org.cip4.jdflib.resource.devicecapability
Class JDFDeviceCap

java.lang.Object
  extended by org.apache.xerces.dom.NodeImpl
      extended by org.apache.xerces.dom.ChildNode
          extended by org.apache.xerces.dom.ParentNode
              extended by org.apache.xerces.dom.ElementImpl
                  extended by org.apache.xerces.dom.ElementNSImpl
                      extended by org.cip4.jdflib.core.KElement
                          extended by org.cip4.jdflib.core.JDFElement
                              extended by org.cip4.jdflib.auto.JDFAutoDeviceCap
                                  extended by org.cip4.jdflib.resource.devicecapability.JDFDeviceCap
All Implemented Interfaces:
Serializable, Cloneable, IDeviceCapable, Element, EventTarget, Node, NodeList, TypeInfo

public class JDFDeviceCap
extends JDFAutoDeviceCap
implements IDeviceCapable

Author:
Dr. Rainer Prosi, Heidelberger Druckmaschinen AG before Aug 10, 2009
See Also:
Serialized Form

Nested Class Summary
static class JDFDeviceCap.EnumAvailability
           
 
Nested classes/interfaces inherited from class org.cip4.jdflib.auto.JDFAutoDeviceCap
JDFAutoDeviceCap.EnumCombinedMethod, JDFAutoDeviceCap.EnumExecutionPolicy, JDFAutoDeviceCap.EnumTypeOrder
 
Nested classes/interfaces inherited from class org.cip4.jdflib.core.JDFElement
JDFElement.EnumBoolean, JDFElement.EnumNamedColor, JDFElement.EnumNodeStatus, JDFElement.EnumOrientation, JDFElement.EnumPoolType, JDFElement.EnumSeparation, JDFElement.EnumSettingsPolicy, JDFElement.EnumValidationLevel, JDFElement.EnumVersion, JDFElement.EnumXYRelation
 
Nested classes/interfaces inherited from class org.cip4.jdflib.core.KElement
KElement.SimpleNodeComparator, KElement.SingleAttributeComparator, KElement.SingleXPathComparator
 
Field Summary
static String FITS_TYPE
           
 
Fields inherited from class org.apache.xerces.dom.ElementNSImpl
localName, namespaceURI
 
Fields inherited from class org.apache.xerces.dom.ElementImpl
attributes, name
 
Fields inherited from class org.apache.xerces.dom.ParentNode
firstChild, fNodeListCache, ownerDocument
 
Fields inherited from class org.apache.xerces.dom.ChildNode
nextSibling, previousSibling
 
Fields inherited from class org.apache.xerces.dom.NodeImpl
DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_IS_CONTAINED, DOCUMENT_POSITION_PRECEDING, ELEMENT_DEFINITION_NODE, FIRSTCHILD, flags, HASSTRING, ID, IGNORABLEWS, NORMALIZED, OWNED, ownerNode, READONLY, SPECIFIED, SYNCCHILDREN, SYNCDATA, TREE_POSITION_ANCESTOR, TREE_POSITION_DESCENDANT, TREE_POSITION_DISCONNECTED, TREE_POSITION_EQUIVALENT, TREE_POSITION_FOLLOWING, TREE_POSITION_PRECEDING, TREE_POSITION_SAME_NODE
 
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Fields inherited from interface org.w3c.dom.TypeInfo
DERIVATION_EXTENSION, DERIVATION_LIST, DERIVATION_RESTRICTION, DERIVATION_UNION
 
Constructor Summary
JDFDeviceCap(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument, String qualifiedName)
          Constructor for JDFDeviceCap
JDFDeviceCap(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument, String myNamespaceURI, String qualifiedName)
          Constructor for JDFDeviceCap
JDFDeviceCap(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument, String myNamespaceURI, String qualifiedName, String myLocalName)
          Constructor for JDFDeviceCap
 
