org.umlg.ocl.Collect2 Maven / Gradle / Ivy
The newest version!
package org.umlg.ocl;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.util.ArrayList;
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 java.util.UUID;
import org.apache.commons.text.StringEscapeUtils;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.umlg.ocl.Collect3.Collect3RuntimePropertyEnum;
import org.umlg.ocl.collect.Collect1;
import org.umlg.ocl.collect.Enumeration1;
import org.umlg.runtime.adaptor.TransactionThreadEntityVar;
import org.umlg.runtime.adaptor.UMLG;
import org.umlg.runtime.adaptor.UmlgLabelConverterFactory;
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.BaseUmlgCompositionNode;
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.util.ObjectMapperFactory;
import org.umlg.runtime.util.UmlgFormatter;
import org.umlg.runtime.validation.UmlgConstraintViolation;
import org.umlg.runtime.validation.UmlgConstraintViolationException;
import org.umlg.runtime.validation.UmlgValidation;
public class Collect2 extends BaseUmlgCompositionNode implements UmlgRootNode, CompositionNode {
static final public long serialVersionUID = 1L;
private UmlgSet collect1;
private UmlgSet collect3;
private UmlgSet enumeration1;
private UmlgSet password;
private UmlgSet really;
private String tmpId; // tmpId is only used the umlg restlet gui. It is never persisted. Its value is generated by the gui.
/**
* constructor for Collect2
*
* @param id
*/
public Collect2(Object id) {
super(id);
}
/**
* constructor for Collect2
*
* @param vertex
*/
public Collect2(Vertex vertex) {
super(vertex);
}
/**
* default constructor for Collect2
*/
public Collect2() {
this(true);
}
/**
* constructor for Collect2
*
* @param persistent
*/
public Collect2(Boolean persistent) {
super(persistent);
}
public void addToCollect1(Collect1 collect1) {
if ( collect1 != null ) {
if ( !this.collect1.isEmpty() ) {
throw new RuntimeException("Property umlgtest::org::umlg::ocl::collect::collect1_collect2::collect1 is a one and already has a value!");
}
this.collect1.add(collect1);
}
}
public void addToCollect1IgnoreInverse(Collect1 collect1) {
if ( collect1 != null ) {
if ( !this.collect1.isEmpty() ) {
throw new RuntimeException("Property umlgtest::org::umlg::ocl::collect::collect1_collect2::collect1 is a one and already has a value!");
}
this.collect1.addIgnoreInverse(collect1);
}
}
public void addToCollect3(Collect3 collect3) {
if ( collect3 != null ) {
collect3.clearCollect2();
collect3.initialiseProperty(Collect3RuntimePropertyEnum.collect2, false, true);
removeFromCollect3(collect3);
}
if ( collect3 != null ) {
this.collect3.add(collect3);
}
}
public void addToCollect3(UmlgSet collect3) {
if ( !collect3.isEmpty() ) {
this.collect3.addAll(collect3);
}
}
public void addToCollect3IgnoreInverse(Collect3 collect3) {
if ( collect3 != null ) {
collect3.clearCollect2();
collect3.initialiseProperty(Collect3RuntimePropertyEnum.collect2, false, true);
removeFromCollect3(collect3);
}
if ( collect3 != null ) {
this.collect3.addIgnoreInverse(collect3);
}
}
public void addToEnumeration1(Enumeration1 enumeration1) {
if ( !this.enumeration1.isEmpty() ) {
throw new RuntimeException("Property is a one and already has value, first clear it before adding!");
}
if ( enumeration1 != null ) {
List violations = validateEnumeration1(enumeration1);
if ( violations.isEmpty() ) {
this.enumeration1.add(enumeration1);
} else {
throw new UmlgConstraintViolationException(violations);
}
}
}
public void addToEnumeration1IgnoreInverse(Enumeration1 enumeration1) {
if ( !this.enumeration1.isEmpty() ) {
throw new RuntimeException("Property is a one and already has value, first clear it before adding!");
}
if ( enumeration1 != null ) {
List violations = validateEnumeration1(enumeration1);
if ( violations.isEmpty() ) {
this.enumeration1.add(enumeration1);
} else {
throw new UmlgConstraintViolationException(violations);
}
}
}
public void addToPassword(String password) {
if ( !this.password.isEmpty() ) {
throw new RuntimeException("Property is a one and already has value, first clear it before adding!");
}
if ( password != null ) {
List violations = validatePassword(password);
if ( violations.isEmpty() ) {
this.password.add(password);
} else {
throw new UmlgConstraintViolationException(violations);
}
}
}
public void addToPasswordIgnoreInverse(String password) {
if ( !this.password.isEmpty() ) {
throw new RuntimeException("Property is a one and already has value, first clear it before adding!");
}
if ( password != null ) {
List violations = validatePassword(password);
if ( violations.isEmpty() ) {
this.password.add(password);
} else {
throw new UmlgConstraintViolationException(violations);
}
}
}
public void addToReally(Double really) {
if ( !this.really.isEmpty() ) {
throw new RuntimeException("Property is a one and already has value, first clear it before adding!");
}
if ( really != null ) {
List violations = validateReally(really);
if ( violations.isEmpty() ) {
this.really.add(really);
} else {
throw new UmlgConstraintViolationException(violations);
}
}
}
public void addToReallyIgnoreInverse(Double really) {
if ( !this.really.isEmpty() ) {
throw new RuntimeException("Property is a one and already has value, first clear it before adding!");
}
if ( really != null ) {
List violations = validateReally(really);
if ( violations.isEmpty() ) {
this.really.add(really);
} else {
throw new UmlgConstraintViolationException(violations);
}
}
}
static public UmlgSet extends Collect2> allInstances(Filter filter) {
UmlgSet result = new UmlgMemorySet();
result.addAll(UMLG.get().allInstances(Collect2.class.getName(), filter));
return result;
}
static public UmlgSet extends Collect2> allInstances() {
UmlgSet result = new UmlgMemorySet();
result.addAll(UMLG.get().allInstances(Collect2.class.getName()));
return result;
}
@Override
public List checkClassConstraints() {
List result = new ArrayList();
return result;
}
public void clearCollect1() {
this.collect1.clear();
}
public void clearCollect3() {
this.collect3.clear();
}
public void clearEnumeration1() {
this.enumeration1.clear();
}
public void clearPassword() {
this.password.clear();
}
public void clearReally() {
this.really.clear();
}
@Override
public void delete() {
this.collect1.clear();
this.collect3.clear();
this.password.clear();
TransactionThreadEntityVar.remove(this);
this.vertex.remove();
}
@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 reallyAsNumber = (Number)propertyMap.get("really");
if ( propertyMap.containsKey("enumeration1") ) {
if ( propertyMap.get("enumeration1") != null ) {
Enumeration1 enumeration1 = Enumeration1.fromJson((String)propertyMap.get("enumeration1"));
setEnumeration1(enumeration1);
} else {
setEnumeration1(null);
}
}
if ( propertyMap.containsKey("password") ) {
if ( propertyMap.get("password") != null ) {
String password = (java.lang.String)propertyMap.get("password");
setPassword(password);
} else {
setPassword(null);
}
}
if ( propertyMap.containsKey("really") ) {
if ( propertyMap.get("really") != null ) {
Double really = reallyAsNumber != null ? reallyAsNumber.doubleValue() : null;
setReally(really);
} else {
setReally(null);
}
}
if ( propertyMap.containsKey("tmpId") ) {
if ( propertyMap.get("tmpId") != null ) {
this.tmpId = (String)propertyMap.get("tmpId");
UmlgTmpIdManager.INSTANCE.put(this.tmpId, getId());
} else {
this.tmpId = null;
}
}
}
@SuppressWarnings( "unchecked")
@Override
public void fromJsonNonCompositeOne(Map propertyMap) {
if ( propertyMap.containsKey("collect1") ) {
if ( propertyMap.get("collect1") != null ) {
Map collect1Map = (Map)propertyMap.get("collect1");
if ( collect1Map.isEmpty() || collect1Map.get("id") == null ) {
setCollect1(null);
} else {
setCollect1((Collect1)UMLG.get().getEntity((collect1Map.get("id"))));
}
} else {
setCollect1(null);
}
}
}
@Override
public void fromJsonNonCompositeRequiredMany(Map propertyMap) {
}
public UmlgSet getCollect3() {
return this.collect3;
}
public Enumeration1 getEnumeration1() {
UmlgSet tmp = this.enumeration1;
if ( !tmp.isEmpty() ) {
return tmp.iterator().next();
} else {
return null;
}
}
@Override
public String getMetaDataAsJson() {
return Collect2.Collect2RuntimePropertyEnum.asJson();
}
@Override
public UmlgNode getOwningObject() {
return null;
}
public String getPassword() {
UmlgSet tmp = this.password;
if ( !tmp.isEmpty() ) {
return tmp.iterator().next();
} else {
return null;
}
}
@Override
public String getQualifiedName() {
return "umlgtest::org::umlg::ocl::Collect2";
}
/**
* 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 = Collections.emptyList();
Collect2RuntimePropertyEnum runtimeProperty;
if ( !inverse ) {
runtimeProperty = Collect2RuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getQualifiedName());
} else {
runtimeProperty = Collect2RuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getInverseQualifiedName());
}
if ( runtimeProperty != null && result.isEmpty() ) {
switch ( runtimeProperty ) {
default:
result = Collections.emptyList();
}
}
return result;
}
public Double getReally() {
UmlgSet tmp = this.really;
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 = 0;
Collect2RuntimePropertyEnum runtimeProperty;
if ( !inverse ) {
runtimeProperty = Collect2RuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getQualifiedName());
} else {
runtimeProperty = Collect2RuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getInverseQualifiedName());
}
if ( runtimeProperty != null && result == 0 ) {
switch ( runtimeProperty ) {
case enumeration1:
result = enumeration1.size();
break;
case collect1:
result = collect1.size();
break;
case collect3:
result = collect3.size();
break;
case password:
result = password.size();
break;
case really:
result = really.size();
break;
default:
result = 0;
}
}
return result;
}
@Override
public String getUid() {
String uid;
if ( !this.vertex.property("uid").isPresent() && this.vertex.property("uid").value() != null ) {
uid=UUID.randomUUID().toString();
this.vertex.property("uid", uid);
} else {
uid=this.vertex.value("uid");
}
return uid;
}
@Override
public boolean hasOnlyOneCompositeParent() {
int result = 0;
return result == 1;
}
public void initDataTypeVariablesWithDefaultValues() {
}
public void initVariables() {
}
/**
* boolean properties' default values are initialized in the constructor via z_internalBooleanProperties
*
* @param loaded
*/
@Override
public void initialiseProperties(boolean loaded) {
this.enumeration1 = new UmlgSetImpl(this, PropertyTree.from(Collect2RuntimePropertyEnum.enumeration1), loaded);
this.collect1 = new UmlgSetImpl(this, PropertyTree.from(Collect2RuntimePropertyEnum.collect1), loaded);
this.collect3 = new UmlgSetImpl(this, PropertyTree.from(Collect2RuntimePropertyEnum.collect3), loaded);
this.password = new UmlgSetImpl(this, PropertyTree.from(Collect2RuntimePropertyEnum.password), loaded);
this.really = new UmlgSetImpl(this, PropertyTree.from(Collect2RuntimePropertyEnum.really), loaded);
}
@Override
public void initialiseProperty(UmlgRuntimeProperty tumlRuntimeProperty, boolean inverse, boolean loaded) {
Collect2RuntimePropertyEnum runtimeProperty;
if ( !inverse ) {
runtimeProperty = (Collect2RuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getQualifiedName()));
} else {
runtimeProperty = (Collect2RuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getInverseQualifiedName()));
}
if ( runtimeProperty != null ) {
switch ( runtimeProperty ) {
case enumeration1:
this.enumeration1 = new UmlgSetImpl(this, PropertyTree.from(Collect2RuntimePropertyEnum.enumeration1), loaded);
break;
case collect1:
this.collect1 = new UmlgSetImpl(this, PropertyTree.from(Collect2RuntimePropertyEnum.collect1), loaded);
break;
case collect3:
this.collect3 = new UmlgSetImpl(this, PropertyTree.from(Collect2RuntimePropertyEnum.collect3), loaded);
break;
case password:
this.password = new UmlgSetImpl(this, PropertyTree.from(Collect2RuntimePropertyEnum.password), loaded);
break;
case really:
this.really = new UmlgSetImpl(this, PropertyTree.from(Collect2RuntimePropertyEnum.really), loaded);
break;
}
}
}
@Override
public UmlgRuntimeProperty inverseAdder(UmlgRuntimeProperty tumlRuntimeProperty, boolean inverse, UmlgNode umlgNode) {
Collect2RuntimePropertyEnum runtimeProperty;
if ( !inverse ) {
runtimeProperty = (Collect2RuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getQualifiedName()));
} else {
runtimeProperty = (Collect2RuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getInverseQualifiedName()));
}
if ( runtimeProperty != null ) {
switch ( runtimeProperty ) {
case collect1:
this.collect1.inverseAdder((Collect1)umlgNode);
break;
case collect3:
this.collect3.inverseAdder((Collect3)umlgNode);
break;
}
return runtimeProperty;
} else {
return null;
}
}
@Override
public boolean isTinkerRoot() {
return true;
}
public UmlgSet lookupFor_collect2_collect1() {
UmlgSet result = new UmlgMemorySet();
Filter filter = new Filter() {
@Override
public boolean filter(Collect1 entity){
return !entity.getCollect2().contains(Collect2.this);
}
};
result.addAll(org.umlg.ocl.collect.Collect1.allInstances(filter));
return result;
}
public UmlgSet lookupFor_collect2_collect3() {
UmlgSet result = new UmlgMemorySet();
Filter filter = new Filter() {
@Override
public boolean filter(Collect3 entity){
return entity.z_internal_getCollect2() == null;
}
};
result.addAll(org.umlg.ocl.Collect3.allInstances(filter));
return result;
}
public void removeFromCollect1(Collect1 collect1) {
if ( collect1 != null ) {
this.collect1.remove(collect1);
}
}
public void removeFromCollect1(UmlgSet collect1) {
if ( !collect1.isEmpty() ) {
this.collect1.removeAll(collect1);
}
}
public void removeFromCollect3(Collect3 collect3) {
if ( collect3 != null ) {
this.collect3.remove(collect3);
}
}
public void removeFromCollect3(UmlgSet collect3) {
if ( !collect3.isEmpty() ) {
this.collect3.removeAll(collect3);
}
}
public void removeFromEnumeration1(Enumeration1 enumeration1) {
if ( enumeration1 != null ) {
this.enumeration1.remove(enumeration1);
}
}
public void removeFromEnumeration1(UmlgSet enumeration1) {
if ( !enumeration1.isEmpty() ) {
this.enumeration1.removeAll(enumeration1);
}
}
public void removeFromPassword(String password) {
if ( password != null ) {
this.password.remove(password);
}
}
public void removeFromPassword(UmlgSet password) {
if ( !password.isEmpty() ) {
this.password.removeAll(password);
}
}
public void removeFromReally(Double really) {
if ( really != null ) {
this.really.remove(really);
}
}
public void removeFromReally(UmlgSet really) {
if ( !really.isEmpty() ) {
this.really.removeAll(really);
}
}
public void setCollect1(Collect1 collect1) {
clearCollect1();
addToCollect1(collect1);
}
public void setCollect3(UmlgSet collect3) {
clearCollect3();
if ( collect3 != null ) {
addToCollect3(collect3);
}
}
public void setEnumeration1(Enumeration1 enumeration1) {
if ( enumeration1 == null ) {
clearEnumeration1();
} else {
z_internalClearEnumeration1();
}
addToEnumeration1(enumeration1);
}
public void setPassword(String password) {
if ( password == null ) {
clearPassword();
} else {
z_internalClearPassword();
}
addToPassword(password);
}
public void setReally(Double really) {
if ( really == null ) {
clearReally();
} else {
z_internalClearReally();
}
addToReally(really);
}
/**
* deep indicates that components also be serialized.
*
* @param deep
*/
@Override
public String toJson(Boolean deep) {
StringBuilder sb = new StringBuilder();
if ( this.tmpId != null ) {
sb.append("\"tmpId\": \"" + this.tmpId + "\", ");
}
sb.append("\"id\": \"" + getId() + "\", ");
sb.append("\"enumeration1\": " + (getEnumeration1() == null ? null : "\"" + getEnumeration1().toJson() + "\""));
sb.append(", ");
if ( z_internal_getCollect1() != null ) {
if ( UmlgTmpIdManager.INSTANCE.get(z_internal_getCollect1().getId()) != null ) {
sb.append("\"collect1\": " + "{\"id\": \"" + z_internal_getCollect1().getId() + "\", \"tmpId\": \"" + UmlgTmpIdManager.INSTANCE.get(z_internal_getCollect1().getId()) + "\",\"displayName\": \"" + z_internal_getCollect1().getName() + "\"}" + "");
} else {
sb.append("\"collect1\": " + "{\"id\": \"" + z_internal_getCollect1().getId() + "\", \"displayName\": \"" + z_internal_getCollect1().getName() + "\"}" + "");
}
} else {
sb.append("\"collect1\": " + "{\"id\": " + null + ", \"displayName\": " + null + "}");
}
sb.append(", ");
sb.append("\"password\": " + (getPassword() != null ? "\"" + getPassword() + "\"" : null ));
sb.append(", ");
sb.append("\"really\": " + getReally() + "");
sb.append(", ");
sb.append("\"qualifiedName\": \"" + getQualifiedName() + "\"");
sb.append(", ");
//PlaceHolder for restful
sb.append("\"uri\": {}");
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) {
StringBuilder sb = new StringBuilder();
if ( this.tmpId != null ) {
sb.append("\"tmpId\": \"" + this.tmpId + "\", ");
}
sb.append("\"id\": \"" + getId() + "\", ");
sb.append("\"enumeration1\": " + (getEnumeration1() == null ? null : "\"" + getEnumeration1().toJson() + "\""));
sb.append(", ");
if ( z_internal_getCollect1() != null ) {
if ( UmlgTmpIdManager.INSTANCE.get(z_internal_getCollect1().getId()) != null ) {
sb.append("\"collect1\": " + "{\"id\": \"" + z_internal_getCollect1().getId() + "\", \"tmpId\": \"" + UmlgTmpIdManager.INSTANCE.get(z_internal_getCollect1().getId()) + "\",\"displayName\": \"" + z_internal_getCollect1().getName() + "\"}" + "");
} else {
sb.append("\"collect1\": " + "{\"id\": \"" + z_internal_getCollect1().getId() + "\", \"displayName\": \"" + z_internal_getCollect1().getName() + "\"}" + "");
}
} else {
sb.append("\"collect1\": " + "{\"id\": " + null + ", \"displayName\": " + null + "}");
}
sb.append(", ");
sb.append("\"password\": " + (getPassword() != null ? "\"" + getPassword() + "\"" : null ));
sb.append(", ");
sb.append("\"really\": " + getReally() + "");
sb.append(", ");
sb.append("\"qualifiedName\": \"" + getQualifiedName() + "\"");
sb.append(", ");
//PlaceHolder for restful
sb.append("\"uri\": {}");
sb.insert(0, "{");
sb.append("}");
return sb.toString();
}
@Override
public String toJsonWithoutCompositeParent() {
return toJsonWithoutCompositeParent(false);
}
public List validateEnumeration1(Enumeration1 enumeration1) {
List result = new ArrayList();
return result;
}
@Override
public List validateMultiplicities() {
List result = new ArrayList();
if ( z_internal_getCollect1() == null ) {
result.add(new UmlgConstraintViolation("multiplicity", "umlgtest::org::umlg::ocl::collect::collect1_collect2::collect1", "lower multiplicity is 1"));
}
return result;
}
public List validatePassword(String password) {
List result = new ArrayList();
return result;
}
public List validateReally(Double really) {
List result = new ArrayList();
return result;
}
@Override
public void z_internalAddPersistentValueToCollection(UmlgRuntimeProperty umlgRuntimeProperty, Object umlgNode) {
Collect2RuntimePropertyEnum runtimeProperty;
runtimeProperty = (Collect2RuntimePropertyEnum.fromQualifiedName(umlgRuntimeProperty.getQualifiedName()));
if ( runtimeProperty != null ) {
switch ( runtimeProperty ) {
case enumeration1:
this.enumeration1.z_internalAdder(Enumeration1.valueOf((String)umlgNode));
break;
case collect1:
this.collect1.z_internalAdder((Collect1)umlgNode);
break;
case collect3:
this.collect3.z_internalAdder((Collect3)umlgNode);
break;
case password:
this.password.z_internalAdder(UmlgFormatter.parse(Collect2RuntimePropertyEnum.password.getDataTypeEnum(), umlgNode));
break;
case really:
this.really.z_internalAdder((double)umlgNode);
break;
}
}
}
@Override
public void z_internalAddToCollection(UmlgRuntimeProperty umlgRuntimeProperty, Object umlgNode) {
Collect2RuntimePropertyEnum runtimeProperty;
runtimeProperty = (Collect2RuntimePropertyEnum.fromQualifiedName(umlgRuntimeProperty.getQualifiedName()));
if ( runtimeProperty != null ) {
switch ( runtimeProperty ) {
case enumeration1:
this.enumeration1.z_internalAdder((Enumeration1)umlgNode);
break;
case collect1:
this.collect1.z_internalAdder((Collect1)umlgNode);
break;
case collect3:
this.collect3.z_internalAdder((Collect3)umlgNode);
break;
case password:
this.password.z_internalAdder((String)umlgNode);
break;
case really:
this.really.z_internalAdder((Double)umlgNode);
break;
}
}
}
@Override
public Set z_internalBooleanProperties() {
Set result = new HashSet();
return result;
}
public void z_internalClearCollect1() {
this.collect1.z_internalClear();
}
public void z_internalClearCollect3() {
this.collect3.z_internalClear();
}
public void z_internalClearEnumeration1() {
this.enumeration1.z_internalClear();
}
public void z_internalClearPassword() {
this.password.z_internalClear();
}
public void z_internalClearReally() {
this.really.z_internalClear();
}
@Override
public Set z_internalDataTypeProperties() {
Set result = new HashSet();
result.add(Collect2RuntimePropertyEnum.enumeration1);
result.add(Collect2RuntimePropertyEnum.password);
result.add(Collect2RuntimePropertyEnum.really);
return result;
}
@Override
public Map z_internalDataTypePropertiesWithDefaultValues() {
Map result = new HashMap();
return result;
}
@Override
public UmlgCollection extends Object> z_internalGetCollectionFor(UmlgRuntimeProperty tumlRuntimeProperty, boolean inverse) {
UmlgCollection extends Object> result = null;
if ( result == null ) {
Collect2RuntimePropertyEnum runtimeProperty;
if ( !inverse ) {
runtimeProperty = (Collect2RuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getQualifiedName()));
} else {
runtimeProperty = (Collect2RuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getInverseQualifiedName()));
}
if ( runtimeProperty != null ) {
switch ( runtimeProperty ) {
case enumeration1:
result = this.enumeration1;
break;
case collect1:
result = this.collect1;
break;
case collect3:
result = this.collect3;
break;
case password:
result = this.password;
break;
case really:
result = this.really;
break;
}
}
}
return result;
}
@Override
public UmlgRuntimeProperty z_internalInverseAdder(UmlgRuntimeProperty tumlRuntimeProperty, boolean inverse, UmlgNode umlgNode) {
Collect2RuntimePropertyEnum runtimeProperty;
if ( !inverse ) {
runtimeProperty = (Collect2RuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getQualifiedName()));
} else {
runtimeProperty = (Collect2RuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getInverseQualifiedName()));
}
if ( runtimeProperty != null ) {
switch ( runtimeProperty ) {
case collect1:
this.collect1.z_internalAdder((Collect1)umlgNode);
break;
case collect3:
this.collect3.z_internalAdder((Collect3)umlgNode);
break;
}
return runtimeProperty;
} else {
return null;
}
}
@Override
public void z_internalMarkCollectionLoaded(UmlgRuntimeProperty umlgRuntimeProperty, boolean loaded) {
Collect2RuntimePropertyEnum runtimeProperty;
runtimeProperty = (Collect2RuntimePropertyEnum.fromQualifiedName(umlgRuntimeProperty.getQualifiedName()));
if ( runtimeProperty != null ) {
switch ( runtimeProperty ) {
case enumeration1:
this.enumeration1.setLoaded(loaded);
break;
case collect1:
this.collect1.setLoaded(loaded);
break;
case collect3:
this.collect3.setLoaded(loaded);
break;
case password:
this.password.setLoaded(loaded);
break;
case really:
this.really.setLoaded(loaded);
break;
}
}
}
public Collect1 z_internal_getCollect1() {
UmlgSet tmp = this.collect1;
if ( !tmp.isEmpty() ) {
return tmp.iterator().next();
} else {
return null;
}
}
static public enum Collect2RuntimePropertyEnum implements UmlgRuntimeProperty {
enumeration1(/* qualifiedName */ "umlgtest::org::umlg::ocl::Collect2::enumeration1",/* persistentName */ "enumeration1",/* inverseName */ "collect2",/* inverseQualifiedName */ "umlgtest::org::umlg::ocl::collect::enumeration1_collect2::collect2",/* isAssociationClassOne */ false,/* isMemberEndOfAssociationClass */ false,/* associationClassPropertyNameField */ "null",/* inverseAssociationClassPropertyNameField */ "null",/* isAssociationClassProperty */ false,/* isOnePrimitivePropertyOfAssociationClass */ false,/* isOnePrimitive */ false,/* isReadOnly */ false,/* dataTypeEnum */ null,/* validations */ Collections.emptyList(),/* isManyPrimitive */ false,/* oneEnumeration */ true,/* manyEnumeration */ false,/* isControllingSide */ false,/* isComposite */ false,/* isInverseComposite */ false,/* label */ UmlgLabelConverterFactory.getUmlgLabelConverter().convert("enumeration1_collect2"),/* isOneToOne */ true,/* isOneToMany */ false,/* isManyToOne */ false,/* isManyToMany */ false,/* upper */ 1,/* lower */ 0,/* inverseUpper */ 1,/* isQualified */ false,/* isInverseQualified */ false,/* isOrdered */ false,/* isInverseOrdered */ false,/* isUnique */ true,/* isInverseUnique */ true,/* isDerived */ false,/* isNavigable */ true,/* propertyType */ Enumeration1.class,/* json */ "{\"name\": \"enumeration1\", \"associationClassOne\": false, \"memberEndOfAssociationClass\": false, \"associationClassPropertyName\": null, \"inverseAssociationClassPropertyName\": null, \"associationClassProperty\": false, \"onePrimitivePropertyOfAssociationClass\": false, \"onePrimitive\": false, \"readOnly\": false, \"dataTypeEnum\": null, \"validations\": null, \"qualifiedName\": \"umlgtest::org::umlg::ocl::Collect2::enumeration1\", \"persistentName\": \"enumeration1\", \"inverseName\": \"collect2\", \"inverseQualifiedName\": \"umlgtest::org::umlg::ocl::collect::enumeration1_collect2::collect2\", \"manyPrimitive\": false, \"oneEnumeration\": true, \"manyEnumeration\": false, \"controllingSide\": false, \"composite\": false, \"inverseComposite\": false, \"oneToOne\": true, \"oneToMany\": false, \"manyToOne\": false, \"manyToMany\": false, \"upper\": 1, \"lower\": 0, \"inverseUpper\": 1, \"label\": \"enumeration1_collect2\", \"qualified\": false, \"inverseQualified\": false, \"ordered\": false, \"inverseOrdered\": false, \"unique\": true, \"inverseUnique\": true, \"derived\": false, \"navigable\": true}",/* isChangeListenerAttribute */ false),
collect1(/* qualifiedName */ "umlgtest::org::umlg::ocl::collect::collect1_collect2::collect1",/* persistentName */ "collect1",/* inverseName */ "collect2",/* inverseQualifiedName */ "umlgtest::org::umlg::ocl::collect::Collect1::collect2",/* 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("collect1_collect2"),/* 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 */ true,/* isDerived */ false,/* isNavigable */ false,/* propertyType */ Collect1.class,/* json */ "{\"name\": \"collect1\", \"associationClassOne\": false, \"memberEndOfAssociationClass\": false, \"associationClassPropertyName\": null, \"inverseAssociationClassPropertyName\": null, \"associationClassProperty\": false, \"onePrimitivePropertyOfAssociationClass\": false, \"onePrimitive\": false, \"readOnly\": false, \"dataTypeEnum\": null, \"validations\": null, \"qualifiedName\": \"umlgtest::org::umlg::ocl::collect::collect1_collect2::collect1\", \"persistentName\": \"collect1\", \"inverseName\": \"collect2\", \"inverseQualifiedName\": \"umlgtest::org::umlg::ocl::collect::Collect1::collect2\", \"manyPrimitive\": false, \"oneEnumeration\": false, \"manyEnumeration\": false, \"controllingSide\": false, \"composite\": false, \"inverseComposite\": false, \"oneToOne\": false, \"oneToMany\": false, \"manyToOne\": true, \"manyToMany\": false, \"upper\": 1, \"lower\": 1, \"inverseUpper\": -1, \"label\": \"collect1_collect2\", \"qualified\": false, \"inverseQualified\": false, \"ordered\": false, \"inverseOrdered\": false, \"unique\": true, \"inverseUnique\": true, \"derived\": false, \"navigable\": false}",/* isChangeListenerAttribute */ false),
collect3(/* qualifiedName */ "umlgtest::org::umlg::ocl::Collect2::collect3",/* persistentName */ "collect3",/* inverseName */ "collect2",/* inverseQualifiedName */ "umlgtest::org::umlg::ocl::collect2_collect3::collect2",/* 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 */ false,/* isInverseComposite */ false,/* label */ UmlgLabelConverterFactory.getUmlgLabelConverter().convert("collect2_collect3"),/* isOneToOne */ false,/* isOneToMany */ true,/* isManyToOne */ false,/* isManyToMany */ false,/* upper */ -1,/* lower */ 0,/* inverseUpper */ 1,/* isQualified */ false,/* isInverseQualified */ false,/* isOrdered */ false,/* isInverseOrdered */ false,/* isUnique */ true,/* isInverseUnique */ true,/* isDerived */ false,/* isNavigable */ true,/* propertyType */ Collect3.class,/* json */ "{\"name\": \"collect3\", \"associationClassOne\": false, \"memberEndOfAssociationClass\": false, \"associationClassPropertyName\": null, \"inverseAssociationClassPropertyName\": null, \"associationClassProperty\": false, \"onePrimitivePropertyOfAssociationClass\": false, \"onePrimitive\": false, \"readOnly\": false, \"dataTypeEnum\": null, \"validations\": null, \"qualifiedName\": \"umlgtest::org::umlg::ocl::Collect2::collect3\", \"persistentName\": \"collect3\", \"inverseName\": \"collect2\", \"inverseQualifiedName\": \"umlgtest::org::umlg::ocl::collect2_collect3::collect2\", \"manyPrimitive\": false, \"oneEnumeration\": false, \"manyEnumeration\": false, \"controllingSide\": true, \"composite\": false, \"inverseComposite\": false, \"oneToOne\": false, \"oneToMany\": true, \"manyToOne\": false, \"manyToMany\": false, \"upper\": -1, \"lower\": 0, \"inverseUpper\": 1, \"label\": \"collect2_collect3\", \"qualified\": false, \"inverseQualified\": false, \"ordered\": false, \"inverseOrdered\": false, \"unique\": true, \"inverseUnique\": true, \"derived\": false, \"navigable\": true}",/* isChangeListenerAttribute */ false),
password(/* qualifiedName */ "umlgtest::org::umlg::ocl::Collect2::password",/* persistentName */ "password",/* inverseName */ "inverseOf::password",/* inverseQualifiedName */ "inverseOf::umlgtest::org::umlg::ocl::Collect2::password",/* isAssociationClassOne */ false,/* isMemberEndOfAssociationClass */ false,/* associationClassPropertyNameField */ "null",/* inverseAssociationClassPropertyNameField */ "null",/* isAssociationClassProperty */ false,/* isOnePrimitivePropertyOfAssociationClass */ false,/* isOnePrimitive */ false,/* isReadOnly */ false,/* dataTypeEnum */ DataTypeEnum.UnsecurePassword,/* validations */ Collections.emptyList(),/* isManyPrimitive */ false,/* oneEnumeration */ false,/* manyEnumeration */ false,/* isControllingSide */ true,/* isComposite */ false,/* isInverseComposite */ false,/* label */ UmlgLabelConverterFactory.getUmlgLabelConverter().convert("password"),/* 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\": \"password\", \"associationClassOne\": false, \"memberEndOfAssociationClass\": false, \"associationClassPropertyName\": null, \"inverseAssociationClassPropertyName\": null, \"associationClassProperty\": false, \"onePrimitivePropertyOfAssociationClass\": false, \"onePrimitive\": false, \"readOnly\": false, \"dataTypeEnum\": \"" + DataTypeEnum.UnsecurePassword.toString() + "\", \"validations\": null, \"qualifiedName\": \"umlgtest::org::umlg::ocl::Collect2::password\", \"persistentName\": \"password\", \"inverseName\": \"inverseOf::password\", \"inverseQualifiedName\": \"inverseOf::umlgtest::org::umlg::ocl::Collect2::password\", \"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\": \"password\", \"qualified\": false, \"inverseQualified\": false, \"ordered\": false, \"inverseOrdered\": false, \"unique\": true, \"inverseUnique\": false, \"derived\": false, \"navigable\": true}",/* isChangeListenerAttribute */ false),
really(/* qualifiedName */ "umlgtest::org::umlg::ocl::Collect2::really",/* persistentName */ "really",/* inverseName */ "inverseOf::really",/* inverseQualifiedName */ "inverseOf::umlgtest::org::umlg::ocl::Collect2::really",/* 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("really"),/* 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 */ Double.class,/* json */ "{\"name\": \"really\", \"associationClassOne\": false, \"memberEndOfAssociationClass\": false, \"associationClassPropertyName\": null, \"inverseAssociationClassPropertyName\": null, \"associationClassProperty\": false, \"onePrimitivePropertyOfAssociationClass\": false, \"onePrimitive\": true, \"readOnly\": false, \"dataTypeEnum\": null, \"validations\": null, \"qualifiedName\": \"umlgtest::org::umlg::ocl::Collect2::really\", \"persistentName\": \"really\", \"inverseName\": \"inverseOf::really\", \"inverseQualifiedName\": \"inverseOf::umlgtest::org::umlg::ocl::Collect2::really\", \"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\": \"really\", \"qualified\": false, \"inverseQualified\": false, \"ordered\": false, \"inverseOrdered\": false, \"unique\": true, \"inverseUnique\": false, \"derived\": false, \"navigable\": true}",/* isChangeListenerAttribute */ false),
umlgtest(/* qualifiedName */ "umlgtest",/* persistentName */ "umlgtest",/* inverseName */ "inverseOfumlgtest",/* inverseQualifiedName */ "inverseOfumlgtest",/* 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 */ false,/* isInverseComposite */ true,/* label */ UmlgLabelConverterFactory.getUmlgLabelConverter().convert("rootCollect2"),/* isOneToOne */ true,/* isOneToMany */ false,/* isManyToOne */ false,/* isManyToMany */ false,/* upper */ -1,/* lower */ 0,/* inverseUpper */ 1,/* isQualified */ false,/* isInverseQualified */ false,/* isOrdered */ false,/* isInverseOrdered */ false,/* isUnique */ false,/* isInverseUnique */ false,/* isDerived */ false,/* isNavigable */ false,/* propertyType */ Object.class,/* json */ "{\"name\": \"umlgtest\", \"associationClassOne\": false, \"memberEndOfAssociationClass\": false, \"associationClassPropertyName\": null, \"inverseAssociationClassPropertyName\": null, \"associationClassProperty\": false, \"onePrimitivePropertyOfAssociationClass\": false, \"onePrimitive\": false, \"readOnly\": false, \"dataTypeEnum\": null, \"validations\": null, \"qualifiedName\": \"umlgtest\", \"persistentName\": \"umlgtest\", \"inverseName\": \"inverseOfumlgtest\", \"inverseQualifiedName\": \"inverseOfumlgtest\", \"manyPrimitive\": false, \"oneEnumeration\": false, \"manyEnumeration\": false, \"controllingSide\": true, \"composite\": false, \"inverseComposite\": true, \"oneToOne\": true, \"oneToMany\": false, \"manyToOne\": false, \"manyToMany\": false, \"upper\": -1, \"lower\": 0, \"inverseUpper\": 1, \"label\": \"rootCollect2\", \"qualified\": false, \"inverseQualified\": false, \"ordered\": false, \"inverseOrdered\": false, \"unique\": false, \"inverseUnique\": false, \"derived\": false, \"navigable\": false}",/* 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 Collect2RuntimePropertyEnum
*
* @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 Collect2RuntimePropertyEnum(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\": \"Collect2\", ");
sb.append("\"qualifiedName\": \"umlgtest::org::umlg::ocl::Collect2\", ");
sb.append("\"uri\": \"TODO\", ");
sb.append("\"properties\": [");
for ( Collect2RuntimePropertyEnum l : Collect2RuntimePropertyEnum.values() ) {
sb.append(l.toJson());
if ( count < Collect2RuntimePropertyEnum.values().length ) {
count++;
sb.append(",");
}
}
sb.append("]}");
return sb.toString();
}
static public Collect2RuntimePropertyEnum fromInverseQualifiedName(String inverseQualifiedName) {
if ( umlgtest.getInverseQualifiedName().equals(inverseQualifiedName) ) {
return umlgtest;
}
if ( really.getInverseQualifiedName().equals(inverseQualifiedName) ) {
return really;
}
if ( password.getInverseQualifiedName().equals(inverseQualifiedName) ) {
return password;
}
if ( collect3.getInverseQualifiedName().equals(inverseQualifiedName) ) {
return collect3;
}
if ( collect1.getInverseQualifiedName().equals(inverseQualifiedName) ) {
return collect1;
}
if ( enumeration1.getInverseQualifiedName().equals(inverseQualifiedName) ) {
return enumeration1;
}
return null;
}
static public Collect2RuntimePropertyEnum fromLabel(String _label) {
if ( umlgtest.getLabel().equals(_label) ) {
return umlgtest;
}
if ( really.getLabel().equals(_label) ) {
return really;
}
if ( password.getLabel().equals(_label) ) {
return password;
}
if ( collect3.getLabel().equals(_label) ) {
return collect3;
}
if ( collect1.getLabel().equals(_label) ) {
return collect1;
}
if ( enumeration1.getLabel().equals(_label) ) {
return enumeration1;
}
return null;
}
static public Collect2RuntimePropertyEnum fromQualifiedName(String qualifiedName) {
if ( umlgtest.getQualifiedName().equals(qualifiedName) ) {
return umlgtest;
}
if ( really.getQualifiedName().equals(qualifiedName) ) {
return really;
}
if ( password.getQualifiedName().equals(qualifiedName) ) {
return password;
}
if ( collect3.getQualifiedName().equals(qualifiedName) ) {
return collect3;
}
if ( collect1.getQualifiedName().equals(qualifiedName) ) {
return collect1;
}
if ( enumeration1.getQualifiedName().equals(qualifiedName) ) {
return enumeration1;
}
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();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy