org.umlg.concretetest.God Maven / Gradle / Ivy
The newest version!
package org.umlg.concretetest;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.commons.text.StringEscapeUtils;
import org.apache.tinkerpop.gremlin.process.traversal.Compare;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
import org.apache.tinkerpop.gremlin.structure.Direction;
import org.apache.tinkerpop.gremlin.structure.Edge;
import org.apache.tinkerpop.gremlin.structure.Element;
import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.umlg.collectiontest.Dream;
import org.umlg.collectiontest.Fantasy;
import org.umlg.collectiontest.Fantasy.FantasyRuntimePropertyEnum;
import org.umlg.collectiontest.Foot;
import org.umlg.collectiontest.Hand;
import org.umlg.collectiontest.Nightmare;
import org.umlg.collectiontest.Nightmare.NightmareRuntimePropertyEnum;
import org.umlg.collectiontest.World;
import org.umlg.collectiontest.World.WorldRuntimePropertyEnum;
import org.umlg.componenttest.ValidationTest;
import org.umlg.componenttest.ValidationTest.ValidationTestRuntimePropertyEnum;
import org.umlg.concretetest.Angel.AngelRuntimePropertyEnum;
import org.umlg.concretetest.Demon.DemonRuntimePropertyEnum;
import org.umlg.concretetest.God.GodRuntimePropertyEnum;
import org.umlg.concretetest.Universe.UniverseRuntimePropertyEnum;
import org.umlg.embeddedtest.REASON;
import org.umlg.embeddedtest.TestEmbedded;
import org.umlg.embeddedtest.TestEmbedded.TestEmbeddedRuntimePropertyEnum;
import org.umlg.embeddedtest.TestOrderedEnumeration;
import org.umlg.embeddedtest.TestOrderedEnumeration.TestOrderedEnumerationRuntimePropertyEnum;
import org.umlg.hierarchytest.FakeRootFolder;
import org.umlg.hierarchytest.FakeRootFolder.FakeRootFolderRuntimePropertyEnum;
import org.umlg.hierarchytest.RealRootFolder;
import org.umlg.hierarchytest.RealRootFolder.RealRootFolderRuntimePropertyEnum;
import org.umlg.inheritencetest.AbstractSpecies;
import org.umlg.inheritencetest.AbstractSpecies.AbstractSpeciesRuntimePropertyEnum;
import org.umlg.inheritencetest.Mamal;
import org.umlg.interfacetest.Being;
import org.umlg.interfacetest.Being.BeingRuntimePropertyEnum;
import org.umlg.interfacetest.IMany;
import org.umlg.interfacetest.IMany.IManyRuntimePropertyEnum;
import org.umlg.interfacetest.Spirit;
import org.umlg.interfacetest.Spirit.SpiritRuntimePropertyEnum;
import org.umlg.lookup.Devil1;
import org.umlg.lookup.Devil1.Devil1RuntimePropertyEnum;
import org.umlg.lookup.Level1;
import org.umlg.lookup.Level1.Level1RuntimePropertyEnum;
import org.umlg.lookup.Nevil1;
import org.umlg.lookup.Nevil1.Nevil1RuntimePropertyEnum;
import org.umlg.navigability.NonNavigableMany;
import org.umlg.navigability.NonNavigableMany.NonNavigableManyRuntimePropertyEnum;
import org.umlg.navigability.NonNavigableOne;
import org.umlg.navigability.NonNavigableOne.NonNavigableOneRuntimePropertyEnum;
import org.umlg.onetoone.OneOne;
import org.umlg.onetoone.OneOne.OneOneRuntimePropertyEnum;
import org.umlg.onetoone.OneTwo;
import org.umlg.onetoone.OneTwo.OneTwoRuntimePropertyEnum;
import org.umlg.qualifiertest.Many1;
import org.umlg.qualifiertest.Many1.Many1RuntimePropertyEnum;
import org.umlg.qualifiertest.Many2;
import org.umlg.qualifiertest.Many2.Many2RuntimePropertyEnum;
import org.umlg.qualifiertest.Nature;
import org.umlg.qualifiertest.Nature.NatureRuntimePropertyEnum;
import org.umlg.query.BaseUmlgWithQuery;
import org.umlg.runtime.adaptor.UMLG;
import org.umlg.runtime.adaptor.UmlgLabelConverterFactory;
import org.umlg.runtime.adaptor.UmlgQualifierIdFactory;
import org.umlg.runtime.adaptor.UmlgTmpIdManager;
import org.umlg.runtime.collection.Filter;
import org.umlg.runtime.collection.Multiplicity;
import org.umlg.runtime.collection.Qualifier;
import org.umlg.runtime.collection.UmlgBag;
import org.umlg.runtime.collection.UmlgCollection;
import org.umlg.runtime.collection.UmlgOrderedSet;
import org.umlg.runtime.collection.UmlgQualifiedBag;
import org.umlg.runtime.collection.UmlgQualifiedOrderedSet;
import org.umlg.runtime.collection.UmlgQualifiedSequence;
import org.umlg.runtime.collection.UmlgQualifiedSet;
import org.umlg.runtime.collection.UmlgRuntimeProperty;
import org.umlg.runtime.collection.UmlgSequence;
import org.umlg.runtime.collection.UmlgSet;
import org.umlg.runtime.collection.memory.UmlgMemorySet;
import org.umlg.runtime.collection.persistent.PropertyTree;
import org.umlg.runtime.collection.persistent.UmlgBagClosableIterableImpl;
import org.umlg.runtime.collection.persistent.UmlgBagImpl;
import org.umlg.runtime.collection.persistent.UmlgOrderedSetClosableIterableImpl;
import org.umlg.runtime.collection.persistent.UmlgOrderedSetImpl;
import org.umlg.runtime.collection.persistent.UmlgQualifiedBagImpl;
import org.umlg.runtime.collection.persistent.UmlgQualifiedOrderedSetImpl;
import org.umlg.runtime.collection.persistent.UmlgQualifiedSequenceImpl;
import org.umlg.runtime.collection.persistent.UmlgQualifiedSetImpl;
import org.umlg.runtime.collection.persistent.UmlgSequenceClosableIterableImpl;
import org.umlg.runtime.collection.persistent.UmlgSequenceImpl;
import org.umlg.runtime.collection.persistent.UmlgSetClosableIterableImpl;
import org.umlg.runtime.collection.persistent.UmlgSetImpl;
import org.umlg.runtime.domain.CompositionNode;
import org.umlg.runtime.domain.DataTypeEnum;
import org.umlg.runtime.domain.UmlgNode;
import org.umlg.runtime.domain.UmlgRootNode;
import org.umlg.runtime.domain.json.ToJsonUtil;
import org.umlg.runtime.domain.ocl.OclIsInvalidException;
import org.umlg.runtime.util.ObjectMapperFactory;
import org.umlg.runtime.util.Pair;
import org.umlg.runtime.util.UmlgFormatter;
import org.umlg.runtime.validation.DateTimeValidation;
import org.umlg.runtime.validation.UmlgConstraintViolation;
import org.umlg.runtime.validation.UmlgConstraintViolationException;
import org.umlg.runtime.validation.UmlgValidation;
import org.umlg.tag.Tag;
public class God extends BaseUmlgWithQuery implements UmlgRootNode, CompositionNode {
static final public long serialVersionUID = 1L;
private UmlgSet name;
private UmlgSet universe;
private UmlgSet angel;
private UmlgSet spirit;
private UmlgSet being;
private UmlgSet abstractSpecies;
private UmlgSet iMany;
private UmlgSet embeddedString;
private UmlgSet embeddedInteger;
private UmlgSet realRootFolder;
private UmlgSet fakeRootFolder;
private UmlgSet reason;
private UmlgSet pet;
private UmlgSet animalFarm;
private UmlgQualifiedSet nature;
private UmlgSequence hand;
private UmlgQualifiedSequence foot;
private UmlgOrderedSet world;
private UmlgQualifiedOrderedSet fantasy;
private UmlgSet many1;
private UmlgSet many2;
private UmlgBag dream;
private UmlgQualifiedBag nightmare;
private UmlgSet demon;
private UmlgSet oneOne;
private UmlgSet oneTwo;
private UmlgSet nonNavigableOne;
private UmlgSet nonNavigableMany;
private UmlgSet testBoolean;
private UmlgSet level1;
private UmlgSet devil1;
private UmlgSet nevil1;
private UmlgSet beginning;
private UmlgSet validationTest;
private UmlgSet testEmbedded;
private UmlgSet constraintTest;
private UmlgSet testOrderedEnumeration;
private UmlgSet name2;
private UmlgSet anumber;
private UmlgSet name3;
private UmlgSet rEASON;
private UmlgQualifiedSet memory;
/**
* constructor for God
*
* @param id
*/
public God(Object id) {
super(id);
}
/**
* constructor for God
*
* @param vertex
*/
public God(Vertex vertex) {
super(vertex);
}
/**
* default constructor for God
*/
public God() {
this(true);
}
/**
* constructor for God
*
* @param persistent
*/
public God(Boolean persistent) {
super(persistent);
}
public void addToAbstractSpecies(AbstractSpecies abstractSpecies) {
if ( abstractSpecies != null ) {
abstractSpecies.clearGod();
abstractSpecies.initialiseProperty(AbstractSpeciesRuntimePropertyEnum.god, false, true);
removeFromAbstractSpecies(abstractSpecies);
}
if ( abstractSpecies != null ) {
this.abstractSpecies.add(abstractSpecies);
}
}
public void addToAbstractSpecies(UmlgSet abstractSpecies) {
if ( !abstractSpecies.isEmpty() ) {
this.abstractSpecies.addAll(abstractSpecies);
}
}
public void addToAbstractSpeciesIgnoreInverse(AbstractSpecies abstractSpecies) {
if ( abstractSpecies != null ) {
abstractSpecies.clearGod();
abstractSpecies.initialiseProperty(AbstractSpeciesRuntimePropertyEnum.god, false, true);
removeFromAbstractSpecies(abstractSpecies);
}
if ( abstractSpecies != null ) {
this.abstractSpecies.addIgnoreInverse(abstractSpecies);
}
}
public void addToAngel(Angel angel) {
if ( angel != null ) {
angel.clearGod();
angel.initialiseProperty(AngelRuntimePropertyEnum.god, false, true);
removeFromAngel(angel);
}
if ( angel != null ) {
this.angel.add(angel);
}
}
public void addToAngel(UmlgSet angel) {
if ( !angel.isEmpty() ) {
this.angel.addAll(angel);
}
}
public void addToAngelIgnoreInverse(Angel angel) {
if ( angel != null ) {
angel.clearGod();
angel.initialiseProperty(AngelRuntimePropertyEnum.god, false, true);
removeFromAngel(angel);
}
if ( angel != null ) {
this.angel.addIgnoreInverse(angel);
}
}
public void addToAnimalFarm(Mamal animalFarm) {
if ( animalFarm != null ) {
this.animalFarm.add(animalFarm);
}
}
public void addToAnimalFarm(UmlgSet animalFarm) {
if ( !animalFarm.isEmpty() ) {
this.animalFarm.addAll(animalFarm);
}
}
public void addToAnimalFarmIgnoreInverse(Mamal animalFarm) {
if ( animalFarm != null ) {
this.animalFarm.addIgnoreInverse(animalFarm);
}
}
public void addToAnumber(Double anumber) {
if ( !this.anumber.isEmpty() ) {
throw new RuntimeException("Property is a one and already has value, first clear it before adding!");
}
if ( anumber != null ) {
List violations = validateAnumber(anumber);
if ( violations.isEmpty() ) {
this.anumber.add(anumber);
} else {
throw new UmlgConstraintViolationException(violations);
}
}
}
public void addToAnumberIgnoreInverse(Double anumber) {
if ( !this.anumber.isEmpty() ) {
throw new RuntimeException("Property is a one and already has value, first clear it before adding!");
}
if ( anumber != null ) {
List violations = validateAnumber(anumber);
if ( violations.isEmpty() ) {
this.anumber.add(anumber);
} else {
throw new UmlgConstraintViolationException(violations);
}
}
}
public void addToBeginning(LocalDateTime beginning) {
if ( !this.beginning.isEmpty() ) {
throw new RuntimeException("Property is a one and already has value, first clear it before adding!");
}
if ( beginning != null ) {
List violations = validateBeginning(beginning);
if ( violations.isEmpty() ) {
this.beginning.add(beginning);
} else {
throw new UmlgConstraintViolationException(violations);
}
}
}
public void addToBeginningIgnoreInverse(LocalDateTime beginning) {
if ( !this.beginning.isEmpty() ) {
throw new RuntimeException("Property is a one and already has value, first clear it before adding!");
}
if ( beginning != null ) {
List violations = validateBeginning(beginning);
if ( violations.isEmpty() ) {
this.beginning.add(beginning);
} else {
throw new UmlgConstraintViolationException(violations);
}
}
}
public void addToBeing(Being being) {
if ( being != null ) {
being.clearGod();
being.initialiseProperty(BeingRuntimePropertyEnum.god, false, true);
removeFromBeing(being);
}
if ( being != null ) {
this.being.add(being);
}
}
public void addToBeing(UmlgSet being) {
if ( !being.isEmpty() ) {
this.being.addAll(being);
}
}
public void addToBeingIgnoreInverse(Being being) {
if ( being != null ) {
being.clearGod();
being.initialiseProperty(BeingRuntimePropertyEnum.god, false, true);
removeFromBeing(being);
}
if ( being != null ) {
this.being.addIgnoreInverse(being);
}
}
public void addToConstraintTest(String constraintTest) {
if ( !this.constraintTest.isEmpty() ) {
throw new RuntimeException("Property is a one and already has value, first clear it before adding!");
}
if ( constraintTest != null ) {
List violations = validateConstraintTest(constraintTest);
if ( violations.isEmpty() ) {
this.constraintTest.add(constraintTest);
} else {
throw new UmlgConstraintViolationException(violations);
}
}
}
public void addToConstraintTestIgnoreInverse(String constraintTest) {
if ( !this.constraintTest.isEmpty() ) {
throw new RuntimeException("Property is a one and already has value, first clear it before adding!");
}
if ( constraintTest != null ) {
List violations = validateConstraintTest(constraintTest);
if ( violations.isEmpty() ) {
this.constraintTest.add(constraintTest);
} else {
throw new UmlgConstraintViolationException(violations);
}
}
}
public void addToDemon(Demon demon) {
if ( demon != null ) {
demon.clearGod();
demon.initialiseProperty(DemonRuntimePropertyEnum.god, false, true);
removeFromDemon(demon);
}
if ( demon != null ) {
this.demon.add(demon);
}
}
public void addToDemon(UmlgSet demon) {
if ( !demon.isEmpty() ) {
this.demon.addAll(demon);
}
}
public void addToDemonIgnoreInverse(Demon demon) {
if ( demon != null ) {
demon.clearGod();
demon.initialiseProperty(DemonRuntimePropertyEnum.god, false, true);
removeFromDemon(demon);
}
if ( demon != null ) {
this.demon.addIgnoreInverse(demon);
}
}
public void addToDevil1(Devil1 devil1) {
if ( devil1 != null ) {
devil1.clearGod();
devil1.initialiseProperty(Devil1RuntimePropertyEnum.god, false, true);
removeFromDevil1(devil1);
}
if ( devil1 != null ) {
this.devil1.add(devil1);
}
}
public void addToDevil1(UmlgSet devil1) {
if ( !devil1.isEmpty() ) {
this.devil1.addAll(devil1);
}
}
public void addToDevil1IgnoreInverse(Devil1 devil1) {
if ( devil1 != null ) {
devil1.clearGod();
devil1.initialiseProperty(Devil1RuntimePropertyEnum.god, false, true);
removeFromDevil1(devil1);
}
if ( devil1 != null ) {
this.devil1.addIgnoreInverse(devil1);
}
}
public void addToDream(Dream dream) {
if ( dream != null ) {
this.dream.add(dream);
}
}
public void addToDream(UmlgBag dream) {
if ( !dream.isEmpty() ) {
this.dream.addAll(dream);
}
}
public void addToDreamIgnoreInverse(Dream dream) {
if ( dream != null ) {
this.dream.addIgnoreInverse(dream);
}
}
public void addToEmbeddedInteger(Integer embeddedInteger) {
if ( embeddedInteger != null ) {
List violations = validateEmbeddedInteger(embeddedInteger);
if ( violations.isEmpty() ) {
this.embeddedInteger.add(embeddedInteger);
} else {
throw new UmlgConstraintViolationException(violations);
}
}
}
public void addToEmbeddedInteger(UmlgSet embeddedInteger) {
if ( !embeddedInteger.isEmpty() ) {
this.embeddedInteger.addAll(embeddedInteger);
}
}
public void addToEmbeddedIntegerIgnoreInverse(Integer embeddedInteger) {
if ( embeddedInteger != null ) {
List violations = validateEmbeddedInteger(embeddedInteger);
if ( violations.isEmpty() ) {
this.embeddedInteger.addIgnoreInverse(embeddedInteger);
} else {
throw new UmlgConstraintViolationException(violations);
}
}
}
public void addToEmbeddedString(String embeddedString) {
if ( embeddedString != null ) {
List violations = validateEmbeddedString(embeddedString);
if ( violations.isEmpty() ) {
this.embeddedString.add(embeddedString);
} else {
throw new UmlgConstraintViolationException(violations);
}
}
}
public void addToEmbeddedString(UmlgSet embeddedString) {
if ( !embeddedString.isEmpty() ) {
this.embeddedString.addAll(embeddedString);
}
}
public void addToEmbeddedStringIgnoreInverse(String embeddedString) {
if ( embeddedString != null ) {
List violations = validateEmbeddedString(embeddedString);
if ( violations.isEmpty() ) {
this.embeddedString.addIgnoreInverse(embeddedString);
} else {
throw new UmlgConstraintViolationException(violations);
}
}
}
public void addToFakeRootFolder(FakeRootFolder fakeRootFolder) {
if ( fakeRootFolder != null ) {
fakeRootFolder.clearGod();
fakeRootFolder.initialiseProperty(FakeRootFolderRuntimePropertyEnum.god, false, true);
removeFromFakeRootFolder(fakeRootFolder);
}
if ( fakeRootFolder != null ) {
this.fakeRootFolder.add(fakeRootFolder);
}
}
public void addToFakeRootFolder(UmlgSet fakeRootFolder) {
if ( !fakeRootFolder.isEmpty() ) {
this.fakeRootFolder.addAll(fakeRootFolder);
}
}
public void addToFakeRootFolderIgnoreInverse(FakeRootFolder fakeRootFolder) {
if ( fakeRootFolder != null ) {
fakeRootFolder.clearGod();
fakeRootFolder.initialiseProperty(FakeRootFolderRuntimePropertyEnum.god, false, true);
removeFromFakeRootFolder(fakeRootFolder);
}
if ( fakeRootFolder != null ) {
this.fakeRootFolder.addIgnoreInverse(fakeRootFolder);
}
}
public void addToFantasy(Fantasy fantasy) {
if ( fantasy != null ) {
fantasy.clearGod();
fantasy.initialiseProperty(FantasyRuntimePropertyEnum.god, false, true);
removeFromFantasy(fantasy);
}
if ( fantasy != null ) {
this.fantasy.add(fantasy);
}
}
public void addToFantasy(UmlgOrderedSet fantasy) {
for ( Fantasy _f : fantasy ) {
this.addToFantasy(_f);
}
}
public void addToFantasy(int index, Fantasy fantasy) {
if ( fantasy != null ) {
fantasy.clearGod();
fantasy.initialiseProperty(FantasyRuntimePropertyEnum.god, false, true);
removeFromFantasy(fantasy);
}
if ( fantasy != null ) {
this.fantasy.add(index, fantasy);
}
}
public void addToFantasy(int index, UmlgOrderedSet fantasy) {
for ( Fantasy _f : fantasy ) {
this.addToFantasy(_f);
}
}
public void addToFantasyIgnoreInverse(Fantasy fantasy) {
if ( fantasy != null ) {
fantasy.clearGod();
fantasy.initialiseProperty(FantasyRuntimePropertyEnum.god, false, true);
removeFromFantasy(fantasy);
}
if ( fantasy != null ) {
this.fantasy.addIgnoreInverse(fantasy);
}
}
public void addToFoot(Foot foot) {
if ( foot != null ) {
this.foot.add(foot);
}
}
public void addToFoot(UmlgSequence foot) {
for ( Foot _f : foot ) {
this.addToFoot(_f);
}
}
public void addToFoot(int index, Foot foot) {
if ( foot != null ) {
this.foot.add(index, foot);
}
}
public void addToFoot(int index, UmlgSequence foot) {
for ( Foot _f : foot ) {
this.addToFoot(_f);
}
}
public void addToFootIgnoreInverse(Foot foot) {
if ( foot != null ) {
this.foot.addIgnoreInverse(foot);
}
}
public void addToHand(Hand hand) {
if ( hand != null ) {
this.hand.add(hand);
}
}
public void addToHand(UmlgSequence hand) {
if ( !hand.isEmpty() ) {
this.hand.addAll(hand);
}
}
public void addToHand(int index, Hand hand) {
if ( hand != null ) {
this.hand.add(index, hand);
}
}
public void addToHand(int index, UmlgSequence hand) {
if ( !hand.isEmpty() ) {
this.hand.addAll(hand);
}
}
public void addToHandIgnoreInverse(Hand hand) {
if ( hand != null ) {
this.hand.addIgnoreInverse(hand);
}
}
public void addToIMany(IMany iMany) {
if ( iMany != null ) {
iMany.clearGod();
iMany.initialiseProperty(IManyRuntimePropertyEnum.god, false, true);
removeFromIMany(iMany);
}
if ( iMany != null ) {
this.iMany.add(iMany);
}
}
public void addToIMany(UmlgSet iMany) {
if ( !iMany.isEmpty() ) {
this.iMany.addAll(iMany);
}
}
public void addToIManyIgnoreInverse(IMany iMany) {
if ( iMany != null ) {
iMany.clearGod();
iMany.initialiseProperty(IManyRuntimePropertyEnum.god, false, true);
removeFromIMany(iMany);
}
if ( iMany != null ) {
this.iMany.addIgnoreInverse(iMany);
}
}
public void addToLevel1(Level1 level1) {
if ( level1 != null ) {
level1.clearGod();
level1.initialiseProperty(Level1RuntimePropertyEnum.god, false, true);
removeFromLevel1(level1);
}
if ( level1 != null ) {
this.level1.add(level1);
}
}
public void addToLevel1(UmlgSet level1) {
if ( !level1.isEmpty() ) {
this.level1.addAll(level1);
}
}
public void addToLevel1IgnoreInverse(Level1 level1) {
if ( level1 != null ) {
level1.clearGod();
level1.initialiseProperty(Level1RuntimePropertyEnum.god, false, true);
removeFromLevel1(level1);
}
if ( level1 != null ) {
this.level1.addIgnoreInverse(level1);
}
}
public void addToMany1(Many1 many1) {
if ( many1 != null ) {
many1.clearGod();
many1.initialiseProperty(Many1RuntimePropertyEnum.god, false, true);
removeFromMany1(many1);
}
if ( many1 != null ) {
this.many1.add(many1);
}
}
public void addToMany1(UmlgSet many1) {
if ( !many1.isEmpty() ) {
this.many1.addAll(many1);
}
}
public void addToMany1IgnoreInverse(Many1 many1) {
if ( many1 != null ) {
many1.clearGod();
many1.initialiseProperty(Many1RuntimePropertyEnum.god, false, true);
removeFromMany1(many1);
}
if ( many1 != null ) {
this.many1.addIgnoreInverse(many1);
}
}
public void addToMany2(Many2 many2) {
if ( many2 != null ) {
many2.clearGod();
many2.initialiseProperty(Many2RuntimePropertyEnum.god, false, true);
removeFromMany2(many2);
}
if ( many2 != null ) {
this.many2.add(many2);
}
}
public void addToMany2(UmlgSet many2) {
if ( !many2.isEmpty() ) {
this.many2.addAll(many2);
}
}
public void addToMany2IgnoreInverse(Many2 many2) {
if ( many2 != null ) {
many2.clearGod();
many2.initialiseProperty(Many2RuntimePropertyEnum.god, false, true);
removeFromMany2(many2);
}
if ( many2 != null ) {
this.many2.addIgnoreInverse(many2);
}
}
public void addToMemory(Nightmare memory) {
if ( memory != null ) {
memory.clearGodOfMemory();
memory.initialiseProperty(NightmareRuntimePropertyEnum.godOfMemory, false, true);
removeFromMemory(memory);
}
if ( memory != null ) {
this.memory.add(memory);
}
}
public void addToMemory(UmlgSet memory) {
for ( Nightmare _m : memory ) {
this.addToMemory(_m);
}
}
public void addToMemoryIgnoreInverse(Nightmare memory) {
if ( memory != null ) {
memory.clearGodOfMemory();
memory.initialiseProperty(NightmareRuntimePropertyEnum.godOfMemory, false, true);
removeFromMemory(memory);
}
if ( memory != null ) {
this.memory.addIgnoreInverse(memory);
}
}
public void addToName(String name) {
if ( !this.name.isEmpty() ) {
throw new RuntimeException("Property is a one and already has value, first clear it before adding!");
}
if ( name != null ) {
List violations = validateName(name);
if ( violations.isEmpty() ) {
this.name.add(name);
} else {
throw new UmlgConstraintViolationException(violations);
}
}
}
public void addToName2(String name2) {
if ( !this.name2.isEmpty() ) {
throw new RuntimeException("Property is a one and already has value, first clear it before adding!");
}
if ( name2 != null ) {
List violations = validateName2(name2);
if ( violations.isEmpty() ) {
this.name2.add(name2);
} else {
throw new UmlgConstraintViolationException(violations);
}
}
}
public void addToName2IgnoreInverse(String name2) {
if ( !this.name2.isEmpty() ) {
throw new RuntimeException("Property is a one and already has value, first clear it before adding!");
}
if ( name2 != null ) {
List violations = validateName2(name2);
if ( violations.isEmpty() ) {
this.name2.add(name2);
} else {
throw new UmlgConstraintViolationException(violations);
}
}
}
public void addToName3(String name3) {
if ( !this.name3.isEmpty() ) {
throw new RuntimeException("Property is a one and already has value, first clear it before adding!");
}
if ( name3 != null ) {
List violations = validateName3(name3);
if ( violations.isEmpty() ) {
this.name3.add(name3);
} else {
throw new UmlgConstraintViolationException(violations);
}
}
}
public void addToName3IgnoreInverse(String name3) {
if ( !this.name3.isEmpty() ) {
throw new RuntimeException("Property is a one and already has value, first clear it before adding!");
}
if ( name3 != null ) {
List violations = validateName3(name3);
if ( violations.isEmpty() ) {
this.name3.add(name3);
} else {
throw new UmlgConstraintViolationException(violations);
}
}
}
public void addToNameIgnoreInverse(String name) {
if ( !this.name.isEmpty() ) {
throw new RuntimeException("Property is a one and already has value, first clear it before adding!");
}
if ( name != null ) {
List violations = validateName(name);
if ( violations.isEmpty() ) {
this.name.add(name);
} else {
throw new UmlgConstraintViolationException(violations);
}
}
}
public void addToNature(Nature nature) {
if ( nature != null ) {
nature.clearGod();
nature.initialiseProperty(NatureRuntimePropertyEnum.god, false, true);
removeFromNature(nature);
}
if ( nature != null ) {
this.nature.add(nature);
}
}
public void addToNature(UmlgSet nature) {
for ( Nature _n : nature ) {
this.addToNature(_n);
}
}
public void addToNatureIgnoreInverse(Nature nature) {
if ( nature != null ) {
nature.clearGod();
nature.initialiseProperty(NatureRuntimePropertyEnum.god, false, true);
removeFromNature(nature);
}
if ( nature != null ) {
this.nature.addIgnoreInverse(nature);
}
}
public void addToNevil1(Nevil1 nevil1) {
if ( nevil1 != null ) {
nevil1.clearGod();
nevil1.initialiseProperty(Nevil1RuntimePropertyEnum.god, false, true);
removeFromNevil1(nevil1);
}
if ( nevil1 != null ) {
this.nevil1.add(nevil1);
}
}
public void addToNevil1(UmlgSet nevil1) {
if ( !nevil1.isEmpty() ) {
this.nevil1.addAll(nevil1);
}
}
public void addToNevil1IgnoreInverse(Nevil1 nevil1) {
if ( nevil1 != null ) {
nevil1.clearGod();
nevil1.initialiseProperty(Nevil1RuntimePropertyEnum.god, false, true);
removeFromNevil1(nevil1);
}
if ( nevil1 != null ) {
this.nevil1.addIgnoreInverse(nevil1);
}
}
public void addToNightmare(Nightmare nightmare) {
if ( nightmare != null ) {
this.nightmare.add(nightmare);
}
}
public void addToNightmare(UmlgBag nightmare) {
for ( Nightmare _n : nightmare ) {
this.addToNightmare(_n);
}
}
public void addToNightmareIgnoreInverse(Nightmare nightmare) {
if ( nightmare != null ) {
this.nightmare.addIgnoreInverse(nightmare);
}
}
public void addToNonNavigableMany(NonNavigableMany nonNavigableMany) {
if ( nonNavigableMany != null ) {
nonNavigableMany.clearGod();
nonNavigableMany.initialiseProperty(NonNavigableManyRuntimePropertyEnum.god, false, true);
removeFromNonNavigableMany(nonNavigableMany);
}
if ( nonNavigableMany != null ) {
this.nonNavigableMany.add(nonNavigableMany);
}
}
public void addToNonNavigableMany(UmlgSet nonNavigableMany) {
if ( !nonNavigableMany.isEmpty() ) {
this.nonNavigableMany.addAll(nonNavigableMany);
}
}
public void addToNonNavigableManyIgnoreInverse(NonNavigableMany nonNavigableMany) {
if ( nonNavigableMany != null ) {
nonNavigableMany.clearGod();
nonNavigableMany.initialiseProperty(NonNavigableManyRuntimePropertyEnum.god, false, true);
removeFromNonNavigableMany(nonNavigableMany);
}
if ( nonNavigableMany != null ) {
this.nonNavigableMany.addIgnoreInverse(nonNavigableMany);
}
}
public void addToNonNavigableOne(NonNavigableOne nonNavigableOne) {
if ( nonNavigableOne != null ) {
nonNavigableOne.clearGod();
nonNavigableOne.initialiseProperty(NonNavigableOneRuntimePropertyEnum.god, false, true);
removeFromNonNavigableOne(nonNavigableOne);
}
if ( nonNavigableOne != null ) {
this.nonNavigableOne.add(nonNavigableOne);
}
}
public void addToNonNavigableOne(UmlgSet nonNavigableOne) {
if ( !nonNavigableOne.isEmpty() ) {
this.nonNavigableOne.addAll(nonNavigableOne);
}
}
public void addToNonNavigableOneIgnoreInverse(NonNavigableOne nonNavigableOne) {
if ( nonNavigableOne != null ) {
nonNavigableOne.clearGod();
nonNavigableOne.initialiseProperty(NonNavigableOneRuntimePropertyEnum.god, false, true);
removeFromNonNavigableOne(nonNavigableOne);
}
if ( nonNavigableOne != null ) {
this.nonNavigableOne.addIgnoreInverse(nonNavigableOne);
}
}
public void addToOneOne(OneOne oneOne) {
if ( oneOne != null ) {
oneOne.clearGod();
oneOne.initialiseProperty(OneOneRuntimePropertyEnum.god, false, true);
removeFromOneOne(oneOne);
}
if ( oneOne != null ) {
this.oneOne.add(oneOne);
}
}
public void addToOneOne(UmlgSet oneOne) {
if ( !oneOne.isEmpty() ) {
this.oneOne.addAll(oneOne);
}
}
public void addToOneOneIgnoreInverse(OneOne oneOne) {
if ( oneOne != null ) {
oneOne.clearGod();
oneOne.initialiseProperty(OneOneRuntimePropertyEnum.god, false, true);
removeFromOneOne(oneOne);
}
if ( oneOne != null ) {
this.oneOne.addIgnoreInverse(oneOne);
}
}
public void addToOneTwo(OneTwo oneTwo) {
if ( oneTwo != null ) {
oneTwo.clearGod();
oneTwo.initialiseProperty(OneTwoRuntimePropertyEnum.god, false, true);
removeFromOneTwo(oneTwo);
}
if ( oneTwo != null ) {
this.oneTwo.add(oneTwo);
}
}
public void addToOneTwo(UmlgSet oneTwo) {
if ( !oneTwo.isEmpty() ) {
this.oneTwo.addAll(oneTwo);
}
}
public void addToOneTwoIgnoreInverse(OneTwo oneTwo) {
if ( oneTwo != null ) {
oneTwo.clearGod();
oneTwo.initialiseProperty(OneTwoRuntimePropertyEnum.god, false, true);
removeFromOneTwo(oneTwo);
}
if ( oneTwo != null ) {
this.oneTwo.addIgnoreInverse(oneTwo);
}
}
public void addToPet(Mamal pet) {
if ( pet != null ) {
if ( !this.pet.isEmpty() ) {
throw new RuntimeException("Property umlgtest::org::umlg::concretetest::God::pet is a one and already has a value!");
}
this.pet.add(pet);
}
}
public void addToPetIgnoreInverse(Mamal pet) {
if ( pet != null ) {
if ( !this.pet.isEmpty() ) {
throw new RuntimeException("Property umlgtest::org::umlg::concretetest::God::pet is a one and already has a value!");
}
this.pet.addIgnoreInverse(pet);
}
}
public void addToREASON(REASON rEASON) {
if ( rEASON != null ) {
List violations = validateREASON(rEASON);
if ( violations.isEmpty() ) {
this.rEASON.add(rEASON);
} else {
throw new UmlgConstraintViolationException(violations);
}
}
}
public void addToREASON(UmlgSet rEASON) {
if ( !rEASON.isEmpty() ) {
this.rEASON.addAll(rEASON);
}
}
public void addToREASONIgnoreInverse(REASON rEASON) {
if ( rEASON != null ) {
List violations = validateREASON(rEASON);
if ( violations.isEmpty() ) {
this.rEASON.addIgnoreInverse(rEASON);
} else {
throw new UmlgConstraintViolationException(violations);
}
}
}
public void addToRealRootFolder(RealRootFolder realRootFolder) {
if ( realRootFolder != null ) {
realRootFolder.clearGod();
realRootFolder.initialiseProperty(RealRootFolderRuntimePropertyEnum.god, false, true);
removeFromRealRootFolder(realRootFolder);
}
if ( realRootFolder != null ) {
this.realRootFolder.add(realRootFolder);
}
}
public void addToRealRootFolder(UmlgSet realRootFolder) {
if ( !realRootFolder.isEmpty() ) {
this.realRootFolder.addAll(realRootFolder);
}
}
public void addToRealRootFolderIgnoreInverse(RealRootFolder realRootFolder) {
if ( realRootFolder != null ) {
realRootFolder.clearGod();
realRootFolder.initialiseProperty(RealRootFolderRuntimePropertyEnum.god, false, true);
removeFromRealRootFolder(realRootFolder);
}
if ( realRootFolder != null ) {
this.realRootFolder.addIgnoreInverse(realRootFolder);
}
}
public void addToReason(REASON reason) {
if ( !this.reason.isEmpty() ) {
throw new RuntimeException("Property is a one and already has value, first clear it before adding!");
}
if ( reason != null ) {
List violations = validateReason(reason);
if ( violations.isEmpty() ) {
this.reason.add(reason);
} else {
throw new UmlgConstraintViolationException(violations);
}
}
}
public void addToReasonIgnoreInverse(REASON reason) {
if ( !this.reason.isEmpty() ) {
throw new RuntimeException("Property is a one and already has value, first clear it before adding!");
}
if ( reason != null ) {
List violations = validateReason(reason);
if ( violations.isEmpty() ) {
this.reason.add(reason);
} else {
throw new UmlgConstraintViolationException(violations);
}
}
}
public void addToSpirit(Spirit spirit) {
if ( spirit != null ) {
spirit.clearGod();
spirit.initialiseProperty(SpiritRuntimePropertyEnum.god, false, true);
removeFromSpirit(spirit);
}
if ( spirit != null ) {
this.spirit.add(spirit);
}
}
public void addToSpirit(UmlgSet spirit) {
if ( !spirit.isEmpty() ) {
this.spirit.addAll(spirit);
}
}
public void addToSpiritIgnoreInverse(Spirit spirit) {
if ( spirit != null ) {
spirit.clearGod();
spirit.initialiseProperty(SpiritRuntimePropertyEnum.god, false, true);
removeFromSpirit(spirit);
}
if ( spirit != null ) {
this.spirit.addIgnoreInverse(spirit);
}
}
public void addToTestBoolean(Boolean testBoolean) {
if ( !this.testBoolean.isEmpty() ) {
throw new RuntimeException("Property is a one and already has value, first clear it before adding!");
}
if ( testBoolean != null ) {
List violations = validateTestBoolean(testBoolean);
if ( violations.isEmpty() ) {
this.testBoolean.add(testBoolean);
} else {
throw new UmlgConstraintViolationException(violations);
}
}
}
public void addToTestBooleanIgnoreInverse(Boolean testBoolean) {
if ( !this.testBoolean.isEmpty() ) {
throw new RuntimeException("Property is a one and already has value, first clear it before adding!");
}
if ( testBoolean != null ) {
List violations = validateTestBoolean(testBoolean);
if ( violations.isEmpty() ) {
this.testBoolean.add(testBoolean);
} else {
throw new UmlgConstraintViolationException(violations);
}
}
}
public void addToTestEmbedded(TestEmbedded testEmbedded) {
if ( testEmbedded != null ) {
testEmbedded.clearGod();
testEmbedded.initialiseProperty(TestEmbeddedRuntimePropertyEnum.god, false, true);
removeFromTestEmbedded(testEmbedded);
}
if ( testEmbedded != null ) {
this.testEmbedded.add(testEmbedded);
}
}
public void addToTestEmbedded(UmlgSet testEmbedded) {
if ( !testEmbedded.isEmpty() ) {
this.testEmbedded.addAll(testEmbedded);
}
}
public void addToTestEmbeddedIgnoreInverse(TestEmbedded testEmbedded) {
if ( testEmbedded != null ) {
testEmbedded.clearGod();
testEmbedded.initialiseProperty(TestEmbeddedRuntimePropertyEnum.god, false, true);
removeFromTestEmbedded(testEmbedded);
}
if ( testEmbedded != null ) {
this.testEmbedded.addIgnoreInverse(testEmbedded);
}
}
public void addToTestOrderedEnumeration(TestOrderedEnumeration testOrderedEnumeration) {
if ( testOrderedEnumeration != null ) {
testOrderedEnumeration.clearGod();
testOrderedEnumeration.initialiseProperty(TestOrderedEnumerationRuntimePropertyEnum.god, false, true);
removeFromTestOrderedEnumeration(testOrderedEnumeration);
}
if ( testOrderedEnumeration != null ) {
this.testOrderedEnumeration.add(testOrderedEnumeration);
}
}
public void addToTestOrderedEnumeration(UmlgSet testOrderedEnumeration) {
if ( !testOrderedEnumeration.isEmpty() ) {
this.testOrderedEnumeration.addAll(testOrderedEnumeration);
}
}
public void addToTestOrderedEnumerationIgnoreInverse(TestOrderedEnumeration testOrderedEnumeration) {
if ( testOrderedEnumeration != null ) {
testOrderedEnumeration.clearGod();
testOrderedEnumeration.initialiseProperty(TestOrderedEnumerationRuntimePropertyEnum.god, false, true);
removeFromTestOrderedEnumeration(testOrderedEnumeration);
}
if ( testOrderedEnumeration != null ) {
this.testOrderedEnumeration.addIgnoreInverse(testOrderedEnumeration);
}
}
public void addToUniverse(UmlgSet universe) {
if ( !universe.isEmpty() ) {
this.universe.addAll(universe);
}
}
public void addToUniverse(Universe universe) {
if ( universe != null ) {
universe.clearGod();
universe.initialiseProperty(UniverseRuntimePropertyEnum.god, false, true);
removeFromUniverse(universe);
}
if ( universe != null ) {
this.universe.add(universe);
}
}
public void addToUniverseIgnoreInverse(Universe universe) {
if ( universe != null ) {
universe.clearGod();
universe.initialiseProperty(UniverseRuntimePropertyEnum.god, false, true);
removeFromUniverse(universe);
}
if ( universe != null ) {
this.universe.addIgnoreInverse(universe);
}
}
public void addToValidationTest(UmlgSet validationTest) {
if ( !validationTest.isEmpty() ) {
this.validationTest.addAll(validationTest);
}
}
public void addToValidationTest(ValidationTest validationTest) {
if ( validationTest != null ) {
validationTest.clearGod();
validationTest.initialiseProperty(ValidationTestRuntimePropertyEnum.god, false, true);
removeFromValidationTest(validationTest);
}
if ( validationTest != null ) {
this.validationTest.add(validationTest);
}
}
public void addToValidationTestIgnoreInverse(ValidationTest validationTest) {
if ( validationTest != null ) {
validationTest.clearGod();
validationTest.initialiseProperty(ValidationTestRuntimePropertyEnum.god, false, true);
removeFromValidationTest(validationTest);
}
if ( validationTest != null ) {
this.validationTest.addIgnoreInverse(validationTest);
}
}
public void addToWorld(UmlgOrderedSet world) {
if ( !world.isEmpty() ) {
this.world.addAll(world);
}
}
public void addToWorld(World world) {
if ( world != null ) {
world.clearGod();
world.initialiseProperty(WorldRuntimePropertyEnum.god, false, true);
removeFromWorld(world);
}
if ( world != null ) {
this.world.add(world);
}
}
public void addToWorld(int index, UmlgOrderedSet world) {
if ( !world.isEmpty() ) {
this.world.addAll(world);
}
}
public void addToWorld(int index, World world) {
if ( world != null ) {
world.clearGod();
world.initialiseProperty(WorldRuntimePropertyEnum.god, false, true);
removeFromWorld(world);
}
if ( world != null ) {
this.world.add(index, world);
}
}
public void addToWorldIgnoreInverse(World world) {
if ( world != null ) {
world.clearGod();
world.initialiseProperty(WorldRuntimePropertyEnum.god, false, true);
removeFromWorld(world);
}
if ( world != null ) {
this.world.addIgnoreInverse(world);
}
}
static public UmlgSet extends God> allInstances(Filter filter) {
UmlgSet result = new UmlgMemorySet();
result.addAll(UMLG.get().allInstances(God.class.getName(), filter));
return result;
}
static public UmlgSet extends God> allInstances() {
UmlgSet result = new UmlgMemorySet();
result.addAll(UMLG.get().allInstances(God.class.getName()));
return result;
}
/**
* Implements the ocl statement for constraint 'ConstraintCheckNameNoX'
*
* package umlgtest::org::umlg::concretetest
* context God inv:
* if not self.constraintTest.oclIsUndefined() then
* self.constraintTest.indexOf('X')=-1
* else
* true
* endif
* endpackage
*
*/
public List checkClassConstraintConstraintCheckNameNoX() {
List result = new ArrayList();
if ( (ifExp0()) == false ) {
result.add(new UmlgConstraintViolation("ConstraintCheckNameNoX", "umlgtest::org::umlg::concretetest::God", "ocl\npackage umlgtest::org::umlg::concretetest\n context God inv:\n if not self.constraintTest.oclIsUndefined() then\n self.constraintTest.indexOf('X')=-1\nelse\n true\nendif \nendpackage\nfails!"));
}
return result;
}
@Override
public List checkClassConstraints() {
List result = new ArrayList();
result.addAll(super.checkClassConstraints());
result.addAll(checkClassConstraintConstraintCheckNameNoX());
return result;
}
public void clearAbstractSpecies() {
this.abstractSpecies.clear();
}
public void clearAngel() {
this.angel.clear();
}
public void clearAnimalFarm() {
this.animalFarm.clear();
}
public void clearAnumber() {
this.anumber.clear();
}
public void clearBeginning() {
this.beginning.clear();
}
public void clearBeing() {
this.being.clear();
}
public void clearConstraintTest() {
this.constraintTest.clear();
}
public void clearDemon() {
this.demon.clear();
}
public void clearDevil1() {
this.devil1.clear();
}
public void clearDream() {
this.dream.clear();
}
public void clearEmbeddedInteger() {
this.embeddedInteger.clear();
}
public void clearEmbeddedString() {
this.embeddedString.clear();
}
public void clearFakeRootFolder() {
this.fakeRootFolder.clear();
}
public void clearFantasy() {
this.fantasy.clear();
}
public void clearFoot() {
this.foot.clear();
}
public void clearHand() {
this.hand.clear();
}
public void clearIMany() {
this.iMany.clear();
}
public void clearLevel1() {
this.level1.clear();
}
public void clearMany1() {
this.many1.clear();
}
public void clearMany2() {
this.many2.clear();
}
public void clearMemory() {
this.memory.clear();
}
public void clearName() {
this.name.clear();
}
public void clearName2() {
this.name2.clear();
}
public void clearName3() {
this.name3.clear();
}
public void clearNature() {
this.nature.clear();
}
public void clearNevil1() {
this.nevil1.clear();
}
public void clearNightmare() {
this.nightmare.clear();
}
public void clearNonNavigableMany() {
this.nonNavigableMany.clear();
}
public void clearNonNavigableOne() {
this.nonNavigableOne.clear();
}
public void clearOneOne() {
this.oneOne.clear();
}
public void clearOneTwo() {
this.oneTwo.clear();
}
public void clearPet() {
this.pet.clear();
}
public void clearREASON() {
this.rEASON.clear();
}
public void clearRealRootFolder() {
this.realRootFolder.clear();
}
public void clearReason() {
this.reason.clear();
}
public void clearSpirit() {
this.spirit.clear();
}
public void clearTestBoolean() {
this.testBoolean.clear();
}
public void clearTestEmbedded() {
this.testEmbedded.clear();
}
public void clearTestOrderedEnumeration() {
this.testOrderedEnumeration.clear();
}
public void clearUniverse() {
this.universe.clear();
}
public void clearValidationTest() {
this.validationTest.clear();
}
public void clearWorld() {
this.world.clear();
}
@Override
public void delete() {
for ( Many1 child : getMany1() ) {
child.delete();
}
for ( TestOrderedEnumeration child : getTestOrderedEnumeration() ) {
child.delete();
}
for ( Nevil1 child : getNevil1() ) {
child.delete();
}
for ( AbstractSpecies child : getAbstractSpecies() ) {
child.delete();
}
for ( Universe child : getUniverse() ) {
child.delete();
}
for ( RealRootFolder child : getRealRootFolder() ) {
child.delete();
}
for ( Nature child : getNature() ) {
child.delete();
}
for ( OneOne child : getOneOne() ) {
child.delete();
}
for ( World child : getWorld() ) {
child.delete();
}
for ( Many2 child : getMany2() ) {
child.delete();
}
for ( Level1 child : getLevel1() ) {
child.delete();
}
for ( Spirit child : getSpirit() ) {
child.delete();
}
for ( Devil1 child : getDevil1() ) {
child.delete();
}
for ( NonNavigableMany child : getNonNavigableMany() ) {
child.delete();
}
for ( FakeRootFolder child : getFakeRootFolder() ) {
child.delete();
}
for ( Fantasy child : getFantasy() ) {
child.delete();
}
for ( Being child : getBeing() ) {
child.delete();
}
for ( Demon child : getDemon() ) {
child.delete();
}
for ( OneTwo child : getOneTwo() ) {
child.delete();
}
for ( Nightmare child : getNightmare() ) {
child.delete();
}
for ( Angel child : getAngel() ) {
child.delete();
}
for ( ValidationTest child : getValidationTest() ) {
child.delete();
}
for ( IMany child : getIMany() ) {
child.delete();
}
for ( Foot child : getFoot() ) {
child.delete();
}
if ( getPet() != null ) {
getPet().delete();
}
for ( TestEmbedded child : getTestEmbedded() ) {
child.delete();
}
for ( Mamal child : getAnimalFarm() ) {
child.delete();
}
for ( Dream child : getDream() ) {
child.delete();
}
for ( Hand child : getHand() ) {
child.delete();
}
for ( NonNavigableOne child : getNonNavigableOne() ) {
child.delete();
}
this.pet.clear();
this.animalFarm.clear();
this.beginning.clear();
this.memory.clear();
super.delete();
}
@Override
public void fromJson(Map propertyMap) {
fromJsonDataTypeAndComposite(propertyMap);
fromJsonNonCompositeOne(propertyMap);
fromJsonNonCompositeRequiredMany(propertyMap);
}
@Override
public void fromJson(String json) {
ObjectMapper mapper = ObjectMapperFactory.INSTANCE.getObjectMapper();
try {
@SuppressWarnings( "unchecked")
Map propertyMap = mapper.readValue(json, Map.class);
fromJson(propertyMap);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
@Override
public void fromJsonDataTypeAndComposite(Map propertyMap) {
Number anumberAsNumber = (Number)propertyMap.get("anumber");
super.fromJsonDataTypeAndComposite(propertyMap);
if ( propertyMap.containsKey("reason") ) {
if ( propertyMap.get("reason") != null ) {
REASON reason = REASON.fromJson((String)propertyMap.get("reason"));
setReason(reason);
} else {
setReason(null);
}
}
if ( propertyMap.containsKey("anumber") ) {
if ( propertyMap.get("anumber") != null ) {
Double anumber = anumberAsNumber != null ? anumberAsNumber.doubleValue() : null;
setAnumber(anumber);
} else {
setAnumber(null);
}
}
if ( propertyMap.containsKey("embeddedString") ) {
if ( propertyMap.get("embeddedString") != null ) {
UmlgSet embeddedString = new UmlgMemorySet((Collection)propertyMap.get("embeddedString"));
clearEmbeddedString();
for ( String value : embeddedString ) {
addToEmbeddedString(String.valueOf(value));
}
} else {
setEmbeddedString(null);
}
}
if ( propertyMap.containsKey("name3") ) {
if ( propertyMap.get("name3") != null ) {
String name3 = (String)propertyMap.get("name3");
setName3(name3);
} else {
setName3(null);
}
}
if ( propertyMap.containsKey("beginning") ) {
if ( propertyMap.get("beginning") != null ) {
LocalDateTime beginning = UmlgFormatter.parseDateTime((String)propertyMap.get("beginning"));
setBeginning(beginning);
} else {
setBeginning(null);
}
}
if ( propertyMap.containsKey("embeddedInteger") ) {
if ( propertyMap.get("embeddedInteger") != null ) {
UmlgSet embeddedInteger = new UmlgMemorySet((Collection)propertyMap.get("embeddedInteger"));
clearEmbeddedInteger();
for ( Number value : embeddedInteger ) {
addToEmbeddedInteger(value.intValue());
}
} else {
setEmbeddedInteger(null);
}
}
if ( propertyMap.containsKey("testBoolean") ) {
if ( propertyMap.get("testBoolean") != null ) {
Boolean testBoolean = (Boolean)propertyMap.get("testBoolean");
setTestBoolean(testBoolean);
} else {
setTestBoolean(null);
}
}
if ( propertyMap.containsKey("constraintTest") ) {
if ( propertyMap.get("constraintTest") != null ) {
String constraintTest = (String)propertyMap.get("constraintTest");
setConstraintTest(constraintTest);
} else {
setConstraintTest(null);
}
}
if ( propertyMap.containsKey("name2") ) {
if ( propertyMap.get("name2") != null ) {
String name2 = (String)propertyMap.get("name2");
setName2(name2);
} else {
setName2(null);
}
}
if ( propertyMap.containsKey("rEASON") ) {
if ( propertyMap.get("rEASON") != null ) {
Collection rEASON = (Collection)propertyMap.get("rEASON");
clearREASON();
for ( String enumLiteral : rEASON ) {
addToREASON(REASON.valueOf(enumLiteral));
}
} else {
setREASON(null);
}
}
if ( propertyMap.containsKey("name") ) {
if ( propertyMap.get("name") != null ) {
String name = (String)propertyMap.get("name");
setName(name);
} else {
setName(null);
}
}
}
@SuppressWarnings( "unchecked")
@Override
public void fromJsonNonCompositeOne(Map propertyMap) {
super.fromJsonNonCompositeOne(propertyMap);
if ( propertyMap.containsKey("pet") ) {
if ( propertyMap.get("pet") != null ) {
Map petMap = (Map)propertyMap.get("pet");
if ( petMap.isEmpty() || petMap.get("id") == null ) {
setPet(null);
} else {
setPet((Mamal)UMLG.get().getEntity((petMap.get("id"))));
}
} else {
setPet(null);
}
}
}
@Override
public void fromJsonNonCompositeRequiredMany(Map propertyMap) {
super.fromJsonNonCompositeRequiredMany(propertyMap);
}
public UmlgSet getAbstractSpecies() {
return this.abstractSpecies;
}
public UmlgSet getAngel() {
return this.angel;
}
public UmlgSet getAnimalFarm() {
return this.animalFarm;
}
public Double getAnumber() {
UmlgSet tmp = this.anumber;
if ( !tmp.isEmpty() ) {
return tmp.iterator().next();
} else {
return null;
}
}
public LocalDateTime getBeginning() {
UmlgSet tmp = this.beginning;
if ( !tmp.isEmpty() ) {
return tmp.iterator().next();
} else {
return null;
}
}
public UmlgSet getBeing() {
return this.being;
}
public String getConstraintTest() {
UmlgSet tmp = this.constraintTest;
if ( !tmp.isEmpty() ) {
return tmp.iterator().next();
} else {
return null;
}
}
public UmlgSet getDemon() {
return this.demon;
}
public UmlgSet getDevil1() {
return this.devil1;
}
public UmlgBag getDream() {
return this.dream;
}
public UmlgSet getEmbeddedInteger() {
return this.embeddedInteger;
}
public UmlgSet getEmbeddedString() {
return this.embeddedString;
}
public UmlgSet getFakeRootFolder() {
return this.fakeRootFolder;
}
public UmlgQualifiedOrderedSet getFantasy() {
return this.fantasy;
}
public UmlgOrderedSet getFantasyForFantasyQualifierOnName(Pair fantasyQualifierOnName) {
GraphTraversal graphTraversalfantasy_Fantasy = UMLG.get().traversal().V(this.vertex).to(
GodRuntimePropertyEnum.fantasy.isControllingSide() ? Direction.OUT : Direction.IN,
GodRuntimePropertyEnum.fantasy.getLabel())
.has(T.label, "Fantasy");
UmlgOrderedSet result;
graphTraversalfantasy_Fantasy.has("name", fantasyQualifierOnName.getSecond());
UmlgOrderedSet fantasy_fantasy_Fantasy = new UmlgOrderedSetClosableIterableImpl(graphTraversalfantasy_Fantasy, GodRuntimePropertyEnum.fantasy);
result = fantasy_fantasy_Fantasy;
return result;
}
public UmlgQualifiedSequence getFoot() {
return this.foot;
}
public Foot getFootForGodFootQualifier(Pair godFootQualifier) {
GraphTraversal graphTraversalfoot_Foot = UMLG.get().traversal().V(this.vertex).to(
GodRuntimePropertyEnum.foot.isControllingSide() ? Direction.OUT : Direction.IN,
GodRuntimePropertyEnum.foot.getLabel())
.has(T.label, "Foot");
UmlgSequence result;
graphTraversalfoot_Foot.has("name", godFootQualifier.getSecond());
UmlgSequence foot_foot_Foot = new UmlgSequenceClosableIterableImpl(graphTraversalfoot_Foot, GodRuntimePropertyEnum.foot);
result = foot_foot_Foot;
if ( result.iterator().hasNext() ) {
return result.iterator().next();
} else {
return null;
}
}
public UmlgSequence getHand() {
return this.hand;
}
public UmlgSet getIMany() {
return this.iMany;
}
public UmlgSet getLevel1() {
return this.level1;
}
public UmlgSet getMany1() {
return this.many1;
}
public UmlgSet getMany2() {
return this.many2;
}
public UmlgQualifiedSet getMemory() {
return this.memory;
}
public UmlgSet getMemoryForMemoryQualifier1(Pair memoryQualifier1) {
GraphTraversal graphTraversalmemory_Nightmare = UMLG.get().traversal().V(this.vertex).to(
GodRuntimePropertyEnum.memory.isControllingSide() ? Direction.OUT : Direction.IN,
GodRuntimePropertyEnum.memory.getLabel())
.has(T.label, "Nightmare");
UmlgSet result;
graphTraversalmemory_Nightmare.has("nameNonUnique", memoryQualifier1.getSecond());
UmlgSet memory_memory_Nightmare = new UmlgSetClosableIterableImpl(graphTraversalmemory_Nightmare, GodRuntimePropertyEnum.memory);
result = memory_memory_Nightmare;
return result;
}
@Override
public String getMetaDataAsJson() {
return God.GodRuntimePropertyEnum.asJson();
}
public String getName() {
UmlgSet tmp = this.name;
if ( !tmp.isEmpty() ) {
return tmp.iterator().next();
} else {
return null;
}
}
public String getName2() {
UmlgSet tmp = this.name2;
if ( !tmp.isEmpty() ) {
return tmp.iterator().next();
} else {
return null;
}
}
public String getName3() {
UmlgSet tmp = this.name3;
if ( !tmp.isEmpty() ) {
return tmp.iterator().next();
} else {
return null;
}
}
public UmlgQualifiedSet getNature() {
return this.nature;
}
public UmlgSet getNatureForName1Qualifier(Pair name1Qualifier) {
GraphTraversal graphTraversalnature_Nature = UMLG.get().traversal().V(this.vertex).to(
GodRuntimePropertyEnum.nature.isControllingSide() ? Direction.OUT : Direction.IN,
GodRuntimePropertyEnum.nature.getLabel())
.has(T.label, "Nature");
UmlgSet result;
graphTraversalnature_Nature.has("name1", name1Qualifier.getSecond());
UmlgSet nature_nature_Nature = new UmlgSetClosableIterableImpl(graphTraversalnature_Nature, GodRuntimePropertyEnum.nature);
result = nature_nature_Nature;
return result;
}
public Nature getNatureForNameUniqueQualifier(Pair nameUniqueQualifier) {
GraphTraversal graphTraversalnature_Nature = UMLG.get().traversal().V(this.vertex).to(
GodRuntimePropertyEnum.nature.isControllingSide() ? Direction.OUT : Direction.IN,
GodRuntimePropertyEnum.nature.getLabel())
.has(T.label, "Nature");
UmlgSet result;
graphTraversalnature_Nature.has("nameUnique", nameUniqueQualifier.getSecond());
UmlgSet nature_nature_Nature = new UmlgSetClosableIterableImpl(graphTraversalnature_Nature, GodRuntimePropertyEnum.nature);
result = nature_nature_Nature;
if ( result.iterator().hasNext() ) {
return result.iterator().next();
} else {
return null;
}
}
public UmlgSet getNatureForQualifier2(Pair qualifier2) {
GraphTraversal graphTraversalnature_Nature = UMLG.get().traversal().V(this.vertex).to(
GodRuntimePropertyEnum.nature.isControllingSide() ? Direction.OUT : Direction.IN,
GodRuntimePropertyEnum.nature.getLabel())
.has(T.label, "Nature");
UmlgSet result;
graphTraversalnature_Nature.has("name2", qualifier2.getSecond());
UmlgSet nature_nature_Nature = new UmlgSetClosableIterableImpl(graphTraversalnature_Nature, GodRuntimePropertyEnum.nature);
result = nature_nature_Nature;
return result;
}
public UmlgSet getNevil1() {
return this.nevil1;
}
public UmlgQualifiedBag getNightmare() {
return this.nightmare;
}
public Nightmare getNightmareForQualifier1(Pair qualifier1) {
GraphTraversal graphTraversalnightmare_Nightmare = UMLG.get().traversal().V(this.vertex).to(
GodRuntimePropertyEnum.nightmare.isControllingSide() ? Direction.OUT : Direction.IN,
GodRuntimePropertyEnum.nightmare.getLabel())
.has(T.label, "Nightmare");
UmlgBag result;
graphTraversalnightmare_Nightmare.has("name", qualifier1.getSecond());
UmlgBag nightmare_nightmare_Nightmare = new UmlgBagClosableIterableImpl(graphTraversalnightmare_Nightmare, GodRuntimePropertyEnum.nightmare);
result = nightmare_nightmare_Nightmare;
if ( result.iterator().hasNext() ) {
return result.iterator().next();
} else {
return null;
}
}
public UmlgSet getNonNavigableMany() {
return this.nonNavigableMany;
}
public UmlgSet getNonNavigableOne() {
return this.nonNavigableOne;
}
public UmlgSet getOneOne() {
return this.oneOne;
}
public UmlgSet getOneTwo() {
return this.oneTwo;
}
@Override
public UmlgNode getOwningObject() {
return null;
}
public Mamal getPet() {
UmlgSet tmp = this.pet;
if ( !tmp.isEmpty() ) {
return tmp.iterator().next();
} else {
return null;
}
}
@Override
public String getQualifiedName() {
return "umlgtest::org::umlg::concretetest::God";
}
public List getQualifierForFantasy(Fantasy context) {
List result = new ArrayList<>();
result.add(new Qualifier("name", context.getName(), Multiplicity.ZERO_TO_MANY, Fantasy.FantasyRuntimePropertyEnum.name));
return result;
}
public List getQualifierForFoot(Foot context) {
List result = new ArrayList<>();
result.add(new Qualifier("name", context.getName(), Multiplicity.ZERO_TO_ONE, Foot.FootRuntimePropertyEnum.name));
return result;
}
public List getQualifierForMemory(Nightmare context) {
List result = new ArrayList<>();
result.add(new Qualifier("nameNonUnique", context.getNameNonUnique(), Multiplicity.ZERO_TO_MANY, Nightmare.NightmareRuntimePropertyEnum.nameNonUnique));
return result;
}
public List getQualifierForNature(Nature context) {
List result = new ArrayList<>();
result.add(new Qualifier("name2", context.getName2(), Multiplicity.ZERO_TO_MANY, Nature.NatureRuntimePropertyEnum.name2));
result.add(new Qualifier("name1", context.getName1(), Multiplicity.ZERO_TO_MANY, Nature.NatureRuntimePropertyEnum.name1));
result.add(new Qualifier("nameUnique", context.getNameUnique(), Multiplicity.ONE_TO_ONE, Nature.NatureRuntimePropertyEnum.nameUnique));
return result;
}
public List getQualifierForNightmare(Nightmare context) {
List result = new ArrayList<>();
result.add(new Qualifier("name", context.getName(), Multiplicity.ZERO_TO_ONE, Nightmare.NightmareRuntimePropertyEnum.name));
return result;
}
/**
* getQualifiers is called from the collection in order to update the index used to implement the qualifier
*
* @param tumlRuntimeProperty
* @param node
* @param inverse
*/
@Override
public List getQualifiers(UmlgRuntimeProperty tumlRuntimeProperty, UmlgNode node, boolean inverse) {
List result = super.getQualifiers(tumlRuntimeProperty, node, inverse);
GodRuntimePropertyEnum runtimeProperty;
if ( !inverse ) {
runtimeProperty = GodRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getQualifiedName());
} else {
runtimeProperty = GodRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getInverseQualifiedName());
}
if ( runtimeProperty != null && result.isEmpty() ) {
switch ( runtimeProperty ) {
case nature:
result = getQualifierForNature((Nature)node);
break;
case memory:
result = getQualifierForMemory((Nightmare)node);
break;
case fantasy:
result = getQualifierForFantasy((Fantasy)node);
break;
case nightmare:
result = getQualifierForNightmare((Nightmare)node);
break;
case foot:
result = getQualifierForFoot((Foot)node);
break;
default:
result = Collections.emptyList();
}
}
return result;
}
public UmlgSet getREASON() {
return this.rEASON;
}
public UmlgSet getRealRootFolder() {
return this.realRootFolder;
}
public REASON getReason() {
UmlgSet tmp = this.reason;
if ( !tmp.isEmpty() ) {
return tmp.iterator().next();
} else {
return null;
}
}
/**
* getSize is called from the BaseCollection.addInternal in order to save the size of the inverse collection to update the edge's sequence order
*
* @param inverse
* @param tumlRuntimeProperty
*/
@Override
public int getSize(boolean inverse, UmlgRuntimeProperty tumlRuntimeProperty) {
int result = super.getSize(inverse, tumlRuntimeProperty);
GodRuntimePropertyEnum runtimeProperty;
if ( !inverse ) {
runtimeProperty = GodRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getQualifiedName());
} else {
runtimeProperty = GodRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getInverseQualifiedName());
}
if ( runtimeProperty != null && result == 0 ) {
switch ( runtimeProperty ) {
case many1:
result = many1.size();
break;
case testOrderedEnumeration:
result = testOrderedEnumeration.size();
break;
case level1:
result = level1.size();
break;
case reason:
result = reason.size();
break;
case dream:
result = dream.size();
break;
case validationTest:
result = validationTest.size();
break;
case demon:
result = demon.size();
break;
case oneTwo:
result = oneTwo.size();
break;
case anumber:
result = anumber.size();
break;
case nevil1:
result = nevil1.size();
break;
case pet:
result = pet.size();
break;
case spirit:
result = spirit.size();
break;
case testBoolean:
result = testBoolean.size();
break;
case abstractSpecies:
result = abstractSpecies.size();
break;
case universe:
result = universe.size();
break;
case realRootFolder:
result = realRootFolder.size();
break;
case nature:
result = nature.size();
break;
case embeddedString:
result = embeddedString.size();
break;
case name:
result = name.size();
break;
case testEmbedded:
result = testEmbedded.size();
break;
case constraintTest:
result = constraintTest.size();
break;
case rEASON:
result = rEASON.size();
break;
case beginning:
result = beginning.size();
break;
case embeddedInteger:
result = embeddedInteger.size();
break;
case fakeRootFolder:
result = fakeRootFolder.size();
break;
case nightmare:
result = nightmare.size();
break;
case hand:
result = hand.size();
break;
case oneOne:
result = oneOne.size();
break;
case iMany:
result = iMany.size();
break;
case foot:
result = foot.size();
break;
case fantasy:
result = fantasy.size();
break;
case angel:
result = angel.size();
break;
case world:
result = world.size();
break;
case memory:
result = memory.size();
break;
case animalFarm:
result = animalFarm.size();
break;
case being:
result = being.size();
break;
case name3:
result = name3.size();
break;
case nonNavigableMany:
result = nonNavigableMany.size();
break;
case many2:
result = many2.size();
break;
case devil1:
result = devil1.size();
break;
case nonNavigableOne:
result = nonNavigableOne.size();
break;
case name2:
result = name2.size();
break;
default:
result = 0;
}
}
return result;
}
public UmlgSet getSpirit() {
return this.spirit;
}
public Boolean getTestBoolean() {
UmlgSet tmp = this.testBoolean;
if ( !tmp.isEmpty() ) {
return tmp.iterator().next();
} else {
return null;
}
}
public UmlgSet getTestEmbedded() {
return this.testEmbedded;
}
public UmlgSet getTestOrderedEnumeration() {
return this.testOrderedEnumeration;
}
public UmlgSet getUniverse() {
return this.universe;
}
public UmlgSet getValidationTest() {
return this.validationTest;
}
public UmlgOrderedSet getWorld() {
return this.world;
}
@Override
public boolean hasOnlyOneCompositeParent() {
int result = 0;
return result == 1;
}
public void initDataTypeVariablesWithDefaultValues() {
super.initDataTypeVariablesWithDefaultValues();
}
/**
* Implements the ocl statement for initialization variable 'name'
*
* package umlgtest::org::umlg::concretetest
* context God::name : PrimitiveTypes::String
* derive: 'whatajol'
* endpackage
*
*/
public void initVariables() {
super.initVariables();
setName("whatajol");
}
/**
* boolean properties' default values are initialized in the constructor via z_internalBooleanProperties
*
* @param loaded
*/
@Override
public void initialiseProperties(boolean loaded) {
super.initialiseProperties(loaded);
this.many1 = new UmlgSetImpl(this, PropertyTree.from(GodRuntimePropertyEnum.many1), loaded);
this.testOrderedEnumeration = new UmlgSetImpl(this, PropertyTree.from(GodRuntimePropertyEnum.testOrderedEnumeration), loaded);
this.nevil1 = new UmlgSetImpl(this, PropertyTree.from(GodRuntimePropertyEnum.nevil1), loaded);
this.abstractSpecies = new UmlgSetImpl(this, PropertyTree.from(GodRuntimePropertyEnum.abstractSpecies), loaded);
this.universe = new UmlgSetImpl(this, PropertyTree.from(GodRuntimePropertyEnum.universe), loaded);
this.realRootFolder = new UmlgSetImpl(this, PropertyTree.from(GodRuntimePropertyEnum.realRootFolder), loaded);
this.nature = new UmlgQualifiedSetImpl(this, PropertyTree.from(GodRuntimePropertyEnum.nature), loaded);
this.constraintTest = new UmlgSetImpl(this, PropertyTree.from(GodRuntimePropertyEnum.constraintTest), loaded);
this.oneOne = new UmlgSetImpl(this, PropertyTree.from(GodRuntimePropertyEnum.oneOne), loaded);
this.world = new UmlgOrderedSetImpl(this, PropertyTree.from(GodRuntimePropertyEnum.world), loaded);
this.many2 = new UmlgSetImpl(this, PropertyTree.from(GodRuntimePropertyEnum.many2), loaded);
this.level1 = new UmlgSetImpl(this, PropertyTree.from(GodRuntimePropertyEnum.level1), loaded);
this.name3 = new UmlgSetImpl(this, PropertyTree.from(GodRuntimePropertyEnum.name3), loaded);
this.spirit = new UmlgSetImpl(this, PropertyTree.from(GodRuntimePropertyEnum.spirit), loaded);
this.devil1 = new UmlgSetImpl(this, PropertyTree.from(GodRuntimePropertyEnum.devil1), loaded);
this.nonNavigableMany = new UmlgSetImpl(this, PropertyTree.from(GodRuntimePropertyEnum.nonNavigableMany), loaded);
this.memory = new UmlgQualifiedSetImpl(this, PropertyTree.from(GodRuntimePropertyEnum.memory), loaded);
this.fakeRootFolder = new UmlgSetImpl(this, PropertyTree.from(GodRuntimePropertyEnum.fakeRootFolder), loaded);
this.testBoolean = new UmlgSetImpl(this, PropertyTree.from(GodRuntimePropertyEnum.testBoolean), loaded);
this.rEASON = new UmlgSetImpl(this, PropertyTree.from(GodRuntimePropertyEnum.rEASON), loaded);
this.reason = new UmlgSetImpl(this, PropertyTree.from(GodRuntimePropertyEnum.reason), loaded);
this.fantasy = new UmlgQualifiedOrderedSetImpl(this, PropertyTree.from(GodRuntimePropertyEnum.fantasy), loaded);
this.anumber = new UmlgSetImpl(this, PropertyTree.from(GodRuntimePropertyEnum.anumber), loaded);
this.being = new UmlgSetImpl(this, PropertyTree.from(GodRuntimePropertyEnum.being), loaded);
this.beginning = new UmlgSetImpl(this, PropertyTree.from(GodRuntimePropertyEnum.beginning), loaded);
this.demon = new UmlgSetImpl(this, PropertyTree.from(GodRuntimePropertyEnum.demon), loaded);
this.embeddedInteger = new UmlgSetImpl(this, PropertyTree.from(GodRuntimePropertyEnum.embeddedInteger), loaded);
this.oneTwo = new UmlgSetImpl(this, PropertyTree.from(GodRuntimePropertyEnum.oneTwo), loaded);
this.nightmare = new UmlgQualifiedBagImpl(this, PropertyTree.from(GodRuntimePropertyEnum.nightmare), loaded);
this.angel = new UmlgSetImpl(this, PropertyTree.from(GodRuntimePropertyEnum.angel), loaded);
this.validationTest = new UmlgSetImpl(this, PropertyTree.from(GodRuntimePropertyEnum.validationTest), loaded);
this.iMany = new UmlgSetImpl