Method Summary
static KElement actionPoolReport(IDeviceCapable devCapable, JDFElement jdfRootorMess, KElement parentReport)
          actionPoolReport - tests if the JDFNode fits Actions from ActionPool of this DeviceCap.
 JDFBooleanState appendBooleanState(String nam)
          appends a BooleanState with @Name="name"
 JDFEnumerationState appendEnumerationState(String nam)
          appends a NumberState with @Name="name"
 JDFIntegerState appendIntegerState(String nam)
          appends an IntegerState with @Name="name"
 JDFNameState appendNameState(String nam)
          appends a NameState with @Name="name"
 JDFStringState appendStringState(String nam)
          appends a StringState with @Name="name"
 void createModuleCaps(String includeNameExpression)
          creates and links devcaps to modules
 XMLDoc getBadJDFInfo(JDFNode jdfRoot, JDFBaseDataTypes.EnumFitsValue testlists, JDFElement.EnumValidationLevel level)
          Composes a BugReport in XML form for the given JDFNode 'jdfRoot'.
 JDFBooleanState getBooleanState(String nam)
          gets an existing BooleanState with @Name="name"
 Vector getCombinedMethod()
          (9.2) get CombinedMethod attribute CombinedMethod
 JDFBooleanState getCreateBooleanState(String nam)
          gets a NumberState with @Name="name", appends it if it does not exist
 JDFEnumerationState getCreateEnumerationState(String nam)
          gets a EnumerationState with @Name="name", appends it if it does not exist
 JDFIntegerState getCreateIntegerState(String nam)
          gets an IntegerState with @Name="name", appends it if it does not yet exist
 JDFNameState getCreateNameState(String nam)
          gets a NameState with @Name="name", appends it if it does not exist
 JDFStringState getCreateStringState(String nam)
          gets a StringState with @Name="name", appends it if it does not yet exist
 JDFDevCaps getDevCapsByName(String devCapsName, JDFAutoDevCaps.EnumContext context, JDFResourceLink.EnumUsage linkUsage, JDFNode.EnumProcessUsage processUsage, int iSkip)
          get a DevCaps element by name and further restrictions.
 JDFEnumerationState getEnumerationState(String nam)
          gets an existing EnumerationState with @Name="name"
 VElement getExecutableJDF(JDFNode jdfRoot, JDFBaseDataTypes.EnumFitsValue testlists, JDFElement.EnumValidationLevel level)
          Gets of jdfRoot a vector of all executable nodes (jdf root or children nodes that this Device may execute)
 JDFIntegerState getIntegerState(String nam)
          gets an existing IntegerState with @Name="name"
static XMLDoc getJMFInfo(JDFJMF jmfRoot, JDFResponse knownMessagesResp, JDFBaseDataTypes.EnumFitsValue testlists, JDFElement.EnumValidationLevel level, boolean ignoreExtensions)
          Composes a BugReport in XML form for the given JMF message 'jmfRoot'.
 VElement getMatchingTypeNodeVector(JDFNode testRoot)
          test whether a given node has the corect Types and Type Attribute
static JDFMessageService getMessageServiceForJMFType(JDFMessage m, JDFResponse knownMessagesResp)
           
 VString getNamePathVector()
           
 JDFNameState getNameState(String nam)
          gets an existing NameState with @Name="name"
 JDFNumberState getNumberState(String nam)
          gets an existing NumberState with @Name="name"
 JDFAbstractState getState(String nam)
          gets an existing State with @Name="name"
 VElement getStates()
          get all direct state elements of
 JDFStringState getStringState(String nam)
          gets an existing StringState with @Name="name"
 ICapabilityElement getTargetCap(String id)
          get the target JDFTerm referenced by id
