public class TypeDefinitionDMW extends DmsDefinition implements DmcDefinitionIF
TypeDefinition is used to define the types of
attributes that can be used\n as the basis for attribute values. The name
of the type definition should be the same as the\n actual Java class that
is used to store the value of an attribute e.g. the name of the type\n
used to store strings is String. The typeClassName is the
fully qualified name of the class\n derived from DmcAttribute
that stores this type of value; they are always, by convention,\n named
DmcTypeXXX.\n \n TypeDefinitions are
automatically generated internally for ClassDefinitions, \n
ComplexTypeDefinitions,
ExtendedReferenceTypeDefinitions and\n
EnumDefinitions so that these objects can be referred to via
the type attribute of AttributeDefinitions.\n
These definitions are marked as internallyGenerated .\n
\n The simplest TypeDefinition would look something
like:\n
\n TypeDefinition\n name String\n typeClassName org.dmd.dmc.types.DmcTypeString\n description Provides support for String values.\n\n This form would be used for attribute types whose base type originates in
java.lang.\n The dark-matter
base types include: Boolean, Byte, Double, Float, Integer, Long, Short and
String.\n \n TypeDefinitions also support the concept of
specifying a nullReturnValue \n for the entire type i.e.
whenever an attribute of the specified type is accessed, it will return\n
that value when the attribute doesn't exist in the object. An example of
this is the Boolean type:\n
\n TypeDefinition\n name
Boolean\n typeClassName org.dmd.dmc.types.DmcTypeBoolean\n
nullReturnValue false\n description Provides support for Boolean
values. This type makes use of the\n nullReturnValue flag
so that, even if there is no\n value for an attribute of
this type, a value of false will\n be returned.\n \n
\n The next most common form of TypeDefinition adds the
primitiveType \n attribute. This is required for code
generation so that we can import the appropriate type for\n use in the
various getter/setter methods. An example would be the Date
type.\n
\n TypeDefinition\n name Date\n typeClassName org.dmd.dmc.types.DmcTypeDate\n primitiveType java.util.Date\n description Provides support for Date values.\n\n Another common form of
TypeDefinition is the definition of a name type.
Object\n naming is a fundamental aspect of DMOs, with all object names
being based on the DmcObjectName.\n Flagging a type as being
a name type also implies the definition of a designated naming attribute\n
associated with the type. This mechanism allows for the transport of names
that are self\n describing in terms of their implementation type. This
feature supports the NameContainer\n type that allows any
name to be transported in things like dark-matter protocol
GetRequest.\n An example of a naming type would be:\n \n TypeDefinition\n name CamelCaseName\n typeClassName org.dmd.dmc.types.DmcTypeCamelCaseName\n primitiveType org.dmd.dmc.types.CamelCaseName\n isNameType true\n description The CamelCaseName is a string based name that must start with\n an alpha character which is followed by a mix of alphanumerics.\n\n And its associated designated naming attribute would be:\n
\n
AttributeDefinition\n name camelCaseName\n dmdID
116\n type CamelCaseName\n
designatedNameAttribute true\n description The camelCaseName
attribute is used to store a single camelCase\n
format name for something. The name starts with a single letter\n
and can be followed by a mix of letters and numbers. No
spaces or \n other characters are allowed.\n
\n The last form of type definition is one that includes some
additional information to provide\n a convenient, alternate interface for
the generation of member functions associated with\n a container type;
this concept is pretty much limited to the meta-schema, so it is
unlikely\n that non-contributors to dark-matter will make use of this
concept. However, here is an example:\n \n TypeDefinition\n name
NameContainer\n typeClassName
org.dmd.dmc.types.DmcTypeNameContainer\n primitiveType
org.dmd.dmc.types.NameContainer\n altType DmcObjectName\n
altTypeImport org.dmd.dmc.DmcObjectName\n description The
NameContainer type allows for the storage of object names of different
types...\n metanamecore| Modifier | Constructor and Description |
|---|---|
protected |
TypeDefinitionDMW() |
protected |
TypeDefinitionDMW(ClassDefinition cd) |
protected |
TypeDefinitionDMW(DmcObject obj) |
protected |
TypeDefinitionDMW(DmcObject obj,
ClassDefinition cd) |
protected |
TypeDefinitionDMW(String mn) |
| Modifier and Type | Method and Description |
|---|---|
void |
addDescription(Object value)
Adds another description value.
|
String |
getAltType()
The altType indicates an alternate type for a value.
|
String |
getAltTypeImport()
An additional import (if required) by the altType attribute value.
|
Iterator<String> |
getDescription()
The description attribute is used to provide descriptive\n documentation
for schema related definitions.
|
int |
getDescriptionSize() |
Iterator<String> |
getDescriptionWithNewlines() |
TypeDefinitionDMO |
getDMO() |
String |
getDmwIteratorClass()
This attribute indicates just the DmcContainerIterator name for a\n class
of object.
|
String |
getDmwIteratorImport()
This attribute indicates the full name of the DmcContainerIterator \n
derived class that allows us to iterate over a set of object references
and get back\n the DMW wrapper object instead of the DMO.
|
String |
getEnumName()
The original name of an enum as referred to in the internally generated
type for enums.
|
AttributeDefinition |
getFilterAttributeDef()
The filterAttributeDef is a reference to the attribute that is locked\n to
a TypeDefinition that is flagged as filterType.
|
String |
getGenericArgs()
This attribute indicates the generic arguments to be supplied in the\n use
of a class in an autogenerated Iterable.
|
String |
getHelperClassName()
This attribute indicates the full name of the generated helper class for
\n object references i.e.
|
Boolean |
getInternallyGenerated()
This flag indicates if the associated definition was internally
generated.\n This is the case for TypeDefinitions generated for
ClassDefinitions and EnumDefinitions\n that allow for references to these
objects.
|
Boolean |
getIsEnumType()
This flag is set to true for type definitions that define enumerations.
|
Boolean |
getIsExtendedRefType()
This flag is used to indicate taht an internally generated type\n is an
extended reference type.
|
Boolean |
getIsFilterType()
Indicates that a type is derived from DmcFilter.
|
Boolean |
getIsHierarchicName()
Indicates if a name type is for hierarchic objects.
|
Boolean |
getIsNameType()
This attribute indicates if a defined type is used for naming purposes.\n
This allows us to automatically add attributes of this type to the
AttributeFactories.
|
Boolean |
getIsRefType()
This flag is set to true for type definitions that refer to other\n
objects.
|
String |
getKeyClass()
This attribute indicates the class of the key used for types that
support\n storage in a MAP.
|
String |
getKeyImport()
Indicates the import for a keyClass.
|
DefinitionName |
getName()
The name attribute is used to store a single string token that represents
a unique name\n for an object with the set of definitions of which it is a
part.
|
AttributeDefinition |
getNameAttributeDef()
The nameAttributeDef is a reference to the attribute that is locked\n to a
TypeDefinition.
|
String |
getNullReturnValue()
This attribute is used in TypeDefinitions to indicate the value that
should be returned when\n an attribute of the specified type doesn't exist
in the object.
|
Boolean |
getNumericOrBoolean()
When we perform toJSON() operations, we need to know whether to quote\n
values.
|
DefinitionName |
getObjectName() |
DmcAttribute<?> |
getObjectNameAttribute() |
ClassDefinition |
getOriginalClass()
Refers to the class that an internally generated type represents.
|
String |
getPrimitiveType()
The primitiveType indicates the underlying type of a DmcType.
|
String |
getTypeClassName()
This is the fully qualified name of the class derived from DmcAttribute
that provides management\n of a particular type of attribute value.
|
String |
getWrapperClassName()
This is the fully qualified name of the wrapper class derived from
DmcWrapperBase that\n wraps a DMO.
|
void |
setAltType(Object value)
Sets altType to the specified value.
|
void |
setAltTypeImport(Object value)
Sets altTypeImport to the specified value.
|
void |
setDmcObject(DmcObject obj)
Sets the core object.
|
void |
setDmwIteratorClass(Object value)
Sets dmwIteratorClass to the specified value.
|
void |
setDmwIteratorImport(Object value)
Sets dmwIteratorImport to the specified value.
|
void |
setEnumName(Object value)
Sets enumName to the specified value.
|
void |
setFilterAttributeDef(AttributeDefinition value)
Sets filterAttributeDef to the specified value.
|
void |
setGenericArgs(Object value)
Sets genericArgs to the specified value.
|
void |
setHelperClassName(Object value)
Sets helperClassName to the specified value.
|
void |
setInternallyGenerated(Object value)
Sets internallyGenerated to the specified value.
|
void |
setIsEnumType(Object value)
Sets isEnumType to the specified value.
|
void |
setIsExtendedRefType(Object value)
Sets isExtendedRefType to the specified value.
|
void |
setIsFilterType(Object value)
Sets isFilterType to the specified value.
|
void |
setIsHierarchicName(Object value)
Sets isHierarchicName to the specified value.
|
void |
setIsNameType(Object value)
Sets isNameType to the specified value.
|
void |
setIsRefType(Object value)
Sets isRefType to the specified value.
|
void |
setKeyClass(Object value)
Sets keyClass to the specified value.
|
void |
setKeyImport(Object value)
Sets keyImport to the specified value.
|
void |
setName(Object value)
Sets name to the specified value.
|
void |
setNameAttributeDef(AttributeDefinition value)
Sets nameAttributeDef to the specified value.
|
void |
setNullReturnValue(Object value)
Sets nullReturnValue to the specified value.
|
void |
setNumericOrBoolean(Object value)
Sets numericOrBoolean to the specified value.
|
void |
setOriginalClass(ClassDefinition value)
Sets originalClass to the specified value.
|
void |
setPrimitiveType(Object value)
Sets primitiveType to the specified value.
|
void |
setTypeClassName(Object value)
Sets typeClassName to the specified value.
|
void |
setWrapperClassName(Object value)
Sets wrapperClassName to the specified value.
|
getDmcObjectaddRelatedToConcept, getRelatedToConcept, getRelatedToConceptSizeequals, getFullDotName, getNameOfModuleWhereThisCameFromaddComment, addExample, addNvp, addOptimize, addQuestion, addSkip, addTags, getComment, getCommentSize, getDefinedIn, getDmoFromModule, getDotName, getExample, getExampleSize, getFile, getHint, getLineNumber, getNvp, getNvpSize, getObsolete, getOptimize, getOptimizeSize, getQuestion, getQuestionSize, getRelationship, getSearchable, getSkip, getSkipSize, getSortName, getTags, getTagsSize, getVersion, getWhy, setDefinedIn, setDmoFromModule, setDotName, setFile, setHint, setLineNumber, setObsolete, setRelationship, setSearchable, setSortName, setVersion, setWhyaddAux, applyModifier, equals, getBackRefs, getConstructionClass, getConstructionClassInfo, getConstructionClassName, getObjectClass, getReferringObjects, getReferringObjectsViaAttribute, hasAux, isReferenced, referenceCount, removeAux, resolveReferences, resolveReferences, serializeIt, toJSON, toOIF, toOIF, toPersistentOIF, toString, youAreDeletedgetDeleted, getModifier, setDeleted, setModifierclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDefinedIn, getDotName, toOIFequalsprotected TypeDefinitionDMW()
protected TypeDefinitionDMW(DmcObject obj)
protected TypeDefinitionDMW(DmcObject obj, ClassDefinition cd)
protected TypeDefinitionDMW(ClassDefinition cd)
protected TypeDefinitionDMW(String mn) throws DmcValueException
DmcValueExceptionpublic void setDmcObject(DmcObject obj)
DmcContainersetDmcObject in interface DmcContainerIFsetDmcObject in class DmsDefinitionobj - The core object.public TypeDefinitionDMO getDMO()
getDMO in class DmsDefinitionDMWpublic DefinitionName getName()
getName in interface DmcDefinitionIFgetName in class DmsDefinitionDMWpublic void setName(Object value) throws DmcValueException
setName in class DmsDefinitionDMWvalue - A value compatible with DmcTypeDefinitionNameSVDmcValueException - if the value is incorrectpublic String getTypeClassName()
public void setTypeClassName(Object value) throws DmcValueException
value - A value compatible with DmcTypeStringSVDmcValueException - if the value is incorrectpublic Iterator<String> getDescription()
getDescription in class DSDefinitionDMWpublic Iterator<String> getDescriptionWithNewlines()
getDescriptionWithNewlines in class DSDefinitionDMWpublic void addDescription(Object value) throws DmcValueException
addDescription in class DSDefinitionDMWvalue - A value compatible with DmcTypeStringMVDmcValueException - if the value is incorrectpublic int getDescriptionSize()
getDescriptionSize in class DSDefinitionDMWpublic String getPrimitiveType()
public void setPrimitiveType(Object value) throws DmcValueException
value - A value compatible with DmcTypeStringSVDmcValueException - if the value is incorrectpublic String getNullReturnValue()
public void setNullReturnValue(Object value) throws DmcValueException
value - A value compatible with DmcTypeStringSVDmcValueException - if the value is incorrectpublic String getAltType()
public void setAltType(Object value) throws DmcValueException
value - A value compatible with DmcTypeStringSVDmcValueException - if the value is incorrectpublic String getAltTypeImport()
public void setAltTypeImport(Object value) throws DmcValueException
value - A value compatible with DmcTypeStringSVDmcValueException - if the value is incorrectpublic String getKeyClass()
public void setKeyClass(Object value) throws DmcValueException
value - A value compatible with DmcTypeStringSVDmcValueException - if the value is incorrectpublic String getKeyImport()
public void setKeyImport(Object value) throws DmcValueException
value - A value compatible with DmcTypeStringSVDmcValueException - if the value is incorrectpublic String getWrapperClassName()
public void setWrapperClassName(Object value) throws DmcValueException
value - A value compatible with DmcTypeStringSVDmcValueException - if the value is incorrectpublic Boolean getInternallyGenerated()
public void setInternallyGenerated(Object value) throws DmcValueException
value - A value compatible with DmcTypeBooleanSVDmcValueException - if the value is incorrectpublic String getHelperClassName()
public void setHelperClassName(Object value) throws DmcValueException
value - A value compatible with DmcTypeStringSVDmcValueException - if the value is incorrectpublic String getDmwIteratorImport()
public void setDmwIteratorImport(Object value) throws DmcValueException
value - A value compatible with DmcTypeStringSVDmcValueException - if the value is incorrectpublic String getDmwIteratorClass()
public void setDmwIteratorClass(Object value) throws DmcValueException
value - A value compatible with DmcTypeStringSVDmcValueException - if the value is incorrectpublic Boolean getIsEnumType()
public void setIsEnumType(Object value) throws DmcValueException
value - A value compatible with DmcTypeBooleanSVDmcValueException - if the value is incorrectpublic Boolean getIsNameType()
public void setIsNameType(Object value) throws DmcValueException
value - A value compatible with DmcTypeBooleanSVDmcValueException - if the value is incorrectpublic Boolean getIsHierarchicName()
public void setIsHierarchicName(Object value) throws DmcValueException
value - A value compatible with DmcTypeBooleanSVDmcValueException - if the value is incorrectpublic Boolean getIsFilterType()
public void setIsFilterType(Object value) throws DmcValueException
value - A value compatible with DmcTypeBooleanSVDmcValueException - if the value is incorrectpublic Boolean getIsExtendedRefType()
public void setIsExtendedRefType(Object value) throws DmcValueException
value - A value compatible with DmcTypeBooleanSVDmcValueException - if the value is incorrectpublic Boolean getIsRefType()
public void setIsRefType(Object value) throws DmcValueException
value - A value compatible with DmcTypeBooleanSVDmcValueException - if the value is incorrectpublic String getEnumName()
public void setEnumName(Object value) throws DmcValueException
value - A value compatible with DmcTypeStringSVDmcValueException - if the value is incorrectpublic ClassDefinition getOriginalClass()
public void setOriginalClass(ClassDefinition value) throws DmcValueException
value - A value compatible with ClassDefinitionDmcValueException - if the value is incorrectpublic AttributeDefinition getNameAttributeDef()
public void setNameAttributeDef(AttributeDefinition value) throws DmcValueException
value - A value compatible with AttributeDefinitionDmcValueException - if the value is incorrectpublic AttributeDefinition getFilterAttributeDef()
public void setFilterAttributeDef(AttributeDefinition value) throws DmcValueException
value - A value compatible with AttributeDefinitionDmcValueException - if the value is incorrectpublic Boolean getNumericOrBoolean()
public void setNumericOrBoolean(Object value) throws DmcValueException
value - A value compatible with DmcTypeBooleanSVDmcValueException - if the value is incorrectpublic String getGenericArgs()
public void setGenericArgs(Object value) throws DmcValueException
value - A value compatible with DmcTypeStringSVDmcValueException - if the value is incorrectpublic DefinitionName getObjectName()
getObjectName in interface DmcNamedObjectIFgetObjectName in class DmsDefinitionpublic DmcAttribute<?> getObjectNameAttribute()
getObjectNameAttribute in interface DmcNamedObjectIFgetObjectNameAttribute in class DmsDefinitionDMWCopyright © 2023. All rights reserved.