fr.obeo.acceleo.gen.template.scripts.imports.services
Class EObjectServices


public class EObjectServices
extends java.lang.Object

System services for EObject elements.


Constructor Summary
EObjectServices()
           
 
Method Summary
 java.util.List eAllContents(org.eclipse.emf.ecore.EObject current)
          Gets all the direct contents and indirect contents of this object.
 java.util.List eAllContents(org.eclipse.emf.ecore.EObject current, java.lang.String type)
          Gets all the direct contents and indirect contents of the object.
 org.eclipse.emf.ecore.EObject eClass(org.eclipse.emf.ecore.EObject current)
          Gets the metamodel class of an EObject.
 org.eclipse.emf.ecore.EObject eContainer(org.eclipse.emf.ecore.EObject current)
          Gets the container of an EObject.
 org.eclipse.emf.ecore.EObject eContainer(org.eclipse.emf.ecore.EObject current, java.lang.String type)
          Gets recursively the container of an EObject.
 org.eclipse.emf.ecore.EStructuralFeature eContainingFeature(org.eclipse.emf.ecore.EObject current)
          Gets the containing feature of an EObject.
 org.eclipse.emf.ecore.EReference eContainmentFeature(org.eclipse.emf.ecore.EObject current)
          Gets the containment feature of an EObject.
 org.eclipse.emf.common.util.EList eContents(org.eclipse.emf.ecore.EObject current)
          Gets the children of an EObject.
 java.util.List eCrossReferences(org.eclipse.emf.ecore.EObject current)
          Gets the cross referenced objects.
 java.lang.String eResource(org.eclipse.emf.ecore.EObject current)
          Gets the resource of an EObject.
 org.eclipse.emf.ecore.EObject load(fr.obeo.acceleo.gen.template.eval.ENode node, java.lang.String path)
          Loads the root element of the given model.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EObjectServices

public EObjectServices()
Method Detail

eAllContents

public java.util.List eAllContents(org.eclipse.emf.ecore.EObject current)
Gets all the direct contents and indirect contents of this object.

Parameters:
current - is the object
Returns:
the contents

eAllContents

public java.util.List eAllContents(org.eclipse.emf.ecore.EObject current,
                                   java.lang.String type)
                            throws fr.obeo.acceleo.ecore.factories.FactoryException
Gets all the direct contents and indirect contents of the object.

Parameters:
current - is the object
type - is the type of the objects to select
Returns:
the contents
Throws:
fr.obeo.acceleo.ecore.factories.FactoryException

eClass

public org.eclipse.emf.ecore.EObject eClass(org.eclipse.emf.ecore.EObject current)
Gets the metamodel class of an EObject.

Parameters:
current - is the object
Returns:
the metamodel class

eContainer

public org.eclipse.emf.ecore.EObject eContainer(org.eclipse.emf.ecore.EObject current)
Gets the container of an EObject.

Parameters:
current - is the object
Returns:
the container

eContainer

public org.eclipse.emf.ecore.EObject eContainer(org.eclipse.emf.ecore.EObject current,
                                                java.lang.String type)
                                         throws fr.obeo.acceleo.ecore.factories.FactoryException
Gets recursively the container of an EObject. The recursivity is stopped when an element of the given type is found.

Throws:
fr.obeo.acceleo.ecore.factories.FactoryException

eContainingFeature

public org.eclipse.emf.ecore.EStructuralFeature eContainingFeature(org.eclipse.emf.ecore.EObject current)
Gets the containing feature of an EObject.

Parameters:
current - is the object
Returns:
the containing feature

eContainmentFeature

public org.eclipse.emf.ecore.EReference eContainmentFeature(org.eclipse.emf.ecore.EObject current)
Gets the containment feature of an EObject.

Parameters:
current - is the object
Returns:
the containment feature

eContents

public org.eclipse.emf.common.util.EList eContents(org.eclipse.emf.ecore.EObject current)
Gets the children of an EObject.

Parameters:
current - is the object
Returns:
the children

eCrossReferences

public java.util.List eCrossReferences(org.eclipse.emf.ecore.EObject current)
Gets the cross referenced objects.

Parameters:
current - is the object
Returns:
the cross referenced objects

eResource

public java.lang.String eResource(org.eclipse.emf.ecore.EObject current)
Gets the resource of an EObject.

Parameters:
current - is the object
Returns:
the resource

load

public org.eclipse.emf.ecore.EObject load(fr.obeo.acceleo.gen.template.eval.ENode node,
                                          java.lang.String path)
Loads the root element of the given model.

Parameters:
node - is the current node
path - is the path of the model to load
Returns:
the root element of the model