Class ConceptImpl

  • All Implemented Interfaces:
    Serializable, javax.xml.registry.infomodel.Concept, javax.xml.registry.infomodel.ExtensibleObject, javax.xml.registry.infomodel.RegistryObject

    public class ConceptImpl
    extends RegistryObjectImpl
    implements javax.xml.registry.infomodel.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 Detail

      • ConceptImpl

        public ConceptImpl()
        Default constructor
      • ConceptImpl

        public ConceptImpl​(javax.xml.registry.infomodel.Key key)
      • ConceptImpl

        public ConceptImpl​(javax.xml.registry.infomodel.Key key,
                           String description,
                           String name)
      • ConceptImpl

        public ConceptImpl​(javax.xml.registry.infomodel.RegistryObject parent,
                           String name,
                           String value)
                    throws javax.xml.registry.JAXRException
        Throws:
        javax.xml.registry.JAXRException
    • Method Detail

      • getValue

        public String getValue()
                        throws javax.xml.registry.JAXRException
        Gets the value (usually a code in a taxonomy) associated with this Concept.
        Specified by:
        getValue in interface javax.xml.registry.infomodel.Concept
        Throws:
        javax.xml.registry.JAXRException
      • setValue

        public void setValue​(String value)
        Sets the value (usually a code in a taxonomy) associated with this Concept.
        Specified by:
        setValue in interface javax.xml.registry.infomodel.Concept
      • addChildConcept

        public void addChildConcept​(javax.xml.registry.infomodel.Concept concept)
                             throws javax.xml.registry.JAXRException
        Add a child Concept
        Specified by:
        addChildConcept in interface javax.xml.registry.infomodel.Concept
        Throws:
        javax.xml.registry.JAXRException
      • addChildConcepts

        public void addChildConcepts​(Collection concepts)
                              throws javax.xml.registry.JAXRException
        Add a Collection of Concept children. If parameter is null, treat as empty collection.
        Specified by:
        addChildConcepts in interface javax.xml.registry.infomodel.Concept
        Throws:
        javax.xml.registry.JAXRException
      • removeChildConcept

        public void removeChildConcept​(javax.xml.registry.infomodel.Concept concept)
        Remove child concept
        Specified by:
        removeChildConcept in interface javax.xml.registry.infomodel.Concept
      • removeChildConcepts

        public void removeChildConcepts​(Collection concepts)
        Remove a Collection of children Concepts. Treat null parameter as empty collection.
        Specified by:
        removeChildConcepts in interface javax.xml.registry.infomodel.Concept
      • getChildConceptCount

        public int getChildConceptCount()
        Get number of children
        Specified by:
        getChildConceptCount in interface javax.xml.registry.infomodel.Concept
      • getChildrenConcepts

        public Collection getChildrenConcepts()
                                       throws javax.xml.registry.JAXRException
        Get all immediate children Concepts
        Specified by:
        getChildrenConcepts in interface javax.xml.registry.infomodel.Concept
        Throws:
        javax.xml.registry.JAXRException
      • getDescendantConcepts

        public Collection getDescendantConcepts()
                                         throws javax.xml.registry.JAXRException
        Get all descendant Concepts. This method recurses through all the children concepts.
        Specified by:
        getDescendantConcepts in interface javax.xml.registry.infomodel.Concept
        Throws:
        javax.xml.registry.JAXRException
      • getParentConcept

        public javax.xml.registry.infomodel.Concept getParentConcept()
                                                              throws javax.xml.registry.JAXRException
        Get the parent Concept or null if parent is a ClassificationScheme
        Specified by:
        getParentConcept in interface javax.xml.registry.infomodel.Concept
        Throws:
        javax.xml.registry.JAXRException
      • getClassificationScheme

        public javax.xml.registry.infomodel.ClassificationScheme getClassificationScheme()
                                                                                  throws javax.xml.registry.JAXRException
        Get the parent classification scheme. The method recurses up through parent concepts to get the classification scheme.
        Specified by:
        getClassificationScheme in interface javax.xml.registry.infomodel.Concept
        Throws:
        javax.xml.registry.JAXRException
      • setClassificationScheme

        public void setClassificationScheme​(javax.xml.registry.infomodel.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 javax.xml.registry.JAXRException
        Returns the full path from classification scheme down to the concept.
        Specified by:
        getPath in interface javax.xml.registry.infomodel.Concept
        Throws:
        javax.xml.registry.JAXRException
      • getParent

        public javax.xml.registry.infomodel.RegistryObject getParent()
        Specified by:
        getParent in interface javax.xml.registry.infomodel.Concept
      • isPredefined

        public boolean isPredefined()
      • setPredefined

        public void setPredefined​(boolean predefined)
      • getChildrenLoaded

        public boolean getChildrenLoaded()
                                  throws javax.xml.registry.JAXRException
        Throws:
        javax.xml.registry.JAXRException
      • setParentConcept

        public void setParentConcept​(javax.xml.registry.infomodel.Concept parent)
        For use by Composite class only Use parent.addChild to set parent in client code
      • addExternalLink

        public void addExternalLink​(javax.xml.registry.infomodel.ExternalLink link)
                             throws javax.xml.registry.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 javax.xml.registry.infomodel.RegistryObject
        Overrides:
        addExternalLink in class RegistryObjectImpl
        Throws:
        javax.xml.registry.JAXRException
      • addExternalLinks

        public void addExternalLinks​(Collection links)
                              throws javax.xml.registry.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 javax.xml.registry.infomodel.RegistryObject
        Overrides:
        addExternalLinks in class RegistryObjectImpl
        Throws:
        javax.xml.registry.JAXRException
      • setExternalLinks

        public void setExternalLinks​(Collection links)
                              throws javax.xml.registry.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 javax.xml.registry.infomodel.RegistryObject
        Overrides:
        setExternalLinks in class RegistryObjectImpl
        Throws:
        javax.xml.registry.JAXRException