Search in sources :

Example 16 with Namespace

use of org.obeonetwork.dsl.environment.Namespace in project InformationSystem by ObeoNetwork.

the class AbstractTransformationTest method getRootObject.

private EObject getRootObject(URI modelURI) {
    ResourceSet set = getResourceSet();
    Resource resource = set.getResource(modelURI, true);
    for (Iterator<EObject> it = resource.getAllContents(); it.hasNext(); ) {
        EObject object = it.next();
        if (object instanceof TableContainer || object instanceof Root || object instanceof Namespace || object instanceof ScaffoldInfo) {
            return object;
        }
    }
    return null;
}
Also used : Root(org.obeonetwork.dsl.entity.Root) TableContainer(org.obeonetwork.dsl.database.TableContainer) EObject(org.eclipse.emf.ecore.EObject) InternalEObject(org.eclipse.emf.ecore.InternalEObject) XMLResource(org.eclipse.emf.ecore.xmi.XMLResource) Resource(org.eclipse.emf.ecore.resource.Resource) ScaffoldInfo(fr.gouv.mindef.safran.database.scaffold.ScaffoldInfo) ResourceSet(org.eclipse.emf.ecore.resource.ResourceSet) Namespace(org.obeonetwork.dsl.environment.Namespace)

Aggregations

Namespace (org.obeonetwork.dsl.environment.Namespace)16 ArrayList (java.util.ArrayList)5 Root (org.obeonetwork.dsl.entity.Root)5 EObject (org.eclipse.emf.ecore.EObject)4 TableContainer (org.obeonetwork.dsl.database.TableContainer)3 XMLResource (org.eclipse.emf.ecore.xmi.XMLResource)2 Table (org.obeonetwork.dsl.database.Table)2 Entity (org.obeonetwork.dsl.entity.Entity)2 StructuredType (org.obeonetwork.dsl.environment.StructuredType)2 System (org.obeonetwork.dsl.soa.System)2 ScaffoldInfo (fr.gouv.mindef.safran.database.scaffold.ScaffoldInfo)1 Collator (java.text.Collator)1 Collection (java.util.Collection)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1 EReference (org.eclipse.emf.ecore.EReference)1 Setting (org.eclipse.emf.ecore.EStructuralFeature.Setting)1 InternalEObject (org.eclipse.emf.ecore.InternalEObject)1 Resource (org.eclipse.emf.ecore.resource.Resource)1 ResourceSet (org.eclipse.emf.ecore.resource.ResourceSet)1