org.cip4.jdflib.core
Class JDFElement

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
All Implemented Interfaces:
Serializable, Cloneable, Element, EventTarget, Node, NodeList, TypeInfo
Direct Known Subclasses:
JDFAbstractState, JDFAudit, JDFAutoAction, JDFAutoActionPool, JDFAutoAdded, JDFAutoAdhesiveBinding, JDFAutoAdvancedParams, JDFAutoAncestor, JDFAutoApprovalDetails, JDFAutoApprovalPerson, JDFAutoArgumentValue, JDFAutoArtDelivery, JDFAutoAssemblySection, JDFAutoAuthenticationCmdParams, JDFAutoAuthenticationQuParams, JDFAutoAuthenticationResp, JDFAutoBand, JDFAutoBarcode, JDFAutoBarcodeDetails, JDFAutoBarcodeProductionParams, JDFAutoBasicPreflightTest, JDFAutoBindingQualityMeasurement, JDFAutoBindingQualityParams, JDFAutoBindItem, JDFAutoBindList, JDFAutoBookCase, JDFAutoBoxApplication, JDFAutoBoxArgument, JDFAutoBoxFoldAction, JDFAutoBoxToBoxDifference, JDFAutoBundleItem, JDFAutoBusinessInfo, JDFAutocall, JDFAutoCCITTFaxParams, JDFAutoChangedAttribute, JDFAutoChangedPath, JDFAutoChannelBinding, JDFAutochoice, JDFAutoCoilBinding, JDFAutoCollatingItem, JDFAutoColorantZoneDetails, JDFAutoColorCorrectionOp, JDFAutoColorSpaceConversionOp, JDFAutoColorSpaceSubstitute, JDFAutoColorsUsed, JDFAutoComment, JDFAutoContainer, JDFAutoContentData, JDFAutoContentMetaData, JDFAutoContentObject, JDFAutoControllerFilter, JDFAutoConvertingConfig, JDFAutoCostCenter, JDFAutoCounterReset, JDFAutoCrease, JDFAutoCreateLink, JDFAutoCreateResource, JDFAutoCreditCard, JDFAutoCustomerMessage, JDFAutoCut, JDFAutoCylinderPosition, JDFAutoDCTParams, JDFAutoDependencies, JDFAutoDevCap, JDFAutoDevCapPool, JDFAutoDevCaps, JDFAutoDeviceCap, JDFAutoDeviceFilter, JDFAutoDeviceInfo, JDFAutoDeviceList, JDFAutoDeviceNColor, JDFAutoDisjointing, JDFAutoDisplayGroup, JDFAutoDisplayGroupPool, JDFAutoDisposition, JDFAutoDrop, JDFAutoDropIntent, JDFAutoDropItem, JDFAutoDropItemIntent, JDFAutoDynamicField, JDFAutoDynamicInput, JDFAutoEdgeGluing, JDFAutoEmboss, JDFAutoEmbossingItem, JDFAutoEmployeeDef, JDFAutoEndSheet, JDFAutoError, JDFAutoErrorData, JDFAutoEvent, JDFAutoExpr, JDFAutoExtraValues, JDFAutoFCNKey, JDFAutoFeatureAttribute, JDFAutoFeaturePool, JDFAutoFeeder, JDFAutoFeederQualityParams, JDFAutoFileAlias, JDFAutoFlateParams, JDFAutoFlushedResources, JDFAutoFlushQueueInfo, JDFAutoFlushQueueParams, JDFAutoFlushResourceParams, JDFAutoFolderProduction, JDFAutoGangCmdFilter, JDFAutoGangInfo, JDFAutoGangQuFilter, JDFAutoGeneralID, JDFAutoGlue, JDFAutoHardCoverBinding, JDFAutoIcon, JDFAutoIconList, JDFAutoIdentical, JDFAutoIDInfo, JDFAutoIDPCover, JDFAutoIDPFinishing, JDFAutoIDPFolding, JDFAutoIDPHoleMaking, JDFAutoIDPImageShift, JDFAutoIDPJobSheet, JDFAutoIDPLayout, JDFAutoIDPStitching, JDFAutoIDPTrimming, JDFAutoImageCompression, JDFAutoImageShift, JDFAutoInsert, JDFAutoInsertList, JDFAutoJBIG2Params, JDFAutoJDFController, JDFAutoJDFService, JDFAutoJobPhase, JDFAutoJPEG2000Params, JDFAutoKnownMsgQuParams, JDFAutoLayerDetails, JDFAutoLayerList, JDFAutoLayoutElementPart, JDFAutoLoc, JDFAutoLocation, JDFAutoLogicalStackParams, JDFAutoLongFold, JDFAutoLongGlue, JDFAutoLongPerforate, JDFAutoLongSlit, JDFAutoLot, JDFAutoLZWParams, JDFAutomacro, JDFAutoMacroPool, JDFAutoMarkActivation, JDFAutoMarkObject, JDFAutoMediaLayers, JDFAutoMessage, JDFAutoMessageService, JDFAutoMetadataMap, JDFAutoMilestone, JDFAutoMISDetails, JDFAutoModifyNodeCmdParams, JDFAutoModule, JDFAutoModuleCap, JDFAutoModulePhase, JDFAutoModulePool, JDFAutoModuleStatus, JDFAutoMoveResource, JDFAutoMsgFilter, JDFAutoNewComment, JDFAutoNewJDFCmdParams, JDFAutoNewJDFQuParams, JDFAutoNodeInfoCmdParams, JDFAutoNodeInfoQuParams, JDFAutoNodeInfoResp, JDFAutoNotificationDef, JDFAutoNotificationFilter, JDFAutoNumberingParam, JDFAutoNumberItem, JDFAutoObjectModel, JDFAutoObservationTarget, JDFAutoOccupation, JDFAutoOCGControl, JDFAutootherwise, JDFAutoPageAssignedList, JDFAutoPageCell, JDFAutoPageCondition, JDFAutoPageData, JDFAutoPageElement, JDFAutoPart, JDFAutoPartStatus, JDFAutoPayment, JDFAutoPDFInterpretingParams, JDFAutoPDFXParams, JDFAutoPerforate, JDFAutoPerformance, JDFAutoPipeParams, JDFAutoPixelColorant, JDFAutoPlasticCombBinding, JDFAutoPosition, JDFAutoPositionObj, JDFAutoPreflightAction, JDFAutoPreflightArgument, JDFAutoPreflightConstraint, JDFAutoPreflightDetail, JDFAutoPreflightInstance, JDFAutoPreflightInstanceDetail, JDFAutoPRError, JDFAutoPRGroup, JDFAutoPRGroupOccurrence, JDFAutoPricing, JDFAutoPrintConditionColor, JDFAutoPRItem, JDFAutoPROccurrence, JDFAutoProductionSubPath, JDFAutoProofItem, JDFAutoPRRule, JDFAutoPRRuleAttr, JDFAutoQualityMeasurement, JDFAutoQueue, JDFAutoQueueEntry, JDFAutoQueueEntryDef, JDFAutoQueueEntryDefList, JDFAutoQueueEntryPosParams, JDFAutoQueueEntryPriParams, JDFAutoQueueFilter, JDFAutoQueueSubmissionParams, JDFAutoReferenceXObjParams, JDFAutoRemoved, JDFAutoRemoveLink, JDFAutoRepeatDesc, JDFAutoRequestQueueEntryParams, JDFAutoResourceCmdParams, JDFAutoResourceInfo, JDFAutoResourceParam, JDFAutoResourcePullParams, JDFAutoResourceQuParams, JDFAutoResubmissionParams, JDFAutoReturnQueueEntryParams, JDFAutoRingBinding, JDFAutoRuleLength, JDFAutoSaddleStitching, JDFAutoScore, JDFAutoScreenSelector, JDFAutoSeparationList, JDFAutoSeparationSpec, JDFAutoset, JDFAutoShapeCut, JDFAutoShapeTemplate, JDFAutoShiftPoint, JDFAutoShutDownCmdParams, JDFAutoSideSewing, JDFAutoSideStitching, JDFAutoSignatureCell, JDFAutoSoftCoverBinding, JDFAutoStack, JDFAutoStation, JDFAutoStatusQuParams, JDFAutoStopPersChParams, JDFAutoStringListValue, JDFAutoStripBinding, JDFAutoStripCellParams, JDFAutoStripMark, JDFAutoSubmissionMethods, JDFAutoSubscription, JDFAutoSubscriptionFilter, JDFAutoSubscriptionInfo, JDFAutoSystemTimeSet, JDFAutoTabDimensions, JDFAutoTabs, JDFAutoTape, JDFAutoTest, JDFAutoTestPool, JDFAutoThinPDFParams, JDFAutoThreadSealing, JDFAutoThreadSewing, JDFAutoTIFFEmbeddedFile, JDFAutoTIFFFormatParams, JDFAutoTIFFtag, JDFAutoTrackFilter, JDFAutoTrackResult, JDFAutoTransferCurveSet, JDFAutoTrappingOrder, JDFAutoUpdateJDFCmdParams, JDFAutoValue, JDFAutoValueLoc, JDFAutoWakeUpCmdParams, JDFAutowhen, JDFAutoWireCombBinding, JDFCertificate, JDFNode, JDFPool, JDFRefElement, JDFResource, JDFResourceLink, JDFSourceResource, JDFSpanBase, JDFTerm, JDFValue

public class JDFElement
extends KElement

Author:
Dietrich Mucha JDFElement contains generic JDF element functionality in general only elements in the JDF namespace will inherit from JDFElement
See Also:
Serialized Form

Nested Class Summary
static class JDFElement.EnumBoolean
          Boolean Enumeration from JDF Spec Orientation of a physical resource.
static class JDFElement.EnumNamedColor
          Colors of preprocessed products such as Wire-O binders and cover leaflets.
static class JDFElement.EnumNodeStatus
          Enumeration of valid nodestatus types Identifies the status of the node.
static class JDFElement.EnumOrientation
          Orientation Enumeration
Orientation of a physical resource.
static class JDFElement.EnumPoolType
          Enumeration of various pool types
static class JDFElement.EnumSeparation
          Separation Enumeration identifies the separation name.
static class JDFElement.EnumSettingsPolicy
          The policy for this element indicates what happens when unsupported settings, (i.e., subelements, attributes or attribute values), are present in the element.
static class JDFElement.EnumValidationLevel
          Enumeration for validation level
level ValidationLevel_NoWarnIncomplete: Ignore warnings and don't require all required parameters
level ValidationLevel_NoWarnComplete: Ignore warnings and require all required parameters
level ValidationLevel_Incomplete: incomplete elements are valid
level ValidationLevel_Complete: full validation of an individual resource
level ValidationLevel_RecursiveIncomplete: incomplete validation of an individual resource and all of its child elements - e.g. for pools
level ValidationLevel_RecursiveComplete: full validation of an individual resource and all of its child elements - e.g. for pools
static class JDFElement.EnumVersion
          Enumeration strings for Version NOTE: If not specified the version defaults to Version 1.3
static class JDFElement.EnumXYRelation
          XYRelation Enumeration
XML attributes of type XYRelation define the relationship between two ordered numbers.
 
Nested classes/interfaces inherited from class org.cip4.jdflib.core.KElement
KElement.SimpleNodeComparator, KElement.SingleAttributeComparator, KElement.SingleXPathComparator
 
Field Summary
 
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
JDFElement(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument, String qualifiedName)
          Constructor for JDFElement
JDFElement(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument, String myNamespaceURI, String qualifiedName)
          Constructor for JDFElement
JDFElement(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument, String myNamespaceURI, String qualifiedName, String myLocalName)
          Constructor for JDFElement
 
