com.sun.xml.registry.uddi.infomodel
Class ConceptImpl

java.lang.Object
  extended by com.sun.xml.registry.uddi.infomodel.ExtensibleObjectImpl
      extended by com.sun.xml.registry.uddi.infomodel.RegistryObjectImpl
          extended by com.sun.xml.registry.uddi.infomodel.ConceptImpl
All Implemented Interfaces:
Serializable, Concept, ExtensibleObject, RegistryObject

public class ConceptImpl
extends RegistryObjectImpl
implements Concept, Serializable

Implementation of Concept interface. The ConceptImpl has either a concept or classification scheme as its parent, but not both.

Author:
Farrukh S. Najmi, Kathy Walsh
See Also:
Serialized Form

Constructor Summary
ConceptImpl()
          Default constructor
ConceptImpl(Key key)
           
ConceptImpl(Key key, String description, String name)
           
ConceptImpl(RegistryObject parent, String name, String value)
           
 
Method Summary
 void addChildConcept(Concept concept)
          Add a child Concept
 void addChildConcepts(Collection concepts)
          Add a Collection of Concept children.
 void addExternalLink(ExternalLink link)
          Overrides behavior in RegistryObjectImpl to allow adding external links.
 void addExternalLinks(Collection links)
          Overrides behavior in RegistryObjectImpl to allow adding external links.
 int getChildConceptCount()
          Get number of children
 Collection getChildrenConcepts()
          Get all immediate children Concepts
 boolean getChildrenLoaded()
           
 ClassificationScheme getClassificationScheme()
          Get the parent classification scheme.
 Collection getDescendantConcepts()
          Get all descendant Concepts.
 RegistryObject getParent()
          Gets the parent Concept or ClassificationScheme for this object.
 Concept getParentConcept()
          Get the parent Concept or null if parent is a ClassificationScheme
 String getPath()
          Returns the full path from classification scheme down to the concept.
 String getValue()
          Gets the value (usually a code in a taxonomy) associated with this Concept.
 boolean isPredefined()
           
 void removeChildConcept(Concept concept)
          Remove child concept
 void removeChildConcepts(Collection concepts)
          Remove a Collection of children Concepts.
 void setClassificationScheme(ClassificationScheme scheme)
          Internal method to set the ClassificationScheme.
 void setExternalLinks(Collection links)
          Overrides behavior in RegistryObjectImpl to allow adding external links.
 void setParentConcept(Concept parent)
          For use by Composite class only Use parent.addChild to set parent in client code
 void setPredefined(boolean predefined)
           
 void setValue(String value)
          Sets the value (usually a code in a taxonomy) associated with this Concept.
 
Methods inherited from class com.sun.xml.registry.uddi.infomodel.RegistryObjectImpl
addAssociation, addAssociations, addClassification, addClassifications, addExternalIdentifier, addExternalIdentifiers, addSlot, addSlots, areAssociationsLoaded, getAssociatedObjects, getAssociations, getAuditTrail, getClassifications, getConnection, getDescription, getExternalIdentifiers, getExternalLinks, getKey, getLifeCycleManager, getName, getObjectType, getRegistryPackages, getRegistryService, getServiceId, getSubmittingOrganization, isDeleted, isLoaded, isModified, isNew, isRetrieved, removeAssociation, removeAssociations, removeClassification, removeClassifications, removeExternalIdentifier, removeExternalIdentifiers, removeExternalLink, removeExternalLinks, removeSlot, removeSlots, setAssociations, setAssociationsLoaded, setClassifications, setDescription, setExternalIdentifiers, setIsDeleted, setIsLoaded, setIsModified, setIsNew, setIsRetrieved, setKey, setLifeCycleManager, setName, setObjectType, setRegistryService, setServiceId, setStatusFlags, setSubmittingOrganization, toXML
 
Methods inherited from class com.sun.xml.registry.uddi.infomodel.ExtensibleObjectImpl
getSlot, getSlots
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.xml.registry.infomodel.RegistryObject
addAssociation, addAssociations, addClassification, addClassifications, addExternalIdentifier, addExternalIdentifiers, 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, setKey, setName, toXML
 
Methods inherited from interface javax.xml.registry.infomodel.ExtensibleObject
addSlot, addSlots, getSlot, getSlots, removeSlot, removeSlots
 

Constructor Detail

ConceptImpl

public ConceptImpl()
Default constructor


ConceptImpl

public ConceptImpl(Key key)

ConceptImpl

public ConceptImpl(Key key,
                   String description,
                   String name)

ConceptImpl

public ConceptImpl(RegistryObject parent,
                   String name,
                   String value)
            throws JAXRException
Throws:
JAXRException
Method Detail

getValue

public String getValue()
                throws JAXRException
Gets the value (usually a code in a taxonomy) associated with this Concept.

Specified by:
getValue in interface Concept
Returns:
the value (usually a taxonomy value) associated with this Concept
Throws:
JAXRException - If the JAXR provider encounters an internal error

setValue

public void setValue(String value)
Sets the value (usually a code in a taxonomy) associated with this Concept.

Specified by:
setValue in interface Concept
Parameters:
value - the value (usually a taxonomy value) associated with this Concept