protected  ElementInfo getTheElementInfo()
           
 String getTypeExpression()
          Gets of this string attribute TypeExpression if it exists, otherwise returns the literal string defined in Types
 boolean isIgnoreDefaults()
           
 boolean isIgnoreExtensions()
           
 boolean matchesType(JDFNode testRoot, boolean bLocal)
          test whether a given node has the corect Types and Type Attribute
 void setCombinedMethod(JDFAutoDeviceCap.EnumCombinedMethod method)
          set attribute CombinedMethod to an individual method
 void setCombinedMethod(Vector vMethod)
          set attribute CombinedMethod to an individual method
 boolean setDefaultsFromCaps(JDFNode node, boolean bLocal, boolean bAll)
          set the defaults of node to the values defined in the child DevCap and State elements
 void setIgnoreDefaults(boolean _ignoreDefaults)
           
 void setIgnoreExtensions(boolean _ignoreExtensions)
           
 String toString()
          toString - StringRepresentation of JDFNode
 
Methods inherited from class org.cip4.jdflib.auto.JDFAutoDeviceCap
appendActionPool, appendDevCapPool, appendDevCaps, appendDisplayGroupPool, appendFeaturePool, appendMacroPool, appendModulePool, appendPerformance, appendTestPool, getActionPool, getAllDevCaps, getAllPerformance, getCreateActionPool, getCreateDevCapPool, getCreateDevCaps, getCreateDisplayGroupPool, getCreateFeaturePool, getCreateMacroPool, getCreateModulePool, getCreatePerformance, getCreateTestPool, getDevCapPool, getDevCaps, getDisplayGroupPool, getExecutionPolicy, getFeaturePool, getGenericAttributes, getLang, getMacroPool, getModulePool, getOptionalCombinedTypes, getPerformance, getTestPool, getTheAttributeInfo, getType, getTypeOrder, getTypes, setExecutionPolicy, setGenericAttributes, setLang, setOptionalCombinedTypes, setType, setTypeExpression, setTypeOrder, setTypes
 
Methods inherited from class org.cip4.jdflib.core.JDFElement
appendAnchor, appendBestEffortExceptions, appendComment, appendElement, appendGeneralID, appendGeneralID, appendHRef, appendHRef, appendMustHonorExceptions, appendOperatorInterventionExceptions, appendPreview, appendrRefs, attributeType, clearTargets, cloneNewDoc, copyInto, deprecatedAttributes, eraseDefaultAttributes, exclusiveOneOfAttribute, exclusiveOneOfElement, fixVersion, getAllRefs, getAtrType, getAttributeInfo, getBestEffortExceptions, getChildElement, getChildElements, getChildElementVector_JDFElement, getChildElementVector, getChildIds, getChildrenByTagName, getChildrenByTagName, getChildWithAttribute, getChildWithMatchingAttribute, getComment, getComment, getCommentURL, getCreateComment, getCreatePreview, getCreateRefElement, getDeepElementByID, getDefaultAttributeMap, getDefaultJDFVersion, getDeprecatedAttributes, getDeprecatedElements, getDescriptiveName, getElement_JDFElement, getElement, getElementIDPrefix, getElementNameVector, getEnumAttribute, getEnumerationsAttribute, getEnumerationsAttribute, getEnumforAttribute, getEnumNodeName, getEnumString, getFirstVersion, getGeneralID, getGeneralID, getGeneralID, getGeneralIDMap, getGeneralIDVectorMap, getHRef, getHRefs, getHRefs, getInsertElements, getInsertElementVector, getInvalidAttributes, getInvalidElements_JDFElement, getInvalidElements, getJDFRoot, getJMFRoot, getLastVersion, getLinkRoot, getMaxVersion, getMissingAttributes, getMissingAttributeVector, getMissingElements, getMissingElementVector, getMustHonorExceptions, getNamesVector, getOperatorInterventionExceptions, getOwnerDocument_JDFElement, getParentJDF, getParentJDF, getPartMap, getPartMapVector, getPrereleaseAttributes, getPrereleaseElements, getPreview, getRefElement, getRefElements, getRefString, getrRefs, getSchemaURL, getSchemaURL, getSettingsPolicy, getStatus, getTarget_JDFElement, getTarget, getTarget, getTheAttributeInfo_JDFElement, getTheElementInfo_JDFElement, getTypeForAttribute, getUnknownAttributes, getUnknownAttributeVector, getUnknownElements, getUnknownElementVector, getUnknownPoolElements, getURLDoc, getURLInputStream, getValueForNewAttribute, getVersion, getVersion, getvHRefRes, getvHRefRes, getXMLDocUserData, hasMissingAttributes, hasMissingElements, hasPartMap, hasSettingsPolicy, hasUnknownAttributes, hasUnknownElements, idString, includesMatchingAttribute, inlineRefElements, insertBefore, isComment, isCommentStatic, isDirty, isInJDFNameSpace, isInJDFNameSpaceStatic, isInJDFNameSpaceStatic, isJDFNode, isRefElement, isRefElementStatic, isResource, isResourceLink, isResourceLinkStatic, isResourceStatic, isResourceUpdate, isValid_JDFElement, isValid, jdfVersion, knownAttributes, knownElements, matchesPath, newID, numChildElements_JDFElement, numChildElements, optionalAttributes, optionalElements, prereleaseAttributes, prereleaseElements, refElement, removeBestEffortExceptions, removeChild, removeChild, removeChildren, removeExtensions, removeFromBestEffortExceptions, removeFromMustHonorExceptions, removeFromOperatorInterventionExceptions, removeFromrRefs, removeGeneralID, removePartMap, removeRefElement, removeSettingsPolicy, replaceChild, requiredAttributes, requiredElements, requiredLevel, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeNameTimeStamp, setAttributes, setBestEffortExceptions, setCommentURL, setDefaultJDFVersion, setDescriptiveName, setDirty, setEnumerationsAttribute, setGeneralID, setLongID, setMustHonorExceptions, setOperatorInterventionExceptions, setPartMap, setPartMapVector, setSettingsPolicy, setStatus, setVersion, setvStringAttribute, stringToVersion, uniqueElements, upDaterRefs, validAttribute, validAttribute, validEnumAttribute, validEnumerationsAttribute, validResourcePosition, version
 