Method Summary
 String appendAnchor(String strName)
          create and append a unique id, keep the existing one if it already exists
 void appendBestEffortExceptions(String value)
          Append a token to attribute BestEffortExceptions
 JDFComment appendComment()
          Appends element Comment to the end of 'this'
 KElement appendElement(String elementName, String nameSpaceURI)
           
 JDFGeneralID appendGeneralID()
          append an empty GeneralID
 JDFGeneralID appendGeneralID(String idUsage, String idValue)
          append a GeneralID with idValue, duplicate entries are retained generalID elements are always placed first and new GeneralID elements are appended at the end of the list
 JDFElement appendHRef(JDFResource target, String refAttribute, String preSet)
          append a reference to a target node automatically generate a unique ID attribute for target, if it does not exist
 JDFElement appendHRef(String idRef, String refAttribute, String nameSpaceURI)
          append a reference with a specific id
 void appendMustHonorExceptions(String value)
          Append a token to attribute MustHonorExceptions
 void appendOperatorInterventionExceptions(String value)
          Append a token to attribute OperatorInterventionExceptions
 JDFPreview appendPreview()
          Appends element JDFPreview to the end of 'this'
 void appendrRefs(String value)
          Deprecated. rRefs was deprecated in JDF 1.2
 AttributeInfo.EnumAttributeType attributeType(String attributeName)
          Returns the type of the given attribute for the latest JDF version.
protected  void clearTargets()
           
 KElement cloneNewDoc()
          same as @see clone but the clone is in a new document
 KElement copyInto(KElement src, boolean bRemove)
          copies a node into this, ignoring identical node names i.e. duplicating elements
 VString deprecatedAttributes()
          list of all deprecated attributes.
 void eraseDefaultAttributes(boolean bRecurse)
          remove all default attributes from this i.e. all attributes whose value matches the schema default
 boolean exclusiveOneOfAttribute(JDFElement.EnumValidationLevel level, String att1, String att2, String att3, String att4)
          return true if no more than one of att1 or att2 exists or exactly one of att1 or att2 exists depending on level
 boolean exclusiveOneOfElement(JDFElement.EnumValidationLevel level, String elm1, String ns1, String elm2, String ns2)
          return true if no more than one of att1 or att2 exists or exactly one of att1 or att2 exists depending on level
 boolean fixVersion(JDFElement.EnumVersion version)
          Mother of all version fixing routines uses heuristics to modify this element and its children to be compatible with a given version in general, it will be able to move from low to high versions but potentially fail when attempting to move from higher to lower versions
 HashSet<JDFElement> getAllRefs(HashSet<JDFElement> vDoneRefs, boolean bRecurse)
          Gets inter-resource linked resource IDs
 AttributeInfo.EnumAttributeType getAtrType(String attributeName)
          returns the data type of a given attribute
 AttributeInfo getAttributeInfo()
          public version of getTheAttributeInfo
 String getBestEffortExceptions()
          Gets the value of attribute BestEffortExceptions
 JDFElement getChildElement(int n)
          Deprecated. use getElement(null, null ,n)
 KElement[] getChildElements()
          Deprecated. use KElement.getChildElementArray()
not typesafe in case of elements in foreign namespaces note that this method previously returned JDFElement[]
 VElement getChildElementVector_JDFElement(String nodeName, String nameSpaceURI, JDFAttributeMap mAttrib, boolean bAnd, int maxSize, boolean bResolveTarget)
           
 VElement getChildElementVector(String nodeName, String nameSpaceURI, JDFAttributeMap mAttrib, boolean bAnd, int maxSize, boolean bResolveTarget)
          Get all children from the actual element matching the given conditions
does NOT get refElement targets although the attributes are checked in the target elements in case of refElements
 VString getChildIds(String attrib, String element, String nameSpaceURI)
          GetChildIds - get a set of all known id's in child nodes
 VElement getChildrenByTagName(String elementName, String nameSpaceURI, JDFAttributeMap mAttrib, boolean bDirect, boolean bAnd, int maxSize)
          Gets children of 'this' by tag name, nameSpaceURI and attribute map, if the attribute map is not empty.
 VElement getChildrenByTagName(String elementName, String nameSpaceURI, JDFAttributeMap mAttrib, boolean bDirect, boolean bAnd, int maxSize, boolean bFollowRefs)
          Gets children of 'this' by tag name, nameSpaceURI and attribute map, if the attribute map is not empty.
 KElement getChildWithAttribute(String nodeName, String attName, String nameSpaceURI, String attVal, int index, boolean bDirect)
          GetChildWithAttribute - Get a child with matching attributes default: getChildWithAttribute(nodeName, attName, null,attValue, 0, true)
 JDFElement getChildWithMatchingAttribute(String nodeName, String attName, String nameSpaceURI, String attVal, int index, boolean bDirect, AttributeInfo.EnumAttributeType dataType)
          Gets a child with matching attributes, also follows refelements
 JDFComment getComment(int iSkip)
          Gets the iSkip-th element Comment
 JDFComment getComment(String _name, int index)
          Gets the Comment with a give @Name
 String getCommentURL()
          Get string attribute CommentURL
 JDFComment getCreateComment(int iSkip)
          Gets the iSkip-th element Comment.
 JDFPreview getCreatePreview(int iSkip)
          Gets the iSkip-th element JDFPreview.
 JDFRefElement getCreateRefElement(JDFResource target)
          gets an inter resource link to a target resource., creates it if it does not exist
protected static KElement getDeepElementByID(KElement base, String attName, String id, KElement childToExclude, XMLDocUserData ud)
          this is an optimized version of GetDeepElement() which returns a complete list of elements.
 JDFAttributeMap getDefaultAttributeMap()
          map of all defaults from the schema
