|
|||||||||||
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(org.w3c.dom.Node currentNode,
java.lang.String name)
Creates an explicit attribute with the corresponding name and adds it to the provided node. |
Attribute |
createImplicitAttribute(org.w3c.dom.Node currentNode,
java.lang.String classType,
java.lang.String parentName,
java.lang.String childName,
java.lang.String relatedID)
Creates an implicit attribute using the provided information. |
abstract java.util.Vector<Entry> |
getAttributes(java.lang.String artifactType,
java.lang.String classType)
Retrieves the attributes of a given artifact (CI or a Relationship). |
abstract java.lang.String |
getCdmVersion()
Retrieves the version of the Common Data Model, which meta-data is extracted. |
java.lang.String |
getClassType(java.lang.String classType)
Returns the correct class type. |
java.lang.String |
getExtendedAttributeName(java.lang.String attributeName)
Prefixes the provided string as an extended attribute. |
protected java.lang.String |
getIdentifierName(NamingRuleIdentifier identifier)
Generate proper name for provided NamingRuleIdentifier. |
java.lang.String |
getMSSClassName()
Returns the name of the ManagementSoftwareSystem class type. |
protected NamingRuleIdentifier |
getNamingRuleIdentifier(java.lang.String classType,
java.lang.String originalName)
Create NamingRuleIdentifier be provided class type and attribute name. |
protected abstract java.util.List<NamingRule> |
getNamingRules(java.lang.String classType)
Returns the CDM naming rules for the provided class. |
protected java.util.Vector<Entry> |
getRelationshipAttributes()
Returns the attributes supported by a Relationship. |
abstract java.util.Map<java.lang.String,java.lang.Object> |
getTypes(java.lang.String artifactType)
Returns the CDM meta-data types artifacts (CIs or Relationships). |
java.util.List<NamingRule> |
getUnsatisfiedNamingRules(java.lang.String classType,
java.util.Set<java.lang.String> attributeNames)
Compute delta of naming rules for the class type and provided attributes. |
boolean |
matchesNamingRules(java.lang.String classType,
java.util.Set<java.lang.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 java.util.Vector<Entry> getAttributes(java.lang.String artifactType, java.lang.String classType) throws java.lang.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.
java.lang.Exception
- if a problem occurs.public abstract java.lang.String getCdmVersion() throws java.lang.Exception
java.lang.Exception
- if a problem occurs.public abstract java.util.Map<java.lang.String,java.lang.Object> getTypes(java.lang.String artifactType) throws java.lang.Exception
artifactType
- determines the type of artifact - either
IdMLConstants.ARTIFACT_CI
or
IdMLConstants.ARTIFACT_RELATIONSHIP
.
java.lang.Exception
- if a problem occurs.protected java.util.Vector<Entry> getRelationshipAttributes()
public java.lang.String getExtendedAttributeName(java.lang.String attributeName)
attributeName
- input name.
public java.lang.String getClassType(java.lang.String classType)
classType
- the native class name.
public java.lang.String getMSSClassName()
public Attribute createExplicitAttribute(org.w3c.dom.Node currentNode, java.lang.String name)
currentNode
- the node where the attribute is to be added.name
- the name of the new attribute.
public Attribute createImplicitAttribute(org.w3c.dom.Node currentNode, java.lang.String classType, java.lang.String parentName, java.lang.String childName, java.lang.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 java.util.List<NamingRule> getNamingRules(java.lang.String classType) throws java.lang.Exception
classType
- the class type of interest.
java.lang.Exception
- if a problem occurs when reading the rules.public boolean matchesNamingRules(java.lang.String classType, java.util.Set<java.lang.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 java.util.List<NamingRule> getUnsatisfiedNamingRules(java.lang.String classType, java.util.Set<java.lang.String> attributeNames) throws java.lang.Exception
classType
- the class whose rules will be processed.attributeNames
- Set of attribute names.
java.lang.Exception
- if an error occurs.protected NamingRuleIdentifier getNamingRuleIdentifier(java.lang.String classType, java.lang.String originalName)
classType
- the class whose attribute is processed.originalName
- original attribute name.
protected java.lang.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 |