Class BaseXJDFHelper

    • Field Detail

      • log

        protected static final org.apache.commons.logging.Log log
      • theElement

        protected KElement theElement
    • Constructor Detail

      • BaseXJDFHelper

        protected BaseXJDFHelper()
      • BaseXJDFHelper

        protected BaseXJDFHelper​(KElement theElement)
    • Method Detail

      • getBaseHelper

        public static BaseXJDFHelper getBaseHelper​(XMLDoc doc)
        factory to create a helper from a doc
        Parameters:
        doc - the xmldoc to parse
        Returns:
        the helper
      • getBaseHelper

        public static BaseXJDFHelper getBaseHelper​(KElement root)
        factory to create a helper from an element
        Parameters:
        root - the element to parse if not an XJDF - search in ancestors of element
        Returns:
        the helper
      • setDefaultVersion

        public static void setDefaultVersion​(JDFElement.EnumVersion defaultVersion)
        Parameters:
        defaultVersion - the defaultVersion to set
      • getXPathValue

        public java.lang.String getXPathValue​(java.lang.String xpath)
        Parameters:
        xpath -
        Returns:
      • getXPathElement

        public KElement getXPathElement​(java.lang.String xpath)
        Parameters:
        xpath -
        Returns:
      • getAttribute

        public java.lang.String getAttribute​(java.lang.String attName)
        Parameters:
        attName -
        Returns:
      • hasAttribute

        public boolean hasAttribute​(java.lang.String attName)
        Parameters:
        attName -
        Returns:
      • removeAttribute

        public void removeAttribute​(java.lang.String attrib,
                                    java.lang.String nameSpaceURI)
        Parameters:
        attrib -
        nameSpaceURI -
      • setAttribute

        public void setAttribute​(java.lang.String attName,
                                 java.lang.String value)
        Parameters:
        attName -
        value -
      • setAttribute

        public void setAttribute​(java.lang.String attName,
                                 int value)
        Parameters:
        attName -
        value -
      • setXPathValue

        public void setXPathValue​(java.lang.String xpath,
                                  java.lang.String value)
        Parameters:
        xpath -
        value -
      • cleanUp

        public void cleanUp()
        generic cleanup routine
      • getRoot

        public KElement getRoot()
        Returns:
        the underlying element
      • getRootDoc

        public JDFDoc getRootDoc()
        Returns:
        the underlying element
      • getXRoot

        public BaseXJDFHelper getXRoot()
        Returns:
        the underlying element
      • getXJDFRoot

        public XJDFHelper getXJDFRoot()
        Returns:
        the underlying parent XJDF element
      • getXJMFRoot

        public XJMFHelper getXJMFRoot()
        Returns:
        the underlying parent XJDF element
      • deleteNode

        public KElement deleteNode()
        Returns:
      • getID

        public java.lang.String getID()
        get the ID from the generic Parameter or Resource element
        Returns:
        the ID , may be null
      • ensureID

        public java.lang.String ensureID()
        get the ID from the generic Parameter or Resource element
        Returns:
        the ID , may never be null
      • setID

        public void setID​(java.lang.String newID)
        Parameters:
        newID -
      • hashCode

        public int hashCode()
        equals and hash are based on the xml element that this helper represents
        Overrides:
        hashCode in class java.lang.Object
        See Also:
        Object.hashCode()
      • equals

        public boolean equals​(java.lang.Object obj)
        equals and hash are based on the xml element that this helper represents
        Overrides:
        equals in class java.lang.Object
        See Also:
        Object.equals(java.lang.Object)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        Returns:
        See Also:
        Object.toString()
      • copyHelper

        public KElement copyHelper​(BaseXJDFHelper src)
        copy the helper src into this
        Parameters:
        src -
        Returns:
      • getLocalName

        public java.lang.String getLocalName()
        Returns:
        the local name of the root
      • getGeneralID

        public java.lang.String getGeneralID​(java.lang.String idUsage)
        Parameters:
        idUsage -
        idValue -
      • getComment

        public java.lang.String getComment​(int i)
        Returns:
        the comment text
      • setComment

        public JDFComment setComment​(java.lang.String text)
        Returns:
        the comment
      • getExternalID

        public java.lang.String getExternalID()
        Returns:
        the productID of the product
      • getDescriptiveName

        public java.lang.String getDescriptiveName()
        Returns:
        the descriptive name of the product
      • appendElement

        public KElement appendElement​(java.lang.String elementName,
                                      java.lang.String nameSpaceURI)