Class JDFTest

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, IStreamWriter, org.w3c.dom.Element, org.w3c.dom.ElementTraversal, org.w3c.dom.events.EventTarget, org.w3c.dom.Node, org.w3c.dom.NodeList, org.w3c.dom.TypeInfo

    public class JDFTest
    extends JDFNodeTerm
    See Also:
    Serialized Form
    • Constructor Detail

      • JDFTest

        public JDFTest​(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument,
                       java.lang.String qualifiedName)
        Constructor for JDFTest
        Parameters:
        myOwnerDocument -
        qualifiedName -
      • JDFTest

        public JDFTest​(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument,
                       java.lang.String myNamespaceURI,
                       java.lang.String qualifiedName)
        Constructor for JDFTest
        Parameters:
        myOwnerDocument -
        myNamespaceURI -
        qualifiedName -
      • JDFTest

        public JDFTest​(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument,
                       java.lang.String myNamespaceURI,
                       java.lang.String qualifiedName,
                       java.lang.String myLocalName)
        Constructor for JDFTest
        Parameters:
        myOwnerDocument -
        myNamespaceURI -
        qualifiedName -
        myLocalName -
    • Method Detail

      • fitsMap

        public boolean fitsMap​(JDFAttributeMap m)
        Evaluates the boolean expression (child Term element) if it fits the attribute map 'm'
        Specified by:
        fitsMap in class JDFTerm
        Parameters:
        m - key-value pair attribute map
        Returns:
        boolean - true, if the boolean expression (child Term element) evaluates to true
      • fitsJDF

        public boolean fitsJDF​(KElement jdf,
                               KElement reportRoot)
        Evaluates the boolean expression (child Term element) if it fits the JDFNode 'jdf' a value of true corresponds to a failed test, i.e. the test describes INVALID states for the jdf
        Specified by:
        fitsJDF in class JDFTerm
        Parameters:
        jdf - JDFNode to test to know if the Device can accept it
        reportRoot - the report to generate. Set to null if no report is requested.
        Returns:
        boolean - true, if boolean expression (child Term element) evaluates to �true�
      • getTerm

        public JDFTerm getTerm()
        gets the term from a test
        Returns:
        JDFTerm the term that defines this test, null if there is no term
      • getIDPrefix

        protected java.lang.String getIDPrefix()
        getIDPrefix
        Overrides:
        getIDPrefix in class KElement
        Returns:
        the default ID prefix of non-overwritten JDF elements
      • getMissingElements

        public VString getMissingElements​(int nMax)
        Description copied from class: JDFElement
        get the missing elements as a vector

        default: getMissingElements(99999999)

        Overrides:
        getMissingElements in class JDFElement
        Parameters:
        nMax -
        Returns:
        See Also:
        org.cip4.jdflib.core.KElement#getMissingElements(int)
      • fitsContext

        public boolean fitsContext​(KElement testElement)
        check whether the boolean logic defined by a Test and a test's subelements makes sense in the context of the tested element jdf
        Overrides:
        fitsContext in class JDFNodeTerm
        Parameters:
        testElement - the KElement to check
        Returns:
        boolean
      • getContext

        public java.lang.String getContext()
        get attribute Context of this Test element
        Returns:
        String - the value of the Context attribute of this test
      • setContext

        public void setContext​(java.lang.String context)
        set attribute Context of this Test element
        Parameters:
        context - the value of the Context attribute of this test