Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
org.umlg.componenttest.SpaceTime Maven / Gradle / Ivy
package org.umlg.componenttest;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.lang.reflect.Constructor;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.commons.text.StringEscapeUtils;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.umlg.componenttest.Space.SpaceRuntimePropertyEnum;
import org.umlg.componenttest.Time.TimeRuntimePropertyEnum;
import org.umlg.concretetest.Universe;
import org.umlg.concretetest.Universe.UniverseRuntimePropertyEnum;
import org.umlg.query.BaseUmlgWithQuery;
import org.umlg.runtime.adaptor.UMLG;
import org.umlg.runtime.adaptor.UmlgLabelConverterFactory;
import org.umlg.runtime.adaptor.UmlgSchemaFactory;
import org.umlg.runtime.adaptor.UmlgTmpIdManager;
import org.umlg.runtime.collection.Filter;
import org.umlg.runtime.collection.Qualifier;
import org.umlg.runtime.collection.UmlgCollection;
import org.umlg.runtime.collection.UmlgRuntimeProperty;
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.UmlgSetImpl;
import org.umlg.runtime.domain.CompositionNode;
import org.umlg.runtime.domain.DataTypeEnum;
import org.umlg.runtime.domain.UmlgNode;
import org.umlg.runtime.domain.json.ToJsonUtil;
import org.umlg.runtime.util.ObjectMapperFactory;
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 SpaceTime extends BaseUmlgWithQuery implements CompositionNode {
static final public long serialVersionUID = 1L;
private UmlgSet name;
private UmlgSet space;
private UmlgSet time;
private UmlgSet universe;
/**
* constructor for SpaceTime
*
* @param id
*/
public SpaceTime(Object id) {
super(id);
}
/**
* constructor for SpaceTime
*
* @param compositeOwner
*/
public SpaceTime(Universe compositeOwner) {
super(true);
compositeOwner.addToSpaceTime(this);
}
/**
* constructor for SpaceTime
*
* @param vertex
*/
public SpaceTime(Vertex vertex) {
super(vertex);
}
/**
* default constructor for SpaceTime
*/
public SpaceTime() {
this(true);
}
/**
* constructor for SpaceTime
*
* @param persistent
*/
public SpaceTime(Boolean persistent) {
super(persistent);
}
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 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 addToSpace(Space space) {
if ( space != null ) {
if ( !this.space.isEmpty() ) {
throw new RuntimeException("Property umlgtest::org::umlg::componenttest::SpaceTime::space is a one and already has a value!");
}
this.space.add(space);
}
}
public void addToSpaceIgnoreInverse(Space space) {
if ( space != null ) {
if ( !this.space.isEmpty() ) {
throw new RuntimeException("Property umlgtest::org::umlg::componenttest::SpaceTime::space is a one and already has a value!");
}
this.space.addIgnoreInverse(space);
}
}
public void addToTime(Time time) {
if ( time != null ) {
if ( !this.time.isEmpty() ) {
throw new RuntimeException("Property umlgtest::org::umlg::componenttest::SpaceTime::time is a one and already has a value!");
}
this.time.add(time);
}
}
public void addToTimeIgnoreInverse(Time time) {
if ( time != null ) {
if ( !this.time.isEmpty() ) {
throw new RuntimeException("Property umlgtest::org::umlg::componenttest::SpaceTime::time is a one and already has a value!");
}
this.time.addIgnoreInverse(time);
}
}
public void addToUniverse(Universe universe) {
if ( universe != null ) {
if ( !this.universe.isEmpty() ) {
throw new RuntimeException("Property umlgtest::org::umlg::componenttest::A__::universe is a one and already has a value!");
}
this.universe.add(universe);
}
}
public void addToUniverseIgnoreInverse(Universe universe) {
if ( universe != null ) {
if ( !this.universe.isEmpty() ) {
throw new RuntimeException("Property umlgtest::org::umlg::componenttest::A__::universe is a one and already has a value!");
}
this.universe.addIgnoreInverse(universe);
}
}
static public UmlgSet extends SpaceTime> allInstances(Filter filter) {
UmlgSet result = new UmlgMemorySet();
result.addAll(UMLG.get().allInstances(SpaceTime.class.getName(), filter));
return result;
}
static public UmlgSet extends SpaceTime> allInstances() {
UmlgSet result = new UmlgMemorySet();
result.addAll(UMLG.get().allInstances(SpaceTime.class.getName()));
return result;
}
@Override
public List checkClassConstraints() {
List result = new ArrayList();
result.addAll(super.checkClassConstraints());
return result;
}
public void clearName() {
this.name.clear();
}
public void clearSpace() {
this.space.clear();
}
public void clearTime() {
this.time.clear();
}
public void clearUniverse() {
this.universe.clear();
}
@Override
public void delete() {
if ( getSpace() != null ) {
getSpace().delete();
}
if ( getTime() != null ) {
getTime().delete();
}
this.universe.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);
}
}
@SuppressWarnings( "unchecked")
@Override
public void fromJsonDataTypeAndComposite(Map propertyMap) {
super.fromJsonDataTypeAndComposite(propertyMap);
if ( propertyMap.containsKey("name") ) {
if ( propertyMap.get("name") != null ) {
String name = (String)propertyMap.get("name");
setName(name);
} else {
setName(null);
}
}
if ( propertyMap.containsKey("space") ) {
if ( propertyMap.get("space") != null ) {
Map spaceMap = (Map)propertyMap.get("space");
Space space;
String idField = (String)spaceMap.get("id");
if ( idField != null && !idField.startsWith("fake") ) {
space = UMLG.get().getEntity((spaceMap.get("id")));
} else {
Class baseTumlClass = UmlgSchemaFactory.getUmlgSchemaMap().get((String)spaceMap.get("qualifiedName"));
try {
Constructor constructor = baseTumlClass.getConstructor(Boolean.class);
space = constructor.newInstance(true);
setSpace(space);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
space.fromJsonDataTypeAndComposite(spaceMap);
} else {
setSpace(null);
}
}
if ( propertyMap.containsKey("time") ) {
if ( propertyMap.get("time") != null ) {
Map timeMap = (Map)propertyMap.get("time");
Time time;
String idField = (String)timeMap.get("id");
if ( idField != null && !idField.startsWith("fake") ) {
time = UMLG.get().getEntity((timeMap.get("id")));
} else {
Class baseTumlClass = UmlgSchemaFactory.getUmlgSchemaMap().get((String)timeMap.get("qualifiedName"));
try {
Constructor constructor = baseTumlClass.getConstructor(Boolean.class);
time = constructor.newInstance(true);
setTime(time);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
time.fromJsonDataTypeAndComposite(timeMap);
} else {
setTime(null);
}
}
}
@SuppressWarnings( "unchecked")
@Override
public void fromJsonNonCompositeOne(Map propertyMap) {
super.fromJsonNonCompositeOne(propertyMap);
if ( propertyMap.containsKey("space") ) {
if ( propertyMap.get("space") != null ) {
Map spaceMap = (Map)propertyMap.get("space");
Space space;
if ( spaceMap.get("id") != null ) {
space = UMLG.get().getEntity((spaceMap.get("id")));
} else {
Class baseTumlClass = UmlgSchemaFactory.getUmlgSchemaMap().get((String)spaceMap.get("qualifiedName"));
try {
Constructor constructor = baseTumlClass.getConstructor(Boolean.class);
space = constructor.newInstance(true);
setSpace(space);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
space.fromJsonNonCompositeOne(spaceMap);
} else {
setSpace(null);
}
}
if ( propertyMap.containsKey("time") ) {
if ( propertyMap.get("time") != null ) {
Map timeMap = (Map)propertyMap.get("time");
Time time;
if ( timeMap.get("id") != null ) {
time = UMLG.get().getEntity((timeMap.get("id")));
} else {
Class baseTumlClass = UmlgSchemaFactory.getUmlgSchemaMap().get((String)timeMap.get("qualifiedName"));
try {
Constructor constructor = baseTumlClass.getConstructor(Boolean.class);
time = constructor.newInstance(true);
setTime(time);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
time.fromJsonNonCompositeOne(timeMap);
} else {
setTime(null);
}
}
}
@Override
public void fromJsonNonCompositeRequiredMany(Map propertyMap) {
super.fromJsonNonCompositeRequiredMany(propertyMap);
}
@Override
public String getMetaDataAsJson() {
return SpaceTime.SpaceTimeRuntimePropertyEnum.asJson();
}
public String getName() {
UmlgSet tmp = this.name;
if ( !tmp.isEmpty() ) {
return tmp.iterator().next();
} else {
return null;
}
}
@Override
public UmlgNode getOwningObject() {
UmlgNode result;
if ( getUniverse() != null ) {
result = getUniverse();
} else {
result = null;
}
return result;
}
@Override
public String getQualifiedName() {
return "umlgtest::org::umlg::componenttest::SpaceTime";
}
/**
* 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);
SpaceTimeRuntimePropertyEnum runtimeProperty;
if ( !inverse ) {
runtimeProperty = SpaceTimeRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getQualifiedName());
} else {
runtimeProperty = SpaceTimeRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getInverseQualifiedName());
}
if ( runtimeProperty != null && result.isEmpty() ) {
switch ( runtimeProperty ) {
default:
result = Collections.emptyList();
}
}
return result;
}
/**
* 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);
SpaceTimeRuntimePropertyEnum runtimeProperty;
if ( !inverse ) {
runtimeProperty = SpaceTimeRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getQualifiedName());
} else {
runtimeProperty = SpaceTimeRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getInverseQualifiedName());
}
if ( runtimeProperty != null && result == 0 ) {
switch ( runtimeProperty ) {
case name:
result = name.size();
break;
case space:
result = space.size();
break;
case time:
result = time.size();
break;
case universe:
result = universe.size();
break;
default:
result = 0;
}
}
return result;
}
public Space getSpace() {
UmlgSet tmp = this.space;
if ( !tmp.isEmpty() ) {
return tmp.iterator().next();
} else {
return null;
}
}
public Time getTime() {
UmlgSet tmp = this.time;
if ( !tmp.isEmpty() ) {
return tmp.iterator().next();
} else {
return null;
}
}
public Universe getUniverse() {
UmlgSet tmp = this.universe;
if ( !tmp.isEmpty() ) {
return tmp.iterator().next();
} else {
return null;
}
}
@Override
public boolean hasOnlyOneCompositeParent() {
int result = 0;
result = result + (getUniverse() != null ? 1 : 0);
return result == 1;
}
public void initDataTypeVariablesWithDefaultValues() {
super.initDataTypeVariablesWithDefaultValues();
}
public void initVariables() {
super.initVariables();
}
/**
* boolean properties' default values are initialized in the constructor via z_internalBooleanProperties
*
* @param loaded
*/
@Override
public void initialiseProperties(boolean loaded) {
super.initialiseProperties(loaded);
this.name = new UmlgSetImpl(this, PropertyTree.from(SpaceTimeRuntimePropertyEnum.name), loaded);
this.space = new UmlgSetImpl(this, PropertyTree.from(SpaceTimeRuntimePropertyEnum.space), loaded);
this.time = new UmlgSetImpl(this, PropertyTree.from(SpaceTimeRuntimePropertyEnum.time), loaded);
this.universe = new UmlgSetImpl(this, PropertyTree.from(SpaceTimeRuntimePropertyEnum.universe), loaded);
}
@Override
public void initialiseProperty(UmlgRuntimeProperty tumlRuntimeProperty, boolean inverse, boolean loaded) {
SpaceTimeRuntimePropertyEnum runtimeProperty;
super.initialiseProperty(tumlRuntimeProperty, inverse, loaded);
if ( !inverse ) {
runtimeProperty = (SpaceTimeRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getQualifiedName()));
} else {
runtimeProperty = (SpaceTimeRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getInverseQualifiedName()));
}
if ( runtimeProperty != null ) {
switch ( runtimeProperty ) {
case name:
this.name = new UmlgSetImpl(this, PropertyTree.from(SpaceTimeRuntimePropertyEnum.name), loaded);
break;
case space:
this.space = new UmlgSetImpl(this, PropertyTree.from(SpaceTimeRuntimePropertyEnum.space), loaded);
break;
case time:
this.time = new UmlgSetImpl(this, PropertyTree.from(SpaceTimeRuntimePropertyEnum.time), loaded);
break;
case universe:
this.universe = new UmlgSetImpl(this, PropertyTree.from(SpaceTimeRuntimePropertyEnum.universe), loaded);
break;
}
}
}
@Override
public UmlgRuntimeProperty inverseAdder(UmlgRuntimeProperty tumlRuntimeProperty, boolean inverse, UmlgNode umlgNode) {
UmlgRuntimeProperty fromSuperRuntimeProperty = super.inverseAdder(tumlRuntimeProperty, inverse, umlgNode);
SpaceTimeRuntimePropertyEnum runtimeProperty;
if ( fromSuperRuntimeProperty != null ) {
return fromSuperRuntimeProperty;
} else {
if ( !inverse ) {
runtimeProperty = (SpaceTimeRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getQualifiedName()));
} else {
runtimeProperty = (SpaceTimeRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getInverseQualifiedName()));
}
if ( runtimeProperty != null ) {
switch ( runtimeProperty ) {
case space:
this.space.inverseAdder((Space)umlgNode);
break;
case time:
this.time.inverseAdder((Time)umlgNode);
break;
case universe:
this.universe.inverseAdder((Universe)umlgNode);
break;
}
return runtimeProperty;
} else {
return null;
}
}
}
@Override
public boolean isTinkerRoot() {
return false;
}
public void removeFromName(String name) {
if ( name != null ) {
this.name.remove(name);
}
}
public void removeFromName(UmlgSet name) {
if ( !name.isEmpty() ) {
this.name.removeAll(name);
}
}
public void removeFromSpace(Space space) {
if ( space != null ) {
this.space.remove(space);
}
}
public void removeFromSpace(UmlgSet space) {
if ( !space.isEmpty() ) {
this.space.removeAll(space);
}
}
public void removeFromTime(Time time) {
if ( time != null ) {
this.time.remove(time);
}
}
public void removeFromTime(UmlgSet time) {
if ( !time.isEmpty() ) {
this.time.removeAll(time);
}
}
public void removeFromUniverse(UmlgSet universe) {
if ( !universe.isEmpty() ) {
this.universe.removeAll(universe);
}
}
public void removeFromUniverse(Universe universe) {
if ( universe != null ) {
this.universe.remove(universe);
}
}
public void setName(String name) {
if ( name == null ) {
clearName();
} else {
z_internalClearName();
}
addToName(name);
}
public void setSpace(Space space) {
if ( space != null ) {
space.clearSpaceTime();
space.initialiseProperty(SpaceRuntimePropertyEnum.spaceTime, false, true);
}
clearSpace();
addToSpace(space);
}
public void setTime(Time time) {
if ( time != null ) {
time.clearSpaceTime();
time.initialiseProperty(TimeRuntimePropertyEnum.spaceTime, false, true);
}
clearTime();
addToTime(time);
}
public void setUniverse(Universe universe) {
if ( universe != null ) {
universe.clearSpaceTime();
universe.initialiseProperty(UniverseRuntimePropertyEnum.spaceTime, false, true);
}
clearUniverse();
addToUniverse(universe);
}
/**
* deep indicates that components also be serialized.
*
* @param deep
*/
@Override
public String toJson(Boolean deep) {
String result = super.toJson(deep);
result = result.substring(1, result.length() - 1);
StringBuilder sb = new StringBuilder(result);
sb.append(", ");
sb.append("\"name\": " + (getName() != null ? "\"" + StringEscapeUtils.escapeJson(getName()) + "\"" : null ));
sb.append(", ");
if ( deep ) {
sb.append("\"space\": " + (getSpace() == null ? "null" : getSpace().toJson(true)) + "");
} else {
sb.delete(sb.length() - 2, sb.length());
}
sb.append(", ");
if ( deep ) {
sb.append("\"time\": " + (getTime() == null ? "null" : getTime().toJson(true)) + "");
} else {
sb.delete(sb.length() - 2, sb.length());
}
sb.append(", ");
if ( getUniverse() != null ) {
if ( UmlgTmpIdManager.INSTANCE.get(getUniverse().getId()) != null ) {
sb.append("\"universe\": " + "{\"id\": \"" + getUniverse().getId() + "\", \"tmpId\": \"" + UmlgTmpIdManager.INSTANCE.get(getUniverse().getId()) + "\",\"displayName\": \"" + getUniverse().getName() + "\"}" + "");
} else {
sb.append("\"universe\": " + "{\"id\": \"" + getUniverse().getId() + "\", \"displayName\": \"" + getUniverse().getName() + "\"}" + "");
}
} else {
sb.append("\"universe\": " + "{\"id\": " + null + ", \"displayName\": " + null + "}");
}
sb.insert(0, "{");
sb.append("}");
return sb.toString();
}
@Override
public String toJson() {
return toJson(false);
}
/**
* deep indicates that components also be serialized.
*
* @param deep
*/
@Override
public String toJsonWithoutCompositeParent(Boolean deep) {
String result = super.toJsonWithoutCompositeParent(deep);
result = result.substring(1, result.length() - 1);
StringBuilder sb = new StringBuilder(result);
sb.append(", ");
sb.append("\"name\": " + (getName() != null ? "\"" + StringEscapeUtils.escapeJson(getName()) + "\"" : null ));
sb.append(", ");
if ( deep ) {
sb.append("\"space\": " + (getSpace() == null ? "null" : getSpace().toJsonWithoutCompositeParent(true)) + "");
} else {
sb.delete(sb.length() - 2, sb.length());
}
sb.append(", ");
if ( deep ) {
sb.append("\"time\": " + (getTime() == null ? "null" : getTime().toJsonWithoutCompositeParent(true)) + "");
} else {
sb.delete(sb.length() - 2, sb.length());
}
sb.insert(0, "{");
sb.append("}");
return sb.toString();
}
@Override
public String toJsonWithoutCompositeParent() {
return toJsonWithoutCompositeParent(false);
}
@Override
public List validateMultiplicities() {
List result = new ArrayList();
if ( getUpdatedOn() == null ) {
result.add(new UmlgConstraintViolation("multiplicity", "umlglib::org::umlg::BaseModelUmlg::updatedOn", "lower multiplicity is 1"));
}
if ( getSpace() == null ) {
result.add(new UmlgConstraintViolation("multiplicity", "umlgtest::org::umlg::componenttest::SpaceTime::space", "lower multiplicity is 1"));
}
if ( getTime() == null ) {
result.add(new UmlgConstraintViolation("multiplicity", "umlgtest::org::umlg::componenttest::SpaceTime::time", "lower multiplicity is 1"));
}
if ( getUniverse() == null ) {
result.add(new UmlgConstraintViolation("multiplicity", "umlgtest::org::umlg::componenttest::A__::universe", "lower multiplicity is 1"));
}
if ( getCreatedOn() == null ) {
result.add(new UmlgConstraintViolation("multiplicity", "umlglib::org::umlg::BaseModelUmlg::createdOn", "lower multiplicity is 1"));
}
return result;
}
public List validateName(String name) {
List result = new ArrayList();
return result;
}
@Override
public void z_internalAddPersistentValueToCollection(UmlgRuntimeProperty umlgRuntimeProperty, Object umlgNode) {
SpaceTimeRuntimePropertyEnum runtimeProperty;
super.z_internalAddPersistentValueToCollection(umlgRuntimeProperty, umlgNode);
runtimeProperty = (SpaceTimeRuntimePropertyEnum.fromQualifiedName(umlgRuntimeProperty.getQualifiedName()));
if ( runtimeProperty != null ) {
switch ( runtimeProperty ) {
case name:
this.name.z_internalAdder((String)umlgNode);
break;
case space:
this.space.z_internalAdder((Space)umlgNode);
break;
case time:
this.time.z_internalAdder((Time)umlgNode);
break;
case universe:
this.universe.z_internalAdder((Universe)umlgNode);
break;
}
}
}
@Override
public void z_internalAddToCollection(UmlgRuntimeProperty umlgRuntimeProperty, Object umlgNode) {
SpaceTimeRuntimePropertyEnum runtimeProperty;
super.z_internalAddToCollection(umlgRuntimeProperty, umlgNode);
runtimeProperty = (SpaceTimeRuntimePropertyEnum.fromQualifiedName(umlgRuntimeProperty.getQualifiedName()));
if ( runtimeProperty != null ) {
switch ( runtimeProperty ) {
case name:
this.name.z_internalAdder((String)umlgNode);
break;
case space:
this.space.z_internalAdder((Space)umlgNode);
break;
case time:
this.time.z_internalAdder((Time)umlgNode);
break;
case universe:
this.universe.z_internalAdder((Universe)umlgNode);
break;
}
}
}
@Override
public Set z_internalBooleanProperties() {
Set result = super.z_internalBooleanProperties();
return result;
}
public void z_internalClearName() {
this.name.z_internalClear();
}
public void z_internalClearSpace() {
this.space.z_internalClear();
}
public void z_internalClearTime() {
this.time.z_internalClear();
}
public void z_internalClearUniverse() {
this.universe.z_internalClear();
}
@Override
public Set z_internalDataTypeProperties() {
Set result = super.z_internalDataTypeProperties();
result.add(SpaceTimeRuntimePropertyEnum.name);
return result;
}
@Override
public Map z_internalDataTypePropertiesWithDefaultValues() {
Map result = super.z_internalDataTypePropertiesWithDefaultValues();
return result;
}
@Override
public UmlgCollection extends Object> z_internalGetCollectionFor(UmlgRuntimeProperty tumlRuntimeProperty, boolean inverse) {
UmlgCollection extends Object> result = null;
result = super.z_internalGetCollectionFor(tumlRuntimeProperty, inverse);
if ( result == null ) {
SpaceTimeRuntimePropertyEnum runtimeProperty;
if ( !inverse ) {
runtimeProperty = (SpaceTimeRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getQualifiedName()));
} else {
runtimeProperty = (SpaceTimeRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getInverseQualifiedName()));
}
if ( runtimeProperty != null ) {
switch ( runtimeProperty ) {
case name:
result = this.name;
break;
case space:
result = this.space;
break;
case time:
result = this.time;
break;
case universe:
result = this.universe;
break;
}
}
}
return result;
}
@Override
public UmlgRuntimeProperty z_internalInverseAdder(UmlgRuntimeProperty tumlRuntimeProperty, boolean inverse, UmlgNode umlgNode) {
UmlgRuntimeProperty fromSuperRuntimeProperty = super.inverseAdder(tumlRuntimeProperty, inverse, umlgNode);
SpaceTimeRuntimePropertyEnum runtimeProperty;
if ( fromSuperRuntimeProperty != null ) {
return fromSuperRuntimeProperty;
} else {
if ( !inverse ) {
runtimeProperty = (SpaceTimeRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getQualifiedName()));
} else {
runtimeProperty = (SpaceTimeRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getInverseQualifiedName()));
}
if ( runtimeProperty != null ) {
switch ( runtimeProperty ) {
case space:
this.space.z_internalAdder((Space)umlgNode);
break;
case time:
this.time.z_internalAdder((Time)umlgNode);
break;
case universe:
this.universe.z_internalAdder((Universe)umlgNode);
break;
}
return runtimeProperty;
} else {
return null;
}
}
}
@Override
public void z_internalMarkCollectionLoaded(UmlgRuntimeProperty umlgRuntimeProperty, boolean loaded) {
SpaceTimeRuntimePropertyEnum runtimeProperty;
super.z_internalMarkCollectionLoaded(umlgRuntimeProperty, loaded);
runtimeProperty = (SpaceTimeRuntimePropertyEnum.fromQualifiedName(umlgRuntimeProperty.getQualifiedName()));
if ( runtimeProperty != null ) {
switch ( runtimeProperty ) {
case name:
this.name.setLoaded(loaded);
break;
case space:
this.space.setLoaded(loaded);
break;
case time:
this.time.setLoaded(loaded);
break;
case universe:
this.universe.setLoaded(loaded);
break;
}
}
}
static public enum SpaceTimeRuntimePropertyEnum implements UmlgRuntimeProperty {
name(/* qualifiedName */ "umlgtest::org::umlg::componenttest::SpaceTime::name",/* persistentName */ "name",/* inverseName */ "inverseOf::name",/* inverseQualifiedName */ "inverseOf::umlgtest::org::umlg::componenttest::SpaceTime::name",/* isAssociationClassOne */ false,/* isMemberEndOfAssociationClass */ false,/* associationClassPropertyNameField */ "null",/* inverseAssociationClassPropertyNameField */ "null",/* isAssociationClassProperty */ false,/* isOnePrimitivePropertyOfAssociationClass */ false,/* isOnePrimitive */ true,/* isReadOnly */ false,/* dataTypeEnum */ null,/* validations */ Collections.emptyList(),/* isManyPrimitive */ false,/* oneEnumeration */ false,/* manyEnumeration */ false,/* isControllingSide */ true,/* isComposite */ false,/* isInverseComposite */ false,/* label */ UmlgLabelConverterFactory.getUmlgLabelConverter().convert("name"),/* isOneToOne */ false,/* isOneToMany */ false,/* isManyToOne */ true,/* isManyToMany */ false,/* upper */ 1,/* lower */ 0,/* inverseUpper */ 1,/* isQualified */ false,/* isInverseQualified */ false,/* isOrdered */ false,/* isInverseOrdered */ false,/* isUnique */ true,/* isInverseUnique */ false,/* isDerived */ false,/* isNavigable */ true,/* propertyType */ String.class,/* json */ "{\"name\": \"name\", \"associationClassOne\": false, \"memberEndOfAssociationClass\": false, \"associationClassPropertyName\": null, \"inverseAssociationClassPropertyName\": null, \"associationClassProperty\": false, \"onePrimitivePropertyOfAssociationClass\": false, \"onePrimitive\": true, \"readOnly\": false, \"dataTypeEnum\": null, \"validations\": null, \"qualifiedName\": \"umlgtest::org::umlg::componenttest::SpaceTime::name\", \"persistentName\": \"name\", \"inverseName\": \"inverseOf::name\", \"inverseQualifiedName\": \"inverseOf::umlgtest::org::umlg::componenttest::SpaceTime::name\", \"manyPrimitive\": false, \"oneEnumeration\": false, \"manyEnumeration\": false, \"controllingSide\": true, \"composite\": false, \"inverseComposite\": false, \"oneToOne\": false, \"oneToMany\": false, \"manyToOne\": true, \"manyToMany\": false, \"upper\": 1, \"lower\": 0, \"inverseUpper\": 1, \"label\": \"name\", \"qualified\": false, \"inverseQualified\": false, \"ordered\": false, \"inverseOrdered\": false, \"unique\": true, \"inverseUnique\": false, \"derived\": false, \"navigable\": true}",/* isChangeListenerAttribute */ false),
updatedOn(/* qualifiedName */ "umlglib::org::umlg::BaseModelUmlg::updatedOn",/* persistentName */ "updatedOn",/* inverseName */ "inverseOf::updatedOn",/* inverseQualifiedName */ "inverseOf::umlglib::org::umlg::BaseModelUmlg::updatedOn",/* isAssociationClassOne */ false,/* isMemberEndOfAssociationClass */ false,/* associationClassPropertyNameField */ "null",/* inverseAssociationClassPropertyNameField */ "null",/* isAssociationClassProperty */ false,/* isOnePrimitivePropertyOfAssociationClass */ false,/* isOnePrimitive */ false,/* isReadOnly */ false,/* dataTypeEnum */ DataTypeEnum.DateTime,/* validations */ Arrays.asList(new DateTimeValidation()),/* isManyPrimitive */ false,/* oneEnumeration */ false,/* manyEnumeration */ false,/* isControllingSide */ true,/* isComposite */ false,/* isInverseComposite */ false,/* label */ UmlgLabelConverterFactory.getUmlgLabelConverter().convert("updatedOn"),/* isOneToOne */ false,/* isOneToMany */ false,/* isManyToOne */ true,/* isManyToMany */ false,/* upper */ 1,/* lower */ 1,/* inverseUpper */ 1,/* isQualified */ false,/* isInverseQualified */ false,/* isOrdered */ false,/* isInverseOrdered */ false,/* isUnique */ true,/* isInverseUnique */ false,/* isDerived */ false,/* isNavigable */ true,/* propertyType */ LocalDateTime.class,/* json */ "{\"name\": \"updatedOn\", \"associationClassOne\": false, \"memberEndOfAssociationClass\": false, \"associationClassPropertyName\": null, \"inverseAssociationClassPropertyName\": null, \"associationClassProperty\": false, \"onePrimitivePropertyOfAssociationClass\": false, \"onePrimitive\": false, \"readOnly\": false, \"dataTypeEnum\": \"" + DataTypeEnum.DateTime.toString() + "\", \"validations\": {\"dateTime\": {}}, \"qualifiedName\": \"umlglib::org::umlg::BaseModelUmlg::updatedOn\", \"persistentName\": \"updatedOn\", \"inverseName\": \"inverseOf::updatedOn\", \"inverseQualifiedName\": \"inverseOf::umlglib::org::umlg::BaseModelUmlg::updatedOn\", \"manyPrimitive\": false, \"oneEnumeration\": false, \"manyEnumeration\": false, \"controllingSide\": true, \"composite\": false, \"inverseComposite\": false, \"oneToOne\": false, \"oneToMany\": false, \"manyToOne\": true, \"manyToMany\": false, \"upper\": 1, \"lower\": 1, \"inverseUpper\": 1, \"label\": \"updatedOn\", \"qualified\": false, \"inverseQualified\": false, \"ordered\": false, \"inverseOrdered\": false, \"unique\": true, \"inverseUnique\": false, \"derived\": false, \"navigable\": true}",/* isChangeListenerAttribute */ false),
space(/* qualifiedName */ "umlgtest::org::umlg::componenttest::SpaceTime::space",/* persistentName */ "space",/* inverseName */ "spaceTime",/* inverseQualifiedName */ "umlgtest::org::umlg::componenttest::A__::spaceTime",/* isAssociationClassOne */ false,/* isMemberEndOfAssociationClass */ false,/* associationClassPropertyNameField */ "null",/* inverseAssociationClassPropertyNameField */ "null",/* isAssociationClassProperty */ false,/* isOnePrimitivePropertyOfAssociationClass */ false,/* isOnePrimitive */ false,/* isReadOnly */ false,/* dataTypeEnum */ null,/* validations */ Collections.emptyList(),/* isManyPrimitive */ false,/* oneEnumeration */ false,/* manyEnumeration */ false,/* isControllingSide */ true,/* isComposite */ true,/* isInverseComposite */ false,/* label */ UmlgLabelConverterFactory.getUmlgLabelConverter().convert("A__"),/* isOneToOne */ true,/* isOneToMany */ false,/* isManyToOne */ false,/* isManyToMany */ false,/* upper */ 1,/* lower */ 1,/* inverseUpper */ 1,/* isQualified */ false,/* isInverseQualified */ false,/* isOrdered */ false,/* isInverseOrdered */ false,/* isUnique */ true,/* isInverseUnique */ true,/* isDerived */ false,/* isNavigable */ true,/* propertyType */ Space.class,/* json */ "{\"name\": \"space\", \"associationClassOne\": false, \"memberEndOfAssociationClass\": false, \"associationClassPropertyName\": null, \"inverseAssociationClassPropertyName\": null, \"associationClassProperty\": false, \"onePrimitivePropertyOfAssociationClass\": false, \"onePrimitive\": false, \"readOnly\": false, \"dataTypeEnum\": null, \"validations\": null, \"qualifiedName\": \"umlgtest::org::umlg::componenttest::SpaceTime::space\", \"persistentName\": \"space\", \"inverseName\": \"spaceTime\", \"inverseQualifiedName\": \"umlgtest::org::umlg::componenttest::A__::spaceTime\", \"manyPrimitive\": false, \"oneEnumeration\": false, \"manyEnumeration\": false, \"controllingSide\": true, \"composite\": true, \"inverseComposite\": false, \"oneToOne\": true, \"oneToMany\": false, \"manyToOne\": false, \"manyToMany\": false, \"upper\": 1, \"lower\": 1, \"inverseUpper\": 1, \"label\": \"A__\", \"qualified\": false, \"inverseQualified\": false, \"ordered\": false, \"inverseOrdered\": false, \"unique\": true, \"inverseUnique\": true, \"derived\": false, \"navigable\": true}",/* isChangeListenerAttribute */ false),
time(/* qualifiedName */ "umlgtest::org::umlg::componenttest::SpaceTime::time",/* persistentName */ "time",/* inverseName */ "spaceTime",/* inverseQualifiedName */ "umlgtest::org::umlg::componenttest::A__::spaceTime",/* isAssociationClassOne */ false,/* isMemberEndOfAssociationClass */ false,/* associationClassPropertyNameField */ "null",/* inverseAssociationClassPropertyNameField */ "null",/* isAssociationClassProperty */ false,/* isOnePrimitivePropertyOfAssociationClass */ false,/* isOnePrimitive */ false,/* isReadOnly */ false,/* dataTypeEnum */ null,/* validations */ Collections.emptyList(),/* isManyPrimitive */ false,/* oneEnumeration */ false,/* manyEnumeration */ false,/* isControllingSide */ true,/* isComposite */ true,/* isInverseComposite */ false,/* label */ UmlgLabelConverterFactory.getUmlgLabelConverter().convert("A__"),/* isOneToOne */ true,/* isOneToMany */ false,/* isManyToOne */ false,/* isManyToMany */ false,/* upper */ 1,/* lower */ 1,/* inverseUpper */ 1,/* isQualified */ false,/* isInverseQualified */ false,/* isOrdered */ false,/* isInverseOrdered */ false,/* isUnique */ true,/* isInverseUnique */ true,/* isDerived */ false,/* isNavigable */ true,/* propertyType */ Time.class,/* json */ "{\"name\": \"time\", \"associationClassOne\": false, \"memberEndOfAssociationClass\": false, \"associationClassPropertyName\": null, \"inverseAssociationClassPropertyName\": null, \"associationClassProperty\": false, \"onePrimitivePropertyOfAssociationClass\": false, \"onePrimitive\": false, \"readOnly\": false, \"dataTypeEnum\": null, \"validations\": null, \"qualifiedName\": \"umlgtest::org::umlg::componenttest::SpaceTime::time\", \"persistentName\": \"time\", \"inverseName\": \"spaceTime\", \"inverseQualifiedName\": \"umlgtest::org::umlg::componenttest::A__::spaceTime\", \"manyPrimitive\": false, \"oneEnumeration\": false, \"manyEnumeration\": false, \"controllingSide\": true, \"composite\": true, \"inverseComposite\": false, \"oneToOne\": true, \"oneToMany\": false, \"manyToOne\": false, \"manyToMany\": false, \"upper\": 1, \"lower\": 1, \"inverseUpper\": 1, \"label\": \"A__\", \"qualified\": false, \"inverseQualified\": false, \"ordered\": false, \"inverseOrdered\": false, \"unique\": true, \"inverseUnique\": true, \"derived\": false, \"navigable\": true}",/* isChangeListenerAttribute */ false),
universe(/* qualifiedName */ "umlgtest::org::umlg::componenttest::A__::universe",/* persistentName */ "universe",/* inverseName */ "spaceTime",/* inverseQualifiedName */ "umlgtest::org::umlg::concretetest::Universe::spaceTime",/* isAssociationClassOne */ false,/* isMemberEndOfAssociationClass */ false,/* associationClassPropertyNameField */ "null",/* inverseAssociationClassPropertyNameField */ "null",/* isAssociationClassProperty */ false,/* isOnePrimitivePropertyOfAssociationClass */ false,/* isOnePrimitive */ false,/* isReadOnly */ false,/* dataTypeEnum */ null,/* validations */ Collections.emptyList(),/* isManyPrimitive */ false,/* oneEnumeration */ false,/* manyEnumeration */ false,/* isControllingSide */ false,/* isComposite */ false,/* isInverseComposite */ true,/* label */ UmlgLabelConverterFactory.getUmlgLabelConverter().convert("A__"),/* isOneToOne */ true,/* isOneToMany */ false,/* isManyToOne */ false,/* isManyToMany */ false,/* upper */ 1,/* lower */ 1,/* inverseUpper */ 1,/* isQualified */ false,/* isInverseQualified */ false,/* isOrdered */ false,/* isInverseOrdered */ false,/* isUnique */ true,/* isInverseUnique */ true,/* isDerived */ false,/* isNavigable */ true,/* propertyType */ Universe.class,/* json */ "{\"name\": \"universe\", \"associationClassOne\": false, \"memberEndOfAssociationClass\": false, \"associationClassPropertyName\": null, \"inverseAssociationClassPropertyName\": null, \"associationClassProperty\": false, \"onePrimitivePropertyOfAssociationClass\": false, \"onePrimitive\": false, \"readOnly\": false, \"dataTypeEnum\": null, \"validations\": null, \"qualifiedName\": \"umlgtest::org::umlg::componenttest::A__::universe\", \"persistentName\": \"universe\", \"inverseName\": \"spaceTime\", \"inverseQualifiedName\": \"umlgtest::org::umlg::concretetest::Universe::spaceTime\", \"manyPrimitive\": false, \"oneEnumeration\": false, \"manyEnumeration\": false, \"controllingSide\": false, \"composite\": false, \"inverseComposite\": true, \"oneToOne\": true, \"oneToMany\": false, \"manyToOne\": false, \"manyToMany\": false, \"upper\": 1, \"lower\": 1, \"inverseUpper\": 1, \"label\": \"A__\", \"qualified\": false, \"inverseQualified\": false, \"ordered\": false, \"inverseOrdered\": false, \"unique\": true, \"inverseUnique\": true, \"derived\": false, \"navigable\": true}",/* isChangeListenerAttribute */ false),
tag(/* qualifiedName */ "umlglib::org::umlg::tag::tag_baseUmlg_1::tag",/* persistentName */ "tag",/* inverseName */ "baseUmlg",/* inverseQualifiedName */ "umlglib::org::umlg::tag::Tag::baseUmlg",/* isAssociationClassOne */ false,/* isMemberEndOfAssociationClass */ false,/* associationClassPropertyNameField */ "null",/* inverseAssociationClassPropertyNameField */ "null",/* isAssociationClassProperty */ false,/* isOnePrimitivePropertyOfAssociationClass */ false,/* isOnePrimitive */ false,/* isReadOnly */ false,/* dataTypeEnum */ null,/* validations */ Collections.emptyList(),/* isManyPrimitive */ false,/* oneEnumeration */ false,/* manyEnumeration */ false,/* isControllingSide */ false,/* isComposite */ false,/* isInverseComposite */ false,/* label */ UmlgLabelConverterFactory.getUmlgLabelConverter().convert("tag_baseUmlg_1"),/* isOneToOne */ false,/* isOneToMany */ false,/* isManyToOne */ false,/* isManyToMany */ true,/* upper */ -1,/* lower */ 0,/* inverseUpper */ -1,/* isQualified */ false,/* isInverseQualified */ false,/* isOrdered */ false,/* isInverseOrdered */ false,/* isUnique */ true,/* isInverseUnique */ true,/* isDerived */ false,/* isNavigable */ true,/* propertyType */ Tag.class,/* json */ "{\"name\": \"tag\", \"associationClassOne\": false, \"memberEndOfAssociationClass\": false, \"associationClassPropertyName\": null, \"inverseAssociationClassPropertyName\": null, \"associationClassProperty\": false, \"onePrimitivePropertyOfAssociationClass\": false, \"onePrimitive\": false, \"readOnly\": false, \"dataTypeEnum\": null, \"validations\": null, \"qualifiedName\": \"umlglib::org::umlg::tag::tag_baseUmlg_1::tag\", \"persistentName\": \"tag\", \"inverseName\": \"baseUmlg\", \"inverseQualifiedName\": \"umlglib::org::umlg::tag::Tag::baseUmlg\", \"manyPrimitive\": false, \"oneEnumeration\": false, \"manyEnumeration\": false, \"controllingSide\": false, \"composite\": false, \"inverseComposite\": false, \"oneToOne\": false, \"oneToMany\": false, \"manyToOne\": false, \"manyToMany\": true, \"upper\": -1, \"lower\": 0, \"inverseUpper\": -1, \"label\": \"tag_baseUmlg_1\", \"qualified\": false, \"inverseQualified\": false, \"ordered\": false, \"inverseOrdered\": false, \"unique\": true, \"inverseUnique\": true, \"derived\": false, \"navigable\": true}",/* isChangeListenerAttribute */ false),
createdOn(/* qualifiedName */ "umlglib::org::umlg::BaseModelUmlg::createdOn",/* persistentName */ "createdOn",/* inverseName */ "inverseOf::createdOn",/* inverseQualifiedName */ "inverseOf::umlglib::org::umlg::BaseModelUmlg::createdOn",/* isAssociationClassOne */ false,/* isMemberEndOfAssociationClass */ false,/* associationClassPropertyNameField */ "null",/* inverseAssociationClassPropertyNameField */ "null",/* isAssociationClassProperty */ false,/* isOnePrimitivePropertyOfAssociationClass */ false,/* isOnePrimitive */ false,/* isReadOnly */ false,/* dataTypeEnum */ DataTypeEnum.DateTime,/* validations */ Arrays.asList(new DateTimeValidation()),/* isManyPrimitive */ false,/* oneEnumeration */ false,/* manyEnumeration */ false,/* isControllingSide */ true,/* isComposite */ false,/* isInverseComposite */ false,/* label */ UmlgLabelConverterFactory.getUmlgLabelConverter().convert("createdOn"),/* isOneToOne */ false,/* isOneToMany */ false,/* isManyToOne */ true,/* isManyToMany */ false,/* upper */ 1,/* lower */ 1,/* inverseUpper */ 1,/* isQualified */ false,/* isInverseQualified */ false,/* isOrdered */ false,/* isInverseOrdered */ false,/* isUnique */ true,/* isInverseUnique */ false,/* isDerived */ false,/* isNavigable */ true,/* propertyType */ LocalDateTime.class,/* json */ "{\"name\": \"createdOn\", \"associationClassOne\": false, \"memberEndOfAssociationClass\": false, \"associationClassPropertyName\": null, \"inverseAssociationClassPropertyName\": null, \"associationClassProperty\": false, \"onePrimitivePropertyOfAssociationClass\": false, \"onePrimitive\": false, \"readOnly\": false, \"dataTypeEnum\": \"" + DataTypeEnum.DateTime.toString() + "\", \"validations\": {\"dateTime\": {}}, \"qualifiedName\": \"umlglib::org::umlg::BaseModelUmlg::createdOn\", \"persistentName\": \"createdOn\", \"inverseName\": \"inverseOf::createdOn\", \"inverseQualifiedName\": \"inverseOf::umlglib::org::umlg::BaseModelUmlg::createdOn\", \"manyPrimitive\": false, \"oneEnumeration\": false, \"manyEnumeration\": false, \"controllingSide\": true, \"composite\": false, \"inverseComposite\": false, \"oneToOne\": false, \"oneToMany\": false, \"manyToOne\": true, \"manyToMany\": false, \"upper\": 1, \"lower\": 1, \"inverseUpper\": 1, \"label\": \"createdOn\", \"qualified\": false, \"inverseQualified\": false, \"ordered\": false, \"inverseOrdered\": false, \"unique\": true, \"inverseUnique\": false, \"derived\": false, \"navigable\": true}",/* isChangeListenerAttribute */ false);
private String _qualifiedName;
private String _persistentName;
private String _inverseName;
private String _inverseQualifiedName;
private boolean _associationClassOne;
private boolean _memberEndOfAssociationClass;
private String _associationClassPropertyName;
private String _inverseAssociationClassPropertyName;
private boolean _associationClassProperty;
private boolean _onePrimitivePropertyOfAssociationClass;
private boolean _onePrimitive;
private Boolean _readOnly;
private DataTypeEnum dataTypeEnum;
private List validations;
private boolean _manyPrimitive;
private boolean _oneEnumeration;
private boolean _manyEnumeration;
private boolean _controllingSide;
private boolean _composite;
private boolean _inverseComposite;
private String _label;
private boolean _oneToOne;
private boolean _oneToMany;
private boolean _manyToOne;
private boolean _manyToMany;
private int _upper;
private int _lower;
private int _inverseUpper;
private boolean _qualified;
private boolean _inverseQualified;
private boolean _ordered;
private boolean _inverseOrdered;
private boolean _unique;
private boolean _inverseUnique;
private boolean _derived;
private boolean _navigability;
private Class _propertyType;
private String _json;
private boolean _changeListener;
/**
* constructor for SpaceTimeRuntimePropertyEnum
*
* @param _qualifiedName
* @param _persistentName
* @param _inverseName
* @param _inverseQualifiedName
* @param _associationClassOne
* @param _memberEndOfAssociationClass
* @param _associationClassPropertyName
* @param _inverseAssociationClassPropertyName
* @param _associationClassProperty
* @param _onePrimitivePropertyOfAssociationClass
* @param _onePrimitive
* @param _readOnly
* @param dataTypeEnum
* @param validations
* @param _manyPrimitive
* @param _oneEnumeration
* @param _manyEnumeration
* @param _controllingSide
* @param _composite
* @param _inverseComposite
* @param _label
* @param _oneToOne
* @param _oneToMany
* @param _manyToOne
* @param _manyToMany
* @param _upper
* @param _lower
* @param _inverseUpper
* @param _qualified
* @param _inverseQualified
* @param _ordered
* @param _inverseOrdered
* @param _unique
* @param _inverseUnique
* @param _derived
* @param _navigability
* @param _propertyType
* @param _json
* @param _changeListener
*/
private SpaceTimeRuntimePropertyEnum(String _qualifiedName, String _persistentName, String _inverseName, String _inverseQualifiedName, boolean _associationClassOne, boolean _memberEndOfAssociationClass, String _associationClassPropertyName, String _inverseAssociationClassPropertyName, boolean _associationClassProperty, boolean _onePrimitivePropertyOfAssociationClass, boolean _onePrimitive, Boolean _readOnly, DataTypeEnum dataTypeEnum, List validations, boolean _manyPrimitive, boolean _oneEnumeration, boolean _manyEnumeration, boolean _controllingSide, boolean _composite, boolean _inverseComposite, String _label, boolean _oneToOne, boolean _oneToMany, boolean _manyToOne, boolean _manyToMany, int _upper, int _lower, int _inverseUpper, boolean _qualified, boolean _inverseQualified, boolean _ordered, boolean _inverseOrdered, boolean _unique, boolean _inverseUnique, boolean _derived, boolean _navigability, Class _propertyType, String _json, boolean _changeListener) {
this._qualifiedName = _qualifiedName;
this._persistentName = _persistentName;
this._inverseName = _inverseName;
this._inverseQualifiedName = _inverseQualifiedName;
this._associationClassOne = _associationClassOne;
this._memberEndOfAssociationClass = _memberEndOfAssociationClass;
this._associationClassPropertyName = _associationClassPropertyName;
this._inverseAssociationClassPropertyName = _inverseAssociationClassPropertyName;
this._associationClassProperty = _associationClassProperty;
this._onePrimitivePropertyOfAssociationClass = _onePrimitivePropertyOfAssociationClass;
this._onePrimitive = _onePrimitive;
this._readOnly = _readOnly;
this.dataTypeEnum = dataTypeEnum;
this.validations = validations;
this._manyPrimitive = _manyPrimitive;
this._oneEnumeration = _oneEnumeration;
this._manyEnumeration = _manyEnumeration;
this._controllingSide = _controllingSide;
this._composite = _composite;
this._inverseComposite = _inverseComposite;
this._label = _label;
this._oneToOne = _oneToOne;
this._oneToMany = _oneToMany;
this._manyToOne = _manyToOne;
this._manyToMany = _manyToMany;
this._upper = _upper;
this._lower = _lower;
this._inverseUpper = _inverseUpper;
this._qualified = _qualified;
this._inverseQualified = _inverseQualified;
this._ordered = _ordered;
this._inverseOrdered = _inverseOrdered;
this._unique = _unique;
this._inverseUnique = _inverseUnique;
this._derived = _derived;
this._navigability = _navigability;
this._propertyType = _propertyType;
this._json = _json;
this._changeListener = _changeListener;
}
static public String asJson() {
int count = 1;
StringBuilder sb = new StringBuilder();;
sb.append("{\"name\": \"SpaceTime\", ");
sb.append("\"qualifiedName\": \"umlgtest::org::umlg::componenttest::SpaceTime\", ");
sb.append("\"uri\": \"TODO\", ");
sb.append("\"properties\": [");
for ( SpaceTimeRuntimePropertyEnum l : SpaceTimeRuntimePropertyEnum.values() ) {
sb.append(l.toJson());
if ( count < SpaceTimeRuntimePropertyEnum.values().length ) {
count++;
sb.append(",");
}
}
sb.append("]}");
return sb.toString();
}
static public SpaceTimeRuntimePropertyEnum fromInverseQualifiedName(String inverseQualifiedName) {
if ( createdOn.getInverseQualifiedName().equals(inverseQualifiedName) ) {
return createdOn;
}
if ( tag.getInverseQualifiedName().equals(inverseQualifiedName) ) {
return tag;
}
if ( universe.getInverseQualifiedName().equals(inverseQualifiedName) ) {
return universe;
}
if ( time.getInverseQualifiedName().equals(inverseQualifiedName) ) {
return time;
}
if ( space.getInverseQualifiedName().equals(inverseQualifiedName) ) {
return space;
}
if ( updatedOn.getInverseQualifiedName().equals(inverseQualifiedName) ) {
return updatedOn;
}
if ( name.getInverseQualifiedName().equals(inverseQualifiedName) ) {
return name;
}
return null;
}
static public SpaceTimeRuntimePropertyEnum fromLabel(String _label) {
if ( createdOn.getLabel().equals(_label) ) {
return createdOn;
}
if ( tag.getLabel().equals(_label) ) {
return tag;
}
if ( universe.getLabel().equals(_label) ) {
return universe;
}
if ( time.getLabel().equals(_label) ) {
return time;
}
if ( space.getLabel().equals(_label) ) {
return space;
}
if ( updatedOn.getLabel().equals(_label) ) {
return updatedOn;
}
if ( name.getLabel().equals(_label) ) {
return name;
}
return null;
}
static public SpaceTimeRuntimePropertyEnum fromQualifiedName(String qualifiedName) {
if ( createdOn.getQualifiedName().equals(qualifiedName) ) {
return createdOn;
}
if ( tag.getQualifiedName().equals(qualifiedName) ) {
return tag;
}
if ( universe.getQualifiedName().equals(qualifiedName) ) {
return universe;
}
if ( time.getQualifiedName().equals(qualifiedName) ) {
return time;
}
if ( space.getQualifiedName().equals(qualifiedName) ) {
return space;
}
if ( updatedOn.getQualifiedName().equals(qualifiedName) ) {
return updatedOn;
}
if ( name.getQualifiedName().equals(qualifiedName) ) {
return name;
}
return null;
}
public String getAssociationClassPropertyName() {
return this._associationClassPropertyName;
}
public DataTypeEnum getDataTypeEnum() {
return this.dataTypeEnum;
}
public String getInverseAssociationClassPropertyName() {
return this._inverseAssociationClassPropertyName;
}
public String getInverseName() {
return this._inverseName;
}
public String getInverseQualifiedName() {
return this._inverseQualifiedName;
}
public int getInverseUpper() {
return this._inverseUpper;
}
public String getJson() {
return this._json;
}
public String getLabel() {
return this._label;
}
public int getLower() {
return this._lower;
}
public String getPersistentName() {
return this._persistentName;
}
public Class getPropertyType() {
return this._propertyType;
}
public String getQualifiedName() {
return this._qualifiedName;
}
public Boolean getReadOnly() {
return this._readOnly;
}
public int getUpper() {
return this._upper;
}
public List getValidations() {
return this.validations;
}
public boolean isAssociationClassOne() {
return this._associationClassOne;
}
public boolean isAssociationClassProperty() {
return this._associationClassProperty;
}
public boolean isChangeListener() {
return this._changeListener;
}
public boolean isComposite() {
return this._composite;
}
public boolean isControllingSide() {
return this._controllingSide;
}
public boolean isDerived() {
return this._derived;
}
public boolean isInverseComposite() {
return this._inverseComposite;
}
public boolean isInverseOrdered() {
return this._inverseOrdered;
}
public boolean isInverseQualified() {
return this._inverseQualified;
}
public boolean isInverseUnique() {
return this._inverseUnique;
}
public boolean isManyEnumeration() {
return this._manyEnumeration;
}
public boolean isManyPrimitive() {
return this._manyPrimitive;
}
public boolean isManyToMany() {
return this._manyToMany;
}
public boolean isManyToOne() {
return this._manyToOne;
}
public boolean isMemberEndOfAssociationClass() {
return this._memberEndOfAssociationClass;
}
public boolean isNavigability() {
return this._navigability;
}
public boolean isOneEnumeration() {
return this._oneEnumeration;
}
public boolean isOnePrimitive() {
return this._onePrimitive;
}
public boolean isOnePrimitivePropertyOfAssociationClass() {
return this._onePrimitivePropertyOfAssociationClass;
}
public boolean isOneToMany() {
return this._oneToMany;
}
public boolean isOneToOne() {
return this._oneToOne;
}
public boolean isOrdered() {
return this._ordered;
}
public boolean isQualified() {
return this._qualified;
}
public boolean isUnique() {
return this._unique;
}
@Override
public boolean isValid(int elementCount) {
if ( isQualified() ) {
return elementCount >= getLower();
} else {
return (getUpper() == -1 || elementCount <= getUpper()) && elementCount >= getLower();
}
}
@Override
public String toJson() {
return getJson();
}
}
}