net.sf.csutils.core.registry
Class Concepts

java.lang.Object
  extended by net.sf.csutils.core.registry.Concepts

public class Concepts
extends java.lang.Object

A utility class for working with concepts. This class provides only static methods and cannot be instantiated.

This class supports an extended path notation. A complete path includes the classification schemes, or taxonomies name. For example: //taxonomyName/conceptA/conceptB.

In the example, the double slashes indicate that the first component in the path is in fact a taxonomies, or classification schemes name.


Constructor Summary
Concepts()
           
 
Method Summary
static java.util.Collection<javax.xml.registry.infomodel.Concept> asConceptCollection(java.util.Collection<?> pCollection)
          Casts the given collection to a collection of concepts.
static javax.xml.registry.infomodel.Concept findConceptByPath(RegistryFacade pFacade, javax.xml.registry.infomodel.RegistryObject pObject, java.lang.String pPath)
          Returns the concept with the given path, relative to the given registry object.
static javax.xml.registry.infomodel.RegistryObject findObjectByPath(RegistryFacade pFacade, java.lang.String pPath)
          Returns the classification scheme, or concept, with the given path.
static java.util.Collection<javax.xml.registry.infomodel.Concept> getChildrenConcepts(javax.xml.registry.infomodel.RegistryObject pObject)
          Returns the given objects children concepts.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Concepts

public Concepts()
Method Detail

findObjectByPath

public static javax.xml.registry.infomodel.RegistryObject findObjectByPath(RegistryFacade pFacade,
                                                                           java.lang.String pPath)
                                                                    throws javax.xml.registry.JAXRException
Returns the classification scheme, or concept, with the given path.

Parameters:
pFacade - The registry facade to use.
pPath - The path to evaluate.
Returns:
The classification scheme, or concept, with the given path
Throws:
javax.xml.registry.JAXRException - The operation failed.

findConceptByPath

public static javax.xml.registry.infomodel.Concept findConceptByPath(RegistryFacade pFacade,
                                                                     javax.xml.registry.infomodel.RegistryObject pObject,
                                                                     java.lang.String pPath)
                                                              throws javax.xml.registry.JAXRException
Returns the concept with the given path, relative to the given registry object.

Parameters:
pFacade - The registry facade to use
pObject - The object, relative to which the path should be evaluated.
pPath - The path to evaluate.
Returns:
The concept with the given path, relative to the given registry object.
Throws:
javax.xml.registry.JAXRException - The operation failed.

getChildrenConcepts

public static java.util.Collection<javax.xml.registry.infomodel.Concept> getChildrenConcepts(javax.xml.registry.infomodel.RegistryObject pObject)
                                                                                      throws javax.xml.registry.JAXRException
Returns the given objects children concepts.

Parameters:
pObject - The object to query for children concepts.
Returns:
The objects children concepts.
Throws:
java.lang.IllegalArgumentException - The object is null, or another object than a ClassificationScheme, or Concept. In other words, it doesn't have any children concepts.
javax.xml.registry.JAXRException - The operation failed.

asConceptCollection

public static java.util.Collection<javax.xml.registry.infomodel.Concept> asConceptCollection(java.util.Collection<?> pCollection)
Casts the given collection to a collection of concepts.

Parameters:
pCollection - The concept collection to cast.
Returns:
The casted collection of concepts.


Copyright © 2009-2010. All Rights Reserved.