org.nasdanika.models.architecture.impl.ArchitecturePackageImpl Maven / Gradle / Ivy
/**
*/
package org.nasdanika.models.architecture.impl;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EGenericType;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.impl.EPackageImpl;
import org.nasdanika.graph.model.ModelPackage;
import org.nasdanika.models.architecture.Actor;
import org.nasdanika.models.architecture.ArchitectureDescription;
import org.nasdanika.models.architecture.ArchitectureDescriptionElement;
import org.nasdanika.models.architecture.ArchitectureElement;
import org.nasdanika.models.architecture.ArchitectureFactory;
import org.nasdanika.models.architecture.ArchitecturePackage;
import org.nasdanika.models.architecture.CompositeNode;
import org.nasdanika.models.architecture.CompositeRelationshipSource;
import org.nasdanika.models.architecture.CompositeRelationshipTarget;
import org.nasdanika.models.architecture.Domain;
import org.nasdanika.models.architecture.Node;
import org.nasdanika.models.architecture.PartyActor;
import org.nasdanika.models.architecture.PersonActor;
import org.nasdanika.models.architecture.Relationship;
import org.nasdanika.models.architecture.RelationshipSource;
import org.nasdanika.models.architecture.RelationshipTarget;
import org.nasdanika.models.architecture.Role;
import org.nasdanika.models.architecture.Tunnel;
import org.nasdanika.models.architecture.Undergoer;
import org.nasdanika.models.architecture.c4.C4Package;
import org.nasdanika.models.architecture.c4.impl.C4PackageImpl;
import org.nasdanika.models.party.PartyPackage;
import org.nasdanika.ncore.NcorePackage;
/**
*
* An implementation of the model Package.
*
* @generated
*/
public class ArchitecturePackageImpl extends EPackageImpl implements ArchitecturePackage {
/**
*
*
* @generated
*/
private EClass architectureElementEClass = null;
/**
*
*
* @generated
*/
private EClass actorEClass = null;
/**
*
*
* @generated
*/
private EClass partyActorEClass = null;
/**
*
*
* @generated
*/
private EClass personActorEClass = null;
/**
*
*
* @generated
*/
private EClass roleEClass = null;
/**
*
*
* @generated
*/
private EClass undergoerEClass = null;
/**
*
*
* @generated
*/
private EClass architectureDescriptionElementEClass = null;
/**
*
*
* @generated
*/
private EClass architectureDescriptionEClass = null;
/**
*
*
* @generated
*/
private EClass domainEClass = null;
/**
*
*
* @generated
*/
private EClass relationshipTargetEClass = null;
/**
*
*
* @generated
*/
private EClass compositeRelationshipTargetEClass = null;
/**
*
*
* @generated
*/
private EClass relationshipEClass = null;
/**
*
*
* @generated
*/
private EClass relationshipSourceEClass = null;
/**
*
*
* @generated
*/
private EClass compositeRelationshipSourceEClass = null;
/**
*
*
* @generated
*/
private EClass nodeEClass = null;
/**
*
*
* @generated
*/
private EClass compositeNodeEClass = null;
/**
*
*
* @generated
*/
private EClass tunnelEClass = null;
/**
* Creates an instance of the model Package, registered with
* {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
* package URI value.
* Note: the correct way to create the package is via the static
* factory method {@link #init init()}, which also performs
* initialization of the package, or returns the registered package,
* if one already exists.
*
*
* @see org.eclipse.emf.ecore.EPackage.Registry
* @see org.nasdanika.models.architecture.ArchitecturePackage#eNS_URI
* @see #init()
* @generated
*/
private ArchitecturePackageImpl() {
super(eNS_URI, ArchitectureFactory.eINSTANCE);
}
/**
*
*
* @generated
*/
private static boolean isInited = false;
/**
* Creates, registers, and initializes the Package for this model, and for any others upon which it depends.
*
*
This method is used to initialize {@link ArchitecturePackage#eINSTANCE} when that field is accessed.
* Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
*
*
* @see #eNS_URI
* @see #createPackageContents()
* @see #initializePackageContents()
* @generated
*/
public static ArchitecturePackage init() {
if (isInited) return (ArchitecturePackage)EPackage.Registry.INSTANCE.getEPackage(ArchitecturePackage.eNS_URI);
// Obtain or create and register package
Object registeredArchitecturePackage = EPackage.Registry.INSTANCE.get(eNS_URI);
ArchitecturePackageImpl theArchitecturePackage = registeredArchitecturePackage instanceof ArchitecturePackageImpl ? (ArchitecturePackageImpl)registeredArchitecturePackage : new ArchitecturePackageImpl();
isInited = true;
// Initialize simple dependencies
org.nasdanika.drawio.model.ModelPackage.eINSTANCE.eClass();
ModelPackage.eINSTANCE.eClass();
NcorePackage.eINSTANCE.eClass();
PartyPackage.eINSTANCE.eClass();
// Obtain or create and register interdependencies
Object registeredPackage = EPackage.Registry.INSTANCE.getEPackage(C4Package.eNS_URI);
C4PackageImpl theC4Package = (C4PackageImpl)(registeredPackage instanceof C4PackageImpl ? registeredPackage : C4Package.eINSTANCE);
// Create package meta-data objects
theArchitecturePackage.createPackageContents();
theC4Package.createPackageContents();
// Initialize created meta-data
theArchitecturePackage.initializePackageContents();
theC4Package.initializePackageContents();
// Mark meta-data to indicate it can't be changed
theArchitecturePackage.freeze();
// Update the registry and return the package
EPackage.Registry.INSTANCE.put(ArchitecturePackage.eNS_URI, theArchitecturePackage);
return theArchitecturePackage;
}
/**
*
*
* @generated
*/
@Override
public EClass getArchitectureElement() {
return architectureElementEClass;
}
/**
*
*
* @generated
*/
@Override
public EAttribute getArchitectureElement_Icon() {
return (EAttribute)architectureElementEClass.getEStructuralFeatures().get(0);
}
/**
*
*
* @generated
*/
@Override
public EClass getActor() {
return actorEClass;
}
/**
*
*
* @generated
*/
@Override
public EReference getActor_Roles() {
return (EReference)actorEClass.getEStructuralFeatures().get(0);
}
/**
*
*
* @generated
*/
@Override
public EClass getPartyActor() {
return partyActorEClass;
}
/**
*
*
* @generated
*/
@Override
public EClass getPersonActor() {
return personActorEClass;
}
/**
*
*
* @generated
*/
@Override
public EClass getRole() {
return roleEClass;
}
/**
*
*
* @generated
*/
@Override
public EReference getRole_Actors() {
return (EReference)roleEClass.getEStructuralFeatures().get(0);
}
/**
*
*
* @generated
*/
@Override
public EReference getRole_Extends() {
return (EReference)roleEClass.getEStructuralFeatures().get(1);
}
/**
*
*
* @generated
*/
@Override
public EReference getRole_Extensions() {
return (EReference)roleEClass.getEStructuralFeatures().get(2);
}
/**
*
*
* @generated
*/
@Override
public EClass getUndergoer() {
return undergoerEClass;
}
/**
*
*
* @generated
*/
@Override
public EReference getUndergoer_Roles() {
return (EReference)undergoerEClass.getEStructuralFeatures().get(0);
}
/**
*
*
* @generated
*/
@Override
public EClass getArchitectureDescriptionElement() {
return architectureDescriptionElementEClass;
}
/**
*
*
* @generated
*/
@Override
public EClass getArchitectureDescription() {
return architectureDescriptionEClass;
}
/**
*
*
* @generated
*/
@Override
public EReference getArchitectureDescription_Actors() {
return (EReference)architectureDescriptionEClass.getEStructuralFeatures().get(0);
}
/**
*
*
* @generated
*/
@Override
public EClass getDomain() {
return domainEClass;
}
/**
*
*
* @generated
*/
@Override
public EClass getRelationshipTarget() {
return relationshipTargetEClass;
}
/**
*
*
* @generated
*/
@Override
public EClass getCompositeRelationshipTarget() {
return compositeRelationshipTargetEClass;
}
/**
*
*
* @generated
*/
@Override
public EClass getRelationship() {
return relationshipEClass;
}
/**
*
*
* @generated
*/
@Override
public EClass getRelationshipSource() {
return relationshipSourceEClass;
}
/**
*
*
* @generated
*/
@Override
public EClass getCompositeRelationshipSource() {
return compositeRelationshipSourceEClass;
}
/**
*
*
* @generated
*/
@Override
public EClass getNode() {
return nodeEClass;
}
/**
*
*
* @generated
*/
@Override
public EClass getCompositeNode() {
return compositeNodeEClass;
}
/**
*
*
* @generated
*/
@Override
public EClass getTunnel() {
return tunnelEClass;
}
/**
*
*
* @generated
*/
@Override
public ArchitectureFactory getArchitectureFactory() {
return (ArchitectureFactory)getEFactoryInstance();
}
/**
*
*
* @generated
*/
private boolean isCreated = false;
/**
* Creates the meta-model objects for the package. This method is
* guarded to have no affect on any invocation but its first.
*
*
* @generated
*/
public void createPackageContents() {
if (isCreated) return;
isCreated = true;
// Create classes and their features
architectureElementEClass = createEClass(ARCHITECTURE_ELEMENT);
createEAttribute(architectureElementEClass, ARCHITECTURE_ELEMENT__ICON);
actorEClass = createEClass(ACTOR);
createEReference(actorEClass, ACTOR__ROLES);
partyActorEClass = createEClass(PARTY_ACTOR);
personActorEClass = createEClass(PERSON_ACTOR);
roleEClass = createEClass(ROLE);
createEReference(roleEClass, ROLE__ACTORS);
createEReference(roleEClass, ROLE__EXTENDS);
createEReference(roleEClass, ROLE__EXTENSIONS);
undergoerEClass = createEClass(UNDERGOER);
createEReference(undergoerEClass, UNDERGOER__ROLES);
architectureDescriptionElementEClass = createEClass(ARCHITECTURE_DESCRIPTION_ELEMENT);
architectureDescriptionEClass = createEClass(ARCHITECTURE_DESCRIPTION);
createEReference(architectureDescriptionEClass, ARCHITECTURE_DESCRIPTION__ACTORS);
domainEClass = createEClass(DOMAIN);
relationshipTargetEClass = createEClass(RELATIONSHIP_TARGET);
compositeRelationshipTargetEClass = createEClass(COMPOSITE_RELATIONSHIP_TARGET);
relationshipEClass = createEClass(RELATIONSHIP);
relationshipSourceEClass = createEClass(RELATIONSHIP_SOURCE);
compositeRelationshipSourceEClass = createEClass(COMPOSITE_RELATIONSHIP_SOURCE);
nodeEClass = createEClass(NODE);
compositeNodeEClass = createEClass(COMPOSITE_NODE);
tunnelEClass = createEClass(TUNNEL);
}
/**
*
*
* @generated
*/
private boolean isInitialized = false;
/**
* Complete the initialization of the package and its meta-model. This
* method is guarded to have no affect on any invocation but its first.
*
*
* @generated
*/
public void initializePackageContents() {
if (isInitialized) return;
isInitialized = true;
// Initialize package
setName(eNAME);
setNsPrefix(eNS_PREFIX);
setNsURI(eNS_URI);
// Obtain other dependent packages
C4Package theC4Package = (C4Package)EPackage.Registry.INSTANCE.getEPackage(C4Package.eNS_URI);
NcorePackage theNcorePackage = (NcorePackage)EPackage.Registry.INSTANCE.getEPackage(NcorePackage.eNS_URI);
PartyPackage thePartyPackage = (PartyPackage)EPackage.Registry.INSTANCE.getEPackage(PartyPackage.eNS_URI);
ModelPackage theModelPackage_1 = (ModelPackage)EPackage.Registry.INSTANCE.getEPackage(ModelPackage.eNS_URI);
// Add subpackages
getESubpackages().add(theC4Package);
// Create type parameters
// Set bounds for type parameters
// Add supertypes to classes
architectureElementEClass.getESuperTypes().add(theNcorePackage.getDocumentedNamedElement());
architectureElementEClass.getESuperTypes().add(theNcorePackage.getPeriod());
actorEClass.getESuperTypes().add(this.getArchitectureElement());
actorEClass.getESuperTypes().add(theNcorePackage.getStringIdentity());
partyActorEClass.getESuperTypes().add(this.getActor());
partyActorEClass.getESuperTypes().add(thePartyPackage.getParty());
personActorEClass.getESuperTypes().add(this.getPartyActor());
personActorEClass.getESuperTypes().add(thePartyPackage.getPerson());
roleEClass.getESuperTypes().add(this.getArchitectureElement());
roleEClass.getESuperTypes().add(theNcorePackage.getStringIdentity());
architectureDescriptionElementEClass.getESuperTypes().add(theModelPackage_1.getDocumentedNamedGraphElement());
architectureDescriptionElementEClass.getESuperTypes().add(this.getArchitectureElement());
architectureDescriptionElementEClass.getESuperTypes().add(this.getUndergoer());
EGenericType g1 = createEGenericType(theModelPackage_1.getDocumentedNamedGraph());
EGenericType g2 = createEGenericType(this.getArchitectureDescriptionElement());
g1.getETypeArguments().add(g2);
architectureDescriptionEClass.getEGenericSuperTypes().add(g1);
g1 = createEGenericType(this.getArchitectureElement());
architectureDescriptionEClass.getEGenericSuperTypes().add(g1);
g1 = createEGenericType(this.getUndergoer());
architectureDescriptionEClass.getEGenericSuperTypes().add(g1);
domainEClass.getESuperTypes().add(this.getArchitectureDescriptionElement());
domainEClass.getESuperTypes().add(this.getArchitectureDescription());
g1 = createEGenericType(this.getArchitectureDescriptionElement());
relationshipTargetEClass.getEGenericSuperTypes().add(g1);
g1 = createEGenericType(theModelPackage_1.getDocumentedNamedConnectionTarget());
g2 = createEGenericType(this.getRelationship());
g1.getETypeArguments().add(g2);
relationshipTargetEClass.getEGenericSuperTypes().add(g1);
compositeRelationshipTargetEClass.getESuperTypes().add(this.getDomain());
compositeRelationshipTargetEClass.getESuperTypes().add(this.getRelationshipTarget());
g1 = createEGenericType(theModelPackage_1.getDocumentedNamedConnection());
g2 = createEGenericType(this.getRelationshipTarget());
g1.getETypeArguments().add(g2);
relationshipEClass.getEGenericSuperTypes().add(g1);
g1 = createEGenericType(this.getArchitectureElement());
relationshipEClass.getEGenericSuperTypes().add(g1);
g1 = createEGenericType(this.getUndergoer());
relationshipEClass.getEGenericSuperTypes().add(g1);
g1 = createEGenericType(theModelPackage_1.getDocumentedNamedConnectionSource());
g2 = createEGenericType(this.getRelationship());
g1.getETypeArguments().add(g2);
relationshipSourceEClass.getEGenericSuperTypes().add(g1);
g1 = createEGenericType(this.getArchitectureDescriptionElement());
relationshipSourceEClass.getEGenericSuperTypes().add(g1);
compositeRelationshipSourceEClass.getESuperTypes().add(this.getDomain());
compositeRelationshipSourceEClass.getESuperTypes().add(this.getRelationshipSource());
nodeEClass.getESuperTypes().add(this.getRelationshipSource());
nodeEClass.getESuperTypes().add(this.getRelationshipTarget());
compositeNodeEClass.getESuperTypes().add(this.getDomain());
compositeNodeEClass.getESuperTypes().add(this.getNode());
g1 = createEGenericType(theModelPackage_1.getDocumentedNamedTunnel());
g2 = createEGenericType(this.getRelationshipTarget());
g1.getETypeArguments().add(g2);
g2 = createEGenericType(this.getRelationship());
g1.getETypeArguments().add(g2);
tunnelEClass.getEGenericSuperTypes().add(g1);
g1 = createEGenericType(this.getRelationship());
tunnelEClass.getEGenericSuperTypes().add(g1);
// Initialize classes, features, and operations; add parameters
initEClass(architectureElementEClass, ArchitectureElement.class, "ArchitectureElement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getArchitectureElement_Icon(), ecorePackage.getEString(), "icon", null, 0, 1, ArchitectureElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(actorEClass, Actor.class, "Actor", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getActor_Roles(), this.getRole(), this.getRole_Actors(), "roles", null, 0, -1, Actor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(partyActorEClass, PartyActor.class, "PartyActor", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(personActorEClass, PersonActor.class, "PersonActor", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(roleEClass, Role.class, "Role", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getRole_Actors(), this.getActor(), this.getActor_Roles(), "actors", null, 0, -1, Role.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getRole_Extends(), this.getRole(), this.getRole_Extensions(), "extends", null, 0, -1, Role.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getRole_Extensions(), this.getRole(), this.getRole_Extends(), "extensions", null, 0, -1, Role.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(undergoerEClass, Undergoer.class, "Undergoer", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getUndergoer_Roles(), this.getRole(), null, "roles", null, 0, -1, Undergoer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
getUndergoer_Roles().getEKeys().add(theNcorePackage.getStringIdentity_Id());
initEClass(architectureDescriptionElementEClass, ArchitectureDescriptionElement.class, "ArchitectureDescriptionElement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(architectureDescriptionEClass, ArchitectureDescription.class, "ArchitectureDescription", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getArchitectureDescription_Actors(), this.getActor(), null, "actors", null, 0, -1, ArchitectureDescription.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
getArchitectureDescription_Actors().getEKeys().add(theNcorePackage.getStringIdentity_Id());
initEClass(domainEClass, Domain.class, "Domain", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(relationshipTargetEClass, RelationshipTarget.class, "RelationshipTarget", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(compositeRelationshipTargetEClass, CompositeRelationshipTarget.class, "CompositeRelationshipTarget", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(relationshipEClass, Relationship.class, "Relationship", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(relationshipSourceEClass, RelationshipSource.class, "RelationshipSource", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(compositeRelationshipSourceEClass, CompositeRelationshipSource.class, "CompositeRelationshipSource", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(nodeEClass, Node.class, "Node", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(compositeNodeEClass, CompositeNode.class, "CompositeNode", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(tunnelEClass, Tunnel.class, "Tunnel", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
// Create resource
createResource(eNS_URI);
// Create annotations
// http://www.eclipse.org/emf/2002/GenModel
createGenModelAnnotations();
}
/**
* Initializes the annotations for http://www.eclipse.org/emf/2002/GenModel.
*
*
* @generated
*/
protected void createGenModelAnnotations() {
String source = "http://www.eclipse.org/emf/2002/GenModel";
addAnnotation
(roleEClass,
source,
new String[] {
"documentation", ""
});
addAnnotation
(getArchitectureDescription_Actors(),
source,
new String[] {
"documentation", "Actors operating on the elements of this architecture description"
});
}
} //ArchitecturePackageImpl