Methods inherited from class org.cip4.jdflib.core.KElement
addAttribute, addAttribute, addNameSpace, ancestorDistance, appendAttribute, appendCData, appendCData, appendChild, appendElement, appendElementN, appendElementRaw, appendEntityReference, appendText, appendTextElement, appendXMLComment, appendXMLComment, buildXPath, buildXPath, buildXPath, clone, copyAttribute, copyAttribute, copyElement, copyElements, copyXPathValue, createRoot, deleteNode, eraseEmptyAttributes, eraseEmptyNodes, fillHashSet, fitsName_KElement, fitsName, flush, generateDotID, getAttribute_KElement, getAttribute_KElement, getAttribute, getAttribute, getAttributeMap, getAttributeVector_KElement, getAttributeVector, getBoolAttribute, getCData, getChildAttributeList, getChildByTagName, getChildElementArray, getChildElementVector_KElement, getChildElementVector, getChildElementVector, getChildFromList, getChildFromList, getChildNode, getChildNodes_KElement, getChildNodeVector, getChildrenByClass, getChildrenByTagName_KElement, getChildrenFromList, getChildrenWithAttribute, getCreateElement_KElement, getCreateElement, getCreateElement, getCreateXPathElement, getDeepElement, getDeepParent, getDeepParent, getDeepParentChild, getDeepParentNotName, getDocRoot, getDOMAttr, getElement_KElement, getElement, getElementByClass, getElementHashMap, getElementsByTagName_KElement, getFirstChildElement, getFirstChildElement, getFirstChildElement, getFirstElementNode, getID, getIDPrefix, getInheritedAttribute, getInheritedElement, getInheritedXPathAttribute, getIntAttribute, getLocalNameStatic, getLongAttribute, getMultipleIDs, getNamespaceURI, getNamespaceURIFromPrefix, getNextElementNode, getNextSiblingElement, getNextSiblingElement, getNextSiblingElement, getNumCDatas, getNumChildNodes, getNumChildText, getNumXMLComments, getOwnerDocument_KElement, getParentNode_KElement, getPreviousSiblingElement, getPreviousSiblingElement, getRealAttribute, getTarget_KElement, getText, getText, getTree, getTreeElement, getXMLComment, getXMLNSNameSpace, getXMLNSPrefix, getXPathAttribute, getXPathAttributeMap, getXPathElement, getXPathElementVector, getXSIType, hasAttribute_KElement, hasAttribute, hasAttribute, hasAttributes, hasChildElement, hasChildElements, hasChildNodes, hasChildText, hasXPathNode, includesAttribute, includesAttributes, init, insertAt, insertBefore, isAncestor, isEqual, isWildCard, matchesPath, matchesPathName, mergeElement, moveAttribute, moveAttribute, moveElement, moveElements, moveMe, normalize, numChildElements_KElement, numChildNodes, numSiblingElements, pushUp, removeAllText, removeAttribute_KElement, removeAttribute, removeAttribute, removeAttributeNode, removeAttributeNS, removeAttributes, removeCData, removeChildNode, removeChildren, removeChildText, removeExtensions, removeFromAttribute, removeXMLComment, removeXPathAttribute, removeXPathElement, renameAttribute, renameElement, replaceElement, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setAttributeNSRaw, setAttributeRaw, setAttributes, setAttributes, setAttributes, setAttributesRaw, setBoolAttribute, setDirty, setID, setIntAttribute, setNamespaceURI, setNodeValue, setPrefix, setRealAttribute, setText, setvStringAttribute, setXMLComment, setXPathAttribute, setXPathValue, setXPathValues, setXSIType, sortChild, sortChild, sortChildren, sortChildren, toDisplayXML, toXML, toXML, uniqueID, write2File, write2File, write2Stream, xmlNameSpace, xmlnsLocalName, xmlnsPrefix
 
