org.umlg.multiplecompositeparent.FolderX Maven / Gradle / Ivy
The newest version!
package org.umlg.multiplecompositeparent;
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.multiplecompositeparent.FolderX.FolderXRuntimePropertyEnum;
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.UmlgOrderedSet;
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.UmlgOrderedSetImpl;
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.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 FolderX extends BaseUmlgCompositionNode implements CompositionNode {
static final public long serialVersionUID = 1L;
private UmlgSet name;
private UmlgOrderedSet subFolder;
private UmlgSet folder;
private UmlgSet root1;
private UmlgSet root2;
private String tmpId; // tmpId is only used the umlg restlet gui. It is never persisted. Its value is generated by the gui.
/**
* constructor for FolderX
*
* @param compositeOwner
*/
public FolderX(FolderX compositeOwner) {
super(true);
compositeOwner.addToSubFolder(this);
}
/**
* constructor for FolderX
*
* @param id
*/
public FolderX(Object id) {
super(id);
}
/**
* constructor for FolderX
*
* @param compositeOwner
*/
public FolderX(Root1 compositeOwner) {
super(true);
compositeOwner.addToFolder(this);
}
/**
* constructor for FolderX
*
* @param compositeOwner
*/
public FolderX(Root2 compositeOwner) {
super(true);
compositeOwner.addToFolder(this);
}
/**
* constructor for FolderX
*
* @param vertex
*/
public FolderX(Vertex vertex) {
super(vertex);
}
/**
* default constructor for FolderX
*/
public FolderX() {
this(true);
}
/**
* constructor for FolderX
*
* @param persistent
*/
public FolderX(Boolean persistent) {
super(persistent);
}
public void addToFolder(FolderX folder) {
if ( folder != null ) {
if ( !this.folder.isEmpty() ) {
throw new RuntimeException("Property umlgtest::org::umlg::multiplecompositeparent::folder_folder_1::folder is a one and already has a value!");
}
this.folder.add(folder);
}
}
public void addToFolderIgnoreInverse(FolderX folder) {
if ( folder != null ) {
if ( !this.folder.isEmpty() ) {
throw new RuntimeException("Property umlgtest::org::umlg::multiplecompositeparent::folder_folder_1::folder is a one and already has a value!");
}
this.folder.addIgnoreInverse(folder);
}
}
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 addToRoot1(Root1 root1) {
if ( root1 != null ) {
if ( !this.root1.isEmpty() ) {
throw new RuntimeException("Property umlgtest::org::umlg::multiplecompositeparent::root1_folder_1::root1 is a one and already has a value!");
}
this.root1.add(root1);
}
}
public void addToRoot1IgnoreInverse(Root1 root1) {
if ( root1 != null ) {
if ( !this.root1.isEmpty() ) {
throw new RuntimeException("Property umlgtest::org::umlg::multiplecompositeparent::root1_folder_1::root1 is a one and already has a value!");
}
this.root1.addIgnoreInverse(root1);
}
}
public void addToRoot2(Root2 root2) {
if ( root2 != null ) {
if ( !this.root2.isEmpty() ) {
throw new RuntimeException("Property umlgtest::org::umlg::multiplecompositeparent::root2_folder_1::root2 is a one and already has a value!");
}
this.root2.add(root2);
}
}
public void addToRoot2IgnoreInverse(Root2 root2) {
if ( root2 != null ) {
if ( !this.root2.isEmpty() ) {
throw new RuntimeException("Property umlgtest::org::umlg::multiplecompositeparent::root2_folder_1::root2 is a one and already has a value!");
}
this.root2.addIgnoreInverse(root2);
}
}
public void addToSubFolder(FolderX subFolder) {
if ( subFolder != null ) {
subFolder.clearFolder();
subFolder.initialiseProperty(FolderXRuntimePropertyEnum.folder, false, true);
removeFromSubFolder(subFolder);
}
if ( subFolder != null ) {
this.subFolder.add(subFolder);
}
}
public void addToSubFolder(UmlgOrderedSet subFolder) {
if ( !subFolder.isEmpty() ) {
this.subFolder.addAll(subFolder);
}
}
public void addToSubFolder(int index, FolderX subFolder) {
if ( subFolder != null ) {
subFolder.clearFolder();
subFolder.initialiseProperty(FolderXRuntimePropertyEnum.folder, false, true);
removeFromSubFolder(subFolder);
}
if ( subFolder != null ) {
this.subFolder.add(index, subFolder);
}
}
public void addToSubFolder(int index, UmlgOrderedSet subFolder) {
if ( !subFolder.isEmpty() ) {
this.subFolder.addAll(subFolder);
}
}
public void addToSubFolderIgnoreInverse(FolderX subFolder) {
if ( subFolder != null ) {
subFolder.clearFolder();
subFolder.initialiseProperty(FolderXRuntimePropertyEnum.folder, false, true);
removeFromSubFolder(subFolder);
}
if ( subFolder != null ) {
this.subFolder.addIgnoreInverse(subFolder);
}
}
static public UmlgSet extends FolderX> allInstances(Filter filter) {
UmlgSet result = new UmlgMemorySet();
result.addAll(UMLG.get().allInstances(FolderX.class.getName(), filter));
return result;
}
static public UmlgSet extends FolderX> allInstances() {
UmlgSet result = new UmlgMemorySet();
result.addAll(UMLG.get().allInstances(FolderX.class.getName()));
return result;
}
@Override
public List checkClassConstraints() {
List result = new ArrayList();
return result;
}
public void clearFolder() {
this.folder.clear();
}
public void clearName() {
this.name.clear();
}
public void clearRoot1() {
this.root1.clear();
}
public void clearRoot2() {
this.root2.clear();
}
public void clearSubFolder() {
this.subFolder.clear();
}
@Override
public void delete() {
for ( FolderX child : getSubFolder() ) {
child.delete();
}
this.root1.clear();
this.root2.clear();
this.folder.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) {
if ( propertyMap.containsKey("name") ) {
if ( propertyMap.get("name") != null ) {
String name = (String)propertyMap.get("name");
setName(name);
} else {
setName(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;
}
}
}
@Override
public void fromJsonNonCompositeOne(Map propertyMap) {
}
@Override
public void fromJsonNonCompositeRequiredMany(Map propertyMap) {
}
public FolderX getFolder() {
UmlgSet tmp = this.folder;
if ( !tmp.isEmpty() ) {
return tmp.iterator().next();
} else {
return null;
}
}
@Override
public String getMetaDataAsJson() {
return FolderX.FolderXRuntimePropertyEnum.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 ( getRoot1() != null ) {
result = getRoot1();
} else if ( getRoot2() != null ) {
result = getRoot2();
} else if ( getFolder() != null ) {
result = getFolder();
} else {
result = null;
}
return result;
}
@Override
public String getQualifiedName() {
return "umlgtest::org::umlg::multiplecompositeparent::FolderX";
}
/**
* 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();
FolderXRuntimePropertyEnum runtimeProperty;
if ( !inverse ) {
runtimeProperty = FolderXRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getQualifiedName());
} else {
runtimeProperty = FolderXRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getInverseQualifiedName());
}
if ( runtimeProperty != null && result.isEmpty() ) {
switch ( runtimeProperty ) {
default:
result = Collections.emptyList();
}
}
return result;
}
public Root1 getRoot1() {
UmlgSet tmp = this.root1;
if ( !tmp.isEmpty() ) {
return tmp.iterator().next();
} else {
return null;
}
}
public Root2 getRoot2() {
UmlgSet tmp = this.root2;
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;
FolderXRuntimePropertyEnum runtimeProperty;
if ( !inverse ) {
runtimeProperty = FolderXRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getQualifiedName());
} else {
runtimeProperty = FolderXRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getInverseQualifiedName());
}
if ( runtimeProperty != null && result == 0 ) {
switch ( runtimeProperty ) {
case root1:
result = root1.size();
break;
case name:
result = name.size();
break;
case subFolder:
result = subFolder.size();
break;
case root2:
result = root2.size();
break;
case folder:
result = folder.size();
break;
default:
result = 0;
}
}
return result;
}
public UmlgOrderedSet getSubFolder() {
return this.subFolder;
}
@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;
result = result + (getRoot1() != null ? 1 : 0);
result = result + (getRoot2() != null ? 1 : 0);
result = result + (getFolder() != null ? 1 : 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.root1 = new UmlgSetImpl(this, PropertyTree.from(FolderXRuntimePropertyEnum.root1), loaded);
this.name = new UmlgSetImpl(this, PropertyTree.from(FolderXRuntimePropertyEnum.name), loaded);
this.subFolder = new UmlgOrderedSetImpl(this, PropertyTree.from(FolderXRuntimePropertyEnum.subFolder), loaded);
this.root2 = new UmlgSetImpl(this, PropertyTree.from(FolderXRuntimePropertyEnum.root2), loaded);
this.folder = new UmlgSetImpl(this, PropertyTree.from(FolderXRuntimePropertyEnum.folder), loaded);
}
@Override
public void initialiseProperty(UmlgRuntimeProperty tumlRuntimeProperty, boolean inverse, boolean loaded) {
FolderXRuntimePropertyEnum runtimeProperty;
if ( !inverse ) {
runtimeProperty = (FolderXRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getQualifiedName()));
} else {
runtimeProperty = (FolderXRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getInverseQualifiedName()));
}
if ( runtimeProperty != null ) {
switch ( runtimeProperty ) {
case root1:
this.root1 = new UmlgSetImpl(this, PropertyTree.from(FolderXRuntimePropertyEnum.root1), loaded);
break;
case name:
this.name = new UmlgSetImpl(this, PropertyTree.from(FolderXRuntimePropertyEnum.name), loaded);
break;
case subFolder:
this.subFolder = new UmlgOrderedSetImpl(this, PropertyTree.from(FolderXRuntimePropertyEnum.subFolder), loaded);
break;
case root2:
this.root2 = new UmlgSetImpl(this, PropertyTree.from(FolderXRuntimePropertyEnum.root2), loaded);
break;
case folder:
this.folder = new UmlgSetImpl(this, PropertyTree.from(FolderXRuntimePropertyEnum.folder), loaded);
break;
}
}
}
@Override
public UmlgRuntimeProperty inverseAdder(UmlgRuntimeProperty tumlRuntimeProperty, boolean inverse, UmlgNode umlgNode) {
FolderXRuntimePropertyEnum runtimeProperty;
if ( !inverse ) {
runtimeProperty = (FolderXRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getQualifiedName()));
} else {
runtimeProperty = (FolderXRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getInverseQualifiedName()));
}
if ( runtimeProperty != null ) {
switch ( runtimeProperty ) {
case root1:
this.root1.inverseAdder((Root1)umlgNode);
break;
case subFolder:
this.subFolder.inverseAdder((FolderX)umlgNode);
break;
case root2:
this.root2.inverseAdder((Root2)umlgNode);
break;
case folder:
this.folder.inverseAdder((FolderX)umlgNode);
break;
}
return runtimeProperty;
} else {
return null;
}
}
@Override
public boolean isTinkerRoot() {
return false;
}
public void removeFromFolder(FolderX folder) {
if ( folder != null ) {
this.folder.remove(folder);
}
}
public void removeFromFolder(UmlgSet folder) {
if ( !folder.isEmpty() ) {
this.folder.removeAll(folder);
}
}
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 removeFromRoot1(Root1 root1) {
if ( root1 != null ) {
this.root1.remove(root1);
}
}
public void removeFromRoot1(UmlgSet root1) {
if ( !root1.isEmpty() ) {
this.root1.removeAll(root1);
}
}
public void removeFromRoot2(Root2 root2) {
if ( root2 != null ) {
this.root2.remove(root2);
}
}
public void removeFromRoot2(UmlgSet root2) {
if ( !root2.isEmpty() ) {
this.root2.removeAll(root2);
}
}
public void removeFromSubFolder(FolderX subFolder) {
if ( subFolder != null ) {
this.subFolder.remove(subFolder);
}
}
public void removeFromSubFolder(UmlgOrderedSet subFolder) {
if ( !subFolder.isEmpty() ) {
this.subFolder.removeAll(subFolder);
}
}
public void setFolder(FolderX folder) {
clearFolder();
addToFolder(folder);
}
public void setName(String name) {
if ( name == null ) {
clearName();
} else {
z_internalClearName();
}
addToName(name);
}
public void setRoot1(Root1 root1) {
clearRoot1();
addToRoot1(root1);
}
public void setRoot2(Root2 root2) {
clearRoot2();
addToRoot2(root2);
}
public void setSubFolder(UmlgOrderedSet subFolder) {
clearSubFolder();
if ( subFolder != null ) {
addToSubFolder(subFolder);
}
}
/**
* 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() + "\", ");
if ( getRoot1() != null ) {
if ( UmlgTmpIdManager.INSTANCE.get(getRoot1().getId()) != null ) {
sb.append("\"root1\": " + "{\"id\": \"" + getRoot1().getId() + "\", \"tmpId\": \"" + UmlgTmpIdManager.INSTANCE.get(getRoot1().getId()) + "\",\"displayName\": \"" + getRoot1().getName() + "\"}" + "");
} else {
sb.append("\"root1\": " + "{\"id\": \"" + getRoot1().getId() + "\", \"displayName\": \"" + getRoot1().getName() + "\"}" + "");
}
} else {
sb.append("\"root1\": " + "{\"id\": " + null + ", \"displayName\": " + null + "}");
}
sb.append(", ");
sb.append("\"name\": " + (getName() != null ? "\"" + StringEscapeUtils.escapeJson(getName()) + "\"" : null ));
sb.append(", ");
if ( getRoot2() != null ) {
if ( UmlgTmpIdManager.INSTANCE.get(getRoot2().getId()) != null ) {
sb.append("\"root2\": " + "{\"id\": \"" + getRoot2().getId() + "\", \"tmpId\": \"" + UmlgTmpIdManager.INSTANCE.get(getRoot2().getId()) + "\",\"displayName\": \"" + getRoot2().getName() + "\"}" + "");
} else {
sb.append("\"root2\": " + "{\"id\": \"" + getRoot2().getId() + "\", \"displayName\": \"" + getRoot2().getName() + "\"}" + "");
}
} else {
sb.append("\"root2\": " + "{\"id\": " + null + ", \"displayName\": " + null + "}");
}
sb.append(", ");
if ( getFolder() != null ) {
if ( UmlgTmpIdManager.INSTANCE.get(getFolder().getId()) != null ) {
sb.append("\"folder\": " + "{\"id\": \"" + getFolder().getId() + "\", \"tmpId\": \"" + UmlgTmpIdManager.INSTANCE.get(getFolder().getId()) + "\",\"displayName\": \"" + getFolder().getName() + "\"}" + "");
} else {
sb.append("\"folder\": " + "{\"id\": \"" + getFolder().getId() + "\", \"displayName\": \"" + getFolder().getName() + "\"}" + "");
}
} else {
sb.append("\"folder\": " + "{\"id\": " + null + ", \"displayName\": " + null + "}");
}
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("\"name\": " + (getName() != null ? "\"" + StringEscapeUtils.escapeJson(getName()) + "\"" : null ));
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);
}
@Override
public List validateMultiplicities() {
List result = new ArrayList();
if ( getName() == null ) {
result.add(new UmlgConstraintViolation("multiplicity", "umlgtest::org::umlg::multiplecompositeparent::FolderX::name", "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) {
FolderXRuntimePropertyEnum runtimeProperty;
runtimeProperty = (FolderXRuntimePropertyEnum.fromQualifiedName(umlgRuntimeProperty.getQualifiedName()));
if ( runtimeProperty != null ) {
switch ( runtimeProperty ) {
case root1:
this.root1.z_internalAdder((Root1)umlgNode);
break;
case name:
this.name.z_internalAdder((String)umlgNode);
break;
case subFolder:
this.subFolder.z_internalAdder((FolderX)umlgNode);
break;
case root2:
this.root2.z_internalAdder((Root2)umlgNode);
break;
case folder:
this.folder.z_internalAdder((FolderX)umlgNode);
break;
}
}
}
@Override
public void z_internalAddToCollection(UmlgRuntimeProperty umlgRuntimeProperty, Object umlgNode) {
FolderXRuntimePropertyEnum runtimeProperty;
runtimeProperty = (FolderXRuntimePropertyEnum.fromQualifiedName(umlgRuntimeProperty.getQualifiedName()));
if ( runtimeProperty != null ) {
switch ( runtimeProperty ) {
case root1:
this.root1.z_internalAdder((Root1)umlgNode);
break;
case name:
this.name.z_internalAdder((String)umlgNode);
break;
case subFolder:
this.subFolder.z_internalAdder((FolderX)umlgNode);
break;
case root2:
this.root2.z_internalAdder((Root2)umlgNode);
break;
case folder:
this.folder.z_internalAdder((FolderX)umlgNode);
break;
}
}
}
@Override
public Set z_internalBooleanProperties() {
Set result = new HashSet();
return result;
}
public void z_internalClearFolder() {
this.folder.z_internalClear();
}
public void z_internalClearName() {
this.name.z_internalClear();
}
public void z_internalClearRoot1() {
this.root1.z_internalClear();
}
public void z_internalClearRoot2() {
this.root2.z_internalClear();
}
public void z_internalClearSubFolder() {
this.subFolder.z_internalClear();
}
@Override
public Set z_internalDataTypeProperties() {
Set result = new HashSet();
result.add(FolderXRuntimePropertyEnum.name);
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 ) {
FolderXRuntimePropertyEnum runtimeProperty;
if ( !inverse ) {
runtimeProperty = (FolderXRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getQualifiedName()));
} else {
runtimeProperty = (FolderXRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getInverseQualifiedName()));
}
if ( runtimeProperty != null ) {
switch ( runtimeProperty ) {
case root1:
result = this.root1;
break;
case name:
result = this.name;
break;
case subFolder:
result = this.subFolder;
break;
case root2:
result = this.root2;
break;
case folder:
result = this.folder;
break;
}
}
}
return result;
}
@Override
public UmlgRuntimeProperty z_internalInverseAdder(UmlgRuntimeProperty tumlRuntimeProperty, boolean inverse, UmlgNode umlgNode) {
FolderXRuntimePropertyEnum runtimeProperty;
if ( !inverse ) {
runtimeProperty = (FolderXRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getQualifiedName()));
} else {
runtimeProperty = (FolderXRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getInverseQualifiedName()));
}
if ( runtimeProperty != null ) {
switch ( runtimeProperty ) {
case root1:
this.root1.z_internalAdder((Root1)umlgNode);
break;
case subFolder:
this.subFolder.z_internalAdder((FolderX)umlgNode);
break;
case root2:
this.root2.z_internalAdder((Root2)umlgNode);
break;
case folder:
this.folder.z_internalAdder((FolderX)umlgNode);
break;
}
return runtimeProperty;
} else {
return null;
}
}
@Override
public void z_internalMarkCollectionLoaded(UmlgRuntimeProperty umlgRuntimeProperty, boolean loaded) {
FolderXRuntimePropertyEnum runtimeProperty;
runtimeProperty = (FolderXRuntimePropertyEnum.fromQualifiedName(umlgRuntimeProperty.getQualifiedName()));
if ( runtimeProperty != null ) {
switch ( runtimeProperty ) {
case root1:
this.root1.setLoaded(loaded);
break;
case name:
this.name.setLoaded(loaded);
break;
case subFolder:
this.subFolder.setLoaded(loaded);
break;
case root2:
this.root2.setLoaded(loaded);
break;
case folder:
this.folder.setLoaded(loaded);
break;
}
}
}
static public enum FolderXRuntimePropertyEnum implements UmlgRuntimeProperty {
root1(/* qualifiedName */ "umlgtest::org::umlg::multiplecompositeparent::root1_folder_1::root1",/* persistentName */ "root1",/* inverseName */ "folder",/* inverseQualifiedName */ "umlgtest::org::umlg::multiplecompositeparent::Root1::folder",/* 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("root1_folder_1"),/* isOneToOne */ false,/* isOneToMany */ false,/* isManyToOne */ true,/* isManyToMany */ false,/* upper */ 1,/* lower */ 0,/* inverseUpper */ -1,/* isQualified */ false,/* isInverseQualified */ false,/* isOrdered */ false,/* isInverseOrdered */ true,/* isUnique */ true,/* isInverseUnique */ true,/* isDerived */ false,/* isNavigable */ true,/* propertyType */ Root1.class,/* json */ "{\"name\": \"root1\", \"associationClassOne\": false, \"memberEndOfAssociationClass\": false, \"associationClassPropertyName\": null, \"inverseAssociationClassPropertyName\": null, \"associationClassProperty\": false, \"onePrimitivePropertyOfAssociationClass\": false, \"onePrimitive\": false, \"readOnly\": false, \"dataTypeEnum\": null, \"validations\": null, \"qualifiedName\": \"umlgtest::org::umlg::multiplecompositeparent::root1_folder_1::root1\", \"persistentName\": \"root1\", \"inverseName\": \"folder\", \"inverseQualifiedName\": \"umlgtest::org::umlg::multiplecompositeparent::Root1::folder\", \"manyPrimitive\": false, \"oneEnumeration\": false, \"manyEnumeration\": false, \"controllingSide\": false, \"composite\": false, \"inverseComposite\": true, \"oneToOne\": false, \"oneToMany\": false, \"manyToOne\": true, \"manyToMany\": false, \"upper\": 1, \"lower\": 0, \"inverseUpper\": -1, \"label\": \"root1_folder_1\", \"qualified\": false, \"inverseQualified\": false, \"ordered\": false, \"inverseOrdered\": true, \"unique\": true, \"inverseUnique\": true, \"derived\": false, \"navigable\": true}",/* isChangeListenerAttribute */ false),
name(/* qualifiedName */ "umlgtest::org::umlg::multiplecompositeparent::FolderX::name",/* persistentName */ "name",/* inverseName */ "inverseOf::name",/* inverseQualifiedName */ "inverseOf::umlgtest::org::umlg::multiplecompositeparent::FolderX::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 */ 1,/* 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::multiplecompositeparent::FolderX::name\", \"persistentName\": \"name\", \"inverseName\": \"inverseOf::name\", \"inverseQualifiedName\": \"inverseOf::umlgtest::org::umlg::multiplecompositeparent::FolderX::name\", \"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\": \"name\", \"qualified\": false, \"inverseQualified\": false, \"ordered\": false, \"inverseOrdered\": false, \"unique\": true, \"inverseUnique\": false, \"derived\": false, \"navigable\": true}",/* isChangeListenerAttribute */ false),
subFolder(/* qualifiedName */ "umlgtest::org::umlg::multiplecompositeparent::FolderX::subFolder",/* persistentName */ "subFolder",/* inverseName */ "folder",/* inverseQualifiedName */ "umlgtest::org::umlg::multiplecompositeparent::folder_folder_1::folder",/* 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("folder_folder_1"),/* isOneToOne */ false,/* isOneToMany */ true,/* isManyToOne */ false,/* isManyToMany */ false,/* upper */ -1,/* lower */ 0,/* inverseUpper */ 1,/* isQualified */ false,/* isInverseQualified */ false,/* isOrdered */ true,/* isInverseOrdered */ false,/* isUnique */ true,/* isInverseUnique */ true,/* isDerived */ false,/* isNavigable */ true,/* propertyType */ FolderX.class,/* json */ "{\"name\": \"subFolder\", \"associationClassOne\": false, \"memberEndOfAssociationClass\": false, \"associationClassPropertyName\": null, \"inverseAssociationClassPropertyName\": null, \"associationClassProperty\": false, \"onePrimitivePropertyOfAssociationClass\": false, \"onePrimitive\": false, \"readOnly\": false, \"dataTypeEnum\": null, \"validations\": null, \"qualifiedName\": \"umlgtest::org::umlg::multiplecompositeparent::FolderX::subFolder\", \"persistentName\": \"subFolder\", \"inverseName\": \"folder\", \"inverseQualifiedName\": \"umlgtest::org::umlg::multiplecompositeparent::folder_folder_1::folder\", \"manyPrimitive\": false, \"oneEnumeration\": false, \"manyEnumeration\": false, \"controllingSide\": true, \"composite\": true, \"inverseComposite\": false, \"oneToOne\": false, \"oneToMany\": true, \"manyToOne\": false, \"manyToMany\": false, \"upper\": -1, \"lower\": 0, \"inverseUpper\": 1, \"label\": \"folder_folder_1\", \"qualified\": false, \"inverseQualified\": false, \"ordered\": true, \"inverseOrdered\": false, \"unique\": true, \"inverseUnique\": true, \"derived\": false, \"navigable\": true}",/* isChangeListenerAttribute */ false),
root2(/* qualifiedName */ "umlgtest::org::umlg::multiplecompositeparent::root2_folder_1::root2",/* persistentName */ "root2",/* inverseName */ "folder",/* inverseQualifiedName */ "umlgtest::org::umlg::multiplecompositeparent::Root2::folder",/* 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("root2_folder_1"),/* isOneToOne */ false,/* isOneToMany */ false,/* isManyToOne */ true,/* isManyToMany */ false,/* upper */ 1,/* lower */ 0,/* inverseUpper */ -1,/* isQualified */ false,/* isInverseQualified */ false,/* isOrdered */ false,/* isInverseOrdered */ true,/* isUnique */ true,/* isInverseUnique */ true,/* isDerived */ false,/* isNavigable */ true,/* propertyType */ Root2.class,/* json */ "{\"name\": \"root2\", \"associationClassOne\": false, \"memberEndOfAssociationClass\": false, \"associationClassPropertyName\": null, \"inverseAssociationClassPropertyName\": null, \"associationClassProperty\": false, \"onePrimitivePropertyOfAssociationClass\": false, \"onePrimitive\": false, \"readOnly\": false, \"dataTypeEnum\": null, \"validations\": null, \"qualifiedName\": \"umlgtest::org::umlg::multiplecompositeparent::root2_folder_1::root2\", \"persistentName\": \"root2\", \"inverseName\": \"folder\", \"inverseQualifiedName\": \"umlgtest::org::umlg::multiplecompositeparent::Root2::folder\", \"manyPrimitive\": false, \"oneEnumeration\": false, \"manyEnumeration\": false, \"controllingSide\": false, \"composite\": false, \"inverseComposite\": true, \"oneToOne\": false, \"oneToMany\": false, \"manyToOne\": true, \"manyToMany\": false, \"upper\": 1, \"lower\": 0, \"inverseUpper\": -1, \"label\": \"root2_folder_1\", \"qualified\": false, \"inverseQualified\": false, \"ordered\": false, \"inverseOrdered\": true, \"unique\": true, \"inverseUnique\": true, \"derived\": false, \"navigable\": true}",/* isChangeListenerAttribute */ false),
folder(/* qualifiedName */ "umlgtest::org::umlg::multiplecompositeparent::folder_folder_1::folder",/* persistentName */ "folder",/* inverseName */ "subFolder",/* inverseQualifiedName */ "umlgtest::org::umlg::multiplecompositeparent::FolderX::subFolder",/* 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("folder_folder_1"),/* isOneToOne */ false,/* isOneToMany */ false,/* isManyToOne */ true,/* isManyToMany */ false,/* upper */ 1,/* lower */ 0,/* inverseUpper */ -1,/* isQualified */ false,/* isInverseQualified */ false,/* isOrdered */ false,/* isInverseOrdered */ true,/* isUnique */ true,/* isInverseUnique */ true,/* isDerived */ false,/* isNavigable */ true,/* propertyType */ FolderX.class,/* json */ "{\"name\": \"folder\", \"associationClassOne\": false, \"memberEndOfAssociationClass\": false, \"associationClassPropertyName\": null, \"inverseAssociationClassPropertyName\": null, \"associationClassProperty\": false, \"onePrimitivePropertyOfAssociationClass\": false, \"onePrimitive\": false, \"readOnly\": false, \"dataTypeEnum\": null, \"validations\": null, \"qualifiedName\": \"umlgtest::org::umlg::multiplecompositeparent::folder_folder_1::folder\", \"persistentName\": \"folder\", \"inverseName\": \"subFolder\", \"inverseQualifiedName\": \"umlgtest::org::umlg::multiplecompositeparent::FolderX::subFolder\", \"manyPrimitive\": false, \"oneEnumeration\": false, \"manyEnumeration\": false, \"controllingSide\": false, \"composite\": false, \"inverseComposite\": true, \"oneToOne\": false, \"oneToMany\": false, \"manyToOne\": true, \"manyToMany\": false, \"upper\": 1, \"lower\": 0, \"inverseUpper\": -1, \"label\": \"folder_folder_1\", \"qualified\": false, \"inverseQualified\": false, \"ordered\": false, \"inverseOrdered\": true, \"unique\": true, \"inverseUnique\": true, \"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 FolderXRuntimePropertyEnum
*
* @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 FolderXRuntimePropertyEnum(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\": \"FolderX\", ");
sb.append("\"qualifiedName\": \"umlgtest::org::umlg::multiplecompositeparent::FolderX\", ");
sb.append("\"uri\": \"TODO\", ");
sb.append("\"properties\": [");
for ( FolderXRuntimePropertyEnum l : FolderXRuntimePropertyEnum.values() ) {
sb.append(l.toJson());
if ( count < FolderXRuntimePropertyEnum.values().length ) {
count++;
sb.append(",");
}
}
sb.append("]}");
return sb.toString();
}
static public FolderXRuntimePropertyEnum fromInverseQualifiedName(String inverseQualifiedName) {
if ( folder.getInverseQualifiedName().equals(inverseQualifiedName) ) {
return folder;
}
if ( root2.getInverseQualifiedName().equals(inverseQualifiedName) ) {
return root2;
}
if ( subFolder.getInverseQualifiedName().equals(inverseQualifiedName) ) {
return subFolder;
}
if ( name.getInverseQualifiedName().equals(inverseQualifiedName) ) {
return name;
}
if ( root1.getInverseQualifiedName().equals(inverseQualifiedName) ) {
return root1;
}
return null;
}
static public FolderXRuntimePropertyEnum fromLabel(String _label) {
if ( folder.getLabel().equals(_label) ) {
return folder;
}
if ( root2.getLabel().equals(_label) ) {
return root2;
}
if ( subFolder.getLabel().equals(_label) ) {
return subFolder;
}
if ( name.getLabel().equals(_label) ) {
return name;
}
if ( root1.getLabel().equals(_label) ) {
return root1;
}
return null;
}
static public FolderXRuntimePropertyEnum fromQualifiedName(String qualifiedName) {
if ( folder.getQualifiedName().equals(qualifiedName) ) {
return folder;
}
if ( root2.getQualifiedName().equals(qualifiedName) ) {
return root2;
}
if ( subFolder.getQualifiedName().equals(qualifiedName) ) {
return subFolder;
}
if ( name.getQualifiedName().equals(qualifiedName) ) {
return name;
}
if ( root1.getQualifiedName().equals(qualifiedName) ) {
return root1;
}
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