Class JDFAbstractState

    • Constructor Detail

      • JDFAbstractState

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

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

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

      • addValue

        public abstract void addValue​(java.lang.String value,
                                      JDFBaseDataTypes.EnumFitsValue testlists)
        add a value to the list of values defined by testlists
        Parameters:
        value - value to test
        testlists - switches between Allowed test lists and Present test lists. Has two values: Allowed and Present.
      • fitsValue

        public abstract boolean fitsValue​(java.lang.String value,
                                          JDFBaseDataTypes.EnumFitsValue testlists)
        Tests whether the defined value matches the Allowed test lists or the Present test lists specified for this state
        Parameters:
        value - value to test
        testlists - switches between Allowed test lists and Present test lists. Has two values: Allowed and Present.
        Returns:
        boolean - true, if the value matches the test lists or if Allowed testlists are not specified
      • getNamePath

        public final java.lang.String getNamePath()
        Gets the NamePath of this State in form " DevCapsName[Context=aaa, LinkUsage=ccc]/DevCapName1/DevCapName2../@StateName "

        default getNamePath(false)

        Returns:
        String - NamePath of this State
      • getNamePathVector

        public final VString getNamePathVector​(boolean bRecurse)
        Gets the NamePath of this State in form " DevCapsName[Context=aaa, LinkUsage=ccc]/DevCapName1/DevCapName2../@StateName "

        default getNamePath(false)

        Parameters:
        bRecurse - if true returns " DevCapsName/SubelemName1/SubelemName2/../@StateName "
        Returns:
        String - NamePath of this State
      • getParentDevCaps

        public JDFDevCaps getParentDevCaps()
        get the ancestor devCaps, null if this resides in a DevCapPool
        Returns:
        JDFDevCaps
      • getParentDevCap

        public JDFDevCap getParentDevCap()
        get the parent devCap of this
        Returns:
      • setDevNS

        public void setDevNS​(java.lang.String value)
        Sets attribute DevNS
        Parameters:
        value - the value to set the attribute to
      • getDevNS

        public java.lang.String getDevNS()
        Gets URI attribute DevNS
        Returns:
        String: the attribute value
      • setHasDefault

        public void setHasDefault​(boolean value)
        Sets attribute HasDefault, default=true
        Parameters:
        value - the value to set the attribute to
      • getHasDefault

        public boolean getHasDefault()
        Gets boolean attribute HasDefault
        Returns:
        boolean: the attribute value
      • setMaxOccurs

        public void setMaxOccurs​(int value)
        Sets attribute MaxOccurs,
        Parameters:
        value - the value to set the attribute to
      • getMaxOccurs

        public int getMaxOccurs()
        Gets integer attribute MaxOccurs
        Returns:
        int: the attribute value
      • setMinOccurs

        public void setMinOccurs​(int value)
        Sets attribute MinOccurs, default=1
        Parameters:
        value - the value to set the attribute to
      • getMinOccurs

        public int getMinOccurs()
        Get integer attribute MinOccurs
        Returns:
        int: the attribute value
      • setName

        public void setName​(java.lang.String value)
        Sets String attribute Name
        Since name is independent of the data type of the State element, the setter is defined here
        Parameters:
        value - the value to set the attribute to
      • getName

        public java.lang.String getName()
        Gets String attribute Name
        Since name is independent of the data type of the State element,the getter is defined here
        Returns:
        String: the attribute value
      • setRequired

        public void setRequired​(boolean value)
        Sets attribute Required
        Parameters:
        value - the value to set the attribute to
      • getRequired

        public boolean getRequired()
        Gets boolean attribute Required
        Returns:
        boolean: the attribute value
      • setActionRefs

        public void setActionRefs​(VString value)
        Sets attribute ActionRefs
        Parameters:
        value - vector of ActionRefs
      • getActionRefs

        public VString getActionRefs()
        Gets NMTOKENS attribute ActionRefs
        Returns:
        VString: the attribute value
      • setEditable

        public void setEditable​(boolean value)
        Sets attribute Editable
        Parameters:
        value - the value to set the attribute to
      • getEditable

        public boolean getEditable()
        Gets boolean attribute Editable
        Returns:
        boolean: the attribute value
      • setMacroRefs

        public void setMacroRefs​(VString value)
        Sets attribute MacroRefs
        Parameters:
        value - vector of MacroRefs
      • getMacroRefs

        public VString getMacroRefs()
        Get NMTOKENS attribute MacroRefs
        Returns:
        VString: the attribute value
      • setDependentMacroRef

        public void setDependentMacroRef​(java.lang.String value)
        Sets attribute DependentMacroRef
        Parameters:
        value - vector of DependentMacroRef
      • getDependentMacroRef

        public java.lang.String getDependentMacroRef()
        Get string attribute DependentMacroRef
        Returns:
        String: the attribute value
      • setUserDisplay

        public void setUserDisplay​(JDFAbstractState.EnumUserDisplay value)
        Sets attribute UserDisplay, default=Display
        Parameters:
        value - the value to set the attribute to
      • getUserDisplay

        public JDFAbstractState.EnumUserDisplay getUserDisplay()
        Gets typesafe enumerated attribute UserDisplay
        Returns:
        EnumUserDisplay: the enumeration value of the attribute
      • getCreateLoc

        public JDFLoc getCreateLoc​(int iSkip)
        Gets the iSkip-th element Loc. If doesn't exist, it is created.

        default: getCreateLoc(0)

        Parameters:
        iSkip - number of elements to skip
        Returns:
        JDFLoc: the matching element
      • getLoc

        public JDFLoc getLoc​(int iSkip)
        Gets the iSkip-th element Loc

        default: getCreateLoc(0)

        Parameters:
        iSkip - number of elements to skip
        Returns:
        JDFLoc: the matching element
      • appendLoc

        public JDFLoc appendLoc()
        Appends element Loc to the end of this
        Returns:
        JDFLoc: newly created Loc element
      • setAllowedLength

        protected void setAllowedLength​(JDFIntegerRange value)
        set attribute AllowedLength
        Parameters:
        value - the value to set the attribute to
      • getAllowedLength

        protected JDFIntegerRange getAllowedLength()
        get attribute AllowedLength
        Returns:
        JDFIntegerRange: the attribute value
      • setPresentLength

        protected void setPresentLength​(JDFIntegerRange value)
      • fitsLength

        protected final boolean fitsLength​(java.lang.String str,
                                           JDFBaseDataTypes.EnumFitsValue length)
        fitsLength - tests, if the defined String str matches AllowedLength or the PresentLength, specified for this State
        Parameters:
        str - string to test
        length - switches between AllowedLength and PresentLength.
        Returns:
        boolean - true, if 'str' matches Length or if AllowedLength is not specified
      • getMatchingObjectInNode

        public java.lang.Object getMatchingObjectInNode​(KElement element)
        gets the matching Attribute value String or AbstractSpan object from the parent, depending on the type of the state
        Parameters:
        element - the parent in which to search
        Returns:
        Object: either a String or AbstractSpan
      • setDefaultsFromCaps

        public boolean setDefaultsFromCaps​(KElement element,
                                           boolean bAll)
        set the default values specified in this in element
        Parameters:
        element - the element to set the defaults on
        bAll -
        Returns:
        true if successful
      • fitsListType

        protected final boolean fitsListType​(java.lang.String value)
        fitsListType - tests, if the defined value matches value of ListType attribute, specified for this State
        Parameters:
        value - value to test
        Returns:
        boolean - true, if 'value' matches specified ListType
      • getValueLocLoc

        public JDFLoc getValueLocLoc​(int iSkip,
                                     int jSkip)
        Gets the j-th element Loc of the i-th element Value
        Parameters:
        iSkip - number of Value elements to skip (iSkip=0 - first Value element)
        jSkip - number of Loc subelements of i-th Value element to skip, (jSkip=0 - first Loc element)
        Returns:
        JDFLoc: the matching Loc element
      • getValueLoc

        public final JDFValueLoc getValueLoc​(int iSkip)
        get iSkip'th element Loc
        Parameters:
        iSkip - number of Value elements to skip (iSkip=0 - get first element)
        Returns:
        JDFValueLoc: the element
      • appendValueLocLoc

        public JDFLoc appendValueLocLoc​(int iSkip)
        appends element Loc to the end of the i-th subelement Value
        Parameters:
        iSkip - number of Value elements to skip (iSkip=0 - first Value element)
        Returns:
        JDFLoc: newly created Loc element
      • appendValueLoc

        public final JDFValueLoc appendValueLoc()
        Appends element ValueLoc
        Returns:
        JDFLoc: newly created ValueLoc element
      • fitsRegExp

        protected final boolean fitsRegExp​(java.lang.String str,
                                           JDFBaseDataTypes.EnumFitsValue regexp)
        fitsRegExp - checks whether str matches the AllowedRegExp/PresentRegExp specified for this State
        Parameters:
        str - string to test
        regexp - switches between AllowedRegExp and PresentRegExp.
        Returns:
        boolean - true, if str matches the RegExp or if AllowedRegExp is not specified
      • getPresentRegExp

        protected java.lang.String getPresentRegExp()
        Returns:
      • getAllowedRegExp

        protected java.lang.String getAllowedRegExp()
        Returns:
      • getModuleAvailability

        public JDFDeviceCap.EnumAvailability getModuleAvailability()
        get the availability of this devcaps based on the list of installed modules in ModuleRefs and ModulePool
        Returns:
      • getModuleRefs

        public VString getModuleRefs()
        (21) get VString attribute ModuleRefs
        Specified by:
        getModuleRefs in interface ICapabilityElement
        Returns:
        VString the value of the attribute
      • getIDPrefix

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