Class ByteArrayClassImpl
- 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.ByteArrayClassImpl
-
- All Implemented Interfaces:
AtomicClass,ByteArrayClass,DataClass,PropertyHandler
public class ByteArrayClassImpl extends AtomicClassImpl implements ByteArrayClass
Implementation ofByteArrayClass.- Author:
- Rainer Maximini
-
-
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.base.ByteArrayClass
CLASS_NAME, DEFAULT_MAXSIZE
-
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
-
-
Constructor Summary
Constructors Constructor Description ByteArrayClassImpl()Constructor for ByteArrayClassImpl.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcreateSystemSubClasses()createSystemSubClasses.ObjectgetDefaultValue()The default value is either a defined value withAtomicClass.setDefaultValue(Object)or an arbitrary but valid one.longgetMaxSize()The maximum size of the byte array that is allowed in theByteArrayObject.StringgetMimeType()The mime type of the content of aByteArrayObject.Class<? extends DataObject>getObjectClass()getObjectClass.booleanisByteArray()isByteArray.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.voidsetMaxSize(long maxSize)Specify the maximum size of the byte array that is allowed in theByteArrayObject.voidsetMimeType(String mimeType)Specifies the mime type of the content of aByteArrayObject.-
Methods inherited from class de.uni_trier.wi2.procake.data.model.base.impl.AtomicClassImpl
addAtomicObject, checkFinishEditing, createNewInstanceEnumerationPredicate, createNewInstanceIntervalPredicate, createNewInstanceOntologyOrderPredicate, createNewInstanceTaxonomyOrderPredicate, createNewInstanceTotalOrderPredicate, finishEditing, getAtomicObjects, 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, createSubclass, createSystemClassTree, getAllProperties, getAllPropertyNodes, getModel, getName, getProperty, getPropertyNames, getPropertyNode, getPropertyRootNode, getRootClass, getSubClasses, getSuperClass, getSuperClasses, getSystemClassName, getSystemSuperClass, hasProperties, includeClass, isAbstract, isAdaptationCase, isAggregate, isBoolean, 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, isURI, 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, 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, createSubclass, finishEditing, getModel, getName, getSubClasses, getSuperClass, getSuperClasses, getSystemClassName, getSystemSuperClass, includeClass, isAbstract, isAggregate, isAtomic, isBoolean, 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, isURI, 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
-
getDefaultValue
public Object getDefaultValue()
The default value is either a defined value withAtomicClass.setDefaultValue(Object)or an arbitrary but valid one.If the class is not finished, null will return if no default one defined manually. After finishing the class an arbitrary valid value is returned. This must be overwritten by subclasses!
- Specified by:
getDefaultValuein interfaceAtomicClass- Overrides:
getDefaultValuein classAtomicClassImpl- Returns:
- A valid native object of the class.
- See Also:
AtomicClass.getDefaultValue()
-
getMaxSize
public long getMaxSize()
The maximum size of the byte array that is allowed in theByteArrayObject.- Specified by:
getMaxSizein interfaceByteArrayClass- Returns:
- The maximum size of the byte array.
-
setMaxSize
public void setMaxSize(long maxSize) throws IllegalEditExceptionSpecify the maximum size of the byte array that is allowed in theByteArrayObject.- Specified by:
setMaxSizein interfaceByteArrayClass- Parameters:
maxSize- The maximum size.- Throws:
IllegalEditException
-
getMimeType
public String getMimeType()
The mime type of the content of aByteArrayObject.- Specified by:
getMimeTypein interfaceByteArrayClass- Returns:
- The mime type of the content.
-
setMimeType
public void setMimeType(String mimeType) throws IllegalEditException
Specifies the mime type of the content of aByteArrayObject.- Specified by:
setMimeTypein interfaceByteArrayClass- Parameters:
mimeType- aStringobject- Throws:
IllegalEditException- if any.
-
isByteArray
public boolean isByteArray()
isByteArray.
- Specified by:
isByteArrayin interfaceDataClass- Overrides:
isByteArrayin classAbstractDataClassImpl- Returns:
trueif the data class can be casted toByteArrayClass
-
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
-
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
-
-