Package org.cip4.jdflib.core
Class JDFResourceLink
- java.lang.Object
-
- org.apache.xerces.dom.NodeImpl
-
- org.apache.xerces.dom.ChildNode
-
- org.apache.xerces.dom.ParentNode
-
- org.apache.xerces.dom.ElementImpl
-
- org.apache.xerces.dom.ElementNSImpl
-
- org.cip4.jdflib.core.KElement
-
- org.cip4.jdflib.core.JDFElement
-
- org.cip4.jdflib.auto.JDFAutoResourceLink
-
- org.cip4.jdflib.core.JDFResourceLink
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,IAmountPoolContainer,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
- Direct Known Subclasses:
JDFPartAmount
public class JDFResourceLink extends JDFAutoResourceLink implements IAmountPoolContainer
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJDFResourceLink.EnumUsageEnumeration strings for Usage-
Nested classes/interfaces inherited from class org.cip4.jdflib.auto.JDFAutoResourceLink
JDFAutoResourceLink.EnumMinLateStatus, JDFAutoResourceLink.EnumMinStatus, JDFAutoResourceLink.EnumOrientation, JDFAutoResourceLink.EnumPipePartIDKeys
-
Nested classes/interfaces inherited from class org.cip4.jdflib.core.JDFElement
JDFElement.EnumBoolean, JDFElement.EnumNamedColor, JDFElement.EnumNodeStatus, JDFElement.EnumPoolType, JDFElement.EnumSeparation, JDFElement.EnumSettingsPolicy, JDFElement.EnumValidationLevel, JDFElement.EnumVersion, JDFElement.EnumXYRelation, JDFElement.eUnit
-
Nested classes/interfaces inherited from class org.cip4.jdflib.core.KElement
KElement.SimpleElementNameComparator, KElement.SimpleNodeComparator, KElement.SingleAttributeComparator, KElement.SingleXPathComparator
-
-
Field Summary
-
Fields inherited from class org.apache.xerces.dom.ParentNode
firstChild, fNodeListCache, ownerDocument
-
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
-
-
Constructor Summary
Constructors Constructor Description JDFResourceLink(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument, java.lang.String qualifiedName)Constructor for JDFResourceLinkJDFResourceLink(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument, java.lang.String myNamespaceURI, java.lang.String qualifiedName)Constructor for JDFResourceLinkJDFResourceLink(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument, java.lang.String myNamespaceURI, java.lang.String qualifiedName, java.lang.String myLocalName)Constructor for JDFResourceLink
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description JDFAmountPoolappendAmountPool()(29) append element AmountPoolJDFPartappendPart()append element PartvoidexpandAmountPool()create an Amountpool and fill it with the values of Amount and ActualAmountvoidexpandTarget(boolean bForce)Expand the target resource to contain all parts specified in the link.voidgenerateCombinedProcessIndex()doublegetActualAmount(JDFAttributeMap mPart)doublegetAmount(JDFAttributeMap mPart)get double attribute Amount, defaults to the value of Amount for the linked partitionJDFAmountPool.AmountMapgetAmountMap(VString vPartIDKeys)get an AmountMap for the child Amountpool of thisjava.lang.StringgetAmountPoolAttribute(java.lang.String attrib, java.lang.String nameSpaceURI, JDFAttributeMap mPart, int iSkip)returns the attribute occurence in PartAmount, or the default in the ResourceLinkjava.lang.StringgetAmountPoolAttribute(java.lang.String attrib, java.lang.String nameSpaceURI, VJDFAttributeMap vPart)returns the attribute occurence in PartAmount, or the default in the ResourceLinkdoublegetAmountPoolDouble(java.lang.String attName, JDFAttributeMap mPart)get the sum of all matching AmountPool/PartAmount/@attName as a double PartAmounts match if all attributes match those in PartAmount, i.e.doublegetAmountPoolDouble(java.lang.String attName, VJDFAttributeMap vPart)get the exactly matching AmountPool/PartAmount/@AttName as a doubledoublegetAmountPoolSumDouble(java.lang.String attName, VJDFAttributeMap vPart)java.lang.StringgetAuditString()get element AuditVStringgetCombinedProcessTypes()gets list of all types referenced by CombinedProccessIndex or CombinedProcessTypeJDFAmountPoolgetCreateAmountPool()(25) getCreateAmountPoolJDFPartgetCreatePart(int i)get element Part, create if it does not existbooleangetDraftOK()gets attribute DraftOKJDFNode.EnumProcessUsagegetEnumProcessUsage()get attribute ProcessUsageVStringgetInvalidAttributes(JDFElement.EnumValidationLevel level, boolean bIgnorePrivate, int nMax)get invalid attributesVElementgetLeafVector()java.lang.StringgetLinkedResourceName()Returns the linked resource nameJDFResourcegetLinkRoot()getLinkRoot - gets the root resource of the targetJDFResourcegetLinkTarget()Deprecated.never usedJDFLotgetLot(int n)get the nTh Lot elementdoublegetMaxAmount(JDFAttributeMap mPart)get double attribute MaxAmount, defaults to getAmount if MinAmount is not setdoublegetMinAmount(JDFAttributeMap mPart)get double attribute MinAmount, defaults to getAmount if MinAmount is not setdoublegetMinAmountPoolAttribute(java.lang.String attrib, java.lang.String nameSpaceURI, JDFAttributeMap mPart, int def)returns the minimum value of attribute occurence in PartAmount,JDFResource.EnumResStatusgetMinLateStatus()get attribute MinLateStatusJDFResource.EnumResStatusgetMinStatus()getMinStatus - get the minimum status of the ResourceLink in a JDF node.java.lang.StringgetNamedProcessUsage()Get the expected name of the linked resource and an optional processusage in name:usage format.JDFPartgetPart(int i)get first Part element beyond iJDFAttributeMapArraygetPartMapArray()get part map arrayVJDFAttributeMapgetPartMapVector()get part map vectorVElementgetParts()getParts - get the vector of part elements, note that a resource link with multiple part elements is effectively an OR of these partsjava.util.Vector<JDFResource.EnumPartIDKey>getPipePartIDKeysEnum()Gets an enumerated list of all valid pipe part keys for this resourcejava.lang.StringgetPipeProtocol()gets string attribute PipeProtocoljava.lang.StringgetPipeURL()gets string attribute PipeURLJDFPoolgetPool()get the parent ResourceLinkPoolVElementgetRawTargetVector(int nMax)Method getTargetVector gets the resource nodes this resourcelink refers to including all leaves with identical elements.protected JDFResourceLinkPoolgetResourceLinkPool()get the parent ResourceLinkPoolVJDFAttributeMapgetResourcePartMapVector()get part map vector as defined by the linked resource.JDFResource.EnumResStatusgetStatusFromLeaves()get the status of the Resource that is linked by this linkJDFResource.EnumResStatusgetStatusJDF()get the status of the Resource that is linked by this linkJDFResourcegetTarget()gets the first resource leaf that this resourcelink refers to
see the description ofgetTargetVectorfor details overrides the deprecated method JDFElement.getTarget()java.util.List<JDFResource>getTargetList()VElementgetTargetVector(int nMax)Method getTargetVector gets the resource nodes this resourcelink refers to.protected ElementInfogetTheElementInfo()JDFResourceLink.EnumUsagegetUsage()(9) get attribute UsagebooleanhasAmountPoolAttribute(java.lang.String attrib, java.lang.String nameSpaceURI, JDFAttributeMap mPart)Deprecated.060601 use getAmountPoolAttribute(attrib,nameSpaceURI,mPart,0)!=null;booleanhasPartMap(JDFAttributeMap mPart)check whether the part defined in mPart is includedbooleanhasResourcePartMap(JDFAttributeMap partMap, boolean bCheckResource)checks whether a given partMap is compatible with this linkbooleanisExecutable(JDFAttributeMap partMap, boolean bCheckChildren)isExecutable - checks whether the resource link links to a resource, which is in a state that will allow a node to executebooleanisImplementation()booleanisLocal()check whether the resource is in the same node as the linkbooleanisPhysical()checks whether this is a link to a physical resource.
Note that this method only works on links to resources that have a valid "Class" attribute.static booleanisResourceLink(KElement e)check whether e is a "real" resourceLink and NOT a partamountbooleanisResourceSelected(JDFResource resourceToCheck)Check whether a resource is selected by a ResourceLink.
A resource is selected if all (partition) leaves are selected by the resource linkbooleanisValid(JDFElement.EnumValidationLevel level)default validatorbooleanmatchesString(java.lang.String namedResLink)return true if this is moderately well described by namedReslinkbooleanoverlapsResourcePartMap(JDFAttributeMap partMap)voidreduceParts()reduce the parts to the canonical representation.voidremovePart(int iSkip)remove element PartvoidremovePartMap(JDFAttributeMap mPart)remove the part defined in mPartvoidsetActualAmount(double value, JDFAttributeMap mPart)Set attribute ActualAmount in the AmountPool or in the link, depending on the value of mPartvoidsetAmount(double value, JDFAttributeMap mPart)setAmount in PartAmount or in this if partAmount=nullvoidsetAmountPoolAttribute(java.lang.String attrib, java.lang.String value, java.lang.String nameSpaceURI, JDFAttributeMap mPart)sets the attribute occurence in the appropriate PartAmount when called for a resourceLink and creates the AmountPool and/or PartAmount if it is not yet therevoidsetAmountPoolAttribute(java.lang.String attrib, java.lang.String value, java.lang.String nameSpaceURI, VJDFAttributeMap vPart)sets the attribute occurence in the appropriate PartAmount when called for a resourceLink and creates the AmountPool and/or PartAmount(s) if they are not yet therevoidsetCombinedProcessIndex(int value)sets attribute CombinedProcessIndexvoidsetCombinedProcessIndex(JDFIntegerList value)sets attribute CombinedProcessIndexvoidsetDraftOK(boolean value)sets attribute DraftOK if version>=1.3, set MinStatus=Draft instead of DraftOK=truevoidsetMaxAmount(double value, JDFAttributeMap mPart)set MaxAmount in PartAmount or in this if partAmount=nullvoidsetMinAmount(double value, JDFAttributeMap mPart)set MinAmount in PartAmount or in this if partAmount=nullvoidsetPart(java.lang.String key, java.lang.String value)setPart - shorthand if only one part is required, should be set to key = valuevoidsetPartition(JDFResource.EnumPartIDKey key, java.lang.String value)shorthand if only one part is required, should be set to key = valuevoidsetPartMap(JDFAttributeMap mPart)set all parts to those defined in vPartsvoidsetPartMapVector(VJDFAttributeMap vParts)set all parts to those define in vPartsvoidsetPipePartIDKeys(VString keys)Deprecated.use setPipePartIDKeys(Vector enum)voidsetProcessUsage(JDFNode.EnumProcessUsage processUsage)set attribute ProcessUsagevoidsetQuantity(int quant)setQuantityvoidsetStatus(JDFResource.EnumResStatus s)set the status of the Resource that is linked by this linkbooleansetTarget(JDFResource resourceTarget)setTarget - sets the link to the target defined by partLeaf.voidsetUsage(JDFResourceLink.EnumUsage enumVar)(5) set attribute Usagejava.lang.StringtoString()toStringvoidunpartition(boolean bRemovePartMapVector, boolean bRemoveAmountPool)remove all partition stuffbooleanvalidCombinedProcessIndex()booleanvalidResourcePosition()checks whether the resource lives in the same node or an ancestor node of the link-
Methods inherited from class org.cip4.jdflib.auto.JDFAutoResourceLink
appendLot, getActualAmount, getAllLot, getAmount, getAmountPool, getCombinedProcessIndex, getCombinedProcessType, getCreateLot, getCreateLot, getDuration, getLot, getMaxAmount, getMinAmount, getOrientation, getPipePartIDKeys, getPipePause, getPipeResume, getProcessUsage, getRecommendation, getRemotePipeEndPause, getRemotePipeEndResume, getrRef, getrSubRef, getStart, getStartOffset, getTheAttributeInfo, getTransformation, setActualAmount, setAmount, setCombinedProcessType, setDuration, setMaxAmount, setMinAmount, setMinLateStatus, setMinStatus, setOrientation, setPipePartIDKeys, setPipePause, setPipeProtocol, setPipeResume, setPipeURL, setProcessUsage, setRecommendation, setRemotePipeEndPause, setRemotePipeEndResume, setrRef, setrSubRef, setStart, setStartOffset, setTransformation
-
Methods inherited from class org.cip4.jdflib.core.JDFElement
appendAnchor, appendBestEffortExceptions, appendComment, appendElement, appendGeneralID, appendGeneralID, appendGeneralID, appendHRef, appendHRef, appendMustHonorExceptions, appendOperatorInterventionExceptions, appendPreview, appendrRefs, attributeType, clearTargets, cloneNewDoc, copyChildren, copyInto, createRoot, createRoot, deprecatedAttributes, eraseDefaultAttributes, exclusiveOneOfAttribute, exclusiveOneOfElement, fixVersion, getAllRefs, getAtrType, getAttributeInfo, getBestEffortExceptions, getChildElement, getChildElements, getChildElementVector, getChildElementVector_JDFElement, getChildIds, getChildrenByTagName, getChildrenByTagName, getChildWithAttribute, getChildWithMatchingAttribute, getComment, getComment, getCommentText, getCommentURL, getCreateComment, getCreateComment, getCreateElement_JDFElement, getCreatePreview, getCreateRefElement, getDeepElementByID, getDefaultAttributeMap, getDefaultJDFVersion, getDeprecatedAttributes, getDeprecatedElements, getDescriptiveName, getElement, getElement_JDFElement, getElementIDPrefix, getElementInfo, getElementNameVector, getEnumAttribute, getEnumerationsAttribute, getEnumerationsAttribute, getEnumforAttribute, getEnumNodeName, getEnumString, getFirstVersion, getGeneralID, getGeneralID, getGeneralID, getGeneralIDListMap, getGeneralIDMap, getGeneralIDVectorMap, getHRef, getHRefs, getHRefs, getInsertElements, getInsertElementVector, getInvalidElements, getInvalidElements_JDFElement, getJDFRoot, getJMFRoot, getLastVersion, getLinkFromUserData, getLinkRoot, getMaxVersion, getMissingAttributes, getMissingAttributeVector, getMissingElements, getMissingElementVector, getMustHonorExceptions, getNamesVector, getOperatorInterventionExceptions, getOwnerDocument_JDFElement, getParentJDF, getParentJDF, getPartMap, getPrereleaseAttributes, getPrereleaseElements, getPreview, getRefElement, getRefElements, getRefString, getrRefs, getSchemaURL, getSchemaURL, getSchemaURL, getSettingsPolicy, getStatus, getTarget, getTarget_JDFElement, getTheAttributeInfo_JDFElement, getTheElementInfo_JDFElement, getTypeForAttribute, getUnknownAttributes, getUnknownAttributeVector, getUnknownElements, getUnknownElementVector, getUnknownPoolElements, getURLDoc, getURLInputStream, getValueForNewAttribute, getVersion, getVersion, getvHRefRes, getvHRefRes, getXMLDocUserData, hasMissingAttributes, hasMissingElements, hasSettingsPolicy, hasUnknownAttributes, hasUnknownElements, idString, includesMatchingAttribute, init, inlineRefElements, insertBefore, isComment, isCommentStatic, isDeprecated, isDirty, isInAnyCIP4NameSpaceStatic, isInAnyCIP4NameSpaceStatic, isInAnyJDFNameSpaceStatic, isInAnyJDFNameSpaceStatic, isInJDFNameSpace, isInJDFNameSpaceStatic, isInJDFNameSpaceStatic, isInXJDFNameSpaceStatic, isInXJDFNameSpaceStatic, isJDFNode, isRefElement, isRefElementStatic, isResource, isResourceLink, isResourceLinkStatic, isResourceStatic, isResourceUpdate, isValid_JDFElement, isXJDF, jdfVersion, knownAttributes, knownElements, matchesPath, newID, numChildElements, numChildElements_JDFElement, optionalAttributes, optionalElements, parseFile, parseFile, parseStream, parseString, prereleaseAttributes, prereleaseElements, refElement, removeBestEffortExceptions, removeChild, removeChild, removeChildren, removeExtensions, removeFromBestEffortExceptions, removeFromMustHonorExceptions, removeFromOperatorInterventionExceptions, removeFromrRefs, removeGeneralID, removeRefElement, removeSettingsPolicy, replaceChild, requiredAttributes, requiredElements, requiredLevel, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeNameTimeStamp, setAttributes, setBestEffortExceptions, setCommentText, setCommentText, setCommentURL, setDefaultJDFVersion, setDescriptiveName, setDirty, setEnumerationsAttribute, setGeneralID, setLongID, setMustHonorExceptions, setOperatorInterventionExceptions, setSettingsPolicy, setStatus, setVersion, setvStringAttribute, stringToVersion, uniqueElements, upDaterRefs, validAttribute, validAttribute, validEnumAttribute, validEnumerationsAttribute, validResourcePosition, version, write2Dir
-
Methods inherited from class org.cip4.jdflib.core.KElement
addAttribute, addAttribute, addNameSpace, ancestorDistance, appendAttribute, appendAttribute, appendAttributes, appendCData, appendCData, appendChild, appendElement, appendElementN, appendElementRaw, appendEntityReference, appendText, appendTextElement, appendXMLComment, appendXMLComment, buildRelativeXPath, buildXPath, buildXPath, buildXPath, cleanup, clearNSMap, clone, copyAttribute, copyAttribute, copyAttribute, copyAttribute, copyElement, copyElements, copyXPathValue, createRoot, deleteNode, ensureCase, eraseEmptyAttributes, eraseEmptyNodes, fillHashSet, fitsName, fitsName_KElement, flush, generateDotID, getAttribute, getAttribute, getAttribute, getAttribute_KElement, getAttribute_KElement, getAttributeArray_KElement, getAttributeIgnoreCase, getAttributeMap, getAttributeMap_KElement, getAttributeRaw, getAttributeVector, getAttributeVector_KElement, getBoolAttribute, getCData, getChildArray, getChildArray_KElement, getChildArrayByClass, getChildArrayByClass_KElement, getChildAttributeList, getChildByTagName, getChildElementArray, getChildElementVector, getChildElementVector, getChildElementVector_KElement, getChildFromList, getChildFromList, getChildList, getChildList, getChildNode, getChildNodes_KElement, getChildNodeVector, getChildrenByClass, getChildrenByTagName, getChildrenByTagName_KElement, getChildrenFromList, getChildrenIgnoreList, getChildrenWithAttribute, getChildWithAttribute, getChildWithAttribute, getCreateChildWithAttribute, getCreateElement, getCreateElement, getCreateElement_KElement, getCreateXPathElement, getDeepElement, getDeepParent, getDeepParent, getDeepParentChild, getDeepParentNotName, getDocRoot, getDOMAttr, getElement, getElement_KElement, getElementByClass, getElementHashMap, getElementsByTagName_KElement, getFirstChildElement, getFirstChildElement, getFirstChildElement, getFirstElementNode, getID, getIDPrefix, getIgnoreCase, getIgnoreCase_KElement, getInheritedAttribute, getInheritedElement, getInheritedXPathAttribute, getIntAttribute, getLocalNameStatic, getLongAttribute, getMultipleIDs, getNamespaceURI, getNamespaceURIFromPrefix, getNextElementNode, getNextSiblingElement, getNextSiblingElement, getNextSiblingElement, getNonEmpty, getNonEmpty_KElement, getNumCDatas, getNumChildNodes, getNumChildText, getNumXMLComments, getOwnerDocument_KElement, getParentNode_KElement, getPreviousSiblingElement, getPreviousSiblingElement, getRealAttribute, getTarget_KElement, getText, getText, getTree, getTree, getTreeByClass, getTreeElement, getXMLComment, getXMLNSNameSpace, getXMLNSPrefix, getXPathAttribute, getXPathAttributeMap, getXPathElement, getXPathElementVector, getXPathValueMap, getXPathValueMap, getXSIType, hasAttribute, hasAttribute, hasAttribute_KElement, hasAttributes, hasChildElement, hasChildElements, hasChildNodes, hasChildText, hasNonEmpty, hasNonEmpty_KElement, hasXPathNode, includesAttribute, includesAttributes, insertAt, insertBefore, isAncestor, isEqual, isEqual, isWildCard, matchesPath, matchesPathName, mergeElement, moveArray, moveAttribute, moveAttribute, moveElement, moveElements, moveMe, normalize, numChildElements_KElement, numChildNodes, numChildNodes, numChildrenByClass, numSiblingElements, pushUp, removeAllText, removeAttribute, removeAttribute, removeAttribute_KElement, removeAttributeNode, removeAttributeNS, removeAttributes, removeCData, removeChildNode, removeChildren, removeChildrenByClass, removeChildText, removeExtensions, removeFromAttribute, removeIgnoreCase, removeIgnoreCase_KElement, removeXMLComment, removeXPathAttribute, removeXPathElement, renameAttribute, renameAttribute, renameElement, replaceElement, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setAttributeNSRaw, setAttributeRaw, setAttributes, setAttributes, setAttributes, setAttributesRaw, setBoolAttribute, setDirty, setID, setIntAttribute, setNamespaceURI, setNodeValue, setNonEmpty, setPrefix, setRealAttribute, setText, setvStringAttribute, setXMLComment, setXMLComment, setXPathAttribute, setXPathValue, setXPathValues, setXSIType, sortChild, sortChild, sortChildren, sortChildren, sortChildren, sortChildren, toDisplayXML, toValueString, toXML, toXML, uniqueID, uniqueID, write2File, write2File, write2Stream, writeStream, xmlNameSpace, xmlnsLocalName, xmlnsPrefix
-
Methods inherited from class org.apache.xerces.dom.ElementNSImpl
getLocalName, getPrefix, getTypeName, getTypeNamespace, getXMLBaseAttribute, isDerivedFrom, setType
-
Methods inherited from class org.apache.xerces.dom.ElementImpl
cloneNode, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getBaseURI, getChildElementCount, getDefaultAttributes, getElementsByTagName, getElementsByTagNameNS, getFirstElementChild, getLastElementChild, getNextElementSibling, getNodeName, getNodeType, getPreviousElementSibling, 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.w3c.dom.Element
getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS
-
Methods inherited from interface org.cip4.jdflib.ifaces.IAmountPoolContainer
getAmountPool, getAttribute, getRealAttribute, hasAttribute, removeAttribute, setAttribute
-
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
-
-
-
-
Constructor Detail
-
JDFResourceLink
public JDFResourceLink(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument, java.lang.String qualifiedName)Constructor for JDFResourceLink- Parameters:
myOwnerDocument- owner documentqualifiedName- qualified name
-
JDFResourceLink
public JDFResourceLink(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument, java.lang.String myNamespaceURI, java.lang.String qualifiedName)Constructor for JDFResourceLink- Parameters:
myOwnerDocument- owner documenmyNamespaceURI- namespace URIqualifiedName- qualified name
-
JDFResourceLink
public JDFResourceLink(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument, java.lang.String myNamespaceURI, java.lang.String qualifiedName, java.lang.String myLocalName)Constructor for JDFResourceLink- Parameters:
myOwnerDocument- owner documenmyNamespaceURI- namespace URIqualifiedName- qualified namemyLocalName- local name
-
-
Method Detail
-
getTheElementInfo
protected ElementInfo getTheElementInfo()
- Overrides:
getTheElementInfoin classJDFAutoResourceLink- Returns:
- the elementinfo
-
isResourceLink
public static boolean isResourceLink(KElement e)
check whether e is a "real" resourceLink and NOT a partamount- Parameters:
e-
-
getInvalidAttributes
public VString getInvalidAttributes(JDFElement.EnumValidationLevel level, boolean bIgnorePrivate, int nMax)
Description copied from class:JDFElementget invalid attributes- Overrides:
getInvalidAttributesin classJDFElement- Parameters:
level- validation levelbIgnorePrivate- if true, do not worry about attributes in other namespacesnMax- maximum size of the returned vector- Returns:
- VString - a vector of invalid attribute names
- See Also:
JDFElement.getInvalidAttributes(org.cip4.jdflib.core.JDFElement.EnumValidationLevel, boolean, int)
-
setUsage
public void setUsage(JDFResourceLink.EnumUsage enumVar)
(5) set attribute Usage- Overrides:
setUsagein classJDFAutoResourceLink- Parameters:
enumVar- the enumVar to set the attribute to
-
getUsage
public JDFResourceLink.EnumUsage getUsage()
(9) get attribute Usage- Overrides:
getUsagein classJDFAutoResourceLink- Returns:
- the value of the attribute
-
generateCombinedProcessIndex
public void generateCombinedProcessIndex()
-
validCombinedProcessIndex
public boolean validCombinedProcessIndex()
- Returns:
-
toString
public java.lang.String toString()
toString
-
unpartition
public void unpartition(boolean bRemovePartMapVector, boolean bRemoveAmountPool)remove all partition stuff- Parameters:
bRemovePartMapVector-bRemoveAmountPool- if true, assume all amounts apply to the main resource and copy from the first partamount
-
setTarget
public boolean setTarget(JDFResource resourceTarget)
setTarget - sets the link to the target defined by partLeaf. Automatically generates a part subelement, if partleaf is not the root resource- Parameters:
resourceTarget- the resource that this ResourceLink shoud refer to- Returns:
- boolean - always true
- Throws:
JDFException- if an attempt is made to link to a resource sub-element
-
getAmount
public double getAmount(JDFAttributeMap mPart)
get double attribute Amount, defaults to the value of Amount for the linked partition- Parameters:
mPart- partition map to retrieve Amount for- Returns:
- the amount, -1 if none is specified
-
getMinAmount
public double getMinAmount(JDFAttributeMap mPart)
get double attribute MinAmount, defaults to getAmount if MinAmount is not set- Parameters:
mPart- partition map to retrieve MinAmount for- Returns:
- the MinAmount value
-
getMaxAmount
public double getMaxAmount(JDFAttributeMap mPart)
get double attribute MaxAmount, defaults to getAmount if MinAmount is not set- Parameters:
mPart- partition map to retrieve MaxAmount for- Returns:
- the MaxAmount value
-
getLinkRoot
public JDFResource getLinkRoot()
getLinkRoot - gets the root resource of the target- Specified by:
getLinkRootin interfaceIAmountPoolContainer- Returns:
- JDFResource
-
getLinkTarget
@Deprecated public JDFResource getLinkTarget()
Deprecated.never usedgetLinkTarget- Returns:
- JDFResource
-
setQuantity
public void setQuantity(int quant)
setQuantity- Parameters:
quant-
-
setAmount
public void setAmount(double value, JDFAttributeMap mPart)setAmount in PartAmount or in this if partAmount=null- Parameters:
value- amount to setmPart- partition map to set amount for
-
setMinAmount
public void setMinAmount(double value, JDFAttributeMap mPart)set MinAmount in PartAmount or in this if partAmount=null- Parameters:
value- amount to setmPart- partition map to set amount for
-
setMaxAmount
public void setMaxAmount(double value, JDFAttributeMap mPart)set MaxAmount in PartAmount or in this if partAmount=null- Parameters:
value- amount to setmPart- partition map to set amount for
-
getStatusJDF
public JDFResource.EnumResStatus getStatusJDF()
get the status of the Resource that is linked by this link- Returns:
- JDFResource.EnumResStatus
-
getStatusFromLeaves
public JDFResource.EnumResStatus getStatusFromLeaves()
get the status of the Resource that is linked by this link- Returns:
- JDFResource.EnumResStatus
-
setStatus
public void setStatus(JDFResource.EnumResStatus s)
set the status of the Resource that is linked by this link- Parameters:
s- value to set
-
isLocal
public boolean isLocal()
check whether the resource is in the same node as the link- Returns:
- true, if the linked resource resides in the same node
-
getPart
public JDFPart getPart(int i)
get first Part element beyond i- Parameters:
i- number of elements to skip- Returns:
- JDFResource
-
getCreatePart
public JDFPart getCreatePart(int i)
get element Part, create if it does not exist- Parameters:
i- number of elements to skip- Returns:
- JDFResource
-
getAuditString
public java.lang.String getAuditString()
get element Audit- Returns:
- String
-
getParts
public VElement getParts()
getParts - get the vector of part elements, note that a resource link with multiple part elements is effectively an OR of these parts- Returns:
- VElement
-
setPart
public void setPart(java.lang.String key, java.lang.String value)setPart - shorthand if only one part is required, should be set to key = value- Parameters:
key- the partition keyvalue- the partition value
-
setPartition
public void setPartition(JDFResource.EnumPartIDKey key, java.lang.String value)
shorthand if only one part is required, should be set to key = value- Parameters:
key- the partition keyvalue- the partition value
-
removePart
public void removePart(int iSkip)
remove element Part- Parameters:
iSkip- number of elements to skip
-
isExecutable
public boolean isExecutable(JDFAttributeMap partMap, boolean bCheckChildren)
isExecutable - checks whether the resource link links to a resource, which is in a state that will allow a node to execute- Parameters:
partMap- the attribute map of partsbCheckChildren- if true, calculates the availability status of a resource from all child partition leaves, else the status is taken from the appropriate leaf itself- Returns:
- boolean - true if the node is executable, false if not
-
getResourceLinkPool
protected JDFResourceLinkPool getResourceLinkPool()
get the parent ResourceLinkPool- Returns:
- JDFResourceLinkPool - the parent ResourceLinkPool
-
getTarget
public JDFResource getTarget()
gets the first resource leaf that this resourcelink refers to
see the description ofgetTargetVectorfor details overrides the deprecated method JDFElement.getTarget()- Overrides:
getTargetin classJDFElement- Returns:
- JDFResource - the first leaf that is referenced by this ResourceLink
- Since:
- 102103 GetTarget returns the lowest common denominator if all children of a resource are referenced
-
getTargetVector
public VElement getTargetVector(int nMax)
Method getTargetVector gets the resource nodes this resourcelink refers to. Skips links that do not exist or where the name mangling is illegal.
Actual behavior varies according to the value of PartUsage of the referenced resource:
if PartUsage="Explicit", all elements that are referenced in PartIDKeys and the ResourceLink must exist and fit
if PartUsage="Implicit", the best fitting intermediate node of the partitioned resource is returned.
Attributes in the Part elements, that are not referenced in PartIDKeys, are assumed to be logical attributes (e.g. RunIndex of a RunList) and ignored when searching the part.- Parameters:
nMax- maximum number of requested resources; -1= all- Returns:
- VElement - the set of leaves that are referenced by this ResourceLink
-
getRawTargetVector
public VElement getRawTargetVector(int nMax)
Method getTargetVector gets the resource nodes this resourcelink refers to including all leaves with identical elements. Skips links that do not exist or where the name mangling is illegal.
Actual behavior varies according to the value of PartUsage of the referenced resource:
if PartUsage="Explicit", all elements that are referenced in PartIDKeys and the ResourceLink must exist and fit
if PartUsage="Implicit", the best fitting intermediate node of the partitioned resource is returned.
Attributes in the Part elements, that are not referenced in PartIDKeys, are assumed to be logical attributes (e.g. RunIndex of a RunList) and ignored when searching the part.- Parameters:
nMax- maximum number of requested resources; -1= all- Returns:
- VElement - the set of leaves that are referenced by this ResourceLink
-
getPool
public JDFPool getPool()
get the parent ResourceLinkPool- Returns:
- the parent ResourceLinkPool
-
hasResourcePartMap
public boolean hasResourcePartMap(JDFAttributeMap partMap, boolean bCheckResource)
checks whether a given partMap is compatible with this link- Parameters:
partMap- the map of parts that this link is compared tobCheckResource- if true, also recurse into the resource and check if the parts exist- Returns:
- boolean - true if this is compatible with partMap
-
overlapsResourcePartMap
public boolean overlapsResourcePartMap(JDFAttributeMap partMap)
- Parameters:
partMap-- Returns:
- boolean
-
isResourceSelected
public boolean isResourceSelected(JDFResource resourceToCheck)
Check whether a resource is selected by a ResourceLink.
A resource is selected if all (partition) leaves are selected by the resource link- Parameters:
resourceToCheck- The resource which may be selected by the ResourceLink. This ResourceLink must always be the full ResourceLink, i.e. Part Elements are not allowed as parameters.- Returns:
- true, if the resource link selects the resource
-
getResourcePartMapVector
public VJDFAttributeMap getResourcePartMapVector()
get part map vector as defined by the linked resource. This returns the vector of leaves that would be returned.- Returns:
- vector of mAttribute, one for each part
-
getLeafVector
public VElement getLeafVector()
- Returns:
- the vector of referenced leaves
-
getLinkedResourceName
public java.lang.String getLinkedResourceName()
Returns the linked resource name- Returns:
- - the name
-
getNamedProcessUsage
public java.lang.String getNamedProcessUsage()
Get the expected name of the linked resource and an optional processusage in name:usage format. If no processusage is available, return GetLinkedResourceName:input / GetLinkedResourceName:output respectively.- Returns:
- String
-
validResourcePosition
public boolean validResourcePosition()
checks whether the resource lives in the same node or an ancestor node of the link- Returns:
- true, if the linked resource resides in a legal node
-
isValid
public boolean isValid(JDFElement.EnumValidationLevel level)
default validator- Overrides:
isValidin classJDFElement- Parameters:
level- validation level- Returns:
- boolean the validity of the node
- See Also:
JDFElement.isValid(org.cip4.jdflib.core.KElement.EnumValidationLevel)
-
isPhysical
public boolean isPhysical()
checks whether this is a link to a physical resource.
Note that this method only works on links to resources that have a valid "Class" attribute.- Returns:
- true, if the link links to a physical resource
-
isImplementation
public boolean isImplementation()
- Returns:
- boolean
-
appendPart
public JDFPart appendPart()
append element Part- Returns:
-
getCreateAmountPool
public JDFAmountPool getCreateAmountPool()
Description copied from class:JDFAutoResourceLink(25) getCreateAmountPool- Specified by:
getCreateAmountPoolin interfaceIAmountPoolContainer- Overrides:
getCreateAmountPoolin classJDFAutoResourceLink- Returns:
- See Also:
IAmountPoolContainer.getCreateAmountPool()
-
appendAmountPool
public JDFAmountPool appendAmountPool()
Description copied from class:JDFAutoResourceLink(29) append element AmountPool- Overrides:
appendAmountPoolin classJDFAutoResourceLink- Returns:
-
getLot
public JDFLot getLot(int n)
get the nTh Lot element- Overrides:
getLotin classJDFAutoResourceLink- Parameters:
n- the index of the element- Returns:
- the nth Lot, null if it does not exist
-
reduceParts
public void reduceParts()
reduce the parts to the canonical representation. If all children of a parent node are in defined in parts, they are replaced by their parent. E.g. the canonical representation of all leaves is the root.
-
expandTarget
public void expandTarget(boolean bForce)
Expand the target resource to contain all parts specified in the link.
If PartUsage==Explicit or bForce==true, loop over all part elements as well.- Parameters:
bForce- if true, implicitly referenced partitions are also expanded
-
expandAmountPool
public void expandAmountPool()
create an Amountpool and fill it with the values of Amount and ActualAmount
-
getMinAmountPoolAttribute
public double getMinAmountPoolAttribute(java.lang.String attrib, java.lang.String nameSpaceURI, JDFAttributeMap mPart, int def)returns the minimum value of attribute occurence in PartAmount,- Parameters:
attrib- the attribute namenameSpaceURI- the XML-namespace URImPart- defines which part of this ResourceLink the amount belongs to. If empty get the ResourceLink root attribute.def- the default value id, if no matching attribute is found- Returns:
- double - the value of attribute found, def if no matches found
- Since:
- 060630
-
getAmountMap
public JDFAmountPool.AmountMap getAmountMap(VString vPartIDKeys)
get an AmountMap for the child Amountpool of this- Parameters:
vPartIDKeys-- Returns:
- the AmountMap for the Amountpool, null if no amountpool exists
-
getAmountPoolAttribute
public java.lang.String getAmountPoolAttribute(java.lang.String attrib, java.lang.String nameSpaceURI, JDFAttributeMap mPart, int iSkip)returns the attribute occurence in PartAmount, or the default in the ResourceLink- Parameters:
attrib- the attribute namenameSpaceURI- the XML-namespacemPart- defines which part of this ResourceLink the Amount belongs to. If empty get the ResourceLink root attribute.iSkip-- Returns:
- value of attribute found, null if not available
- Since:
- 071103
-
getAmountPoolAttribute
public java.lang.String getAmountPoolAttribute(java.lang.String attrib, java.lang.String nameSpaceURI, VJDFAttributeMap vPart)returns the attribute occurence in PartAmount, or the default in the ResourceLink- Parameters:
attrib- the attribute namenameSpaceURI- the XML-namespacevPart- defines which part of this ResourceLink the Amount belongs to. If null get the ResourceLink root attribute.- Returns:
- value of attribute found, null if not available
- Since:
- 071103
-
hasAmountPoolAttribute
@Deprecated public boolean hasAmountPoolAttribute(java.lang.String attrib, java.lang.String nameSpaceURI, JDFAttributeMap mPart)Deprecated.060601 use getAmountPoolAttribute(attrib,nameSpaceURI,mPart,0)!=null;returns true if the attribute occurrs- Parameters:
attrib- the attribute namenameSpaceURI- the XML-namespacemPart- which part of this ResourceLink the Amount belongs to, if empty get the ResourceLink root attribute- Returns:
- true if available
- Since:
- 071103
-
setAmountPoolAttribute
public void setAmountPoolAttribute(java.lang.String attrib, java.lang.String value, java.lang.String nameSpaceURI, VJDFAttributeMap vPart)sets the attribute occurence in the appropriate PartAmount when called for a resourceLink and creates the AmountPool and/or PartAmount(s) if they are not yet there- Parameters:
attrib- the attribute namevalue- value to set in string form.nameSpaceURI- the XML-namespacevPart- defines which part of this ResourceLink the Amount belongs to, if empty set the ResourceLink root attribute.- Throws:
JDFException- when called directly on a PartAmount- Since:
- 060630
-
setAmountPoolAttribute
public void setAmountPoolAttribute(java.lang.String attrib, java.lang.String value, java.lang.String nameSpaceURI, JDFAttributeMap mPart)sets the attribute occurence in the appropriate PartAmount when called for a resourceLink and creates the AmountPool and/or PartAmount if it is not yet there- Parameters:
attrib- the attribute namevalue- value to set in string form.nameSpaceURI- the XML-namespacemPart- defines which part of this ResourceLink the Amount belongs to, if empty set the ResourceLink root attribute- Throws:
JDFException- when called directly on a PartAmount- Since:
- 071103
-
getAmountPoolSumDouble
public double getAmountPoolSumDouble(java.lang.String attName, VJDFAttributeMap vPart)- Parameters:
attName-vPart-- Returns:
-
getAmountPoolDouble
public double getAmountPoolDouble(java.lang.String attName, VJDFAttributeMap vPart)get the exactly matching AmountPool/PartAmount/@AttName as a double- Parameters:
attName-vPart-- Returns:
- double -
- Throws:
JDFException- if the element can not be cast to double
-
getAmountPoolDouble
public double getAmountPoolDouble(java.lang.String attName, JDFAttributeMap mPart)get the sum of all matching AmountPool/PartAmount/@attName as a double PartAmounts match if all attributes match those in PartAmount, i.e. mPart is a submap of the searched PartAmount elements- Parameters:
attName- the Attribute name , e.g Amount, ActualAmountmPart-- Returns:
- double - the element
- Throws:
JDFException- if the element can not be cast to double
-
setActualAmount
public void setActualAmount(double value, JDFAttributeMap mPart)Set attribute ActualAmount in the AmountPool or in the link, depending on the value of mPart- Parameters:
value- the value to set ActualAmount tomPart- the part map of AmountPool/PartAmount
-
getActualAmount
public double getActualAmount(JDFAttributeMap mPart)
- Parameters:
mPart-- Returns:
-
getEnumProcessUsage
public JDFNode.EnumProcessUsage getEnumProcessUsage()
get attribute ProcessUsage- Returns:
- EnumProcessUsage
-
setProcessUsage
public void setProcessUsage(JDFNode.EnumProcessUsage processUsage)
set attribute ProcessUsage- Parameters:
processUsage-
-
getMinStatus
public JDFResource.EnumResStatus getMinStatus()
getMinStatus - get the minimum status of the ResourceLink in a JDF node. If usage is input or not available, check DraftOK as well.- Overrides:
getMinStatusin classJDFAutoResourceLink- Returns:
- the status of the ResourceLink
-
getMinLateStatus
public JDFResource.EnumResStatus getMinLateStatus()
get attribute MinLateStatus- Overrides:
getMinLateStatusin classJDFAutoResourceLink- Returns:
- EnumUsage
-
setPipePartIDKeys
@Deprecated public void setPipePartIDKeys(VString keys)
Deprecated.use setPipePartIDKeys(Vector enum)Sets the value of PipePartIDKeys- Parameters:
keys- vector of values to set
-
getPipePartIDKeysEnum
public java.util.Vector<JDFResource.EnumPartIDKey> getPipePartIDKeysEnum()
Gets an enumerated list of all valid pipe part keys for this resource- Returns:
- Vector of EnumPartIDKey - list of all PipePartIDKeys
-
setCombinedProcessIndex
public void setCombinedProcessIndex(JDFIntegerList value)
sets attribute CombinedProcessIndex- Overrides:
setCombinedProcessIndexin classJDFAutoResourceLink- Parameters:
value- attribute value to set
-
setCombinedProcessIndex
public void setCombinedProcessIndex(int value)
sets attribute CombinedProcessIndex- Parameters:
value- attribute value to set
-
getCombinedProcessTypes
public VString getCombinedProcessTypes()
gets list of all types referenced by CombinedProccessIndex or CombinedProcessType- Returns:
- VString - the list of types. Each type occurs at most once
-
setDraftOK
public void setDraftOK(boolean value)
sets attribute DraftOK if version>=1.3, set MinStatus=Draft instead of DraftOK=true- Overrides:
setDraftOKin classJDFAutoResourceLink- Parameters:
value- attribute value to set
-
getDraftOK
public boolean getDraftOK()
gets attribute DraftOK- Overrides:
getDraftOKin classJDFAutoResourceLink- Returns:
- boolean - attribute value. Default is false
-
getPipeProtocol
public java.lang.String getPipeProtocol()
gets string attribute PipeProtocol- Overrides:
getPipeProtocolin classJDFAutoResourceLink- Returns:
- String - attribute value.
-
getPipeURL
public java.lang.String getPipeURL()
gets string attribute PipeURL- Overrides:
getPipeURLin classJDFAutoResourceLink- Returns:
- String - attribute value.
-
getPartMapVector
public VJDFAttributeMap getPartMapVector()
get part map vector- Specified by:
getPartMapVectorin interfaceIAmountPoolContainer- Overrides:
getPartMapVectorin classJDFElement- Returns:
- VJDFAttributeMap - vector of attribute maps, one for each part
-
getPartMapArray
public JDFAttributeMapArray getPartMapArray()
get part map array- Overrides:
getPartMapArrayin classJDFElement- Returns:
- array of attribute, one for each part
-
setPartMapVector
public void setPartMapVector(VJDFAttributeMap vParts)
set all parts to those define in vParts- Overrides:
setPartMapVectorin classJDFElement- Parameters:
vParts- vector of attribute maps for the parts
-
setPartMap
public void setPartMap(JDFAttributeMap mPart)
set all parts to those defined in vParts- Overrides:
setPartMapin classJDFElement- Parameters:
mPart- attribute map for the part to set
-
removePartMap
public void removePartMap(JDFAttributeMap mPart)
remove the part defined in mPart- Overrides:
removePartMapin classJDFElement- Parameters:
mPart- attribute map for the part to remove
-
hasPartMap
public boolean hasPartMap(JDFAttributeMap mPart)
check whether the part defined in mPart is included- Overrides:
hasPartMapin classJDFElement- Parameters:
mPart- attribute map for the part to remove- Returns:
- boolean - returns true if the part exists
-
matchesString
public boolean matchesString(java.lang.String namedResLink)
return true if this is moderately well described by namedReslink- Parameters:
namedResLink-- Returns:
-
getTargetList
public java.util.List<JDFResource> getTargetList()
-
-