package constraints.test.structure;
/*Generated by MPS */
import jetbrains.mps.smodel.runtime.BaseStructureAspectDescriptor;
import jetbrains.mps.smodel.runtime.ConceptDescriptor;
import java.util.Collection;
import java.util.Arrays;
import org.jetbrains.annotations.Nullable;
import jetbrains.mps.smodel.adapter.ids.SConceptId;
import org.jetbrains.mps.openapi.language.SAbstractConcept;
import jetbrains.mps.smodel.runtime.impl.ConceptDescriptorBuilder2;
public class StructureAspectDescriptor extends BaseStructureAspectDescriptor {
/*package*/ final ConceptDescriptor myConceptBase = createDescriptorForBase();
/*package*/ final ConceptDescriptor myConceptCanBeAncestorFail = createDescriptorForCanBeAncestorFail();
/*package*/ final ConceptDescriptor myConceptCanBeChildFail = createDescriptorForCanBeChildFail();
/*package*/ final ConceptDescriptor myConceptCanBeParentFail = createDescriptorForCanBeParentFail();
/*package*/ final ConceptDescriptor myConceptChild = createDescriptorForChild();
/*package*/ final ConceptDescriptor myConceptConcept_CC = createDescriptorForConcept_CC();
/*package*/ final ConceptDescriptor myConceptConcept_CI = createDescriptorForConcept_CI();
/*package*/ final ConceptDescriptor myConceptConcept_II = createDescriptorForConcept_II();
/*package*/ final ConceptDescriptor myConceptContainer = createDescriptorForContainer();
/*package*/ final ConceptDescriptor myConceptDerived1_Constrained = createDescriptorForDerived1_Constrained();
/*package*/ final ConceptDescriptor myConceptDerived1_Inherited = createDescriptorForDerived1_Inherited();
/*package*/ final ConceptDescriptor myConceptDerived2_Constrained = createDescriptorForDerived2_Constrained();
/*package*/ final ConceptDescriptor myConceptDerived2_Inherited = createDescriptorForDerived2_Inherited();
private final LanguageConceptSwitch myConceptIndex;
public StructureAspectDescriptor() {
myConceptIndex = new LanguageConceptSwitch();
}
@Override
public Collection<ConceptDescriptor> getDescriptors() {
return Arrays.asList(myConceptBase, myConceptCanBeAncestorFail, myConceptCanBeChildFail, myConceptCanBeParentFail, myConceptChild, myConceptConcept_CC, myConceptConcept_CI, myConceptConcept_II, myConceptContainer, myConceptDerived1_Constrained, myConceptDerived1_Inherited, myConceptDerived2_Constrained, myConceptDerived2_Inherited);
}
@Override
@Nullable
public ConceptDescriptor getDescriptor(SConceptId id) {
switch (myConceptIndex.index(id)) {
case LanguageConceptSwitch.Base:
return myConceptBase;
case LanguageConceptSwitch.CanBeAncestorFail:
return myConceptCanBeAncestorFail;
case LanguageConceptSwitch.CanBeChildFail:
return myConceptCanBeChildFail;
case LanguageConceptSwitch.CanBeParentFail:
return myConceptCanBeParentFail;
case LanguageConceptSwitch.Child:
return myConceptChild;
case LanguageConceptSwitch.Concept_CC:
return myConceptConcept_CC;
case LanguageConceptSwitch.Concept_CI:
return myConceptConcept_CI;
case LanguageConceptSwitch.Concept_II:
return myConceptConcept_II;
case LanguageConceptSwitch.Container:
return myConceptContainer;
case LanguageConceptSwitch.Derived1_Constrained:
return myConceptDerived1_Constrained;
case LanguageConceptSwitch.Derived1_Inherited:
return myConceptDerived1_Inherited;
case LanguageConceptSwitch.Derived2_Constrained:
return myConceptDerived2_Constrained;
case LanguageConceptSwitch.Derived2_Inherited:
return myConceptDerived2_Inherited;
default:
return null;
}
}
/*package*/ int internalIndex(SAbstractConcept c) {
return myConceptIndex.index(c);
}
private static ConceptDescriptor createDescriptorForBase() {
ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("constraints.test", "Base", 0x2b80057037584c14L, 0x86fb871266fb9d11L, 0x50b9acb92ed730ffL);
b.interface_();
b.origin("r:35917c6a-b8ff-491f-83ca-d36ca2c36595(constraints.test.structure)/5816870305080488191");
return b.create();
}
private static ConceptDescriptor createDescriptorForCanBeAncestorFail() {
ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("constraints.test", "CanBeAncestorFail", 0x2b80057037584c14L, 0x86fb871266fb9d11L, 0x7438d976714223ebL);
b.class_(false, false, false);
b.origin("r:35917c6a-b8ff-491f-83ca-d36ca2c36595(constraints.test.structure)/8374682609824965611");
b.aggregate("child", 0x7438d976714223edL).target(0x2b80057037584c14L, 0x86fb871266fb9d11L, 0xa2290b8b60493a1L).optional(true).ordered(true).multiple(false).origin("8374682609824965613").done();
return b.create();
}
private static ConceptDescriptor createDescriptorForCanBeChildFail() {
ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("constraints.test", "CanBeChildFail", 0x2b80057037584c14L, 0x86fb871266fb9d11L, 0x7438d976714223eaL);
b.class_(false, false, false);
b.origin("r:35917c6a-b8ff-491f-83ca-d36ca2c36595(constraints.test.structure)/8374682609824965610");
return b.create();
}
private static ConceptDescriptor createDescriptorForCanBeParentFail() {
ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("constraints.test", "CanBeParentFail", 0x2b80057037584c14L, 0x86fb871266fb9d11L, 0x7438d976714223ecL);
b.class_(false, false, false);
b.origin("r:35917c6a-b8ff-491f-83ca-d36ca2c36595(constraints.test.structure)/8374682609824965612");
b.aggregate("child", 0x7438d976714223f8L).target(0x2b80057037584c14L, 0x86fb871266fb9d11L, 0xa2290b8b60493a1L).optional(true).ordered(true).multiple(false).origin("8374682609824965624").done();
return b.create();
}
private static ConceptDescriptor createDescriptorForChild() {
ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("constraints.test", "Child", 0x2b80057037584c14L, 0x86fb871266fb9d11L, 0xa2290b8b60493a1L);
b.class_(false, false, false);
b.origin("r:35917c6a-b8ff-491f-83ca-d36ca2c36595(constraints.test.structure)/730305212589577121");
return b.create();
}
private static ConceptDescriptor createDescriptorForConcept_CC() {
ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("constraints.test", "Concept_CC", 0x2b80057037584c14L, 0x86fb871266fb9d11L, 0x50b9acb92ed7a75fL);
b.class_(false, false, false);
b.parent(0x2b80057037584c14L, 0x86fb871266fb9d11L, 0x50b9acb92ed73116L);
b.parent(0x2b80057037584c14L, 0x86fb871266fb9d11L, 0x50b9acb92ed73112L);
b.origin("r:35917c6a-b8ff-491f-83ca-d36ca2c36595(constraints.test.structure)/5816870305080518495");
b.alias("CF - composition of D1 & D2 CFs");
return b.create();
}
private static ConceptDescriptor createDescriptorForConcept_CI() {
ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("constraints.test", "Concept_CI", 0x2b80057037584c14L, 0x86fb871266fb9d11L, 0x50b9acb92ed7a775L);
b.class_(false, false, false);
b.parent(0x2b80057037584c14L, 0x86fb871266fb9d11L, 0x50b9acb92ed73116L);
b.parent(0x2b80057037584c14L, 0x86fb871266fb9d11L, 0x50b9acb92ed73124L);
b.origin("r:35917c6a-b8ff-491f-83ca-d36ca2c36595(constraints.test.structure)/5816870305080518517");
return b.create();
}
private static ConceptDescriptor createDescriptorForConcept_II() {
ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("constraints.test", "Concept_II", 0x2b80057037584c14L, 0x86fb871266fb9d11L, 0x50b9acb92ed7a785L);
b.class_(false, false, false);
b.parent(0x2b80057037584c14L, 0x86fb871266fb9d11L, 0x50b9acb92ed7311cL);
b.parent(0x2b80057037584c14L, 0x86fb871266fb9d11L, 0x50b9acb92ed73124L);
b.origin("r:35917c6a-b8ff-491f-83ca-d36ca2c36595(constraints.test.structure)/5816870305080518533");
b.alias("CF - composition of D1 & D2 CFs. D2 & D1 inherites Base CF. Hence, CF - Base CF ");
return b.create();
}
private static ConceptDescriptor createDescriptorForContainer() {
ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("constraints.test", "Container", 0x2b80057037584c14L, 0x86fb871266fb9d11L, 0x50b9acb92ed730f4L);
b.class_(false, false, false);
b.origin("r:35917c6a-b8ff-491f-83ca-d36ca2c36595(constraints.test.structure)/5816870305080488180");
b.prop("triggerBase", 0x50b9acb92ed73128L, "5816870305080488232");
b.prop("triggerD1", 0x50b9acb92ed7312aL, "5816870305080488234");
b.prop("triggerD2", 0x50b9acb92ed7312dL, "5816870305080488237");
b.aggregate("node", 0x50b9acb92ed73126L).target(0x2b80057037584c14L, 0x86fb871266fb9d11L, 0x50b9acb92ed730ffL).optional(true).ordered(true).multiple(false).origin("5816870305080488230").done();
return b.create();
}
private static ConceptDescriptor createDescriptorForDerived1_Constrained() {
ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("constraints.test", "Derived1_Constrained", 0x2b80057037584c14L, 0x86fb871266fb9d11L, 0x50b9acb92ed73116L);
b.interface_();
b.parent(0x2b80057037584c14L, 0x86fb871266fb9d11L, 0x50b9acb92ed730ffL);
b.origin("r:35917c6a-b8ff-491f-83ca-d36ca2c36595(constraints.test.structure)/5816870305080488214");
return b.create();
}
private static ConceptDescriptor createDescriptorForDerived1_Inherited() {
ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("constraints.test", "Derived1_Inherited", 0x2b80057037584c14L, 0x86fb871266fb9d11L, 0x50b9acb92ed7311cL);
b.interface_();
b.parent(0x2b80057037584c14L, 0x86fb871266fb9d11L, 0x50b9acb92ed730ffL);
b.origin("r:35917c6a-b8ff-491f-83ca-d36ca2c36595(constraints.test.structure)/5816870305080488220");
return b.create();
}
private static ConceptDescriptor createDescriptorForDerived2_Constrained() {
ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("constraints.test", "Derived2_Constrained", 0x2b80057037584c14L, 0x86fb871266fb9d11L, 0x50b9acb92ed73112L);
b.interface_();
b.parent(0x2b80057037584c14L, 0x86fb871266fb9d11L, 0x50b9acb92ed730ffL);
b.origin("r:35917c6a-b8ff-491f-83ca-d36ca2c36595(constraints.test.structure)/5816870305080488210");
return b.create();
}
private static ConceptDescriptor createDescriptorForDerived2_Inherited() {
ConceptDescriptorBuilder2 b = new ConceptDescriptorBuilder2("constraints.test", "Derived2_Inherited", 0x2b80057037584c14L, 0x86fb871266fb9d11L, 0x50b9acb92ed73124L);
b.interface_();
b.parent(0x2b80057037584c14L, 0x86fb871266fb9d11L, 0x50b9acb92ed730ffL);
b.origin("r:35917c6a-b8ff-491f-83ca-d36ca2c36595(constraints.test.structure)/5816870305080488228");
return b.create();
}
}