static JDFElement.EnumVersion getDefaultJDFVersion()
          returns the JDFElement::EnumVersion, where new elements will be generated in by default
 VString getDeprecatedAttributes(int nMax)
          This function first, gets all deprecated attributes
 VString getDeprecatedElements(int nMax)
          Vector of deprecated elements below the current element.
 String getDescriptiveName()
          Get string attribute DescriptiveName
 KElement getElement_JDFElement(String nodeName, String nameSpaceURI, int iSkip)
          same as KElement.GetElement, but follows references as well.
 KElement getElement(String nodeName, String nameSpaceURI, int iSkip)
          Gets an existing iSkip-th child node with matching nodeName and nameSpaceURI
 String getElementIDPrefix()
          get Element ID prefix
 VString getElementNameVector()
          Returns a vector which contains the childs of the actual element.
 int getEnumAttribute(String key, Vector v, String nameSpaceURI, int def, boolean bInherit)
          Deprecated. use EnumXYZ.getEnum(getAttribute(key, namespaceURI, def)
 Vector<? extends org.apache.commons.lang.enums.ValuedEnum> getEnumerationsAttribute(String key, String nameSpaceURI, org.apache.commons.lang.enums.ValuedEnum enu, boolean bInherit)
          defines an enumerated list of attributes; used by the automated code generator
 Vector getEnumerationsAttribute(String key, Vector v, String nameSpaceURI, int def, boolean bInherit)
          Deprecated. use getEnumerationsAttribute(key, nameSpaceURI, EnumXYZ.getEnum(0), bInherit)
 org.apache.commons.lang.enums.ValuedEnum getEnumforAttribute(String key)
          Get the ValuedEnum for an enumerated attribute
 int getEnumNodeName(Vector allowedValues)
          Deprecated.  
 String getEnumString(int value, String allowedValues)
          Deprecated. use EnumXYZ.getEnum(int)
 JDFElement.EnumVersion getFirstVersion(String eaName, boolean bElement)
          get the first JDF version where attribute name or element name is valid
 JDFGeneralID getGeneralID(int i)
          gets attribute GeneralID
 String getGeneralID(String idUsage)
          Deprecated. use getGeneralID(idUsage, 0)
 String getGeneralID(String idUsage, int iPos)
          Gets IDValue of the GeneralID with IDUsage=idUsage null, if none exists
 JDFAttributeMap getGeneralIDMap()
          Gets a map of all GeneralID key-value Pairs if multiple generalIDs with the same IDUsage are specified, the last one is added to the map
 VectorMap<String,JDFGeneralID> getGeneralIDVectorMap()
          Gets a map of all GeneralID key-value Pair lists if multiple generalIDs with the same IDUsage are specified, each GeneralID is added to the VectorMap
 String getHRef()
          Deprecated. use getrRef of the coresponding sub classes instead
 VString getHRefs(VString vDoneRefs, boolean bRecurse)
          Deprecated. use getHRefs(VString vDoneRefs, boolean bRecurse, boolean bExpand)
 VString getHRefs(VString vDoneRefs, boolean bRecurse, boolean bExpand)
          GetHRefs - get inter-resource linked resource IDs
 VString getInsertElements()
          Get a vector of direct child element names that exist but are unknown in this element.
 VString getInsertElementVector(VString vKnownKeys, VString vUnique)
          get a vString vector of direct child element names that may be inserted in this element.
 VString getInvalidAttributes(JDFElement.EnumValidationLevel level, boolean bIgnorePrivate, int nMax)
          get invalid attributes
 VString getInvalidElements_JDFElement(JDFElement.EnumValidationLevel level, boolean bIgnorePrivate, int nMax)
          Method GetInvalidElements_JDFElement.
 VString getInvalidElements(JDFElement.EnumValidationLevel level, boolean bIgnorePrivate, int nMax)
          get invalid elements
 JDFNode getJDFRoot()
          Get the JDF root
 JDFJMF getJMFRoot()
          Get the JMF root
 JDFElement.EnumVersion getLastVersion(String eaName, boolean bElement)
          get the last JDF version where attribute name or element name is valid
 JDFResource getLinkRoot(String id)
          Gets the root resource of the target returns a null JDFElement if it does not exist or the name mangling is illegal
 JDFElement.EnumVersion getMaxVersion(boolean bInherit)
          get attribute MaxVersion, defaults to version if not set
 VString getMissingAttributes(int nMax)
          This function first, gets all required attributes and then compare them with the attributes present and returns a Vector with the missing attributes
 VString getMissingAttributeVector(VString vReqKeys, int nMax)
          checks if the curent element has other attributes then also present in vReqKeys.
 VString getMissingElements(int nMax)
          get the missing elements as a vector default: getMissingElements(99999999)
 VString getMissingElementVector(VString vRequiredKeys, int nMax)
          Returns a vector with missing elements default: getMissingElementVector(vRequiredKeys, 9999999)
 String getMustHonorExceptions()
          gets the value of attribute MustHonorExceptions
 VString getNamesVector(String key)
          Get the vector of valid attribute values for an enumerated attribute
 String getOperatorInterventionExceptions()
          gets the value of attribute OperatorInterventionExceptions
 JDFDoc getOwnerDocument_JDFElement()
          Get the document object that owns this
 JDFNode getParentJDF()
          get the local JDF node that this element resides in
if this is a JDF node, return it's parent
if this is the root JDF node, return a null reference
static JDFNode getParentJDF(KElement e)
          static version of GetParentJDF - get the local JDF node that this element resides in.
protected  JDFAttributeMap getPartMap()
          gets the part map
protected  VJDFAttributeMap getPartMapVector()
          GetPartMapVector returns a vector of partmaps, null if no parts are present
 VString getPrereleaseAttributes(int nMax)
          This function first, gets all prerelease attributes It ignores any atrributes that have been added by a schema parser
 VString getPrereleaseElements(int nMax)
          Comma separated list of all prerelease elements.
 JDFPreview getPreview(int iSkip)
          Gets the iSkip-th element Comment
 JDFRefElement getRefElement(JDFResource target)
          gets an inter resource link to a target resource. if target is a partition, the refElement MUST point exactly to that partition
 VElement getRefElements()
          gets the vector of all RefElements
protected  String getRefString()
          Get the string of a refelement that points to this, i.e.NodeName+"Ref"
 VString getrRefs()
          Deprecated. rRefs was deprecated in JDF 1.2
static String getSchemaURL()
          returns the official JDF schema URI for a particular version fool proof schema url as of November 5th, 2003
static String getSchemaURL(int majorVersion, int minorVersion)
           
 JDFElement.EnumSettingsPolicy getSettingsPolicy(boolean bInherit)
          Typesafe enumerated attribute SettingsPolicy
 JDFElement.EnumNodeStatus getStatus()
          gets the value of attribute Status
 KElement getTarget_JDFElement(String id, String attrib)
          Gets the target of link.
 JDFResource getTarget()
          Deprecated. use the respective subclasses getTarget functions
 KElement getTarget(String id, String attrib)
          looking for a specified target with an id, e.g. resource.
protected  AttributeInfo getTheAttributeInfo_JDFElement()
           
protected  AttributeInfo getTheAttributeInfo()
           
protected  ElementInfo getTheElementInfo_JDFElement()
           
protected  ElementInfo getTheElementInfo()
           
 org.apache.commons.lang.enums.ValuedEnum getTypeForAttribute(String key)
          Get the EnumAttributeType for an attribute
 VString getUnknownAttributes(boolean bIgnorePrivate, int nMax)
          Get the unknown attributes default: getUnknownAttributes(bIgnorePrivate, 9999999)
 VString getUnknownAttributeVector(VString vKnownKeys, VString vInNameSpace, int nMax)
          Gets the unknown attributes default: getUnknownAttributeVector(vKnownKeys, new Vector(), 99999999)
 VString getUnknownElements(boolean bIgnorePrivate, int nMax)
          Get a vector with the unknown elements default: getUnknownElements(bIgnorePrivate, 99999999)
 VString getUnknownElementVector(VString vKnownKeys, VString vInNameSpace, int nMax)
          Get a vector with the unknown elements default: getUnknownElementVector(vKnownKeys, vInNameSpace, 9999999)
protected  VString getUnknownPoolElements(JDFElement.EnumPoolType poolType, int nMax)
          get unknown elements for a specific pool
protected  JDFDoc getURLDoc(String url)
          returns the jdf doc referenced by url
protected  InputStream getURLInputStream(String url)
          get the input stream that reads from URL
static String getValueForNewAttribute(KElement ke, String attName)
          gets a reasonable value for an attribute
 JDFElement.EnumVersion getVersion()
          Deprecated. 060505 use getVersion(boolean);
 JDFElement.EnumVersion getVersion(boolean bInherit)
          get the version of this element
 VElement getvHRefRes(boolean bRecurse)
          Deprecated. use getvHRefRes(true,false);
 VElement getvHRefRes(boolean bRecurse, boolean bExpand)
          get inter-resource linked resource vector
protected  XMLDocUserData getXMLDocUserData()
          get/create the associated XMLDocUserData
 boolean hasMissingAttributes()
          Checks, if this has any missing attributes
 boolean hasMissingElements()
          Tests, whether 'this' has any missing direct child elements
protected  boolean hasPartMap(JDFAttributeMap mPart)
          checks whether the part defined in mPart is included in this
 boolean hasSettingsPolicy(boolean bInherit)
          Deprecated. use hasAttribute
 boolean hasUnknownAttributes(boolean bIgnorePrivate)
          Checks, if this has are any unknown attributes
 boolean hasUnknownElements(boolean bIgnorePrivate)
          Tests, whether 'this' has any unknown direct child elements
 String idString(int id)
          Deprecated. 060307 internal legacy method
 boolean includesMatchingAttribute(String attName, String attVal, AttributeInfo.EnumAttributeType dataType)
          test whether the attributes described by attName and attVal exist
 void inlineRefElements(String nodeName, String nameSpaceURI, boolean bDirect)
          inline refelements that match nodename and nameSpaceURI
 KElement insertBefore(String elementName, Node beforeChild, String nameSpaceURI)
          Inserts the Element elementName before the existing Element node beforeChild.
 boolean isComment()
          Deprecated. use instanceof JDFResourceLink instead
static boolean isCommentStatic(KElement kElem)
          Deprecated. use instanceof JDFComment instead
 boolean isDirty()
          Get the dirty status of this element
 boolean isInJDFNameSpace()
          Deprecated. - use isInJDFNameSpaceStatic(kElem)
static boolean isInJDFNameSpaceStatic(KElement kElem)
          checks whether kElem is in the JDF namespace
static boolean isInJDFNameSpaceStatic(String ns)
          checks whether kElem is in the JDF namespace
 boolean isJDFNode()
          Deprecated. use instanceof JDFNode instead
 boolean isRefElement()
          Deprecated. use instanceof JDFRefElement
static boolean isRefElementStatic(KElement kElem)
          Deprecated. use instanceof JDFRefElement
 boolean isResource()
          Deprecated. use instanceof JDFResource instead
 boolean isResourceLink()
          Deprecated. use instanceof JDFResourceLink instead
static boolean isResourceLinkStatic(KElement kElem)
          Deprecated. use instanceof JDFResourceLink instead
static boolean isResourceStatic(KElement e)
          Deprecated. use instanceof JDFResource instead
 boolean isResourceUpdate()
          is this thing a ResourceUpdate?
 boolean isValid_JDFElement(JDFElement.EnumValidationLevel level)
          Mother of all validators; this method is for direct access to the JDFElement valid method and short-circuit all overriding virtual methods
 boolean isValid(JDFElement.EnumValidationLevel level)
          Mother of all validators
 String jdfVersion()
          get the LDFLib version
 VString knownAttributes()
          KElement is generic, therefore the list is empty
 VString knownElements()
          Comma separated list of all known element names;
 boolean matchesPath(String path, boolean bFollowRefs)
          check whether this matches a simple xpath - note that references are NOT followed in case a node name is replaced with a "*"
 String newID(String lastID)
          gets a new ID for the element
 int numChildElements_JDFElement(String nodeName, String nameSpaceURI)
           
 int numChildElements(String nodeName, String nameSpaceURI)
          same as KElement.numChildElements(String, String), but also follows references.
 VString optionalAttributes()
          Comma separated list of all optional attributes.
 VString optionalElements()
          Comma separated list of all optional element names; KElement is generic, therefore the list is empty
 VString prereleaseAttributes()
          Comma separated list of all deprecated attributes.
 String prereleaseElements()
          comma separated list of all prerelease Elements that may occur in a future version
 JDFRefElement refElement(JDFResource target)
          Creates an inter resource link to a target resource.
 void removeBestEffortExceptions()
          Deprecated. use removeAttribute
 Node removeChild(Node arg0)
           
 KElement removeChild(String node, String nameSpaceURI, int n)
          remove child node
 void removeChildren(String nodeName, String nameSpaceURI, JDFAttributeMap mAttrib)
          Remove children that match nodeName and nameSpaceURI
 void removeExtensions()
          remove all private extensions form a jdf element and its children
 void removeFromBestEffortExceptions(String value)
          Remove a token from attribute BestEffortExceptions
 void removeFromMustHonorExceptions(String value)
          Remove a token from attribute MustHonorExceptions
 void removeFromOperatorInterventionExceptions(String value)
          Remove a token from attribute OperatorInterventionExceptions
 int removeFromrRefs(String value)
          Deprecated. rRefs was deprecated in JDF 1.2
 void removeGeneralID(String idUsage)
          removes GeneralID with the IDUsage idUsage
protected  void removePartMap(JDFAttributeMap mPart)
          removes the part defined in mPart
 void removeRefElement(JDFResource target)
          Removes an inter resource link from this Element.
 void removeSettingsPolicy()
          Deprecated. use removeAttribute
 Node replaceChild(Node arg0, Node arg1)
           
 VString requiredAttributes()
          Comma separated list of all required attributes.
 VString requiredElements()
           
static boolean requiredLevel(JDFElement.EnumValidationLevel level)
          Deprecated. use EnumValidationLevel.isRequired()
 void setAttribute(String key, JDFDuration value, String nameSpaceURI)
          Sets an element attribute
 void setAttribute(String key, JDFNumList value, String nameSpaceURI)
          Sets an element attribute
 void setAttribute(String key, JDFNumList value, String nameSpaceURI, int precision)
          Sets an element attribute
 void setAttribute(String key, JDFRangeList value, String nameSpaceURI)
          Sets an element attribute
 void setAttribute(String key, JDFRangeList value, String nameSpaceURI, int precision)
          Sets an element attribute
 void setAttribute(String key, JDFRange value, String nameSpaceURI)
          Sets an element attribute
 void setAttribute(String key, JDFRange value, String nameSpaceURI, int precision)
          Sets an element attribute
 void setAttributeNameTimeStamp(String attributeName, JDFDate timestamp)
          put a timestamp in an attribute of the current node
 int setAttributes(KElement kElem, VString ignoreList)
          Sets the attributes from the curent element to the attributes from kElem.
 void setBestEffortExceptions(VString value)
          Sets attribute BestEffortExceptions with the vector of values
 void setCommentURL(String value)
          Set attribute CommentURL
static void setDefaultJDFVersion(JDFElement.EnumVersion vers)
          sets the JDFElement::EnumVersion, where new elements will be generated in by default
Attention this is static and global.
 void setDescriptiveName(String value)
          Set attribute DescriptiveName
 void setDirty(boolean bAttribute)
          Set this element as dirty
protected  void setEnumerationsAttribute(String key, Vector<? extends org.apache.commons.lang.enums.ValuedEnum> value, String nameSpaceURI)
          set an enumerated list of attributes; used by the automated code generator
 JDFGeneralID setGeneralID(String idUsage, String idValue)
          Creates or Updates a GeneralID with the IDUsage idUsage and IDValue=idValue all entries with a duplicate idUsage are removed
static void setLongID(boolean bLong)
          set the ID generation algorithm to include a date
 void setMustHonorExceptions(VString value)
          Sets attribute MustHonorExceptions with the vector of values
 void setOperatorInterventionExceptions(VString value)
          Sets attribute OperatorInterventionExceptions with the vector of values
protected  void setPartMap(JDFAttributeMap mPart)
          sets part to mPart
protected  void setPartMapVector(VJDFAttributeMap vPart)
          sets all parts to those defined in vParts
 void setSettingsPolicy(JDFElement.EnumSettingsPolicy value)
          Set attribute SettingsPolicy
 void setStatus(JDFElement.EnumNodeStatus s)
          Sets attribute Status
 void setVersion(JDFElement.EnumVersion enumVer)
          set Version to enumVer
 void setvStringAttribute(String key, JDFNameRange value, String nameSpaceURI)
          Deprecated.  
static JDFElement.EnumVersion stringToVersion(String enumName)
          Deprecated. use EnumVersion.getEnum
 String toString()
          toString
 VString uniqueElements()
          comma separated list of all unique Elements that may occur at most once; KElement is generic, therefore the list is empty
 VString upDaterRefs()
          Deprecated. use KElement.fillHashSet(ElementName.RREF,null,hashSet)
 boolean validAttribute(String key, AttributeInfo.EnumAttributeType iType, boolean bRequired, String nameSpaceURI)
          Deprecated. clean up attributeInfo tables instead use KElement public boolean validAttribute(String key,String nameSpaceURI, EnumValidationLevel level)
 boolean validAttribute(String key, String nameSpaceURI, JDFElement.EnumValidationLevel level)
          is the attribute valid and of type iType. iType is of type EnumAttributeType but may be expanded in child classes default: validAttribute(key, null)
 boolean validEnumAttribute(String key, Vector v, boolean bRequired, String nameSpaceURI)
          Deprecated. use getTheAttributeInfo instead
 boolean validEnumerationsAttribute(String key, Vector vs, boolean bRequired, String nameSpaceURI)
          Deprecated. use getTheAttributeInfo instead
protected  boolean validResourcePosition(JDFResource r)
          is the ressource r linkable by this?
 String version()
          Deprecated. use getDefaultJDFVersion()
 
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.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
 

Constructor Detail

JDFElement

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

Parameters:
myOwnerDocument - the DOM document where this elements will be inserted
qualifiedName - the qualified name of the element (see www.w3.org/XML/)

JDFElement

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

Parameters:
myOwnerDocument - the DOM document where this elements will be inserted
myNamespaceURI - the namespace of the elements to (see www.w3.org/XML/)
qualifiedName - the qualified name of the element

JDFElement

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

Parameters:
myOwnerDocument - the DOM document where this elements will be inserted
myNamespaceURI - the namespace of the elements to create
qualifiedName - the qualified name of the element (see www.w3.org/XML/)
myLocalName - the local name of the element (see www.w3.org/XML/)
Method Detail

setLongID

public static void setLongID(boolean bLong)
set the ID generation algorithm to include a date

Parameters:
bLong - if true (default), the date and time is used to generate long IDs

getTheAttributeInfo

protected AttributeInfo getTheAttributeInfo()
Returns:

getAttributeInfo

public AttributeInfo getAttributeInfo()
public version of getTheAttributeInfo

Returns:

getAtrType

public AttributeInfo.EnumAttributeType getAtrType(String attributeName)
returns the data type of a given attribute

Parameters:
attributeName - the localname of the attribute to check
Returns:
the data type of attributeName

getFirstVersion

public JDFElement.EnumVersion getFirstVersion(String eaName,
                                              boolean bElement)
get the first JDF version where attribute name or element name is valid

Parameters:
eaName - attribute name
bElement - true - get ElementInfo, false - get AttributeInfo
Returns:
JDF version, Version_1_0 if no Info is found

isDirty

public boolean isDirty()
Get the dirty status of this element

Overrides:
isDirty in class KElement
Returns:
boolean true if dirty

setDirty

public void setDirty(boolean bAttribute)
Set this element as dirty

Overrides:
setDirty in class KElement
Parameters:
bAttribute - if true, only attributes are dirty, else also sub-elements

getXMLDocUserData

protected XMLDocUserData getXMLDocUserData()
get/create the associated XMLDocUserData

Returns:
the XMLDocUserData of this

getLastVersion

public JDFElement.EnumVersion getLastVersion(String eaName,
                                             boolean bElement)
get the last JDF version where attribute name or element name is valid

Parameters:
eaName - attribute name
bElement - true - get ElementInfo, false - get AttributeInfo
Returns:
JDF version, Version_1_0 if no Info is found

requiredAttributes

public VString requiredAttributes()
Comma separated list of all required attributes. KElement is generic, therefore the list is empty

Returns:
String the comma separated list of required attribute keys

optionalAttributes

public VString optionalAttributes()
Comma separated list of all optional attributes. KElement is generic, therefore only the XML generic attributes are listed
xmlns: the namespace declaration

Returns:
String the comma separated list of optional attribute keys

getDefaultAttributeMap

public JDFAttributeMap getDefaultAttributeMap()
map of all defaults from the schema

Returns:
JDFAttributeMap the comma separated list of deprecated attribute keys

getTheAttributeInfo_JDFElement

protected AttributeInfo getTheAttributeInfo_JDFElement()
Returns:

getTheElementInfo_JDFElement

protected ElementInfo getTheElementInfo_JDFElement()

deprecatedAttributes

public VString deprecatedAttributes()
list of all deprecated attributes. KElement is generic, therefore the list is empty

Returns:
String the comma separated list of deprecated attribute keys

prereleaseAttributes

public VString prereleaseAttributes()
Comma separated list of all deprecated attributes. KElement is generic, therefore the list is empty

Returns:
String the comma separated list of deprecated attribute keys

knownAttributes

public VString knownAttributes()
KElement is generic, therefore the list is empty

Returns:
String the comma separated list of known attribute keys

getMissingAttributeVector

public VString getMissingAttributeVector(VString vReqKeys,
                                         int nMax)
checks if the curent element has other attributes then also present in vReqKeys. If the attribute is not present in vReqKeys, the attribut is added to a new vector. The new vector is returned if there is no missing element left or the new vector has reached the given size nMax.

Parameters:
vReqKeys - the vector with the attributes you already have
nMax - vector with the missing attributes
Returns:
Vector the vector with the missing attributes

getTheElementInfo

protected ElementInfo getTheElementInfo()
Returns:
the elementinfo

getMissingElements

public VString getMissingElements(int nMax)
get the missing elements as a vector

default: getMissingElements(99999999)

Parameters:
nMax - maximum value of missing elements to return
Returns:
VString vector with nMax missing elements

requiredElements

public VString requiredElements()
Returns:
required elements
Since:
060517 changed signature to VString

optionalElements

public VString optionalElements()
Comma separated list of all optional element names; KElement is generic, therefore the list is empty

Returns:
VString the comma separated list of optional element names

uniqueElements

public VString uniqueElements()
comma separated list of all unique Elements that may occur at most once; KElement is generic, therefore the list is empty

Returns:
String the comma separated list of required element names

prereleaseElements

public String prereleaseElements()
comma separated list of all prerelease Elements that may occur in a future version

Returns:
String the comma separated list of required element names

getPrereleaseElements

public VString getPrereleaseElements(int nMax)
Comma separated list of all prerelease elements.

default: getPrereleaseElements(99999999)

Parameters:
nMax -
Returns:
VString vector with nMax missing elements

getDeprecatedElements

public VString getDeprecatedElements(int nMax)
Vector of deprecated elements below the current element.

default: getDeprecatedElements(99999999)

Parameters:
nMax -
Returns:
VString vector with nMax missing elements

knownElements

public VString knownElements()
Comma separated list of all known element names;

Returns:
String the comma separated list of known element names

getMissingAttributes

public VString getMissingAttributes(int nMax)
This function first, gets all required attributes and then compare them with the attributes present and returns a Vector with the missing attributes

Parameters:
nMax - maximum size of the returned Vector
Returns:
VString vector with the missing attribute names

getDeprecatedAttributes

public VString getDeprecatedAttributes(int nMax)
This function first, gets all deprecated attributes

Parameters:
nMax - maximum size of the returned Vector
Returns:
Vector vector with the deprecated attributes

getUnknownAttributes

public VString getUnknownAttributes(boolean bIgnorePrivate,
                                    int nMax)
Get the unknown attributes

default: getUnknownAttributes(bIgnorePrivate, 9999999)

Parameters:
bIgnorePrivate - if true the private attributes will be ignored
nMax - mamimum amount of unknown attributes to return
Returns:
Vector a vector with all unknown atttributes the Element have

getUnknownAttributeVector

public VString getUnknownAttributeVector(VString vKnownKeys,
                                         VString vInNameSpace,
                                         int nMax)
Gets the unknown attributes

default: getUnknownAttributeVector(vKnownKeys, new Vector(), 99999999)

Parameters:
vKnownKeys - vector with all known keys
vInNameSpace - vector with all namespaces to search in
nMax - maximum amount of unknown attributes to return
Returns:
vector with maximum nMax unknown Attributes

getUnknownElements

public VString getUnknownElements(boolean bIgnorePrivate,
                                  int nMax)
Get a vector with the unknown elements

default: getUnknownElements(bIgnorePrivate, 99999999)

Parameters:
bIgnorePrivate - true, to ignore the private elements
nMax - maximum number of elements in the vector returned
Returns:
Vector a vector with nMax unknown elements in the actual element.

getUnknownElementVector

public VString getUnknownElementVector(VString vKnownKeys,
                                       VString vInNameSpace,
                                       int nMax)
Get a vector with the unknown elements

default: getUnknownElementVector(vKnownKeys, vInNameSpace, 9999999)

Parameters:
vKnownKeys - vector of all known elements
vInNameSpace - vector of all namespaces to search in
nMax - maximum amount of elements to return
Returns:
Vector a vector containing the unknown elements

getTypeForAttribute

public org.apache.commons.lang.enums.ValuedEnum getTypeForAttribute(String key)
Get the EnumAttributeType for an attribute

Parameters:
key - the local name of the attribute
Returns:
EnumAttributeType of the attribute

validAttribute

public boolean validAttribute(String key,
                              String nameSpaceURI,
                              JDFElement.EnumValidationLevel level)
is the attribute valid and of type iType. iType is of type EnumAttributeType but may be expanded in child classes

default: validAttribute(key, null)

Parameters:
key - the attribute name
nameSpaceURI - attribute namespace uri
level - the validation level
Returns:
boolean: true if the attribute is valid

getEnumforAttribute

public org.apache.commons.lang.enums.ValuedEnum getEnumforAttribute(String key)
Get the ValuedEnum for an enumerated attribute

Parameters:
key - the local name of the attribute
Returns:
ValuedEnum.Unknown of the requested attribute or null if the attribute is not an enum

eraseDefaultAttributes

public void eraseDefaultAttributes(boolean bRecurse)
remove all default attributes from this i.e. all attributes whose value matches the schema default

Parameters:
bRecurse - if true, also recurse subelements, else only local

hasMissingAttributes

public boolean hasMissingAttributes()
Checks, if this has any missing attributes

Returns:
boolean true, if one or more attributes are missing

hasUnknownAttributes

public boolean hasUnknownAttributes(boolean bIgnorePrivate)
Checks, if this has are any unknown attributes

Parameters:
bIgnorePrivate - if true, looks only in default and JDF namespaces
Returns:
boolean true, if one or more attributes are unknown

hasMissingElements

public boolean hasMissingElements()
Tests, whether 'this' has any missing direct child elements

Returns:
boolean true, if one or more direct child elements are missing

hasUnknownElements

public boolean hasUnknownElements(boolean bIgnorePrivate)
Tests, whether 'this' has any unknown direct child elements

Parameters:
bIgnorePrivate - if true, only looks in default and JDF namespaces
Returns:
boolean true if there are any unknown elements (in respect to the parameter)

getPrereleaseAttributes

public VString getPrereleaseAttributes(int nMax)
This function first, gets all prerelease attributes It ignores any atrributes that have been added by a schema parser

Parameters:
nMax - maximum size of the returned Vector
Returns:
Vector vector with the prerelease attributes

getInsertElements

public VString getInsertElements()
Get a vector of direct child element names that exist but are unknown in this element.

Returns:
a vString that contains missing element keys

getInsertElementVector

public VString getInsertElementVector(VString vKnownKeys,
                                      VString vUnique)
get a vString vector of direct child element names that may be inserted in this element. This means that a element which is already present as a child and has a max occurs of 1 will not be part of the returned vString

Parameters:
vKnownKeys - a vString list of known element tag names. If you want a complete list of all known Elements use KnownElements() from KElement to get a list. Or call GetInsertElements(int nMax)
vUnique - vString a list of elements that may occur only once. Use UniqueElements() to get a String which contains all valid unique Elements from this.
Returns:
VString a vector of strings that contains insertable element keys
See Also:
knownElements(), getInsertElements(), uniqueElements()

attributeType

public AttributeInfo.EnumAttributeType attributeType(String attributeName)
Returns the type of the given attribute for the latest JDF version. Attribute types of previous versions have to be provided by attribute-specific functions (if necessary).

Parameters:
attributeName - name of the attribute
Returns:
EnumAttributeType the attribute's type

getNamesVector

public VString getNamesVector(String key)
Get the vector of valid attribute values for an enumerated attribute

Parameters:
key - the local name of the attribute
Returns:
vector of valid names, null if key is not an enumeration

getMissingElementVector

public VString getMissingElementVector(VString vRequiredKeys,
                                       int nMax)
Returns a vector with missing elements

default: getMissingElementVector(vRequiredKeys, 9999999)

Parameters:
vRequiredKeys - vector with all element which are required
nMax - maximum amount of missing element inside the returned vector
Returns:
Vector the vector with the missing elements

toString

public String toString()
toString

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

isValid

public boolean isValid(JDFElement.EnumValidationLevel level)
Mother of all validators

Parameters:
level - validation level
  • level EnumValidationLevel.None: always return true;
  • level EnumValidationLevel.Construct: incomplete and null elements are valid.
  • level EnumValidationLevel.Incomplete: incomplete elements are valid
  • level EnumValidationLevel.Complete: full validation
  • level EnumValidationLevel.RecursiveIncomplete: incomplete validation but follow links
  • level EnumValidationLevel.RecursiveComplete: full validation and follow links downward
Returns:
boolean the validity of the node

isValid_JDFElement

public boolean isValid_JDFElement(JDFElement.EnumValidationLevel level)
Mother of all validators; this method is for direct access to the JDFElement valid method and short-circuit all overriding virtual methods

Parameters:
level - validation level
  • level EnumValidationLevel.None: always return true;
  • level EnumValidationLevel.Construct: incomplete and null elements are valid.
  • level EnumValidationLevel.Incomplete: incomplete elements are valid
  • level EnumValidationLevel.Complete: full validation
  • level EnumValidationLevel.RecursiveIncomplete: incomplete validation but follow links
  • level EnumValidationLevel.RecursiveComplete: full validation and follow links downward
Returns:
boolean the validity of the node

fixVersion

public final boolean fixVersion(JDFElement.EnumVersion version)
Mother of all version fixing routines uses heuristics to modify this element and its children to be compatible with a given version in general, it will be able to move from low to high versions but potentially fail when attempting to move from higher to lower versions

Parameters:
version - version the resulting element should correspond to
Returns:
true if successful

hasSettingsPolicy

@Deprecated
public boolean hasSettingsPolicy(boolean bInherit)
Deprecated. use hasAttribute

Check Existance of attribute SettingsPolicy

Parameters:
bInherit - recurse through ancestors when searching
Returns:
true if attribute exists

removeSettingsPolicy

@Deprecated
public void removeSettingsPolicy()
Deprecated. use removeAttribute

Remove attribute SettingsPolicy


removeBestEffortExceptions

@Deprecated
public void removeBestEffortExceptions()
Deprecated. use removeAttribute

Remove attribute BestEffortExceptions


getHRef

@Deprecated
public String getHRef()
Deprecated. use getrRef of the coresponding sub classes instead

Gets the one and reference to an ID

Returns:
String the rRef attribute

appendHRef

public JDFElement appendHRef(JDFResource target,
                             String refAttribute,
                             String preSet)
append a reference to a target node automatically generate a unique ID attribute for target, if it does not exist

Parameters:
target - the element to reference
refAttribute - name of the refering attribute, e.g. hRef, rRef
preSet - preset value of the ID attribute - defaults to autogenerated
Returns:
JDFElement

appendHRef

public JDFElement appendHRef(String idRef,
                             String refAttribute,
                             String nameSpaceURI)
append a reference with a specific id

Parameters:
idRef - value of the ID-IDREF pair
refAttribute - value of the IDREF tag
nameSpaceURI - nameSpaceURI of the IDREF tag
Returns:
JDFElement

setAttribute

public void setAttribute(String key,
                         JDFDuration value,
                         String nameSpaceURI)
Sets an element attribute

Parameters:
key - the name of the attribute to set
value - the JDFDuration to set
nameSpaceURI - the nameSpace the attribute is in default: setAttribute(key, value, null)

setAttribute

public void setAttribute(String key,
                         JDFNumList value,
                         String nameSpaceURI)
Sets an element attribute

Parameters:
key - the name of the attribute to set
value - the JDFNumList to set
nameSpaceURI - the nameSpace the attribute is in

setAttribute

public void setAttribute(String key,
                         JDFNumList value,
                         String nameSpaceURI,
                         int precision)
Sets an element attribute

Parameters:
key - the name of the attribute to set
value - the JDFNumList to set
nameSpaceURI - the nameSpace the attribute is in
precision - number of digits

setAttribute

public void setAttribute(String key,
                         JDFRangeList value,
                         String nameSpaceURI)
Sets an element attribute

Parameters:
key - the name of the attribute to set
value - the JDFNumberRangeList to set
nameSpaceURI - the nameSpace the attribute is in

setAttribute

public void setAttribute(String key,
                         JDFRangeList value,
                         String nameSpaceURI,
                         int precision)
Sets an element attribute

Parameters:
key - the name of the attribute to set
value - the JDFNumberRangeList to set
nameSpaceURI - the nameSpace the attribute is in
precision -

setAttribute

public void setAttribute(String key,
                         JDFRange value,
                         String nameSpaceURI)
Sets an element attribute

Parameters:
key - the name of the attribute to set
value - the JDFXYRange to set
nameSpaceURI - the nameSpace the attribute is in

setAttribute

public void setAttribute(String key,
                         JDFRange value,
                         String nameSpaceURI,
                         int precision)
Sets an element attribute

Parameters:
key - the name of the attribute to set
value - the JDFXYRange to set
nameSpaceURI - the nameSpace the attribute is in
precision -

setvStringAttribute

@Deprecated
public void setvStringAttribute(String key,
                                           JDFNameRange value,
                                           String nameSpaceURI)
Deprecated. 

Sets an element attribute

Parameters:
key - the name of the attribute to set
value - the JDFNameRange to set
nameSpaceURI - the nameSpace the attribute is in

exclusiveOneOfAttribute

public boolean exclusiveOneOfAttribute(JDFElement.EnumValidationLevel level,
                                       String att1,
                                       String att2,
                                       String att3,
                                       String att4)
return true if no more than one of att1 or att2 exists or exactly one of att1 or att2 exists depending on level

Parameters:
level - validation level, if level allows optional, no attribute also returns true
att1 - name of first attribute
att2 - name of second attribute
att3 - name of third optional attribute
att4 - name of fourth optional attribute
Returns:
boolean true combination is valid

exclusiveOneOfElement

public boolean exclusiveOneOfElement(JDFElement.EnumValidationLevel level,
                                     String elm1,
                                     String ns1,
                                     String elm2,
                                     String ns2)
return true if no more than one of att1 or att2 exists or exactly one of att1 or att2 exists depending on level

Parameters:
level - validation level, if level allows optional, no attribute also returns true
elm1 - name of first attribute
ns1 - namespace URI of first attribute
elm2 - name of first attribute
ns2 - namespace URI of first attribute
Returns:
boolean true combination is valid

getChildIds

public VString getChildIds(String attrib,
                           String element,
                           String nameSpaceURI)
GetChildIds - get a set of all known id's in child nodes

Parameters:
attrib - attribute name of the ID attribute, defaults to "ID"
element - name of the elements to be searched
nameSpaceURI - attribute namespace uri of the elements to include in the list
Returns:
Vector - a vector of all known ID elements

getTarget

@Deprecated
public JDFResource getTarget()
Deprecated. use the respective subclasses getTarget functions

Get the target element of a link (string id)

Returns:
JDFElement - the element that this reference refers to

getTarget

public KElement getTarget(String id,
                          String attrib)
looking for a specified target with an id, e.g. resource.
Offers access to exactly KElements implementation of GetTarget even if called for an instance of one of it's subclasses.

default: getTarget(id, JDFCoreConstants.ID)

Overrides:
getTarget in class KElement
Parameters:
id - value of the ID tag to search
attrib - name of the ID tag, defaults to "ID"
Returns:
KElement - the element if existing, otherwise null

getJDFRoot

public JDFNode getJDFRoot()
Get the JDF root

Returns:
JDFNode - The root of the JDF File

getJMFRoot

public JDFJMF getJMFRoot()
Get the JMF root

Returns:
JDFJMF - the root of the JMF file

isRefElement

@Deprecated
public boolean isRefElement()
Deprecated. use instanceof JDFRefElement

IsRefElement - is this thing a RefElement?

Returns:
true, if this is a refElement

isRefElementStatic

@Deprecated
public static boolean isRefElementStatic(KElement kElem)
Deprecated. use instanceof JDFRefElement

IsRefElement - is this thing a RefElement?

Parameters:
kElem -
Returns:
true, if this is a refElement

isResource

@Deprecated
public boolean isResource()
Deprecated. use instanceof JDFResource instead

tests whether this Element is a Resource.

Returns:
boolean - true, if it is a Resource.

isResourceStatic

@Deprecated
public static boolean isResourceStatic(KElement e)
Deprecated. use instanceof JDFResource instead

tests whether this Element is a Resource.

Parameters:
e -
Returns:
boolean - true, if it is a Resource.

isResourceUpdate

public boolean isResourceUpdate()
is this thing a ResourceUpdate?

Returns:
true, if this is a ResourceUpdate

isResourceLink

@Deprecated
public boolean isResourceLink()
Deprecated. use instanceof JDFResourceLink instead

Method IsResourceLink.

Returns:
boolean

isResourceLinkStatic

@Deprecated
public static boolean isResourceLinkStatic(KElement kElem)
Deprecated. use instanceof JDFResourceLink instead

Method IsResourceLinkStatic.

Parameters:
kElem -
Returns:
boolean

isComment

@Deprecated
public boolean isComment()
Deprecated. use instanceof JDFResourceLink instead

Check, if this is an Comment element

Returns:
boolean - true, if this is an Comment-Element, otherwise false

isCommentStatic

@Deprecated
public static boolean isCommentStatic(KElement kElem)
Deprecated. use instanceof JDFComment instead

Method isCommentStatic.

Parameters:
kElem -
Returns:
boolean - true, if this is an Comment-Element, otherwise false

isJDFNode

@Deprecated
public boolean isJDFNode()
Deprecated. use instanceof JDFNode instead

is this thing a JDF Node?

Returns:
true if this is a JDF Node

isInJDFNameSpace

@Deprecated
public boolean isInJDFNameSpace()
Deprecated. - use isInJDFNameSpaceStatic(kElem)

Method IsInJDFNameSpace.

Returns:
boolean

removeExtensions

public void removeExtensions()
remove all private extensions form a jdf element and its children


isInJDFNameSpaceStatic

public static boolean isInJDFNameSpaceStatic(String ns)
checks whether kElem is in the JDF namespace

Parameters:
ns - the KElement to check
Returns:
boolean - true, if kElem is in the JDF namespace

isInJDFNameSpaceStatic

public static boolean isInJDFNameSpaceStatic(KElement kElem)
checks whether kElem is in the JDF namespace

Parameters:
kElem - the KElement to check
Returns:
boolean - true, if kElem is in the JDF namespace

getRefElement

public JDFRefElement getRefElement(JDFResource target)
gets an inter resource link to a target resource. if target is a partition, the refElement MUST point exactly to that partition

Parameters:
target - - Target resource to link to
Returns:
the existing refElement

getCreateRefElement

public JDFRefElement getCreateRefElement(JDFResource target)
gets an inter resource link to a target resource., creates it if it does not exist

Parameters:
target - - Target resource to link to
Returns:

refElement

public JDFRefElement refElement(JDFResource target)
Creates an inter resource link to a target resource.
note that if target is a subelement rather than a root resource, it WILL be promoted to root level (rSubRef is deprecated)

Parameters:
target - - Target resource to link to
Returns:

removeRefElement

public void removeRefElement(JDFResource target)
Removes an inter resource link from this Element.

Parameters:
target - Target to remove

getRefElements

public VElement getRefElements()
gets the vector of all RefElements

Returns:
VElement - vector of JDFRefElements

upDaterRefs

@Deprecated
public VString upDaterRefs()
Deprecated. use KElement.fillHashSet(ElementName.RREF,null,hashSet)

UpDates rRefs attribute of this Element, corresponding to the child reference Elements of this Element.

Returns:

inlineRefElements

public void inlineRefElements(String nodeName,
                              String nameSpaceURI,
                              boolean bDirect)
inline refelements that match nodename and nameSpaceURI

Parameters:
nodeName - name of the refelement (without the "Ref")
nameSpaceURI -
bDirect - if true, get direct children only, else recurse into all sub-elements

getChildElementVector

public VElement getChildElementVector(String nodeName,
                                      String nameSpaceURI,
                                      JDFAttributeMap mAttrib,
                                      boolean bAnd,
                                      int maxSize,
                                      boolean bResolveTarget)
Get all children from the actual element matching the given conditions
does NOT get refElement targets although the attributes are checked in the target elements in case of refElements

Overrides:
getChildElementVector in class KElement
Parameters:
nodeName - element name you are searching for
nameSpaceURI - nameSpace you are searching for
mAttrib - attributes you are lokking for
bAnd - if true, a child is only added if it has all attributes specified in Attributes mAttrib
maxSize - maximum size of the element vector
bResolveTarget - if true, returns the targets of the refElements
else the refElements are returned (if mAttrib != null), additionally the attributes of the target are checked)
Returns:
VElement - vector with all elements found
See Also:
default: getChildElementVector(null, null,null, true, 0, false)

