javax.xml.registry.infomodel
Interface Classification
- All Superinterfaces:
- ExtensibleObject, RegistryObject, java.io.Serializable
- public interface Classification
- extends RegistryObject
The Classification interface is used to classify RegistryObject instances. A RegistryObject may be classified along multiple dimensions by adding zero or more Classification instances to the RegistryObject. For example, an Organization may be classified by its industry, by the products it sells and by its geographical location. In this example the RegistryObject would have at least three Classification instances added to it.
The RegistryObject interface provides several addClassification methods to allow a client to add Classification instances to a Registry Object.
The figure below show how a Classification classifies a RegistryObject using a ClassificationScheme.
Internal Vs. External Taxonomies
A taxonomy may be represented within a registry provider in one of the following ways:
- The taxonomy elements and their structural relationship with each other is
represented within the registry provider. This case is referred to as Internal
Taxonomy since the structure of the taxonomy is defined internal to the
registry.
- The taxonomy elements and their structural relationship with each other is
represented somewhere external to the registry provider. This case is
referred to as External Taxonomy since the structure of the
taxonomy is defined external to the registry.
Internal Vs. External Classifications
The Classification interface allows the classification of
RegistryObjects using a ClassificationScheme whether the ClassificationScheme
represents an internal taxonomy or an external taxonomy. When a Classification
instance uses a ClassificationScheme representing an internal taxonomy then it
is referred to as an internal Classification. When a Classification instance
uses a ClassificationScheme representing an external taxonomy then it is
referred to as an external Classification.
Internal Classification
When a Classification instance is used to classify a
RegistryObject using an internal taxonomy it is referred to as an internal
Classification. A client must call the setConcept
method on a Classification and define a reference to a Concept instance from
the Classification instance in order for that Classification to use an internal
taxonomy. It is not necessary for the client to call setClassificationScheme
for internal Classifications since the classifying Concept already knows it
root ClassificationScheme.
Example of Internal Classification
The figure below shows an example of internal classification using a Concept to represent a taxonomy element. The example classifies an Organization instance as a Book Publisher using the NAICS standard taxonomy available as an internal taxonomy.
Note that the figure does not show all the Concepts between the “Book Publishers” node and the NAICS ClassificationScheme to save space. Had they been there they would have been linked together by the parent attribute of each Concept.
External Classification
When a Classification instance is used to classify a RegistryObject using an external taxonomy it is referred to as an external Classification. A client must call the setValue method on a Classification and define a unique value that logically represents a taxonomy element within the taxonomy whose structure is defined externally. It is necessary for the client call setClassificationScheme for external Classifications since there is no other way to infer the ClassificationScheme that represents the external taxonomy.
Example of External Classification
The figure below shows an example of external classification. The example uses the same scenario where a Classification classifies an Organization instance as a Book Publisher using the NAICS standard taxonomy. However, this time the structure of the NAICS taxonomy is not available internally to the registry and consequently there is no Concept instance. Instead, the name and value attributes of the Classification are used to pin-point the Book Publishers taxonomy element. Note that name is optional but value is required.
An Example of Multiple Classifications
The next example shows how a RegistryObject may be classified by multiple classification schemes. In this example, two internal ClassificationSchemes named Industry and Geography are used to classify several Organization RegistryObjects by their industry and Geography.
In figure below, in order to save space and improve readability, the Classification instances are not explicitly shown but are implied as associations between the RegistryObjects (shaded leaf node) and the associated Concepts.
- See Also:
RegistryObject
,
Concept
Methods inherited from interface javax.xml.registry.infomodel.RegistryObject |
addAssociation, addAssociations, addClassification, addClassifications, addExternalIdentifier, addExternalIdentifiers, addExternalLink, addExternalLinks, getAssociatedObjects, getAssociations, getAuditTrail, getClassifications, getConnection, getDescription, getExternalIdentifiers, getExternalLinks, getKey, getName, getObjectType, getOrganization, getPackages, removeAssociation, removeAssociations, removeClassification, removeClassifications, removeExternalIdentifier, removeExternalIdentifiers, removeExternalLink, removeExternalLinks, setAssociations, setClassifications, setDescription, setExternalIdentifiers, setExternalLinks, setKey, setName, toXML |
getConcept
public Concept getConcept()
throws JAXRException
- Gets the Concept that is classifying the object.
- Capability Level: 0
setConcept
public void setConcept(Concept concept)
throws JAXRException
- Sets the concept for this classification
This method is called when defining a Classification using a
ClassificationScheme whose structure is internal to the registry.
This is referred to as internal Classification.
This method should be used mutually exclusively with
the setClassificationScheme method.
- Capability Level: 0
getClassificationScheme
public ClassificationScheme getClassificationScheme()
throws JAXRException
- Gets the ClassificationScheme that is used in classifying the object.
- Capability Level: 0
- See Also:
ClassificationScheme
setClassificationScheme
public void setClassificationScheme(ClassificationScheme classificationScheme)
throws JAXRException
- Sets the ClassificationScheme for this classification.
This method is called when defining a Classification using a
ClassificationScheme whose structure is external to the registry.
This is referred to as external Classification.
If this method is called then you must also call setValue method.
This method should be used mutually exclusively with
the setConcept method.
- Capability Level: 0
getValue
public java.lang.String getValue()
throws JAXRException
- Gets the value of the taxonomy element in case this is an
external Classification. This should return the value of the
Concept representing the taxonomy element when the
Classification is an internal Classification and getConcept
return a non-null value.
- Capability Level: 0
setValue
public void setValue(java.lang.String value)
throws JAXRException
- Sets the value of the taxonomy element in case this is an
external Classification.
Once this call returns subsequent getConcept calls must return
null. Thus concept and value of a Classification are mutually
exclusive.
- Capability Level: 0
getClassifiedObject
public RegistryObject getClassifiedObject()
throws JAXRException
- Gets the Object that is being classified.
- Capability Level: 0
setClassifiedObject
public void setClassifiedObject(RegistryObject object)
throws JAXRException
- Sets the Object that is being classified.
- Capability Level: 0
isExternal
public boolean isExternal()
throws JAXRException
- Returns true if this is an external classification.
- Capability Level: 0