Class JDFIntentResource

    • Constructor Detail

      • JDFIntentResource

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

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

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

      • guessActual

        public static java.lang.String guessActual​(JDFElement root,
                                                   java.lang.String spanName)
        get the best match actual value from any element that may contain spans
        Parameters:
        root - the parent element
        spanName - the span element name
        Returns:
      • copyActualToProcess

        public static void copyActualToProcess​(JDFElement intentRoot,
                                               JDFElement processRoot,
                                               java.lang.String spanName,
                                               java.lang.String attName)
        get the best match actual value from any element that may contain spans
        Parameters:
        intentRoot - the parent intent element
        processRoot - the parent process element
        spanName - the span element name
        attName - the target attribute element name, if null identical to spanName
      • copyProcessToActual

        public static void copyProcessToActual​(JDFElement processRoot,
                                               JDFElement intentRoot,
                                               java.lang.String attName,
                                               java.lang.String spanName)
        get the best match actual value from any element that may contain spans
        Parameters:
        processRoot - the parent process element
        intentRoot - the parent intent element
        attName - the target attribute element name, if null identical to spanName
        spanName - the span element name
      • preferredToActual

        public int preferredToActual()
        set all actual values to the preset defined in preferred
        Returns:
        number of elements modified
      • preferredToActual

        public int preferredToActual​(java.lang.String key)
        set actual values to the preset defined in preferred
        Parameters:
        key - the key of the span resource to modify, if null do all
        Returns:
        number of elements modified
      • getSpans

        public VElement getSpans()
        get a list of all span resources
        Returns:
        VElement all Span elements of this
      • getCreateNumberSpan

        public JDFNumberSpan getCreateNumberSpan​(java.lang.String strName)
        get a number span
        Parameters:
        strName - name of the span element
        Returns:
        JDFNumberSpan the JDFNumberSpan
      • getCreateOptionSpan

        public JDFOptionSpan getCreateOptionSpan​(java.lang.String strName)
        get an option (boolean) span
        Parameters:
        strName - name of the span element
        Returns:
        JDFOptionSpan the JDFOptionSpan
      • getCreateIntegerSpan

        public JDFIntegerSpan getCreateIntegerSpan​(java.lang.String strName)
        get an integer span
        Parameters:
        strName - name of the span element exist
        Returns:
        JDFIntegerSpan the JDFIntegerSpan
      • getCreateNameSpan

        public JDFNameSpan getCreateNameSpan​(java.lang.String strName)
        get a namespan
        Parameters:
        strName - name of the span element
        Returns:
        JDFNameSpan the JDFNameSpan
      • getCreateEnumerationSpan

        public JDFEnumerationSpan getCreateEnumerationSpan​(java.lang.String strName)
        get an Enumeration span
        Parameters:
        strName - name of the span element
        Returns:
        JDFEnumerationSpan the JDFEnumerationSpan
      • getCreateStringSpan

        public JDFStringSpan getCreateStringSpan​(java.lang.String strName)
        get a string span
        Parameters:
        strName - name of the span element
        Returns:
        JDFStringSpan the JDFStringSpan
      • getCreateDurationSpan

        public JDFDurationSpan getCreateDurationSpan​(java.lang.String strName)
        get a duration span
        Parameters:
        strName - name of the span element
        Returns:
        getDurationSpan the getDurationSpan
      • getCreateTimeSpan

        public JDFTimeSpan getCreateTimeSpan​(java.lang.String strName)
        get a time span
        Parameters:
        strName - name of the span element
        Returns:
        getTimeSpan the getTimeSpan
      • getCreateCreateXYPairSpan

        public JDFXYPairSpan getCreateCreateXYPairSpan​(java.lang.String strName)
        get a XYPair span
        Parameters:
        strName - name of the span element
        Returns:
        JDFOptionSpan the JDFOptionSpan
      • getCreateCreateShapeSpan

        public JDFShapeSpan getCreateCreateShapeSpan​(java.lang.String strName)
        get a Shape span
        Parameters:
        strName - name of the span element
        Returns:
        JDFOptionSpan the JDFOptionSpan
      • getNumberSpan

        public JDFNumberSpan getNumberSpan​(java.lang.String strName)
        get a number span
        Parameters:
        strName - name of the span element
        Returns:
        JDFNumberSpan the JDFNumberSpan
      • getOptionSpan

        public JDFOptionSpan getOptionSpan​(java.lang.String strName)
        get an option (boolean) span
        Parameters:
        strName - name of the span element
        Returns:
        JDFOptionSpan the JDFOptionSpan
      • getIntegerSpan

        public JDFIntegerSpan getIntegerSpan​(java.lang.String strName)
        get an integer span
        Parameters:
        strName - name of the span element
        Returns:
        getIntegerSpan the getIntegerSpan
      • getNameSpan

        public JDFNameSpan getNameSpan​(java.lang.String strName)
        get a namespan
        Parameters:
        strName - name of the span element
        Returns:
        JDFNameSpan the JDFNameSpan
      • getEnumerationSpan

        public JDFEnumerationSpan getEnumerationSpan​(java.lang.String strName)
        get an Enumeration span
        Parameters:
        strName - name of the span element
        Returns:
        getEnumerationSpan the getEnumerationSpan
      • getStringSpan

        public JDFStringSpan getStringSpan​(java.lang.String strName)
        get a string span
        Parameters:
        strName - name of the span element
        Returns:
        JDFStringSpan the JDFStringSpan
      • getDurationSpan

        public JDFDurationSpan getDurationSpan​(java.lang.String strName)
        get a duration span
        Parameters:
        strName - name of the span element
        Returns:
        getDurationSpan the getDurationSpan
      • getTimeSpan

        public JDFTimeSpan getTimeSpan​(java.lang.String strName)
        get a time span
        Parameters:
        strName - name of the span element
        Returns:
        getTimeSpan the getTimeSpan
      • getXYPairSpan

        public JDFXYPairSpan getXYPairSpan​(java.lang.String strName)
        get a XYPair span
        Parameters:
        strName - name of the span element
        Returns:
        JDFXYPairSpan the JDFXYPairSpan
      • getShapeSpan

        public JDFShapeSpan getShapeSpan​(java.lang.String strName)
        get a Shape span
        Parameters:
        strName - name of the span element
        Returns:
        JDFShapeSpan the JDFShapeSpan
      • appendNumberSpan

        public JDFNumberSpan appendNumberSpan​(java.lang.String strName)
        Append a number span if it does not yet exist, else return the existing element
        Parameters:
        strName - name of the span element
        Returns:
        JDFNumberSpan the JDFNumberSpan
      • appendOptionSpan

        public JDFOptionSpan appendOptionSpan​(java.lang.String strName)
        Append an option (boolean) span
        Parameters:
        strName - name of the span element
        Returns:
        JDFOptionSpan the JDFOptionSpan
      • appendIntegerSpan

        public JDFIntegerSpan appendIntegerSpan​(java.lang.String strName)
        Append an integer span if it does not yet exist, else return the existing element
        Parameters:
        strName - name of the span element
        Returns:
        JDFIntegerSpan the JDFIntegerSpan
      • appendNameSpan

        public JDFNameSpan appendNameSpan​(java.lang.String strName)
        Append a name span if it does not yet exist, else return the existing element
        Parameters:
        strName - name of the span element
        Returns:
        JDFNameSpan the JDFNameSpan
      • appendEnumerationSpan

        public JDFEnumerationSpan appendEnumerationSpan​(java.lang.String strName)
        Append an Enumeration span if it does not yet exist, else return the existing element
        Parameters:
        strName - name of the span element
        Returns:
        JDFEnumerationSpan the JDFEnumerationSpan
      • appendStringSpan

        public JDFStringSpan appendStringSpan​(java.lang.String strName)
        Append a string span if it does not yet exist, else return the existing element
        Parameters:
        strName - name of the span element
        Returns:
        JDFStringSpan the JDFStringSpan
      • appendDurationSpan

        public JDFDurationSpan appendDurationSpan​(java.lang.String strName)
        Append a duration span if it does not yet exist, else return the existing element
        Parameters:
        strName - name of the span element
        Returns:
        JDFDurationSpan the JDFDurationSpan
      • appendTimeSpan

        public JDFTimeSpan appendTimeSpan​(java.lang.String strName)
        Append a time span if it does not yet exist, else return the existing element
        Parameters:
        strName - name of the span element
        Returns:
        JDFTimeSpan the JDFTimeSpan
      • appendXYPairSpan

        public JDFXYPairSpan appendXYPairSpan​(java.lang.String strName)
        Append a XYPair span if it does not yet exist, else return the existing element
        Parameters:
        strName - name of the span element
        Returns:
        JDFXYPairSpan the JDFXYPairSpan
      • appendShapeSpan

        public JDFShapeSpan appendShapeSpan​(java.lang.String strName)
        Append a Shape span if it does not yet exist, else return the existing element
        Parameters:
        strName - name of the span element
        Returns:
        JDFShapeSpan the JDFShapeSpan
      • getSpan

        public JDFSpanBase getSpan​(java.lang.String strName,
                                   JDFSpanBase.EnumDataType nType)
        get a span
        Parameters:
        strName - name of the span element
        nType - datatype of the new span
        Returns:
        JDFSpanBase the JDFSpanBase
      • appendSpan

        public JDFSpanBase appendSpan​(java.lang.String strName,
                                      JDFSpanBase.EnumDataType nType)
        Append a span if it does not yet exist, else return the existing element
        Parameters:
        strName - name of the span element
        nType - datatype of the new span
        Returns:
        JDFSpanBase the JDFSpanBase