getChildrenByTagName

public VElement getChildrenByTagName(String elementName,
                                     String nameSpaceURI,
                                     JDFAttributeMap mAttrib,
                                     boolean bDirect,
                                     boolean bAnd,
                                     int maxSize)
Gets children of 'this' by tag name, nameSpaceURI and attribute map, if the attribute map is not empty.
Searches the entire tree including hidden nodes that are children of non-matching nodes

Overrides:
getChildrenByTagName in class KElement
Parameters:
elementName - elementname you are searching for
nameSpaceURI - nameSpace you are searching for
mAttrib - map of attributes you are looking for
Wildcards in the attribute map are supported
bDirect - if true, return value is a vector only of all direct child elements.
Otherwise the returned vector contains nodes of arbitrary depth
bAnd - if true, a child is only added, if it includes all attributes, specified in mAttrib
maxSize - maximum size of the element vector. maxSize is ignored if bDirect is false
Returns:
VElement: vector with all found elements
See Also:
KElement.getChildElementVector(java.lang.String, java.lang.String, org.cip4.jdflib.datatypes.JDFAttributeMap, boolean, int, boolean)

getChildrenByTagName

public VElement getChildrenByTagName(String elementName,
                                     String nameSpaceURI,
                                     JDFAttributeMap mAttrib,
                                     boolean bDirect,
                                     boolean bAnd,
                                     int maxSize,
                                     boolean bFollowRefs)
