org.ivoa.model
Class Identity

java.lang.Object
  extended by org.ivoa.dm.model.MetadataElement
      extended by org.ivoa.dm.model.MetadataDataType
          extended by org.ivoa.model.Identity
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class Identity
extends MetadataDataType

UML DataType Identity : This data type contains all flavor for objectType identifiers : - primary key value : numeric
- string xmlId : string for XML ID (xsd:id type) for xml instances - ivoId : URI format for external references TODO : This entity should not be converted to a java class (already exists)

Author:
generated by UML2 Generator tool (UML->XMI->XSLT->java code)
See Also:
Serialized Form

Field Summary
private  java.lang.Integer id
          Attribute id : the primary key generated by JPA after persist execution : this value is updated by PostPersist & PostLoad JPA events.
private  java.lang.String ivoId
          Attribute ivoId : A local xsd:ID for this object, can be used when registering a DM/Resource that has internal references. ( Multiplicity : 0..1 )
private static long serialVersionUID
          serial uid = last modification date of the UML model
private  java.lang.String xmlId
          Attribute xmlId : A local xsd:ID for this object, can be used when registering a DM/Resource that has internal references. ( Multiplicity : 0..1 )
 
Fields inherited from class org.ivoa.dm.model.MetadataElement
log, PRESENT, STRING_BUFFER_CAPACITY
 
Constructor Summary
Identity()
          Creates a new Identity
 
Method Summary
protected  java.lang.StringBuilder deepToString(java.lang.StringBuilder sb, boolean isDeep, java.util.Map<MetadataElement,java.lang.Object> ids)
          Puts the string representation in the given string buffer :
"Type =[class name @ hashcode] : { field name = field value , ...}"
 boolean equals(java.lang.Object object, boolean isDeep)
          Returns equals from id attribute here.
 java.lang.Integer getId()
          Returns id Attribute
 java.lang.String getIvoId()
          Returns ivoId Attribute
 java.lang.Object getProperty(java.lang.String propertyName)
          Returns the property value given the property name.
 java.lang.String getXmlId()
          Returns xmlId Attribute
 void setId(java.lang.Integer pId)
          Defines id Attribute
 void setIvoId(java.lang.String pIvoId)
          Defines ivoId Attribute
 boolean setProperty(java.lang.String propertyName, java.lang.Object value)
          Sets the property value to the given property name.
 void setXmlId(java.lang.String pXmlId)
          Defines xmlId Attribute
 
Methods inherited from class org.ivoa.dm.model.MetadataDataType
getObjectMetaData, toString
 
Methods inherited from class org.ivoa.dm.model.MetadataElement
areEquals, baseToString, clone, deepToString, deepToString, equals, exists, getClassName, getMetaModelFactory, hashCode, toString, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
serial uid = last modification date of the UML model

See Also:
Constant Field Values

id

private java.lang.Integer id
Attribute id : the primary key generated by JPA after persist execution : this value is updated by PostPersist & PostLoad JPA events. This value is transient because the metadata object owns the "real" id. ( Multiplicity : 0..1 )


xmlId

private java.lang.String xmlId
Attribute xmlId : A local xsd:ID for this object, can be used when registering a DM/Resource that has internal references. ( Multiplicity : 0..1 )


ivoId

private java.lang.String ivoId
Attribute ivoId : A local xsd:ID for this object, can be used when registering a DM/Resource that has internal references. ( Multiplicity : 0..1 )

Constructor Detail

Identity

public Identity()
Creates a new Identity

Method Detail

getId

public java.lang.Integer getId()
Returns id Attribute

Returns:
id Attribute

setId

public void setId(java.lang.Integer pId)
Defines id Attribute

Parameters:
pId - value to set

getXmlId

public java.lang.String getXmlId()
Returns xmlId Attribute

Returns:
xmlId Attribute

setXmlId

public void setXmlId(java.lang.String pXmlId)
Defines xmlId Attribute

Parameters:
pXmlId - value to set

getIvoId

public java.lang.String getIvoId()
Returns ivoId Attribute

Returns:
ivoId Attribute

setIvoId

public void setIvoId(java.lang.String pIvoId)
Defines ivoId Attribute

Parameters:
pIvoId - value to set

equals

public boolean equals(java.lang.Object object,
                      boolean isDeep)
Returns equals from id attribute here. Child classes can override this method to allow deep equals with attributes / references / collections

Overrides:
equals in class MetadataElement
Parameters:
object - the reference object with which to compare.
isDeep - true means to call hashCode(sb, true) for all attributes / references / collections which are MetadataElement implementations
Returns:
true if this object is the same as the obj argument; false otherwise.
See Also:
method

getProperty

public java.lang.Object getProperty(java.lang.String propertyName)
Returns the property value given the property name. Can be any property (internal, attribute, reference, collection) and all type must be supported (dataType, objectType, enumeration)

Overrides:
getProperty in class MetadataElement
Parameters:
propertyName - name of the property (like in UML model)
Returns:
property value or null if unknown or not defined

setProperty

public boolean setProperty(java.lang.String propertyName,
                           java.lang.Object value)
Sets the property value to the given property name. Can be any property (internal, attribute, reference, collection) and all type must be supported (dataType, objectType, enumeration)

Overrides:
setProperty in class MetadataElement
Parameters:
propertyName - name of the property (like in UML model)
value - to be set
Returns:
true if property has been set

deepToString

protected java.lang.StringBuilder deepToString(java.lang.StringBuilder sb,
                                               boolean isDeep,
                                               java.util.Map<MetadataElement,java.lang.Object> ids)
Puts the string representation in the given string buffer :
"Type =[class name @ hashcode] : { field name = field value , ...}"

Specified by:
deepToString in class MetadataElement
Parameters:
sb - given string buffer to fill
isDeep - true means to call deepToString(sb, true, ids) for all attributes / references / collections which are MetadataElement implementations
ids - identity map to avoid cyclic loops
Returns:
stringbuffer the given string buffer filled with the string representation