Methods inherited from class org.apache.xerces.dom.ElementNSImpl
getBaseURI, getLocalName, getPrefix, getTypeName, getTypeNamespace, isDerivedFrom, setType, setValues
 
Methods inherited from class org.apache.xerces.dom.ElementImpl
cloneNode, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getDefaultAttributes, getElementsByTagName, getElementsByTagNameNS, getNodeName, getNodeType, getSchemaTypeInfo, getTagName, getXercesAttribute, hasAttributeNS, isEqualNode, reconcileDefaultAttributes, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setOwnerDocument, setReadOnly, setupDefaultAttributes, setXercesAttributeNode, synchronizeData
 
Methods inherited from class org.apache.xerces.dom.ParentNode
getChildNodes, getChildNodesUnoptimized, getFirstChild, getLastChild, getLength, getOwnerDocument, getTextContent, hasChildNodes, item, setTextContent, synchronizeChildren
 
Methods inherited from class org.apache.xerces.dom.ChildNode
getNextSibling, getParentNode, getPreviousSibling
 
Methods inherited from class org.apache.xerces.dom.NodeImpl
addEventListener, changed, changes, compareDocumentPosition, compareTreePosition, dispatchEvent, getContainer, getFeature, getNodeNumber, getNodeValue, getReadOnly, getUserData, getUserData, getUserDataRecord, isDefaultNamespace, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, needsSyncChildren, removeEventListener, setUserData, setUserData
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.cip4.jdflib.ifaces.IDeviceCapable
getActionPool, getTestPool
 
Methods inherited from interface org.w3c.dom.Element
getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS
 
Methods inherited from interface org.w3c.dom.Node
cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasChildNodes, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, setTextContent, setUserData
 

Field Detail

FITS_TYPE

public static final String FITS_TYPE
See Also:
Constant Field Values
Constructor Detail

JDFDeviceCap

public JDFDeviceCap(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument,
                    String qualifiedName)
Constructor for JDFDeviceCap

Parameters:
myOwnerDocument -
qualifiedName -

JDFDeviceCap

public JDFDeviceCap(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument,
                    String myNamespaceURI,
                    String qualifiedName)
Constructor for JDFDeviceCap

Parameters:
myOwnerDocument -
myNamespaceURI -
qualifiedName -