Gets children of 'this' by tag name, nameSpaceURI and attribute map, if the attribute map is not empty.
Searches the entire tree including hidden nodes that are children of non-matching nodes

Parameters:
elementName - elementname you are searching for
nameSpaceURI - nameSpace you are searching for
mAttrib - map of attributes you are looking for
Wildcards in the attribute map are supported
bDirect - if true, return value is a vector only of all direct child elements.
Otherwise the returned vector contains nodes of arbitrary depth
bAnd - if true, a child is only added, if it includes all attributes, specified in mAttrib
maxSize - maximum size of the element vector. maxSize is ignored if bDirect is false
bFollowRefs - if true follow references of refElements, else return the refElement
Returns:
VElement: vector with all found elements
See Also:
KElement.getChildElementVector(java.lang.String, java.lang.String, org.cip4.jdflib.datatypes.JDFAttributeMap, boolean, int, boolean)

getChildElementVector_JDFElement

public VElement getChildElementVector_JDFElement(String nodeName,
                                                 String nameSpaceURI,
                                                 JDFAttributeMap mAttrib,
                                                 boolean bAnd,
                                                 int maxSize,
                                                 boolean bResolveTarget)
Parameters:
nodeName -
nameSpaceURI -
mAttrib -
bAnd -
maxSize -
bResolveTarget - - additional control how refelements are followed
Returns:
See Also:
KElement.getChildElementVector(java.lang.String, java.lang.String, org.cip4.jdflib.datatypes.JDFAttributeMap, boolean, int, boolean)

