com.ibm.di.cdm.jar
Class JarMetaData

java.lang.Object
  extended by com.ibm.di.cdm.core.MetaData
      extended by com.ibm.di.cdm.jar.JarMetaData

public class JarMetaData
extends MetaData

This class is used to retrieve CDM meta-data from a jar file.


Field Summary
 
Fields inherited from class com.ibm.di.cdm.core.MetaData
resHash
 
Constructor Summary
JarMetaData()
           
 
Method Summary
 Vector<Entry> getAttributes(String artifactType, String classType)
          Retrieves the attributes of a given artifact (CI or a Relationship).
 String getCdmVersion()
          Retrieves the version of the Common Data Model, which meta-data is extracted.
protected  String getIdentifierName(NamingRuleIdentifier identifier)
          Generate proper name for provided NamingRuleIdentifier.
protected  List<NamingRule> getNamingRules(String classType)
          Returns the CDM naming rules for the provided class.
 Map<String,Object> getTypes(String artifactType)
          Returns the CDM meta-data types artifacts (CIs or Relationships).
 
Methods inherited from class com.ibm.di.cdm.core.MetaData
createExplicitAttribute, createImplicitAttribute, getClassType, getExtendedAttributeName, getMSSClassName, getNamingRuleIdentifier, getRelationshipAttributes, getUnsatisfiedNamingRules, matchesNamingRules
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JarMetaData

public JarMetaData()
Method Detail

getAttributes

public Vector<Entry> getAttributes(String artifactType,
                                   String classType)
                            throws Exception
Retrieves the attributes of a given artifact (CI or a Relationship).

Specified by:
getAttributes in class MetaData
Parameters:
artifactType - determines the type of artifact, which attributes we want. Accepts either IdMLConstants.ARTIFACT_CI or IdMLConstants.ARTIFACT_RELATIONSHIP.
classType - the type of the artifact, which attributes we want.
Returns:
a Vector containing the CI/Relationship attributes.
Throws:
Exception - if a problem occurs.

getCdmVersion

public String getCdmVersion()
                     throws Exception
Retrieves the version of the Common Data Model, which meta-data is extracted.

Specified by:
getCdmVersion in class MetaData
Returns:
a string representing the CDM version. Its format is '<version>.<release>.<modifier>'.
Throws:
Exception - if a problem occurs.

getTypes

public Map<String,Object> getTypes(String artifactType)
                            throws Exception
Returns the CDM meta-data types artifacts (CIs or Relationships).

Specified by:
getTypes in class MetaData
Parameters:
artifactType - determines the type of artifact - either IdMLConstants.ARTIFACT_CI or IdMLConstants.ARTIFACT_RELATIONSHIP.
Returns:
a Map containing the CDM type names and additional data for them as an Object.
Throws:
Exception - if a problem occurs.

getNamingRules

protected List<NamingRule> getNamingRules(String classType)
                                   throws Exception
Returns the CDM naming rules for the provided class.

Specified by:
getNamingRules in class MetaData
Parameters:
classType - the class type of interest.
Returns:
a list of the available naming rules.
Throws:
Exception - if a problem occurs when reading the rules.

getIdentifierName

protected String getIdentifierName(NamingRuleIdentifier identifier)
Generate proper name for provided NamingRuleIdentifier.

Overrides:
getIdentifierName in class MetaData
Parameters:
identifier - whose name will be generate.
Returns:
a proper name