addChildConcept

public void addChildConcept(Concept concept)
                     throws JAXRException
Add a child Concept

Specified by:
addChildConcept in interface Concept
Parameters:
concept - the concept being added as a child of this object
Throws:
JAXRException - If the JAXR provider encounters an internal error

addChildConcepts

public void addChildConcepts(Collection concepts)
                      throws JAXRException
Add a Collection of Concept children. If parameter is null, treat as empty collection.

Specified by:
addChildConcepts in interface Concept
Parameters:
concepts - the Collection of Concepts being added as a children of this object
Throws:
JAXRException - If the JAXR provider encounters an internal error

removeChildConcept

public void removeChildConcept(Concept concept)
Remove child concept

Specified by:
removeChildConcept in interface Concept
Parameters:
concept - the concept being removed as a child Concept of this object

removeChildConcepts

public void removeChildConcepts(Collection concepts)
Remove a Collection of children Concepts. Treat null parameter as empty collection.

Specified by:
removeChildConcepts in interface Concept
Parameters:
concepts - the Collection of Concepts being removed as children Concepts of this object

getChildConceptCount

public int getChildConceptCount()
Get number of children

Specified by:
getChildConceptCount in interface Concept
Returns:
the number of children Concepts

getChildrenConcepts

public Collection getChildrenConcepts()
                               throws JAXRException
Get all immediate children Concepts

Specified by:
getChildrenConcepts in interface Concept
Returns:
Collection of Concept instances. The Collection may be empty but not null.
Throws:
JAXRException - If the JAXR provider encounters an internal error
See Also:
Concept

getDescendantConcepts

public Collection getDescendantConcepts()
                                 throws JAXRException
Get all descendant Concepts. This method recurses through all the children concepts.

Specified by:
getDescendantConcepts in interface Concept
Returns:
Collection of Concept instances. The Collection may be empty but not null.
Throws:
JAXRException - If the JAXR provider encounters an internal error
See Also:
Concept

getParentConcept

public Concept getParentConcept()
                         throws JAXRException
Get the parent Concept or null if parent is a ClassificationScheme

Specified by:
getParentConcept in interface Concept
Returns:
the Concept that is the parent of this object
Throws:
JAXRException - If the JAXR provider encounters an internal error

getClassificationScheme

public ClassificationScheme getClassificationScheme()
                                             throws JAXRException
Get the parent classification scheme. The method recurses up through parent concepts to get the classification scheme.

Specified by:
getClassificationScheme in interface Concept
Returns:
the ClassificationScheme that is the ancestor of this object. May return null
Throws:
JAXRException - If the JAXR provider encounters an internal error

setClassificationScheme

public void setClassificationScheme(ClassificationScheme scheme)
Internal method to set the ClassificationScheme. This should not be set on a concept that has a concept as a parent.


getPath

public String getPath()
               throws JAXRException
Returns the full path from classification scheme down to the concept.

Specified by:
getPath in interface Concept
Returns:
the canonical path String representing this object
Throws:
JAXRException - If the JAXR provider encounters an internal error

getParent

public RegistryObject getParent()
Description copied from interface: Concept
Gets the parent Concept or ClassificationScheme for this object.

Capability Level: 0

Specified by:
getParent in interface Concept
Returns:
the parent Concept or ClassificationScheme for this object

isPredefined

public boolean isPredefined()

setPredefined

public void setPredefined(boolean predefined)

getChildrenLoaded

public boolean getChildrenLoaded()
                          throws JAXRException
Throws:
JAXRException

setParentConcept

public void setParentConcept(Concept parent)
For use by Composite class only Use parent.addChild to set parent in client code


addExternalLink

public void addExternalLink(ExternalLink link)
                     throws JAXRException
Overrides behavior in RegistryObjectImpl to allow adding external links. If an external link already exists, this method throws UnsupportedCapabilityException. See appendix D of specification.

Specified by:
addExternalLink in interface RegistryObject
Overrides:
addExternalLink in class RegistryObjectImpl
Throws:
JAXRException - If the JAXR provider encounters an internal error

addExternalLinks

public void addExternalLinks(Collection links)
                      throws JAXRException
Overrides behavior in RegistryObjectImpl to allow adding external links. If an external link already exists or if the collection contains more than one external link, this method throws UnsupportedCapabilityException. See appendix D of specification.

Specified by:
addExternalLinks in interface RegistryObject
Overrides:
addExternalLinks in class RegistryObjectImpl
Parameters:
links - the Collection of ExternalLinks being added
Throws:
JAXRException - If the JAXR provider encounters an internal error

setExternalLinks

public void setExternalLinks(Collection links)
                      throws JAXRException
Overrides behavior in RegistryObjectImpl to allow adding external links. If an external link already exists or if the collection contains more than one external link, this method throws UnsupportedCapabilityException. See appendix D of specification.

Specified by:
setExternalLinks in interface RegistryObject
Overrides:
setExternalLinks in class RegistryObjectImpl
Throws:
JAXRException - If the JAXR provider encounters an internal error


Copyright © 2005-2013 Oracle Corporation. All Rights Reserved.