getElementNameVector

public VString getElementNameVector()
Description copied from class: KElement
Returns a vector which contains the childs of the actual element. But every child only once.

Overrides:
getElementNameVector in class KElement
Returns:
Vector vector with the childs of the actual element. Ever child typ is only added once.
See Also:
KElement.getElementNameVector()

getElement

public KElement getElement(String nodeName,
                           String nameSpaceURI,
                           int iSkip)
Description copied from class: KElement
Gets an existing iSkip-th child node with matching nodeName and nameSpaceURI

Overrides:
getElement in class KElement
Parameters:
nodeName - name of the child node to get
nameSpaceURI - namespace to search for
iSkip - number of matching child nodes to skip
Returns:
KElement the matching child element
See Also:
KElement.getElement(java.lang.String, java.lang.String, int)

getElement_JDFElement

public KElement getElement_JDFElement(String nodeName,
                                      String nameSpaceURI,
                                      int iSkip)
same as KElement.GetElement, but follows references as well.
Thus the returned value is the target of the refElement unless the requested element is explicitely a refElement, which is specified by requesting an element with nodeName="XXXRef".
Invalid refelements are simply skipped and are not filled into the vector

Parameters:
nodeName - name of the child node to get
nameSpaceURI - namespace to search for
iSkip - get the iSkipth element that fits
Returns:
KElement the matching element

numChildElements

public int numChildElements(String nodeName,
                            String nameSpaceURI)
same as KElement.numChildElements(String, String), but also follows references.
Invalid refelements are simply skipped.

Overrides:
numChildElements in class KElement
Parameters:
nodeName - the nodes to count
nameSpaceURI - the nameSpace to look in
Returns:
int - the number of child elements

numChildElements_JDFElement

public int numChildElements_JDFElement(String nodeName,
                                       String nameSpaceURI)
Parameters:
nodeName -
nameSpaceURI -
Returns:

removeChildren

public void removeChildren(String nodeName,
                           String nameSpaceURI,
                           JDFAttributeMap mAttrib)
Remove children that match nodeName and nameSpaceURI

Overrides:
removeChildren in class KElement
Parameters:
nodeName - name of the child node to get, if empty or null remove all
nameSpaceURI - namespace to search for
mAttrib - attribute map to search for

validResourcePosition

protected boolean validResourcePosition(JDFResource r)
is the ressource r linkable by this? used by ResorceLink and refElement

Parameters:
r - the resource to link to
Returns:
boolean - true if r is at a valid position

removeChild

public KElement removeChild(String node,
                            String nameSpaceURI,
                            int n)
remove child node

Overrides:
removeChild in class KElement
Parameters:
node - name of the child node to remove, if empty or "*" remove all
nameSpaceURI - namespace to search for
n - number of nodes to skip before deleting
Returns:
KElement - the removed node

appendAnchor

public String appendAnchor(String strName)
create and append a unique id, keep the existing one if it already exists

Overrides:
appendAnchor in class KElement
Parameters:
strName -
Returns:
String - the value of the ID attribute after setting

setAttributeNameTimeStamp

public void setAttributeNameTimeStamp(String attributeName,
                                      JDFDate timestamp)
put a timestamp in an attribute of the current node

Parameters:
attributeName - the attribute name to timestamp
timestamp - the timestamp

setAttributes

public int setAttributes(KElement kElem,
                         VString ignoreList)
Sets the attributes from the curent element to the attributes from kElem. If the Attributes map from kElem is empty (kElem has no attributes), zero is returned. Otherwhise the size of the map (number of attributes from kElem) is returned.

Overrides:
setAttributes in class KElement
Parameters:
kElem - the attribute source
ignoreList -
Returns:
int number of elements from kElem

idString

@Deprecated
public String idString(int id)
Deprecated. 060307 internal legacy method

create a string link from an integer

Parameters:
id - the integer value to convert to an ID
Returns:
String - a unique ID string

getParentJDF

public static JDFNode getParentJDF(KElement e)
static version of GetParentJDF - get the local JDF node that this element resides in.
if e is a JDF node, return it's parent
if e is the root JDF node, return a null reference

Parameters:
e - the KElement (may be in foreign namespace)
Returns:
JDFNode - the local parent JDF of this element

getParentJDF

public JDFNode getParentJDF()
get the local JDF node that this element resides in
if this is a JDF node, return it's parent
if this is the root JDF node, return a null reference

Returns:
JDFNode - the local parent JDF of this element

getInvalidAttributes

public VString getInvalidAttributes(JDFElement.EnumValidationLevel level,
                                    boolean bIgnorePrivate,
                                    int nMax)
get invalid attributes

Parameters:
level - validation level
bIgnorePrivate - if true, do not worry about attributes in other namespaces
nMax - maximum size of the returned vector
Returns:
VString - a vector of invalid attribute names

getInvalidElements

public VString getInvalidElements(JDFElement.EnumValidationLevel level,
                                  boolean bIgnorePrivate,
                                  int nMax)
get invalid elements

Parameters:
level - validation level
bIgnorePrivate - if true, do not worry about elements in other namespaces
nMax - maximum size of the returned vector
Returns:
VString - a vector of invalid element names

getInvalidElements_JDFElement

public VString getInvalidElements_JDFElement(JDFElement.EnumValidationLevel level,
                                             boolean bIgnorePrivate,
                                             int nMax)
Method GetInvalidElements_JDFElement.

Parameters:
level - validation level
bIgnorePrivate - if true, do not worry about elements in other namespaces
nMax - maximum size of the returned vector
Returns:
VString - a vector of invalid element names

setCommentURL

public void setCommentURL(String value)
Set attribute CommentURL

Parameters:
value - the CommentURL value

getCommentURL

public String getCommentURL()
Get string attribute CommentURL

Returns:
the value of the attribute commentURL

getRefString

protected String getRefString()
Get the string of a refelement that points to this, i.e.NodeName+"Ref"

Returns:
the nodename of a refelement

jdfVersion

public String jdfVersion()
get the LDFLib version

Returns:
the JDFLib version

getSchemaURL

public static String getSchemaURL()
returns the official JDF schema URI for a particular version fool proof schema url as of November 5th, 2003

Returns:
the URL that fits to majorVersion and minorVersion - null if not supported

getSchemaURL

public static String getSchemaURL(int majorVersion,
                                  int minorVersion)
Parameters:
majorVersion - the major version - only 1 is supported
minorVersion - the minor version - only 0 or 1 are supported
Returns:
the URL that fits to majorVersion and minorVersion - null if not supported

getDefaultJDFVersion

public static JDFElement.EnumVersion getDefaultJDFVersion()
returns the JDFElement::EnumVersion, where new elements will be generated in by default

Returns:
the default version

setDefaultJDFVersion

public static void setDefaultJDFVersion(JDFElement.EnumVersion vers)
sets the JDFElement::EnumVersion, where new elements will be generated in by default
Attention this is static and global. Therefore it should generally be be called on initialization

