com.metamatrix.api.core.xmi
Class EntityInfo

java.lang.Object
  extended by com.metamatrix.api.core.xmi.EntityInfo

public class EntityInfo
extends java.lang.Object

Represents the minimal information required for XMI entities. This class is used when reading in XMI files to manage the identification information for an entity.

The XMI processor is designed to hide as much as possible the semantics of XMI by simply constructing FeatureInfo and EntityInfo instances as an XMI stream is processed. These info classes are thus similar to SAX events of a SAX XML document parser.


Constructor Summary
EntityInfo(FeatureInfo ownerFeature, java.lang.String metaClassName)
          Construct a new instance of the EntityInfo using the metamodel entity's name.
EntityInfo(FeatureInfo ownerFeature, java.lang.String metaClassName, java.lang.String uri)
          Construct a new instance of the EntityInfo using the metamodel entity's name and URI.
 
Method Summary
 org.xml.sax.Attributes getAttributes()
           
 java.lang.String getHref()
          Gets the href.
 java.lang.String getID()
          Get the value of the XMI ID.
 java.lang.String getIDRef()
          Gets the idRef.
 java.lang.String getLabel()
          Gets the label.
 java.lang.String getMetaClassName()
          Gets the metaModelEntityName.
 java.lang.String getMetaModelURI()
          Get the URI of the namespace for the metamodel.
 java.lang.String getName()
          Get the name of the metamodel entity without its metamodel namespace prefix.
 FeatureInfo getOwnerFeatureInfo()
          Gets the FeatureInfo for the feature on the entity that contains this entity (e.g., this entity's parent entity).
 java.lang.String getParentId()
          Accessor for the parentId field...
 java.lang.String getQMetaClassName()
          Gets the qMetaModelEntityName.
 java.lang.String getUUID()
          Gets the uuid.
 void setAttributes(org.xml.sax.Attributes attributes)
           
 void setHref(java.lang.String href)
          Sets the href.
 void setID(java.lang.String xmiID)
          Set the value of the XMI ID.
 void setIDRef(java.lang.String entityIDRef)
          Sets the entityIDRef.
 void setLabel(java.lang.String label)
          Sets the label.
 void setMetaClassName(java.lang.String metaClassName)
          Sets the metaModelEntityName.
 void setMetaModelURI(java.lang.String uri)
          Set the URI for the namespace for the metamodel.
 void setName(java.lang.String name)
          Set the name of the metamodel entity.
 void setParentId(java.lang.String id)
          Setter for ParentId field.
 void setQMetaClassName(java.lang.String uri, java.lang.String metaClassName)
          Sets the metaModelEntityName.
 void setUUID(java.lang.String uuid)
          Sets the uuid.
 java.lang.String toString()
          Return the string representation for this entity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EntityInfo

public EntityInfo(FeatureInfo ownerFeature,
                  java.lang.String metaClassName)
Construct a new instance of the EntityInfo using the metamodel entity's name.

Parameters:
ownerFeature - the feature of this entity's owner that describes the ownership; may be null if there is no owner
metaClassName - the name (without metamodel namespace prefix) of the metamodel entity; may not be null or zero-length

EntityInfo

public EntityInfo(FeatureInfo ownerFeature,
                  java.lang.String metaClassName,
                  java.lang.String uri)
Construct a new instance of the EntityInfo using the metamodel entity's name and URI.

Parameters:
ownerFeature - the feature of this entity's owner that describes the ownership; may be null if there is no owner
metaClassName - the name (without metamodel namespace prefix) of the metamodel entity; may not be null or zero-length
uri - the URI of the metamodel namespace; may be null or zero-length, which means the metaClassName must unambigously identify a single metaclass within one of the metamodels defined in the header.
Throws:
java.lang.IllegalArgumentException - if the supplied name is null or zero-length
Method Detail

getMetaClassName

public java.lang.String getMetaClassName()
Gets the metaModelEntityName.

Returns:
the name of the metaclass; never null or zero-length

getParentId

public java.lang.String getParentId()
Accessor for the parentId field... may be null if not explicity set in content handler

Returns:
parentId

setParentId

public void setParentId(java.lang.String id)
Setter for ParentId field.

Parameters:
id -

getQMetaClassName

public java.lang.String getQMetaClassName()
Gets the qMetaModelEntityName.

Returns:
the MetaModel URI qualified name of the metaclass; never null or zero-length

setQMetaClassName

public void setQMetaClassName(java.lang.String uri,
                              java.lang.String metaClassName)
Sets the metaModelEntityName.

Parameters:
uri - of the metamodel, may not be null or zero-length
metaClassName - the name (without metamodel namespace prefix) of the metamodel entity; may not be null or zero-length
Throws:
java.lang.IllegalArgumentException - if the supplied name is null or zero-length

setMetaClassName

public void setMetaClassName(java.lang.String metaClassName)
Sets the metaModelEntityName.

Parameters:
metaClassName - the name (without metamodel namespace prefix) of the metamodel entity; may not be null or zero-length
Throws:
java.lang.IllegalArgumentException - if the supplied name is null or zero-length

getName

public java.lang.String getName()
Get the name of the metamodel entity without its metamodel namespace prefix.

Returns:
the name (without prefix) of the metamodel entity

setName

public void setName(java.lang.String name)
Set the name of the metamodel entity.

Parameters:
name - the metamodel entity name (without metamodel namespace prefix); may be null or zero-length

getMetaModelURI

public java.lang.String getMetaModelURI()
Get the URI of the namespace for the metamodel.

Returns:
the URI of the metamodel namespace

setMetaModelURI

public void setMetaModelURI(java.lang.String uri)
Set the URI for the namespace for the metamodel.

Parameters:
uri - the URI of the metamodel namespace; may be null or zero-length, which means the metaClassName must unambigously identify a single metaclass within one of the metamodels defined in the header.

toString

public java.lang.String toString()
Return the string representation for this entity.

Overrides:
toString in class java.lang.Object
Returns:
String representation for this object, which is of the form "."

getID

public java.lang.String getID()
Get the value of the XMI ID.

Returns:
the string ID for this entity

setID

public void setID(java.lang.String xmiID)
Set the value of the XMI ID.

Parameters:
xmiID - the string ID for this entity; may be null or zero-length

getUUID

public java.lang.String getUUID()
Gets the uuid.

Returns:
Returns a String

setUUID

public void setUUID(java.lang.String uuid)
Sets the uuid.

Parameters:
uuid - The uuid to set; may be null or zero-length

getHref

public java.lang.String getHref()
Gets the href.

Returns:
Returns a String

setHref

public void setHref(java.lang.String href)
Sets the href.

Parameters:
href - The href to set; may be null or zero-length

getLabel

public java.lang.String getLabel()
Gets the label.

Returns:
Returns a String

setLabel

public void setLabel(java.lang.String label)
Sets the label.

Parameters:
label - The label to set; may be null or zero-length

getIDRef

public java.lang.String getIDRef()
Gets the idRef.

Returns:
Returns a String

setIDRef

public void setIDRef(java.lang.String entityIDRef)
Sets the entityIDRef.

Parameters:
entityIDRef - The entityIDRef to set; may be null or zero-length

getOwnerFeatureInfo

public FeatureInfo getOwnerFeatureInfo()
Gets the FeatureInfo for the feature on the entity that contains this entity (e.g., this entity's parent entity).

Returns:
Returns the feature info; if this entity represents a root (i.e., it has no parent), then this will be null.

getAttributes

public org.xml.sax.Attributes getAttributes()
Returns:

setAttributes

public void setAttributes(org.xml.sax.Attributes attributes)
Parameters:
attributes -


Copyright © 2009. All Rights Reserved.