Package com.ibm.di.cdm.itregistry
Class ITRegistryMetaData
- java.lang.Object
-
- com.ibm.di.cdm.core.MetaData
-
- com.ibm.di.cdm.itregistry.ITRegistryMetaData
-
public class ITRegistryMetaData extends MetaData
This class is used to retrieve CDM meta-data from an IT registry.
-
-
Constructor Summary
Constructors Constructor Description ITRegistryMetaData(java.lang.String jdbcUrl, java.lang.String jdbcDriver, java.lang.String dbUsername, java.lang.String dbPassword)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Vector<Entry>
getAttributes(java.lang.String artifactType, java.lang.String classType)
Retrieves the attributes of a given artifact (CI or a Relationship).java.lang.String
getCdmVersion()
Retrieves the version of the Common Data Model, which meta-data is extracted.protected java.lang.String
getIdentifierName(NamingRuleIdentifier identifier)
Generate proper name for provided NamingRuleIdentifier.protected java.util.List<NamingRule>
getNamingRules(java.lang.String classType)
FIXME:java.util.Map<java.lang.String,java.lang.Object>
getTypes(java.lang.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
-
-
-
-
Constructor Detail
-
ITRegistryMetaData
public ITRegistryMetaData(java.lang.String jdbcUrl, java.lang.String jdbcDriver, java.lang.String dbUsername, java.lang.String dbPassword) throws java.lang.Exception
Constructor.- Parameters:
jdbcUrl
- the JDBC URL used for connecting to the IT registry.jdbcDriver
- the JDBC driver for connecting to the IT registry.dbUsername
- the user name used for connecting to the IT registry.dbPassword
- the password used for connecting to the IT registry.- Throws:
java.lang.Exception
- if the JDBC driver is unavailable.
-
-
Method Detail
-
getAttributes
public java.util.Vector<Entry> getAttributes(java.lang.String artifactType, java.lang.String classType) throws java.lang.Exception
Retrieves the attributes of a given artifact (CI or a Relationship).- Specified by:
getAttributes
in classMetaData
- Parameters:
artifactType
- determines the type of artifact, which attributes we want. Accepts eitherIdMLConstants.ARTIFACT_CI
orIdMLConstants.ARTIFACT_RELATIONSHIP
.classType
- the type of the artifact, which attributes we want.- Returns:
- a Vector containing the CI/Relationship attributes.
- Throws:
java.lang.Exception
- if a problem occurs.
-
getCdmVersion
public java.lang.String getCdmVersion() throws java.lang.Exception
Retrieves the version of the Common Data Model, which meta-data is extracted.- Specified by:
getCdmVersion
in classMetaData
- Returns:
- a string representing the CDM version. Its format is '<version>.<release>.<modifier>'.
- Throws:
java.lang.Exception
- if a problem occurs.
-
getTypes
public java.util.Map<java.lang.String,java.lang.Object> getTypes(java.lang.String artifactType) throws java.lang.Exception
Returns the CDM meta-data types artifacts (CIs or Relationships).- Specified by:
getTypes
in classMetaData
- Parameters:
artifactType
- determines the type of artifact - eitherIdMLConstants.ARTIFACT_CI
orIdMLConstants.ARTIFACT_RELATIONSHIP
.- Returns:
- a Map containing the CDM type names and additional data for them as an Object.
- Throws:
java.lang.Exception
- if a problem occurs.
-
getNamingRules
protected java.util.List<NamingRule> getNamingRules(java.lang.String classType) throws java.lang.Exception
FIXME:Important: Once the DIS team starts supporting Naming Rule-s via the
DataIntegrationServices
API this method should be extended to return their IT registry adapter classes.- Specified by:
getNamingRules
in classMetaData
- Parameters:
classType
- the class type of interest.- Returns:
- a list of the available naming rules.
- Throws:
java.lang.Exception
- if a problem occurs when reading the rules.- See Also:
JarNamingRulesReader
,TADDMNamingRulesReader
-
getIdentifierName
protected java.lang.String getIdentifierName(NamingRuleIdentifier identifier)
Generate proper name for provided NamingRuleIdentifier.- Overrides:
getIdentifierName
in classMetaData
- Parameters:
identifier
- whose name will be generate.- Returns:
- a proper name
-
-