Class URIClassImpl
- java.lang.Object
-
- de.uni_trier.wi2.procake.data.model.impl.AbstractDataClassImpl
-
- de.uni_trier.wi2.procake.data.model.base.impl.AtomicClassImpl
-
- de.uni_trier.wi2.procake.data.model.base.impl.URIClassImpl
-
- All Implemented Interfaces:
AtomicClass,URIClass,DataClass,PropertyHandler
public class URIClassImpl extends AtomicClassImpl implements URIClass
Implementation of theURIClass.- Author:
- Tobias Dahlem
-
-
Field Summary
-
Fields inherited from class de.uni_trier.wi2.procake.data.model.base.impl.AtomicClassImpl
defaultValue
-
Fields inherited from interface de.uni_trier.wi2.procake.data.model.base.AtomicClass
CLASS_NAME, COMPONENT, COMPONENT_KEY, LOG_CANNOT_HANDLE_NATIVE_VALUES, LOG_INTERVAL_BORDERS_INCOMPATIBLE, LOG_PARSING_NATIVE_VALUE, LOG_UNKNOWN_NATIVE_VALUE, LOG_UNKNOWN_VALUE_IN_ORDER, LOG_VALUE_RANGE_INCOMPATIBLE
-
Fields inherited from interface de.uni_trier.wi2.procake.data.model.DataClass
CLASS_NAME, COMPONENT, COMPONENT_KEY, LOG_ABSTRACT_CLASS_NOT_INSTANTIABLE, LOG_ABSTRACT_SYSTEM_SUBCLASS_CREATION_FAILED, LOG_CLASS_NOT_EDITABLE, LOG_CLASS_NOT_INSTANTIABLE, LOG_EDITABLE_CLASS_NOT_INSTANTIABLE, LOG_FINISH_EDIT_FAILED, LOG_GET_SUPERCLASSES_FAILED, LOG_SUBCLASS_CREATION_FAILED
-
Fields inherited from interface de.uni_trier.wi2.procake.data.model.base.URIClass
CLASS_NAME
-
-
Constructor Summary
Constructors Constructor Description URIClassImpl()Constructor for URIClassImpl.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckFinishEditing()This method only checks if it is possible to finish the class and does not change any internal status.DataClasscreateSubclass(String name)This method creates none system sub classes that are defined by the user.protected voidcreateSystemSubClasses()createSystemSubClasses.Class<? extends DataObject>getObjectClass()getObjectClass.StringgetOntologyName()getOntologyName.booleanisURI()isURI.ObjectnativeFromString(String value)Converts a String to the native object of the correspondingAtomicObjectStringnativeToString(Object value)Converts a native object of the correspondingAtomicObjectto a String.DataObjectnewObject()Creates a newDataObjectand initialize it.URIObjectnewURIObject()Creates a newURIObject.voidsetOntologyName(String ontologyName)setOntologyName.-
Methods inherited from class de.uni_trier.wi2.procake.data.model.base.impl.AtomicClassImpl
addAtomicObject, createNewInstanceEnumerationPredicate, createNewInstanceIntervalPredicate, createNewInstanceOntologyOrderPredicate, createNewInstanceTaxonomyOrderPredicate, createNewInstanceTotalOrderPredicate, finishEditing, getAtomicObjects, getDefaultValue, getInstanceEnumerationPredicate, getInstanceIntervalPredicate, getInstancePredicate, getInstanceTaxonomyOrderPredicate, getInstanceTotalOrderPredicate, getInternalDefaultValue, getNativeValueFromPredicate, hasEnumerationRange, hasIntervalRange, hasTaxonomyRange, hasTotalOrderRange, isAtomic, removeInstancePredicate, setDefaultValue
-
Methods inherited from class de.uni_trier.wi2.procake.data.model.impl.AbstractDataClassImpl
addProperty, addProperty, addSubclass, addSubClass, beSystemClass, checkEditability, checkInstantiability, clearSubClasses, createSystemClassTree, getAllProperties, getAllPropertyNodes, getModel, getName, getProperty, getPropertyNames, getPropertyNode, getPropertyRootNode, getRootClass, getSubClasses, getSuperClass, getSuperClasses, getSystemClassName, getSystemSuperClass, hasProperties, includeClass, isAbstract, isAdaptationCase, isAggregate, isBoolean, isByteArray, isCake2DataReference, isChronologic, isCollection, isControlflowItem, isDataflowWrapper, isDate, isDouble, isEditable, isInstantiable, isInteger, isInterval, isList, isNESTAdaptationQuery, isNESTAdaptationRule, isNESTAdaptationSession, isNESTAdaptationStep, isNESTConstraintEdge, isNESTControlflowEdge, isNESTControlflowNode, isNESTDataflowEdge, isNESTDataNode, isNESTEdge, isNESTGraph, isNESTGraphItem, isNESTNode, isNESTPartOfEdge, isNESTQuery, isNESTSequenceNode, isNESTSequentialWorkflow, isNESTSubWorkflowNode, isNESTTaskNode, isNESTWorkflow, isNESTWorkflowNode, isNode, isNumeric, isParentItem, isSequence, isSet, isString, isSubclassOf, isSubWorkflow, isSystemClass, isTask, isTime, isTimestamp, isUnion, isVoid, isWorkflow, isWorkflowCase, isWorkflowItem, removeProperty, removeSubclass, removeSubClass, setAbstract, setName, setSuperClass, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface de.uni_trier.wi2.procake.data.model.base.AtomicClass
addAtomicObject, createNewInstanceEnumerationPredicate, createNewInstanceIntervalPredicate, createNewInstanceOntologyOrderPredicate, createNewInstanceTaxonomyOrderPredicate, createNewInstanceTotalOrderPredicate, getAtomicObjects, getDefaultValue, getInstanceEnumerationPredicate, getInstanceIntervalPredicate, getInstancePredicate, getInstanceTaxonomyOrderPredicate, getInstanceTotalOrderPredicate, hasEnumerationRange, hasIntervalRange, hasTaxonomyRange, hasTotalOrderRange, removeInstancePredicate, setDefaultValue
-
Methods inherited from interface de.uni_trier.wi2.procake.data.model.DataClass
addSubclass, checkInstantiability, finishEditing, getModel, getName, getSubClasses, getSuperClass, getSuperClasses, getSystemClassName, getSystemSuperClass, includeClass, isAbstract, isAggregate, isAtomic, isBoolean, isByteArray, isCake2DataReference, isChronologic, isCollection, isControlflowItem, isDataflowWrapper, isDate, isDouble, isEditable, isInstantiable, isInteger, isInterval, isList, isNESTConstraintEdge, isNESTControlflowEdge, isNESTControlflowNode, isNESTDataflowEdge, isNESTDataNode, isNESTEdge, isNESTGraph, isNESTGraphItem, isNESTNode, isNESTPartOfEdge, isNESTSequenceNode, isNESTSequentialWorkflow, isNESTSubWorkflowNode, isNESTTaskNode, isNESTWorkflow, isNESTWorkflowNode, isNode, isNumeric, isParentItem, isSequence, isSet, isString, isSubclassOf, isSubWorkflow, isSystemClass, isTask, isTime, isTimestamp, isUnion, isVoid, isWorkflow, isWorkflowItem, removeSubclass, setAbstract, setName
-
Methods inherited from interface de.uni_trier.wi2.procake.data.PropertyHandler
addProperty, addProperty, getAllProperties, getAllPropertyNodes, getProperty, getPropertyNames, getPropertyNode, getPropertyRootNode, hasProperties, removeProperty
-
-
-
-
Method Detail
-
createSystemSubClasses
protected void createSystemSubClasses()
createSystemSubClasses.
- Overrides:
createSystemSubClassesin classAtomicClassImpl
-
isURI
public boolean isURI()
isURI.
- Specified by:
isURIin interfaceDataClass- Overrides:
isURIin classAbstractDataClassImpl- Returns:
trueif the data class can be casted toURIClass
-
newObject
public DataObject newObject() throws IllegalInstantiationException
Creates a newDataObjectand initialize it.DataObjects can not be created directly because they depend on theDataClassthat defines the object.The creation of a new object is only be possible if
DataClass.checkInstantiability()throws no exception.- Specified by:
newObjectin interfaceDataClass- Overrides:
newObjectin classAbstractDataClassImpl- Returns:
- a new
DataObject - Throws:
IllegalInstantiationException- is thrown if it is not possible to create an object this data class
-
getObjectClass
public Class<? extends DataObject> getObjectClass()
getObjectClass.
- Specified by:
getObjectClassin interfaceDataClass- Overrides:
getObjectClassin classAbstractDataClassImpl- Returns:
- Class of the corresponding data object
-
newURIObject
public URIObject newURIObject() throws IllegalInstantiationException
Creates a newURIObject. This is the same likeDataClass.newObject()but returns aURIObjectinstead of aDataObject.- Specified by:
newURIObjectin interfaceURIClass- Returns:
- a new
URIObject - Throws:
IllegalInstantiationException- See Also:
URIObject,DataClass.newObject()
-
getOntologyName
public String getOntologyName()
getOntologyName.
- Specified by:
getOntologyNamein interfaceURIClass- Returns:
- a
Stringobject
-
setOntologyName
public void setOntologyName(String ontologyName) throws NameNotFoundException
setOntologyName.
- Specified by:
setOntologyNamein interfaceURIClass- Parameters:
ontologyName- aStringobject- Throws:
NameNotFoundException
-
createSubclass
public DataClass createSubclass(String name)
This method creates none system sub classes that are defined by the user. It is not possible to create sub-classes for abstract system classes. In that case aIllegalInstantiationExceptionwill be thrown.Each data class has a unique name. This name must be given to this method. If the name already exists, a
NameAlreadyExistsExceptionwill be thrown. The name can be used to access the data class from the data model by using the methodModel.getClass(String).The class is automatically added to the model. To remove the class again you must use the method
Model.removeClass(String).- Specified by:
createSubclassin interfaceDataClass- Overrides:
createSubclassin classAbstractDataClassImpl- Parameters:
name- The uniqe name of the new sub class.- Returns:
- The new sub class.
- See Also:
Model.removeClass(String)
-
checkFinishEditing
protected void checkFinishEditing() throws ClassHierarchyConsistencyExceptionThis method only checks if it is possible to finish the class and does not change any internal status. To initialize internal caches use the methodAbstractDataClassImpl.finishEditing().Sub classes are allowed to overwrite this method with own code but they must follow some instructions. It is very important to call the
AbstractDataClassImpl.checkFinishEditing()method in the super class. This can be done before or after the own check methods. But it is advisable to implement the methods like inAbstractDataClassImpl.finishEditing()where first the super class is called. For example:protected void checkFinishEditing() throws ClassHierarchyConsistencyException { super.checkFinishEditing(); // put your code here }- Overrides:
checkFinishEditingin classAtomicClassImpl- Throws:
ClassHierarchyConsistencyException- See Also:
AbstractDataClassImpl.finishEditing()
-
nativeFromString
public Object nativeFromString(String value) throws InvalidNativeValueException
Converts a String to the native object of the correspondingAtomicObject- Specified by:
nativeFromStringin interfaceAtomicClass- Overrides:
nativeFromStringin classAtomicClassImpl- Parameters:
value- The String representation of the value- Returns:
- a new Object representing the
value - Throws:
InvalidNativeValueException
-
nativeToString
public String nativeToString(Object value) throws InvalidNativeValueException
Converts a native object of the correspondingAtomicObjectto a String.- Specified by:
nativeToStringin interfaceAtomicClass- Overrides:
nativeToStringin classAtomicClassImpl- Parameters:
value- The native object that should be converted.- Returns:
- a String representation of the
value - Throws:
InvalidNativeValueException
-
-