|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.di.cdm.core.MetaData
public abstract class MetaData
An abstract class that declares the routines to be used to retrieve the CDM meta-data.
Field Summary | |
---|---|
protected static ResourceHash |
resHash
NLS Property set holding name-value pairs for the resource. |
Constructor Summary | |
---|---|
MetaData()
|
Method Summary | |
---|---|
Attribute |
createExplicitAttribute(Node currentNode,
String name)
Creates an explicit attribute with the corresponding name and adds it to the provided node. |
Attribute |
createImplicitAttribute(Node currentNode,
String classType,
String parentName,
String childName,
String relatedID)
Creates an implicit attribute using the provided information. |
abstract Vector<Entry> |
getAttributes(String artifactType,
String classType)
Retrieves the attributes of a given artifact (CI or a Relationship). |
abstract String |
getCdmVersion()
Retrieves the version of the Common Data Model, which meta-data is extracted. |
String |
getClassType(String classType)
Returns the correct class type. |
String |
getExtendedAttributeName(String attributeName)
Prefixes the provided string as an extended attribute. |
protected String |
getIdentifierName(NamingRuleIdentifier identifier)
Generate proper name for provided NamingRuleIdentifier. |
String |
getMSSClassName()
Returns the name of the ManagementSoftwareSystem class type. |
protected NamingRuleIdentifier |
getNamingRuleIdentifier(String classType,
String originalName)
Create NamingRuleIdentifier be provided class type and attribute name. |
protected abstract List<NamingRule> |
getNamingRules(String classType)
Returns the CDM naming rules for the provided class. |
protected Vector<Entry> |
getRelationshipAttributes()
Returns the attributes supported by a Relationship. |
abstract Map<String,Object> |
getTypes(String artifactType)
Returns the CDM meta-data types artifacts (CIs or Relationships). |
List<NamingRule> |
getUnsatisfiedNamingRules(String classType,
Set<String> attributeNames)
Compute delta of naming rules for the class type and provided attributes. |
boolean |
matchesNamingRules(String classType,
Set<String> attributes)
Returns true if the provided set of attributes matches any of the rules of that class. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final ResourceHash resHash
Constructor Detail |
---|
public MetaData()
Method Detail |
---|
public abstract Vector<Entry> getAttributes(String artifactType, String classType) throws Exception
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.
Exception
- if a problem occurs.public abstract String getCdmVersion() throws Exception
Exception
- if a problem occurs.public abstract Map<String,Object> getTypes(String artifactType) throws Exception
artifactType
- determines the type of artifact - either
IdMLConstants.ARTIFACT_CI
or
IdMLConstants.ARTIFACT_RELATIONSHIP
.
Exception
- if a problem occurs.protected Vector<Entry> getRelationshipAttributes()
public String getExtendedAttributeName(String attributeName)
attributeName
- input name.
public String getClassType(String classType)
classType
- the native class name.
public String getMSSClassName()
public Attribute createExplicitAttribute(Node currentNode, String name)
currentNode
- the node where the attribute is to be added.name
- the name of the new attribute.
public Attribute createImplicitAttribute(Node currentNode, String classType, String parentName, String childName, String relatedID)
currentNode
- the node where the attribute is to be added.classType
- the type of the class owning the implicit attribute.parentName
- the name of the relationship represented by this implicit
attribute.childName
- the type of the other item which the implicit attribute points
to.relatedID
- the ID of the related item. If provided the current hierarchy
will be checked for a duplicate and if such is found the
implicit attribute will not be added. To skip the duplicate
check set this parameter to null
.
protected abstract List<NamingRule> getNamingRules(String classType) throws Exception
classType
- the class type of interest.
Exception
- if a problem occurs when reading the rules.public boolean matchesNamingRules(String classType, Set<String> attributes)
classType
- the class type of interest.attributes
- a list of available attribute names.
true
if a matching rule is found, false
otherwise.public List<NamingRule> getUnsatisfiedNamingRules(String classType, Set<String> attributeNames) throws Exception
classType
- the class whose rules will be processed.attributeNames
- Set of attribute names.
Exception
- if an error occurs.protected NamingRuleIdentifier getNamingRuleIdentifier(String classType, String originalName)
classType
- the class whose attribute is processed.originalName
- original attribute name.
protected String getIdentifierName(NamingRuleIdentifier identifier)
identifier
- whose name will be generate.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |