API java : Classification


javax.xml.registry.infomodel
Interface Classification

All Superinterfaces:
ExtensibleObject, RegistryObject

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.

Figure 1 shows how a Classification classifies a RegistryObject using a ClassificationScheme.

Using a ClassificationScheme to Classify an Object
Figure 1. Using a ClassificationScheme to Classify an Object

Internal vs. External Taxonomies

A taxonomy may be represented within a JAXR provider in one of the following ways:
  1. The taxonomy elements and their structural relationship with each other are available within the JAXR provider. This case is referred to as Internal Taxonomy since the structure of the taxonomy is available internal to the JAXR provider.
  2. The taxonomy elements and their structural relationship with each other is represented somewhere external to the JAXR provider. This case is referred to as External Taxonomy since the structure of the taxonomy is not available to the JAXR provider.

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

Figure 2 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.

Example of Internal Classification
Figure 2. Example of Internal Classification

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

Figure 3 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 JAXR provider and consequently there is no Concept instance. Instead, the name and value attributes of the Classification are used to pinpoint the Book Publisher's taxonomy element. Note that name is optional but value is required.

Example of External Classification
Figure 3. Example of External Classification

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 4, 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.

Example of Multiple Classifications
Figure 4. Example of Multiple Classifications

Author:
Farrukh S. Najmi
See Also:
RegistryObject, Concept

Method Summary
 ClassificationScheme getClassificationScheme()
          Gets the ClassificationScheme that is used in classifying the object.
 RegistryObject getClassifiedObject()
          Gets the Object that is being classified.
 Concept getConcept()
          Gets the Concept that is classifying the object.
 String getValue()
          Gets the taxonomy value for this Classification.
 boolean isExternal()
          Returns true if this is an external classification.
 void setClassificationScheme(ClassificationScheme classificationScheme)
          Sets the ClassificationScheme for this external classification.
 void setClassifiedObject(RegistryObject classifiedObject)
          Sets the object that is being classified.
 void setConcept(Concept concept)
          Sets the concept for this internal classification.
 void setValue(String value)
          Sets the taxonomy value for this external Classification.
 
Methods inherited from interface javax.xml.registry.infomodel.RegistryObject
addAssociation, addAssociations, addClassification, addClassifications, addExternalIdentifier, addExternalIdentifiers, addExternalLink, addExternalLinks, getAssociatedObjects, getAssociations, getAuditTrail, getClassifications, getDescription, getExternalIdentifiers, getExternalLinks, getKey, getLifeCycleManager, getName, getObjectType, getRegistryPackages, getSubmittingOrganization, removeAssociation, removeAssociations, removeClassification, removeClassifications, removeExternalIdentifier, removeExternalIdentifiers, removeExternalLink, removeExternalLinks, setAssociations, setClassifications, setDescription, setExternalIdentifiers, setExternalLinks, setKey, setName, toXML
 
Methods inherited from interface javax.xml.registry.infomodel.ExtensibleObject
addSlot, addSlots, getSlot, getSlots, removeSlot, removeSlots
 

Method Detail

getConcept

Concept getConcept()
                   throws JAXRException
Gets the Concept that is classifying the object.

Capability Level: 0

Returns:
the Concept that is classifying the classified object. null if this is a external Classification
Throws:
JAXRException - If the JAXR provider encounters an internal error

setConcept

void setConcept(Concept concept)
                throws JAXRException
Sets the concept for this internal classification.

This method should be used mutually exclusively with the setClassificationScheme method.

Capability Level: 0

Parameters:
concept - the Concept that is classifying the classified object.
Throws:
JAXRException - If the JAXR provider encounters an internal error

getClassificationScheme

ClassificationScheme getClassificationScheme()
                                             throws JAXRException
Gets the ClassificationScheme that is used in classifying the object. If the Classification is an internal Classification then this method should return the value returned by calling the getClassificationScheme method on the Concept representing the taxonomy element.

Capability Level: 0

Returns:
the ClassificationScheme used by this Classification
Throws:
JAXRException - If the JAXR provider encounters an internal error
See Also:
ClassificationScheme

setClassificationScheme

void setClassificationScheme(ClassificationScheme classificationScheme)
                             throws JAXRException
Sets the ClassificationScheme for this 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

Parameters:
classificationScheme - the ClassificationScheme used by this Classification
Throws:
JAXRException - If the JAXR provider encounters an internal error

getValue

String getValue()
                throws JAXRException
Gets the taxonomy value for this Classification.

Capability Level: 0

Returns:
the value of the taxonomy element if external Classification; the value of the Concept representing the taxonomy element if internal Classification
Throws:
JAXRException - If the JAXR provider encounters an internal error

setValue

void setValue(String value)
              throws JAXRException
Sets the taxonomy value for this external Classification.

Capability Level: 0

Parameters:
value - the taxonomy value used by this external Classification
Throws:
JAXRException - If the JAXR provider encounters an internal error

getClassifiedObject

RegistryObject getClassifiedObject()
                                   throws JAXRException
Gets the Object that is being classified.

Capability Level: 0

Returns:
the RegistryObject that is classified by this Classification
Throws:
JAXRException - If the JAXR provider encounters an internal error

setClassifiedObject

void setClassifiedObject(RegistryObject classifiedObject)
                         throws JAXRException
Sets the object that is being classified.

Capability Level: 0

Parameters:
classifiedObject - the RegistryObject that is classified by this Classification
Throws:
JAXRException - If the JAXR provider encounters an internal error

isExternal

boolean isExternal()
                   throws JAXRException
Returns true if this is an external classification.

Capability Level: 0

Returns:
true if this is an external Classification; false otherwise
Throws:
JAXRException - If the JAXR provider encounters an internal error

Ces informations proviennent du site de http://java.sun.com

Remarques

Contenu

Le contenu de cette page provient du site de Sun, et est généré depuis un cache sur l'infobrol après certains traitements automatisés. La présentation peut donc différer du document original, mais le contenu aussi. Vous pouvez utiliser ce bouton pour afficher la page originale du site de Sun :

Quels sont les motivations de cette démarche?

Maintenir les pages en cache sur différents sites peut offrir plus de disponibilité.

Chaque page est indexée dans la base de donnée, ce qui permet de retrouver facilement les informations, au moyen des sommaires, du moteur de recherche interne, etc.

Des facilités sont mises en place pour que les membres de l'infobrol puissent effectuer des traductions en français des différents documents. Ceci devrait permettre aux débutants en programmation Java de consulter les API en français s'ils maîtrisent moins bien la langue de Shakespeare. Dans le cas où une traduction a été soumise, elle est disponible au moyen d'un lien en bas de page. Si la traduction a été validée, la page s'affiche par défaut en français, et un lien en bas de page permet d'atteindre la version en anglais.

Le code sur l'infobrol est automatiquement coloré selon la syntaxe, et les différents mots clés sont transformés en liens pour accéder rapidement aux informations.

Vous avez la possibilité de partager vos expériences en proposant vos propres extraits de code en utilisant le bouton "ajouter un commentaire" en bas de page. Si vous visitez simplement l'infobrol, vous avez déjà accès à cette fonction, mais si vous étes membre du brol, vous pouvez en plus utiliser des boutons supplémentaires de mise en forme, dont la coloration automatique de vos extraits de codes.

Réseaux sociaux

Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher les interactions avec les réseaux sociaux sur ces pages.

 

Nuage de mots clés

8 mots clés dont 0 définis manuellement (plus d'information...).

Avertissement

Cette page ne possède pas encore de mots clés manuels, ceci est donc un exemple automatique (les niveaux de pertinence sont fictifs, mais les liens sont valables). Pour tester le nuage avec une page qui contient des mots définis manuellement, vous pouvez cliquer ici.

Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher le nuage de mots clés.

 

Astuce pour imprimer les couleurs des cellules de tableaux : http://www.gaudry.be/ast-rf-450.html
Aucun commentaire pour cette page

© Ce document issu de l′infobrol est enregistré sous le certificat Cyber PrInterDeposit Digital Numbertection. Enregistrement IDDN n° 5329-12927
Document créé le 18/04/08 23:04, dernière modification le Vendredi 17 Juin 2011, 12:12
Source du document imprimé : http://www.gaudry.be/java-api-javaee-rf-javax/xml/registry/infomodel/Classification.html Document affiché 1 fois ce mois de Juin.
St.Gaudry©07.01.02
Outils (masquer)
||
Recherche (afficher)
Recherche :

Utilisateur (masquer)
Apparence (afficher)
Stats (afficher)
15832 documents
452 astuces.
549 niouzes.
3099 definitions.
447 membres.
8115 messages.

Document genere en :
0,48 seconde

Mises à jour :
Mises à jour du site
Citation (masquer)
REVEIL-MATIN : Instrument inventé pour réveiller les gens qui n'ont pas de jeunes enfants.

Pierre Desproges
 
l'infobrol
Nous sommes le Vendredi 01 Juin 2012, 11:37, toutes les heures sont au format GMT+1.00 Heure, heure d'été (+1)