Parameters:
vers - the new default version

getElementIDPrefix

public String getElementIDPrefix()
get Element ID prefix

Returns:
the ID prefix of JDFElement

newID

public String newID(String lastID)
gets a new ID for the element

Parameters:
lastID - the highest ID that has been created before
Returns:
the unique ID string

getEnumAttribute

@Deprecated
public int getEnumAttribute(String key,
                                       Vector v,
                                       String nameSpaceURI,
                                       int def,
                                       boolean bInherit)
Deprecated. use EnumXYZ.getEnum(getAttribute(key, namespaceURI, def)

defines an enumerated list of attributes ; used by the automated code generator

Parameters:
key - the attribute name
v - comma separated string of allowed values
nameSpaceURI - attribute namespace uri
def - the default enum if it does not exist
bInherit - if true: recurse into parent elements when searching the attribute as well
Returns:
int - the enumeration equivalent of the attribute of the attribute def if
Since:
300402

getEnumerationsAttribute

@Deprecated
public Vector getEnumerationsAttribute(String key,
                                                  Vector v,
                                                  String nameSpaceURI,
                                                  int def,
                                                  boolean bInherit)
Deprecated. use getEnumerationsAttribute(key, nameSpaceURI, EnumXYZ.getEnum(0), bInherit)

defines an enumerated list of attributes ; used by the automated code generator

Parameters:
key - the attribute name
v - comma separated string of allowed values
nameSpaceURI - attribute namespace uri
def - the default enum if it does not exist
bInherit - if true: recurse into parent elements when searching the attribute as well
Returns:
the Vector of enumeration equivalents of the attribute
Since:
300402

getEnumerationsAttribute

public Vector<? extends org.apache.commons.lang.enums.ValuedEnum> getEnumerationsAttribute(String key,
                                                                                           String nameSpaceURI,
                                                                                           org.apache.commons.lang.enums.ValuedEnum enu,
                                                                                           boolean bInherit)
defines an enumerated list of attributes; used by the automated code generator

Parameters:
key - the attribute local name
nameSpaceURI - the namespace URI
enu - a dummy enumeration of the correct type, typically EnumXYZ.getEnum(0)
bInherit - if true, also recurse into parent elements when searching the attribute
Returns:
Vector of ValuedEnum, null if no enum was set

setEnumerationsAttribute

protected void setEnumerationsAttribute(String key,
                                        Vector<? extends org.apache.commons.lang.enums.ValuedEnum> value,
                                        String nameSpaceURI)
set an enumerated list of attributes; used by the automated code generator

Parameters:
key - the attribute name
value - the enumeration vector
nameSpaceURI - attribute namespace uri
Throws:
JDFException - wrong data type in vector

validAttribute

@Deprecated
public boolean validAttribute(String key,
                                         AttributeInfo.EnumAttributeType iType,
                                         boolean bRequired,
                                         String nameSpaceURI)
Deprecated. clean up attributeInfo tables instead use KElement public boolean validAttribute(String key,String nameSpaceURI, EnumValidationLevel level)

is the attribute valid and of type iType?
iType is of type EnumAttributeType, but may be expanded in child classes

Parameters:
key - the attribute name
iType - the attribute type
bRequired - true if this attribute is required
nameSpaceURI - attribute namespace uri
Returns:
boolean: true if the attribute is valid

validEnumAttribute

@Deprecated
public boolean validEnumAttribute(String key,
                                             Vector v,
                                             boolean bRequired,
                                             String nameSpaceURI)
Deprecated. use getTheAttributeInfo instead

ValidEnumAttribute - is the attribute valid and does it fit allowedValues, iType is of type EnumAttributeType but may be expanded in child classes

Parameters:
key - the attribute name
v - Vector with all valid enums
bRequired - true if this attribute is required
nameSpaceURI - attribute namespace uri
Returns:
booelan - true if the attribute is valid

validEnumerationsAttribute

@Deprecated
public boolean validEnumerationsAttribute(String key,
                                                     Vector vs,
                                                     boolean bRequired,
                                                     String nameSpaceURI)
Deprecated. use getTheAttributeInfo instead

is the attribute valid and does it fit allowedValues. iType is of type EnumAttributeType but may be expanded in child classes

Parameters:
key - the attribute name
vs - comma separated string of allowed values
bRequired - true if this attribute is required
nameSpaceURI - attribute namespace uri
Returns:
true, if the attribute is valid

replaceChild

public Node replaceChild(Node arg0,
                         Node arg1)
                  throws DOMException
Specified by:
replaceChild in interface Node
Overrides:
replaceChild in class KElement
Throws:
DOMException
See Also:
ParentNode.replaceChild(org.w3c.dom.Node, org.w3c.dom.Node)

removeChild

public Node removeChild(Node arg0)
                 throws DOMException
Specified by:
removeChild in interface Node
Overrides:
removeChild in class KElement
Throws:
DOMException
See Also:
ParentNode.removeChild(org.w3c.dom.Node)

getTarget_JDFElement

public KElement getTarget_JDFElement(String id,
                                     String attrib)
Gets the target of link. Follows an ID-IDREF pair by recursively searching for an attrib with the value id

Parameters:
id - value of the ID tag to search
attrib - name of the ID tag, defaults to "ID"
Returns:
KElement the target of link - the element node.

insertBefore

public KElement insertBefore(String elementName,
                             Node beforeChild,
                             String nameSpaceURI)
Inserts the Element elementName before the existing Element node beforeChild. If beforeChild is null , insert elementName at the end of the list of children. If elementName is a DocumentFragment object, all of its children are inserted, in the same order, before beforeChild. If the elementName is already in the tree, it is removed first.

default: insertBefore(elementName, beforeChild, null)

Overrides:
insertBefore in class KElement
Parameters:
elementName - The elementName to insert the element itself will be created
beforeChild - The reference element, i.e., the elemente before which the new element must be inserted
nameSpaceURI - The namespace to create elementName in
Returns:
KElement the element being inserted

clearTargets

protected void clearTargets()
Overrides:
clearTargets in class KElement

cloneNewDoc

public KElement cloneNewDoc()
same as @see clone but the clone is in a new document

Overrides:
cloneNewDoc in class KElement
Returns:
See Also:
Object.clone()

copyInto

public KElement copyInto(KElement src,
                         boolean bRemove)
copies a node into this, ignoring identical node names i.e. duplicating elements

Overrides:
copyInto in class KElement
Parameters:
src -
bRemove - if true, remove existing information, else retain and overwrite / merge
Returns:
this

getEnumString

@Deprecated
public String getEnumString(int value,
                                       String allowedValues)
Deprecated. use EnumXYZ.getEnum(int)

get the string value from an enumerated set of values

Parameters:
value - - the enum that is to be translated to a string
allowedValues - - comma separated string of allowed values
Returns:
String - the string for the enum

getOwnerDocument_JDFElement

public JDFDoc getOwnerDocument_JDFElement()
Get the document object that owns this

Returns:
JDFDoc the owner document of this

getEnumNodeName

@Deprecated
public int getEnumNodeName(Vector allowedValues)
Deprecated. 

map a node's localname to an enumeration defined by allowedValues

Parameters:
allowedValues - comma separated string of allowed values
Returns:
int - the enum that corresponds to the nodename

getPartMapVector

protected VJDFAttributeMap getPartMapVector()
GetPartMapVector returns a vector of partmaps, null if no parts are present

Returns:
Vector

getPartMap

protected JDFAttributeMap getPartMap()
gets the part map

Returns:
JDFAttributeMap, of the part element

setPartMapVector

protected void setPartMapVector(VJDFAttributeMap vPart)
sets all parts to those defined in vParts

Parameters:
vPart - vector of attribute maps for the parts

setPartMap

protected void setPartMap(JDFAttributeMap mPart)
sets part to mPart

Parameters:
mPart - attribute map for the part to set

removePartMap

protected void removePartMap(JDFAttributeMap mPart)
removes the part defined in mPart

Parameters:
mPart - attribute map for the part to remove

hasPartMap

protected boolean hasPartMap(JDFAttributeMap mPart)
checks whether the part defined in mPart is included in this

Parameters:
mPart - Attribute map to check
Returns:
true if this has a part containing mPart

requiredLevel

@Deprecated
public static boolean requiredLevel(JDFElement.EnumValidationLevel level)
Deprecated. use EnumValidationLevel.isRequired()

returns true if the enumeration level is either Complete or RecursiveComplete, i.e. if the parameter is required

Parameters:
level - the level to check
Returns:
true if required

getHRefs

@Deprecated
public VString getHRefs(VString vDoneRefs,
                                   boolean bRecurse)
Deprecated. use getHRefs(VString vDoneRefs, boolean bRecurse, boolean bExpand)

GetHRefs - get inter-resource linked resource IDs

Parameters:
vDoneRefs -
bRecurse - if true, recurse followed refs
Returns:
VString

getHRefs

public VString getHRefs(VString vDoneRefs,
                        boolean bRecurse,
                        boolean bExpand)
GetHRefs - get inter-resource linked resource IDs

Parameters:
vDoneRefs - (use null by default)
bRecurse - if true recurse followed refs
bExpand - if true expand partitioned resources
Returns:
VString - the vector of referenced resource IDs

getvHRefRes

@Deprecated
public VElement getvHRefRes(boolean bRecurse)
Deprecated. use getvHRefRes(true,false);

get inter-resource linked resource vector

Parameters:
bRecurse -
Returns:
VElement

getvHRefRes

public VElement getvHRefRes(boolean bRecurse,
                            boolean bExpand)
get inter-resource linked resource vector

Parameters:
bRecurse - if true, recurse followed links
bExpand - if true, expand partitioned resources and follow the refs from the leaves
Returns:
VElement - the inter-resource linked resource vector

appendrRefs

@Deprecated
public void appendrRefs(String value)
Deprecated. rRefs was deprecated in JDF 1.2

Append to attribute rRefs if it is not yet in the list

Parameters:
value - the rRef token to append

removeFromrRefs

@Deprecated
public int removeFromrRefs(String value)
Deprecated. rRefs was deprecated in JDF 1.2

Remove value from attribute rRefs if it is in the list

Parameters:
value - the rRef token to remove from the NMTOKENS list
Returns:

getrRefs

@Deprecated
public VString getrRefs()
Deprecated. rRefs was deprecated in JDF 1.2

Get string attribute rRefs, i.e. split the blank separed attribute list

Returns:

getLinkRoot

public JDFResource getLinkRoot(String id)
Gets the root resource of the target returns a null JDFElement if it does not exist or the name mangling is illegal

Parameters:
id - the id of the linked root. If null, the id of this is used.
Returns:
JDFResource the resource root of the resource referenced by this resource link

version

@Deprecated
public final String version()
Deprecated. use getDefaultJDFVersion()

returns the official JDF version string

Returns:
String: the inherited version information or "1.3" if no valid version info was found

setVersion

public void setVersion(JDFElement.EnumVersion enumVer)
set Version to enumVer

Parameters:
enumVer - the EnumVersion to set

getVersion

@Deprecated
public JDFElement.EnumVersion getVersion()
Deprecated. 060505 use getVersion(boolean);

get EnumVersion attribute Version

Returns:
EnumVersion - attribute value

getVersion

public JDFElement.EnumVersion getVersion(boolean bInherit)
get the version of this element

Parameters:
bInherit - if true, check ancestor nodes
Returns:
the version corresponding to this element

getMaxVersion

public JDFElement.EnumVersion getMaxVersion(boolean bInherit)
get attribute MaxVersion, defaults to version if not set

Parameters:
bInherit - if true recurse through ancestors when searching
Returns:
EnumVersion - attribute value default - getMaxVersion(false)

stringToVersion

@Deprecated
public static JDFElement.EnumVersion stringToVersion(String enumName)
Deprecated. use EnumVersion.getEnum

Parameters:
enumName -
Returns:
EnumVersion

getChildElements

@Deprecated
public KElement[] getChildElements()
Deprecated. use KElement.getChildElementArray()
not typesafe in case of elements in foreign namespaces note that this method previously returned JDFElement[]

Method getChildElements.

Returns:
JDFElement[]

getChildElement

@Deprecated
public JDFElement getChildElement(int n)
Deprecated. use getElement(null, null ,n)

Method getChildElement

Parameters:
n - Element index n (1 based)
Returns:
JDFElement

getUnknownPoolElements

protected VString getUnknownPoolElements(JDFElement.EnumPoolType poolType,
                                         int nMax)
get unknown elements for a specific pool

Parameters:
poolType - the PoolType to look for
nMax - max. number of elements to retrieve
Returns:
VString of unknown pool elements

setSettingsPolicy

public void setSettingsPolicy(JDFElement.EnumSettingsPolicy value)
Set attribute SettingsPolicy

Parameters:
value - the SettingsPolicy to set

getSettingsPolicy

public JDFElement.EnumSettingsPolicy getSettingsPolicy(boolean bInherit)
Typesafe enumerated attribute SettingsPolicy

Parameters:
bInherit - recurse through ancestors when searching
Returns:

setBestEffortExceptions

public void setBestEffortExceptions(VString value)
Sets attribute BestEffortExceptions with the vector of values

Parameters:
value - vector of BestEffortExceptions tokens

appendBestEffortExceptions

public void appendBestEffortExceptions(String value)
Append a token to attribute BestEffortExceptions

Parameters:
value - the new BestEffortExceptions token

removeFromBestEffortExceptions

public void removeFromBestEffortExceptions(String value)
Remove a token from attribute BestEffortExceptions

Parameters:
value - the BestEffortExceptions token to remove

getBestEffortExceptions

public String getBestEffortExceptions()
Gets the value of attribute BestEffortExceptions

Returns:
the attribute value

setMustHonorExceptions

public void setMustHonorExceptions(VString value)
Sets attribute MustHonorExceptions with the vector of values

Parameters:
value - vector of MustHonorExceptions tokens

appendMustHonorExceptions

public void appendMustHonorExceptions(String value)
Append a token to attribute MustHonorExceptions

Parameters:
value - the new of MustHonorExceptions token

removeFromMustHonorExceptions

public void removeFromMustHonorExceptions(String value)
Remove a token from attribute MustHonorExceptions

Parameters:
value - the new of MustHonorExceptions token

getMustHonorExceptions

public String getMustHonorExceptions()
gets the value of attribute MustHonorExceptions

Returns:
the attribute value

setOperatorInterventionExceptions

public void setOperatorInterventionExceptions(VString value)
Sets attribute OperatorInterventionExceptions with the vector of values

Parameters:
value - the vector of OperatorInterventionExceptions tokens

appendOperatorInterventionExceptions

public void appendOperatorInterventionExceptions(String value)
Append a token to attribute OperatorInterventionExceptions

Parameters:
value - the new of OperatorInterventionExceptions token

removeFromOperatorInterventionExceptions

public void removeFromOperatorInterventionExceptions(String value)
Remove a token from attribute OperatorInterventionExceptions

Parameters:
value - the new of OperatorInterventionExceptions token

getOperatorInterventionExceptions

public String getOperatorInterventionExceptions()
gets the value of attribute OperatorInterventionExceptions

Returns:
the attribute value

setDescriptiveName

public void setDescriptiveName(String value)
Set attribute DescriptiveName

Parameters:
value - value to set the attribute to

getDescriptiveName

public String getDescriptiveName()
Get string attribute DescriptiveName

Returns:
the attribute value

appendGeneralID

public JDFGeneralID appendGeneralID()
append an empty GeneralID

Returns:
the newly created GeneralID

appendGeneralID

public JDFGeneralID appendGeneralID(String idUsage,
                                    String idValue)
append a GeneralID with idValue, duplicate entries are retained generalID elements are always placed first and new GeneralID elements are appended at the end of the list

Parameters:
idUsage - the IDUsage attribute of the generalID
idValue - the IDValue attribute of the generalID
Returns:
the newly created GeneralID

getGeneralID

public JDFGeneralID getGeneralID(int i)
gets attribute GeneralID

Parameters:
i - get the i'th element that fits
Returns:
the attribute value

setGeneralID

public JDFGeneralID setGeneralID(String idUsage,
                                 String idValue)
Creates or Updates a GeneralID with the IDUsage idUsage and IDValue=idValue all entries with a duplicate idUsage are removed

Parameters:
idUsage - usage to set the attribute to
idValue - value to set the attribute to
Returns:
the newly set GeneralID

removeGeneralID

public void removeGeneralID(String idUsage)
removes GeneralID with the IDUsage idUsage

Parameters:
idUsage - value to set the attribute to

getGeneralID

@Deprecated
public String getGeneralID(String idUsage)
Deprecated. use getGeneralID(idUsage, 0)

Gets IDValue of the GeneralID with IDUsage=idUsage null, if none exists

Parameters:
idUsage -
Returns:
String the attribute value

getGeneralID

public String getGeneralID(String idUsage,
                           int iPos)
Gets IDValue of the GeneralID with IDUsage=idUsage null, if none exists

Parameters:
idUsage -
iPos -
Returns:
String the attribute value

getGeneralIDVectorMap

public VectorMap<String,JDFGeneralID> getGeneralIDVectorMap()
Gets a map of all GeneralID key-value Pair lists if multiple generalIDs with the same IDUsage are specified, each GeneralID is added to the VectorMap

Returns:
VectorMap the map of lists of attribute values

getGeneralIDMap

public JDFAttributeMap getGeneralIDMap()
Gets a map of all GeneralID key-value Pairs if multiple generalIDs with the same IDUsage are specified, the last one is added to the map

Returns:
JDFAttributeMap the map of attribute values

appendElement

public KElement appendElement(String elementName,
                              String nameSpaceURI)
Overrides:
appendElement in class KElement
Parameters:
elementName - the elementname with namespace prefix "xyz:abc"
nameSpaceURI - the namespace of the element "null" is valid if the namespace was specified already above. The method will lookup the namespace for you. Performance wise its better to add it nevertheless.
Returns:
KElement the appended element or null
Throws:
JDFException - if you tried to append an element into an unspecified namespace

appendComment

public JDFComment appendComment()
Appends element Comment to the end of 'this'

Returns:
the newly created JDFComment

getCreateComment

public JDFComment getCreateComment(int iSkip)
Gets the iSkip-th element Comment. If doesn't exist, creates it

Parameters:
iSkip - number of elements to skip
Returns:
the newly created JDFComment

getComment

public JDFComment getComment(int iSkip)
Gets the iSkip-th element Comment

Parameters:
iSkip - number of elements to skip
Returns:
JDFComment - the matching element

getComment

public JDFComment getComment(String _name,
                             int index)
Gets the Comment with a give @Name

Parameters:
_name - Comment/@Name
index - number of elements to skip
Returns:
JDFComment - the matching element

appendPreview

public JDFPreview appendPreview()
Appends element JDFPreview to the end of 'this'

Returns:
the newly created JDFPreview

getCreatePreview

public JDFPreview getCreatePreview(int iSkip)
Gets the iSkip-th element JDFPreview. If doesn't exist, creates it

Parameters:
iSkip - number of elements to skip
Returns:
the newly created JDFPreview

getPreview

public JDFPreview getPreview(int iSkip)
Gets the iSkip-th element Comment

Parameters:
iSkip - number of elements to skip
Returns:
JDFPreview - the matching element

getChildWithMatchingAttribute

public JDFElement getChildWithMatchingAttribute(String nodeName,
                                                String attName,
                                                String nameSpaceURI,
                                                String attVal,
                                                int index,
                                                boolean bDirect,
                                                AttributeInfo.EnumAttributeType dataType)
Gets a child with matching attributes, also follows refelements

Parameters:
nodeName - name of the child node to search for
attName - attribute name to search for
nameSpaceURI - namespace to search for
attVal - a special value to search for
index - if more then one child meets the condition, you can specify the one to return via an index
bDirect - if true, look only in direct children, else search through all children, grandchildren etc.
dataType - dataType to be matched
Returns:
JDFElement: the element which matches the above conditions

getChildWithAttribute

public KElement getChildWithAttribute(String nodeName,
                                      String attName,
                                      String nameSpaceURI,
                                      String attVal,
                                      int index,
                                      boolean bDirect)
GetChildWithAttribute - Get a child with matching attributes

default: getChildWithAttribute(nodeName, attName, null,attValue, 0, true)

Overrides:
getChildWithAttribute in class KElement
Parameters:
nodeName - name of the child node to search for
attName - attribute name to search for
nameSpaceURI - namespace to search for
attVal - the attribute value to search for, Wildcard supported ( null)
index - if more then one child meets the condition, you can specify the one to return via an index
bDirect - if true, looks only in direct children, else search through all children, grandchildren etc.
Returns:
KElement the element which matches the above conditions

includesMatchingAttribute

public boolean includesMatchingAttribute(String attName,
                                         String attVal,
                                         AttributeInfo.EnumAttributeType dataType)
test whether the attributes described by attName and attVal exist
Parameters:
attName - the name of the attribute to look for
attVal - the value of the attribute to look for; a values of "*" is treated as true if the attribute exists, regardless of its value
dataType - the dataType to be matched
Returns:
true, if such attribute exists

setStatus

public void setStatus(JDFElement.EnumNodeStatus s)
Sets attribute Status

Parameters:
s - the status to set the attribute to

getStatus

public JDFElement.EnumNodeStatus getStatus()
gets the value of attribute Status

Returns:
EnumNodeStatus

getDeepElementByID

protected static KElement getDeepElementByID(KElement base,
                                             String attName,
                                             String id,
                                             KElement childToExclude,
                                             XMLDocUserData ud)
this is an optimized version of GetDeepElement() which returns a complete list of elements. Here we abort, when we found the first element that fits. (There is only one element, because the id must be unique)

Parameters:
base -
attName - attribute name
id - attribute ID value
childToExclude - here can be specified, if this method should exclude a child-element when searching This is useful, when searching a tree up
ud - userdata with reference to id cache, if null, no caching
Returns:
KElement the element specified by id and name

getAllRefs

public HashSet<JDFElement> getAllRefs(HashSet<JDFElement> vDoneRefs,
                                      boolean bRecurse)
Gets inter-resource linked resource IDs

Parameters:
vDoneRefs - (use null as default value)
bRecurse - if true, return recursively linked IDs as well
Returns:
the HashSet of all refElements

matchesPath

public boolean matchesPath(String path,
                           boolean bFollowRefs)
check whether this matches a simple xpath - note that references are NOT followed in case a node name is replaced with a "*"

Overrides:
matchesPath in class KElement
Parameters:
path - xpath to match
Returns:
boolean true, if this matches the given xpath

getValueForNewAttribute

public static String getValueForNewAttribute(KElement ke,
                                             String attName)
gets a reasonable value for an attribute

Parameters:
ke -
attName -
Returns:

getURLDoc

protected JDFDoc getURLDoc(String url)
returns the jdf doc referenced by url

Parameters:
url -
Returns:
the document

getURLInputStream

protected InputStream getURLInputStream(String url)
get the input stream that reads from URL

Parameters:
url -
Returns:
InputStream the input stream that the url points to, null if the url is inaccessible


Copyright © 2013. All Rights Reserved.