JDFDeviceCap

public JDFDeviceCap(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument,
                    String myNamespaceURI,
                    String qualifiedName,
                    String myLocalName)
Constructor for JDFDeviceCap

Parameters:
myOwnerDocument -
myNamespaceURI -
qualifiedName -
myLocalName -
Method Detail

getTheElementInfo

protected ElementInfo getTheElementInfo()
Overrides:
getTheElementInfo in class JDFAutoDeviceCap
Returns:
the elementinfo

toString

public String toString()
toString - StringRepresentation of JDFNode

Overrides:
toString in class JDFAutoDeviceCap
Returns:
String
See Also:
Object.toString()

getTypeExpression

public String getTypeExpression()
Gets of this string attribute TypeExpression if it exists, otherwise returns the literal string defined in Types

Overrides:
getTypeExpression in class JDFAutoDeviceCap
Returns:
String - TypeExpression attribute value

getCombinedMethod

public Vector getCombinedMethod()
(9.2) get CombinedMethod attribute CombinedMethod

Overrides:
getCombinedMethod in class JDFAutoDeviceCap
Returns:
Vector of the enumerations

getNamePathVector

public final VString getNamePathVector()
Specified by:
getNamePathVector in interface IDeviceCapable
Returns:

getExecutableJDF

public final VElement getExecutableJDF(JDFNode jdfRoot,
                                       JDFBaseDataTypes.EnumFitsValue testlists,
                                       JDFElement.EnumValidationLevel level)
Gets of jdfRoot a vector of all executable nodes (jdf root or children nodes that this Device may execute)

Parameters:
jdfRoot - the node we test
testlists - testlists that are specified for the State elements (FitsValue_Allowed or FitsValue_Present)
Will be used in fitsValue method of the State class.
level - validation level
Returns:
VElement - vector of executable JDFNodes, null if none found

getBadJDFInfo

public final XMLDoc getBadJDFInfo(JDFNode jdfRoot,
                                  JDFBaseDataTypes.EnumFitsValue testlists,
                                  JDFElement.EnumValidationLevel level)
Composes a BugReport in XML form for the given JDFNode 'jdfRoot'. Gives a list of error messages for 'jdfRoot' and every child rejected Node.
Returns null if there are no errors.

Parameters:
jdfRoot - the node to test
testlists - testlists that are specified for the State elements (FitsValue_Allowed or FitsValue_Present)
Will be used in fitsValue method of the State class.
level - validation level
Returns:
XMLDoc - XMLDoc output of the error messages. If XMLDoc is null there are no errors.

getJMFInfo

public static XMLDoc getJMFInfo(JDFJMF jmfRoot,
                                JDFResponse knownMessagesResp,
                                JDFBaseDataTypes.EnumFitsValue testlists,
                                JDFElement.EnumValidationLevel level,
                                boolean ignoreExtensions)
Composes a BugReport in XML form for the given JMF message 'jmfRoot'. Gives a list of error messages for 'jmfRoot' and every child rejected element.
Returns null if there are no errors.

Parameters:
jmfRoot - the node to test
knownMessagesResp -
testlists - testlists that are specified for the State elements (FitsValue_Allowed or FitsValue_Present)
Will be used in fitsValue method of the State class.
level - validation level
ignoreExtensions -
Returns:
XMLDoc - XMLDoc output of the error messages. If XMLDoc is null there are no errors.

getMessageServiceForJMFType

public static JDFMessageService getMessageServiceForJMFType(JDFMessage m,
                                                            JDFResponse knownMessagesResp)
Parameters:
m - the message to test
knownMessagesResp - the Response that contains the relevant devcap fo the jmf
Returns:
the JMFMessageService element for this message based on family and type

matchesType

public boolean matchesType(JDFNode testRoot,
                           boolean bLocal)
test whether a given node has the corect Types and Type Attribute

Parameters:
testRoot - the JDF or JMF to test
bLocal - if true, only check the root of this, else check children as well
Returns:
boolean - true if this DeviceCaps TypeExpression fits testRoot/@Type and testRoot/@Types

