com.metamatrix.api.core.xmi
Class FeatureInfo

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

public class FeatureInfo
extends java.lang.Object

Class for managing information during the creation of Features. An instance of this class represents a particular feature and (optiona) value on an owner object.

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
FeatureInfo(EntityInfo ownerEntity, java.lang.String featureName, java.lang.String metaClassName, java.lang.String uri)
          Construct a new instance of the FeatureInfo using the feature name, metamodel entity's name and metamodel URI.
 
Method Summary
 java.lang.String getMetaClassName()
          Get the name of the metaclass to which this feature applies.
 java.lang.String getMetaModelURI()
          Get the URI of the namespace for the metamodel.
 java.lang.String getName()
          Get the name of the feature.
 EntityInfo getOwnerEntityInfo()
          Gets the EntityInfo for the feature on the entity that contains this entity.
 java.lang.Object getValue()
          Get the value of the feature
 void setMetaClassName(java.lang.String metaClassName)
          Set the name of the metaclass to which this feature applies.
 void setMetaModelURI(java.lang.String uri)
          Set the URI for the namespace for the metamodel.
 void setName(java.lang.String featureName)
          Set the name of the feature.
 void setValue(java.lang.Object value)
          Set the value of the feature
 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

FeatureInfo

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

Parameters:
ownerEntity - the EntityInfo for the entity on which this feature exists; may not be null
featureName - the name of the feature
metaClassName - the name (without metamodel namespace prefix) of the metamodel entity to which this feature applies; 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, feature name is null or zero-length, or the ownerEntity reference is null
Method Detail

getName

public java.lang.String getName()
Get the name of the feature.

Returns:
Returns a String

setName

public void setName(java.lang.String featureName)
Set the name of the feature.

Parameters:
featureName - The name of the feature

getMetaClassName

public java.lang.String getMetaClassName()
Get the name of the metaclass to which this feature applies.

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

setMetaClassName

public void setMetaClassName(java.lang.String metaClassName)
Set the name of the metaclass to which this feature applies.

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

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 ".="

getValue

public java.lang.Object getValue()
Get the value of the feature

Returns:
Returns the value

setValue

public void setValue(java.lang.Object value)
Set the value of the feature

Parameters:
value - The value to set

getOwnerEntityInfo

public EntityInfo getOwnerEntityInfo()
Gets the EntityInfo for the feature on the entity that contains this entity.

Returns:
Returns the entity info; never null.


Copyright © 2009. All Rights Reserved.