getMatchingTypeNodeVector

public VElement getMatchingTypeNodeVector(JDFNode testRoot)
test whether a given node has the corect Types and Type Attribute

Parameters:
testRoot - the JDF or JMF to test
Returns:
VElement - the list of matching JDF nodes, null if none found

actionPoolReport

public static KElement actionPoolReport(IDeviceCapable devCapable,
                                        JDFElement jdfRootorMess,
                                        KElement parentReport)
actionPoolReport - tests if the JDFNode fits Actions from ActionPool of this DeviceCap.
Composes a detailed report of the found errors in XML form. If XMLDoc is null - there are no errors

Parameters:
jdfRoot - node to test
Returns:
KElement - KElement output of the error messages. If KElement is null there are no errors, JDFNode fits the ActionPool of this DeviceCap and will be accepted by the device.
Throws:
JDFException - if DeviceCap is invalid: ActionPool refers to the non-existent TestPool
JDFException - if DeviceCap is invalid: Action refers to the non-existent Test

createModuleCaps

public void createModuleCaps(String includeNameExpression)
creates and links devcaps to modules

Parameters:
includeNameExpression - regexp of names to include

setDefaultsFromCaps

public boolean setDefaultsFromCaps(JDFNode node,
                                   boolean bLocal,
                                   boolean bAll)
set the defaults of node to the values defined in the child DevCap and State elements

Parameters:
node - the JDFNode in which to set defaults
bLocal - if true, set only in the local node, else recurse children
bAll - if false, only add if minOccurs>=1 and required=true or a default exists

getStates

public VElement getStates()
get all direct state elements of

Returns:
the vector of state elements

getDevCapsByName

public JDFDevCaps getDevCapsByName(String devCapsName,
                                   JDFAutoDevCaps.EnumContext context,
                                   JDFResourceLink.EnumUsage linkUsage,
                                   JDFNode.EnumProcessUsage processUsage,
                                   int iSkip)
get a DevCaps element by name and further restrictions. If an Enumerative restriction is null, the restriction is not checked.

Parameters:
devCapsName - the Name attribute of the DevCaps
context - the Context attribute of the DevCaps
linkUsage - the LinkUsage attribute of the DevCaps
processUsage - the ProcessUsage attribute of the DevCaps
iSkip - the iSkip'th matching DevCaps
Returns:
JDFDevCaps the matching DevCaps, null if not there

setCombinedMethod

public void setCombinedMethod(JDFAutoDeviceCap.EnumCombinedMethod method)
set attribute CombinedMethod to an individual method

Parameters:
method - the individual combined method to set

setCombinedMethod

public void setCombinedMethod(Vector vMethod)
set attribute CombinedMethod to an individual method

Overrides:
setCombinedMethod in class JDFAutoDeviceCap
Parameters:
method - the individual combined method to set

isIgnoreExtensions

public boolean isIgnoreExtensions()
Returns:
the ignoreExtensions

setIgnoreExtensions

public void setIgnoreExtensions(boolean _ignoreExtensions)
Parameters:
_ignoreExtensions - the ignoreExtensions to set

isIgnoreDefaults

public boolean isIgnoreDefaults()
Returns:
the ignoreDefaults

setIgnoreDefaults

public void setIgnoreDefaults(boolean _ignoreDefaults)
Parameters:
_ignoreDefaults - the ignoreDefaults to set

getTargetCap

public ICapabilityElement getTargetCap(String id)
Description copied from interface: IDeviceCapable
get the target JDFTerm referenced by id

Specified by:
getTargetCap in interface IDeviceCapable
Parameters:
id - the @ID of the term
Returns:
ICapabilityElement the referenced term, null if it doesn't exist
See Also:
IDeviceCapable.getTargetCap(java.lang.String)

appendBooleanState

public JDFBooleanState appendBooleanState(String nam)
appends a BooleanState with @Name="name"

Parameters:
nam - the name attribute of the newly appended BooleanState
Returns:
JDFBooleanState: the newly appended BooleanState

appendEnumerationState

public JDFEnumerationState appendEnumerationState(String nam)
appends a NumberState with @Name="name"

Parameters:
nam - the name attribute of the newly appended NumberState
Returns:
JDFNumberState: the newly appended NumberState

appendIntegerState

public JDFIntegerState appendIntegerState(String nam)
appends an IntegerState with @Name="name"

Parameters:
nam - the Name attribute of the newly appended IntegerState
Returns:
JDFIntegerState: the newly appended IntegerState

appendNameState

public JDFNameState appendNameState(String nam)
appends a NameState with @Name="name"

Parameters:
nam - the name attribute of the newly appended NameState
Returns:
JDFNameState: the newly appended NameState

appendStringState

public JDFStringState appendStringState(String nam)
appends a StringState with @Name="name"

Parameters:
nam - the Name attribute of the newly appended StringState
Returns:
JDFStringState: the newly appended StringState

getBooleanState

public JDFBooleanState getBooleanState(String nam)
gets an existing BooleanState with @Name="name"

Parameters:
nam - the Name attribute of the newly appended BooleanState
Returns:
JDFBooleanState: the existing BooleanState

getCreateBooleanState

public JDFBooleanState getCreateBooleanState(String nam)
gets a NumberState with @Name="name", appends it if it does not exist

Parameters:
nam - the name attribute of the newly appended NumberState
Returns:
JDFNumberState: the existing or newly appended NumberState

getCreateEnumerationState

public JDFEnumerationState getCreateEnumerationState(String nam)
gets a EnumerationState with @Name="name", appends it if it does not exist

Parameters:
nam - the name attribute of the newly appended EnumerationState
Returns:
JDFEnumerationState the existing or newly appended EnumerationState

getCreateIntegerState

public JDFIntegerState getCreateIntegerState(String nam)
gets an IntegerState with @Name="name", appends it if it does not yet exist

Parameters:
nam - the name attribute of the newly appended IntegerState
Returns:
JDFIntegerState: the existing or newly appended IntegerState

getCreateNameState

public JDFNameState getCreateNameState(String nam)
gets a NameState with @Name="name", appends it if it does not exist

Parameters:
nam - the name attribute of the newly appended NameState
Returns:
JDFNameState: the existing or newly appended NameState

getCreateStringState

public JDFStringState getCreateStringState(String nam)
gets a StringState with @Name="name", appends it if it does not yet exist

Parameters:
nam - the Name attribute of the newly appended StringState
Returns:
JDFStringState: the existing or newly appended StringState

getEnumerationState

public JDFEnumerationState getEnumerationState(String nam)
gets an existing EnumerationState with @Name="name"

Parameters:
nam - the Name attribute of the newly appended EnumerationState
Returns:
JDFEnumerationState: the existing EnumerationState

getIntegerState

public JDFIntegerState getIntegerState(String nam)
gets an existing IntegerState with @Name="name"

Parameters:
nam - the name attribute of the newly appended IntegerState
Returns:
JDFIntegerState: the existing IntegerState

getNameState

public JDFNameState getNameState(String nam)
gets an existing NameState with @Name="name"

Parameters:
nam - the Name attribute of the newly appended NameState
Returns:
JDFNameState: the existing NameState

getNumberState

public JDFNumberState getNumberState(String nam)
gets an existing NumberState with @Name="name"

Parameters:
nam - the Name attribute of the newly appended NumberState
Returns:
JDFNumberState: the existing NumberState

getState

public JDFAbstractState getState(String nam)
gets an existing State with @Name="name"

Parameters:
nam - the Name attribute of the newly appended StringState
Returns:
JDFStringState: the existing StringState

getStringState

public JDFStringState getStringState(String nam)
gets an existing StringState with @Name="name"

Parameters:
nam - the Name attribute of the newly appended StringState
Returns:
JDFStringState: the existing StringState


Copyright © 2013. All Rights Reserved.