Package org.cip4.jdflib.core
Class JDFElement
- java.lang.Object
-
- org.apache.xerces.dom.NodeImpl
-
- org.apache.xerces.dom.ChildNode
-
- org.apache.xerces.dom.ParentNode
-
- org.apache.xerces.dom.ElementImpl
-
- org.apache.xerces.dom.ElementNSImpl
-
- org.cip4.jdflib.core.KElement
-
- org.cip4.jdflib.core.JDFElement
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,IStreamWriter,org.w3c.dom.Element,org.w3c.dom.ElementTraversal,org.w3c.dom.events.EventTarget,org.w3c.dom.Node,org.w3c.dom.NodeList,org.w3c.dom.TypeInfo
- Direct Known Subclasses:
JDFAbstractState,JDFAutoAbortQueueEntryParams,JDFAutoAction,JDFAutoActionPool,JDFAutoActivity,JDFAutoAdded,JDFAutoAdhesiveBinding,JDFAutoAdhesiveNote,JDFAutoAdvancedParams,JDFAutoAncestor,JDFAutoApprovalDetails,JDFAutoApprovalPerson,JDFAutoArgumentValue,JDFAutoArtDelivery,JDFAutoAssemblySection,JDFAutoAudit,JDFAutoAuthenticationCmdParams,JDFAutoAuthenticationQuParams,JDFAutoAuthenticationResp,JDFAutoAutomatedOverPrintParams,JDFAutoBand,JDFAutoBarcode,JDFAutoBarcodeCompParams,JDFAutoBarcodeDetails,JDFAutoBarcodeProductionParams,JDFAutoBarcodeReproParams,JDFAutoBasicPreflightTest,JDFAutoBindingQualityMeasurement,JDFAutoBindingQualityParams,JDFAutoBindItem,JDFAutoBindList,JDFAutoBookCase,JDFAutoBoxApplication,JDFAutoBoxArgument,JDFAutoBoxFoldAction,JDFAutoBoxToBoxDifference,JDFAutoBundleItem,JDFAutoBusinessInfo,JDFAutocall,JDFAutoCCITTFaxParams,JDFAutoCertificate,JDFAutoCertification,JDFAutoChangedAttribute,JDFAutoChangedPath,JDFAutoChannelBinding,JDFAutochoice,JDFAutoCoilBinding,JDFAutoCollatingItem,JDFAutoColorantZoneDetails,JDFAutoColorCorrectionOp,JDFAutoColorMeasurement,JDFAutoColorSpaceConversionOp,JDFAutoColorSpaceSubstitute,JDFAutoColorsUsed,JDFAutoComment,JDFAutoContainer,JDFAutoContentData,JDFAutoContentMetadata,JDFAutoContentObject,JDFAutoControllerFilter,JDFAutoConvertingConfig,JDFAutoCostCenter,JDFAutoCounterReset,JDFAutoCrease,JDFAutoCreateLink,JDFAutoCreateResource,JDFAutoCreditCard,JDFAutoCustomerMessage,JDFAutoCut,JDFAutoCylinderPosition,JDFAutoDCTParams,JDFAutoDefect,JDFAutoDependencies,JDFAutoDevCap,JDFAutoDevCapPool,JDFAutoDevCaps,JDFAutoDeviceCap,JDFAutoDeviceFilter,JDFAutoDeviceInfo,JDFAutoDeviceList,JDFAutoDeviceMark,JDFAutoDeviceNColor,JDFAutoDeviceNSpace,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,JDFAutoFillColor,JDFAutoFillMark,JDFAutoFitPolicy,JDFAutoFlateParams,JDFAutoFlushedResources,JDFAutoFlushQueueInfo,JDFAutoFlushQueueParams,JDFAutoFlushResourceParams,JDFAutoFold,JDFAutoFolderProduction,JDFAutoGangCmdFilter,JDFAutoGangElement,JDFAutoGangInfo,JDFAutoGangQuFilter,JDFAutoGangSource,JDFAutoGeneralID,JDFAutoGlue,JDFAutoHardCoverBinding,JDFAutoHoldQueueEntryParams,JDFAutoHole,JDFAutoHoleLine,JDFAutoIcon,JDFAutoIconList,JDFAutoIdentical,JDFAutoIDInfo,JDFAutoIDPCover,JDFAutoIDPFinishing,JDFAutoIDPFolding,JDFAutoIDPHoleMaking,JDFAutoIDPImageShift,JDFAutoIDPJobSheet,JDFAutoIDPLayout,JDFAutoIDPStitching,JDFAutoIDPTrimming,JDFAutoImageCompression,JDFAutoImageEnhancementOp,JDFAutoImageShift,JDFAutoInsert,JDFAutoInsertList,JDFAutoInspection,JDFAutoInterpretingDetails,JDFAutoJBIG2Params,JDFAutoJDFController,JDFAutoJDFService,JDFAutoJobField,JDFAutoJobPhase,JDFAutoJPEG2000Params,JDFAutoKnownMsgQuParams,JDFAutoLayerDetails,JDFAutoLayerList,JDFAutoLayoutElementPart,JDFAutoLoc,JDFAutoLocation,JDFAutoLogicalStackParams,JDFAutoLongFold,JDFAutoLongGlue,JDFAutoLongPerforate,JDFAutoLongSlit,JDFAutoLot,JDFAutoLZWParams,JDFAutomacro,JDFAutoMacroPool,JDFAutoMarkActivation,JDFAutoMarkColor,JDFAutoMarkObject,JDFAutoMediaLayers,JDFAutoMessage,JDFAutoMessageService,JDFAutoMetadataMap,JDFAutoMilestone,JDFAutoMISDetails,JDFAutoModifyNodeCmdParams,JDFAutoModule,JDFAutoModuleCap,JDFAutoModulePhase,JDFAutoModulePool,JDFAutoModuleStatus,JDFAutoMoveResource,JDFAutoMsgFilter,JDFAutoNetworkHeader,JDFAutoNewComment,JDFAutoNewJDFCmdParams,JDFAutoNewJDFQuParams,JDFAutoNodeInfoCmdParams,JDFAutoNodeInfoQuParams,JDFAutoNodeInfoResp,JDFAutoNotificationDef,JDFAutoNotificationFilter,JDFAutoNumberingParam,JDFAutoNumberItem,JDFAutoObjectModel,JDFAutoObjectResolution,JDFAutoObservationTarget,JDFAutoOccupation,JDFAutoOCGControl,JDFAutootherwise,JDFAutoPageAssignedList,JDFAutoPageCell,JDFAutoPageCondition,JDFAutoPageData,JDFAutoPageElement,JDFAutoPart,JDFAutoPartAmount,JDFAutoPartStatus,JDFAutoPatch,JDFAutoPayment,JDFAutoPDFInterpretingParams,JDFAutoPDFXParams,JDFAutoPerforate,JDFAutoPerformance,JDFAutoPipeParams,JDFAutoPixelColorant,JDFAutoPlasticCombBinding,JDFAutoPosition,JDFAutoPositionObj,JDFAutoPreflightAction,JDFAutoPreflightArgument,JDFAutoPreflightConstraint,JDFAutoPreflightDetail,JDFAutoPreflightInstance,JDFAutoPreflightInstanceDetail,JDFAutoPreflightItem,JDFAutoPRError,JDFAutoPRGroup,JDFAutoPRGroupOccurrence,JDFAutoPricing,JDFAutoPrintConditionColor,JDFAutoPRItem,JDFAutoPROccurrence,JDFAutoProductionSubPath,JDFAutoProofItem,JDFAutoPRRule,JDFAutoPRRuleAttr,JDFAutoQualityMeasurement,JDFAutoQueue,JDFAutoQueueEntry,JDFAutoQueueEntryDef,JDFAutoQueueEntryDefList,JDFAutoQueueEntryPosParams,JDFAutoQueueEntryPriParams,JDFAutoQueueFilter,JDFAutoQueueSubmissionParams,JDFAutoRefAnchor,JDFAutoReferenceXObjParams,JDFAutoRegistrationQuality,JDFAutoRemoved,JDFAutoRemoveLink,JDFAutoRemoveQueueEntryParams,JDFAutoRepeatDesc,JDFAutoRequestQueueEntryParams,JDFAutoResourceCmdParams,JDFAutoResourceInfo,JDFAutoResourceLink,JDFAutoResourceParam,JDFAutoResourcePullParams,JDFAutoResourceQuParams,JDFAutoResubmissionParams,JDFAutoResumeQueueEntryParams,JDFAutoReturnQueueEntryParams,JDFAutoRingBinding,JDFAutoRuleLength,JDFAutoSaddleStitching,JDFAutoScore,JDFAutoScreenSelector,JDFAutoSeparationList,JDFAutoSeparationSpec,JDFAutoSeparationTint,JDFAutoset,JDFAutoShapeCut,JDFAutoShapeTemplate,JDFAutoSheetCondition,JDFAutoShiftPoint,JDFAutoShutDownCmdParams,JDFAutoSideSewing,JDFAutoSideStitching,JDFAutoSignatureCell,JDFAutoSoftCoverBinding,JDFAutoSourceResource,JDFAutoStack,JDFAutoStation,JDFAutoStatusQuParams,JDFAutoStopPersChParams,JDFAutoStringListValue,JDFAutoStripBinding,JDFAutoStripCellParams,JDFAutoStripMark,JDFAutoSubmissionMethods,JDFAutoSubscription,JDFAutoSubscriptionFilter,JDFAutoSubscriptionInfo,JDFAutoSuspendQueueEntryParams,JDFAutoSystemTimeSet,JDFAutoTabDimensions,JDFAutoTabs,JDFAutoTape,JDFAutoTest,JDFAutoTestPool,JDFAutoThinPDFParams,JDFAutoThreadSealing,JDFAutoThreadSewing,JDFAutoTIFFEmbeddedFile,JDFAutoTIFFFormatParams,JDFAutoTIFFtag,JDFAutoTrackFilter,JDFAutoTrackResult,JDFAutoTransferCurveSet,JDFAutoTrappingOrder,JDFAutoUpdateJDFCmdParams,JDFAutoValue,JDFAutoValueLoc,JDFAutoWakeUpCmdParams,JDFAutowhen,JDFAutoWireCombBinding,JDFCertificate,JDFModuleInfo,JDFNode,JDFPool,JDFRefElement,JDFResource,JDFSourceResource,JDFSpanBase,JDFTerm,JDFValue
public class JDFElement extends KElement
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJDFElement.EnumBooleanBoolean Enumeration from JDF Spec Orientation of a physical resource.static classJDFElement.EnumNamedColorColors of preprocessed products such as Wire-O binders and cover leaflets.static classJDFElement.EnumNodeStatusEnumeration of valid nodestatus types Identifies the status of the node.static classJDFElement.EnumOrientationOrientation Enumeration
Orientation of a physical resource.static classJDFElement.EnumPoolTypeEnumeration of various pool typesstatic classJDFElement.EnumSeparationSeparation Enumeration identifies the separation name.static classJDFElement.EnumSettingsPolicyThe policy for this element indicates what happens when unsupported settings, (i.e., subelements, attributes or attribute values), are present in the element.static classJDFElement.EnumValidationLevelEnumeration 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.static classJDFElement.EnumVersionEnumeration strings for Version NOTE: If not specified the version defaults to Version 1.3static classJDFElement.EnumXYRelationXYRelation Enumeration
XML attributes of type XYRelation define the relationship between two ordered numbers.static classJDFElement.eUnit-
Nested classes/interfaces inherited from class org.cip4.jdflib.core.KElement
KElement.SimpleElementNameComparator, KElement.SimpleNodeComparator, KElement.SingleAttributeComparator, KElement.SingleXPathComparator
-
-
Field Summary
-
Fields inherited from class org.apache.xerces.dom.ParentNode
firstChild, fNodeListCache, ownerDocument
-
Fields inherited from class org.apache.xerces.dom.NodeImpl
DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_IS_CONTAINED, DOCUMENT_POSITION_PRECEDING, ELEMENT_DEFINITION_NODE, FIRSTCHILD, flags, HASSTRING, ID, IGNORABLEWS, NORMALIZED, OWNED, ownerNode, READONLY, SPECIFIED, SYNCCHILDREN, SYNCDATA, TREE_POSITION_ANCESTOR, TREE_POSITION_DESCENDANT, TREE_POSITION_DISCONNECTED, TREE_POSITION_EQUIVALENT, TREE_POSITION_FOLLOWING, TREE_POSITION_PRECEDING, TREE_POSITION_SAME_NODE
-
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
-
-
Constructor Summary
Constructors Constructor Description JDFElement(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument, java.lang.String qualifiedName)Constructor for JDFElementJDFElement(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument, java.lang.String myNamespaceURI, java.lang.String qualifiedName)Constructor for JDFElementJDFElement(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument, java.lang.String myNamespaceURI, java.lang.String qualifiedName, java.lang.String myLocalName)Constructor for JDFElement
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.StringappendAnchor(java.lang.String strName)create and append a unique id, keep the existing one if it already existsvoidappendBestEffortExceptions(java.lang.String value)Append a token to attribute BestEffortExceptionsJDFCommentappendComment()Appends element Comment to the end of 'this'KElementappendElement(java.lang.String elementName, java.lang.String nameSpaceURI)JDFGeneralIDappendGeneralID()append an empty GeneralIDJDFGeneralIDappendGeneralID(java.lang.String idUsage, java.lang.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 listJDFGeneralIDappendGeneralID(java.lang.String idUsage, java.lang.String idValue, JDFAutoGeneralID.EnumDataType namedfeature)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 listJDFElementappendHRef(java.lang.String idRef, java.lang.String refAttribute, java.lang.String nameSpaceURI)append a reference with a specific idJDFElementappendHRef(JDFResource target, java.lang.String refAttribute, java.lang.String preSet)append a reference to a target node automatically generate a unique ID attribute for target, if it does not existvoidappendMustHonorExceptions(java.lang.String value)Append a token to attribute MustHonorExceptionsvoidappendOperatorInterventionExceptions(java.lang.String value)Append a token to attribute OperatorInterventionExceptionsJDFPreviewappendPreview()Appends element JDFPreview to the end of 'this'voidappendrRefs(java.lang.String value)Deprecated.rRefs was deprecated in JDF 1.2AttributeInfo.EnumAttributeTypeattributeType(java.lang.String attributeName)Returns the type of the given attribute for the latest JDF version.protected voidclearTargets()KElementcloneNewDoc()same as @see clone but the clone is in a new documentvoidcopyChildren(java.lang.String elementName, KElement src)KElementcopyInto(KElement src, boolean bRemove)copies a node into this, ignoring identical node names i.e.static JDFElementcreateRoot(java.lang.String nodename)create a new root documentstatic JDFElementcreateRoot(java.lang.String nodename, JDFElement.EnumVersion v)create a new root documentVStringdeprecatedAttributes()list of all deprecated attributes.voideraseDefaultAttributes(boolean bRecurse)remove all default attributes from this i.e.booleanexclusiveOneOfAttribute(JDFElement.EnumValidationLevel level, java.lang.String att1, java.lang.String att2, java.lang.String att3, java.lang.String att4)return true if no more than one of att1 or att2 exists or exactly one of att1 or att2 exists depending on levelbooleanexclusiveOneOfElement(JDFElement.EnumValidationLevel level, java.lang.String elm1, java.lang.String ns1, java.lang.String elm2, java.lang.String ns2)return true if no more than one of att1 or att2 exists or exactly one of att1 or att2 exists depending on levelbooleanfixVersion(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 versionsjava.util.HashSet<JDFElement>getAllRefs(java.util.HashSet<JDFElement> vDoneRefs, boolean bRecurse)Gets inter-resource linked resource IDsAttributeInfo.EnumAttributeTypegetAtrType(java.lang.String attributeName)returns the data type of a given attributeAttributeInfogetAttributeInfo()public version of getTheAttributeInfojava.lang.StringgetBestEffortExceptions()Gets the value of attribute BestEffortExceptionsJDFElementgetChildElement(int n)Deprecated.use getElement(null, null ,n)KElement[]getChildElements()Deprecated.useKElement.getChildElementArray()
not typesafe in case of elements in foreign namespaces note that this method previously returned JDFElement[]VElementgetChildElementVector(java.lang.String nodeName, java.lang.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 refElementsVElementgetChildElementVector_JDFElement(java.lang.String nodeName, java.lang.String nameSpaceURI, JDFAttributeMap mAttrib, boolean bAnd, int maxSize, boolean bResolveTarget)VStringgetChildIds(java.lang.String attrib, java.lang.String element, java.lang.String nameSpaceURI)GetChildIds - get a set of all known id's in child nodesVElementgetChildrenByTagName(java.lang.String elementName, java.lang.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 nodesVElementgetChildrenByTagName(java.lang.String elementName, java.lang.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 nodesKElementgetChildWithAttribute(java.lang.String nodeName, java.lang.String attName, java.lang.String nameSpaceURI, java.lang.String attVal, int index, boolean bDirect)GetChildWithAttribute - Get a child with matching attributesJDFElementgetChildWithMatchingAttribute(java.lang.String nodeName, java.lang.String attName, java.lang.String nameSpaceURI, java.lang.String attVal, int index, boolean bDirect, AttributeInfo.EnumAttributeType dataType)Gets a child with matching attributes, also follows refelementsJDFCommentgetComment(int iSkip)Gets the iSkip-th element CommentJDFCommentgetComment(java.lang.String _name, int index)Gets the Comment with a given @Namejava.lang.StringgetCommentText(java.lang.String _name, int index)Gets the Comment with a given @Namejava.lang.StringgetCommentURL()Get string attribute CommentURLJDFCommentgetCreateComment(int iSkip)Gets the iSkip-th element Comment.JDFCommentgetCreateComment(java.lang.String _name, int index)Gets the Comment with a give @NameKElementgetCreateElement_JDFElement(java.lang.String nodeName, java.lang.String nameSpaceURI, int iSkip)Gets the iSkip-th child node with matching nodeName and nameSpaceURI, optionally creates it if it doesn't exist.JDFPreviewgetCreatePreview(int iSkip)Gets the iSkip-th element JDFPreview.JDFRefElementgetCreateRefElement(JDFResource target)gets an inter resource link to a target resource., creates it if it does not existprotected static KElementgetDeepElementByID(KElement base, java.lang.String attName, java.lang.String id, KElement childToExclude, XMLDocUserData ud)this is an optimized version of GetDeepElement() which returns a complete list of elements.JDFAttributeMapgetDefaultAttributeMap()map of all defaults from the schemastatic JDFElement.EnumVersiongetDefaultJDFVersion()returns the JDFElement::EnumVersion, where new elements will be generated in by defaultVStringgetDeprecatedAttributes(int nMax)This function first, gets all deprecated attributesVStringgetDeprecatedElements(int nMax)Vector of deprecated elements below the current element.java.lang.StringgetDescriptiveName()Get string attribute DescriptiveNameKElementgetElement(java.lang.String nodeName, java.lang.String nameSpaceURI, int iSkip)Gets an existing iSkip-th child node with matching nodeName and nameSpaceURIKElementgetElement_JDFElement(java.lang.String nodeName, java.lang.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 vectorjava.lang.StringgetElementIDPrefix()get Element ID prefixElementInfogetElementInfo()VStringgetElementNameVector()Returns a vector which contains the childs of the actual element.intgetEnumAttribute(java.lang.String key, java.util.Vector v, java.lang.String nameSpaceURI, int def, boolean bInherit)Deprecated.use EnumXYZ.getEnum(getAttribute(key, namespaceURI, def)java.util.Vector<? extends org.apache.commons.lang.enums.ValuedEnum>getEnumerationsAttribute(java.lang.String key, java.lang.String nameSpaceURI, org.apache.commons.lang.enums.ValuedEnum enu, boolean bInherit)defines an enumerated list of attributes; used by the automated code generatorjava.util.VectorgetEnumerationsAttribute(java.lang.String key, java.util.Vector v, java.lang.String nameSpaceURI, int def, boolean bInherit)Deprecated.use getEnumerationsAttribute(key, nameSpaceURI, EnumXYZ.getEnum(0), bInherit)org.apache.commons.lang.enums.ValuedEnumgetEnumforAttribute(java.lang.String key)Get the ValuedEnum for an enumerated attributeintgetEnumNodeName(java.util.Vector allowedValues)Deprecated.java.lang.StringgetEnumString(int value, java.lang.String allowedValues)Deprecated.use EnumXYZ.getEnum(int)JDFElement.EnumVersiongetFirstVersion(java.lang.String eaName, boolean bElement)get the first JDF version where attribute name or element name is validJDFGeneralIDgetGeneralID(int i)gets attribute GeneralIDjava.lang.StringgetGeneralID(java.lang.String idUsage)Gets IDValue of the GeneralID with IDUsage=idUsage null, if none existsjava.lang.StringgetGeneralID(java.lang.String idUsage, int iPos)Gets IDValue of the GeneralID with IDUsage=idUsage null, if none existsListMap<java.lang.String,JDFGeneralID>getGeneralIDListMap()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 VectorMapJDFAttributeMapgetGeneralIDMap()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 mapVectorMap<java.lang.String,JDFGeneralID>getGeneralIDVectorMap()Deprecated.java.lang.StringgetHRef()Deprecated.use getrRef of the coresponding sub classes insteadVStringgetHRefs(VString vDoneRefs, boolean bRecurse)Deprecated.use getHRefs(VString vDoneRefs, boolean bRecurse, boolean bExpand)VStringgetHRefs(VString vDoneRefs, boolean bRecurse, boolean bExpand)GetHRefs - get inter-resource linked resource IDsVStringgetInsertElements()Get a vector of direct child element names that exist but are unknown in this element.VStringgetInsertElementVector(VString vKnownKeys, VString vUnique)get avStringvector of direct child element names that may be inserted in this element.VStringgetInvalidAttributes(JDFElement.EnumValidationLevel level, boolean bIgnorePrivate, int nMax)get invalid attributesVStringgetInvalidElements(JDFElement.EnumValidationLevel level, boolean bIgnorePrivate, int nMax)get invalid elementsVStringgetInvalidElements_JDFElement(JDFElement.EnumValidationLevel level, boolean bIgnorePrivate, int nMax)Method GetInvalidElements_JDFElement.JDFNodegetJDFRoot()Get the JDF rootJDFJMFgetJMFRoot()Get the JMF rootJDFElement.EnumVersiongetLastVersion(java.lang.String eaName, boolean bElement)get the last JDF version where attribute name or element name is validprotected JDFResourcegetLinkFromUserData(java.lang.String myid)JDFResourcegetLinkRoot(java.lang.String id)Gets the root resource of the target returns a null JDFElement if it does not exist or the name mangling is illegalJDFElement.EnumVersiongetMaxVersion(boolean bInherit)get attribute MaxVersion, defaults to version if not setVStringgetMissingAttributes(int nMax)This function first, gets all required attributes and then compare them with the attributes present and returns a Vector with the missing attributesVStringgetMissingAttributeVector(VString vReqKeys, int nMax)checks if the curent element has other attributes then also present in vReqKeys.VStringgetMissingElements(int nMax)get the missing elements as a vectorVStringgetMissingElementVector(VString vRequiredKeys, int nMax)Returns a vector with missing elementsjava.lang.StringgetMustHonorExceptions()gets the value of attribute MustHonorExceptionsVStringgetNamesVector(java.lang.String key)Get the vector of valid attribute values for an enumerated attributejava.lang.StringgetOperatorInterventionExceptions()gets the value of attribute OperatorInterventionExceptionsJDFDocgetOwnerDocument_JDFElement()Get the document object that owns thisJDFNodegetParentJDF()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 referencestatic JDFNodegetParentJDF(KElement e)static version of GetParentJDF - get the local JDF node that this element resides in.protected JDFAttributeMapgetPartMap()gets the part mapprotected JDFAttributeMapArraygetPartMapArray()GetPartMapVector returns a vector of partmaps, null if no parts are presentprotected VJDFAttributeMapgetPartMapVector()GetPartMapVector returns a vector of partmaps, null if no parts are presentVStringgetPrereleaseAttributes(int nMax)This function first, gets all prerelease attributes It ignores any atrributes that have been added by a schema parserVStringgetPrereleaseElements(int nMax)Comma separated list of all prerelease elements.JDFPreviewgetPreview(int iSkip)Gets the iSkip-th element CommentJDFRefElementgetRefElement(JDFResource target)gets an inter resource link to a target resource.VElementgetRefElements()gets the vector of all RefElementsprotected java.lang.StringgetRefString()Get the string of a refelement that points to this, i.e.NodeName+"Ref"VStringgetrRefs()Deprecated.rRefs was deprecated in JDF 1.2static java.lang.StringgetSchemaURL()returns the official JDF schema URI for a particular version fool proof schema url as of November 5th, 2003static java.lang.StringgetSchemaURL(int majorVersion, int minorVersion)static java.lang.StringgetSchemaURL(JDFElement.EnumVersion version)get the schemaURL based on a versionJDFElement.EnumSettingsPolicygetSettingsPolicy(boolean bInherit)Typesafe enumerated attribute SettingsPolicyJDFElement.EnumNodeStatusgetStatus()gets the value of attribute StatusJDFResourcegetTarget()Deprecated.use the respective subclasses getTarget functionsKElementgetTarget(java.lang.String id, java.lang.String attrib)looking for a specified target with an id, e.g.KElementgetTarget_JDFElement(java.lang.String id, java.lang.String attrib)Gets the target of link.protected AttributeInfogetTheAttributeInfo()protected AttributeInfogetTheAttributeInfo_JDFElement()protected ElementInfogetTheElementInfo()protected ElementInfogetTheElementInfo_JDFElement()org.apache.commons.lang.enums.ValuedEnumgetTypeForAttribute(java.lang.String key)Get the EnumAttributeType for an attributeVStringgetUnknownAttributes(boolean bIgnorePrivate, int nMax)Get the unknown attributesVStringgetUnknownAttributeVector(VString vKnownKeys, VString vInNameSpace, int nMax)Gets the unknown attributesVStringgetUnknownElements(boolean bIgnorePrivate, int nMax)Get a vector with the unknown elementsVStringgetUnknownElementVector(VString vKnownKeys, VString vInNameSpace, int nMax)Get a vector with the unknown elementsprotected VStringgetUnknownPoolElements(JDFElement.EnumPoolType poolType, int nMax)get unknown elements for a specific poolprotected JDFDocgetURLDoc(java.lang.String url)returns the jdf doc referenced by urlprotected java.io.InputStreamgetURLInputStream(java.lang.String url)get the input stream that reads from URLstatic java.lang.StringgetValueForNewAttribute(KElement ke, java.lang.String attName)gets a reasonable value for an attributeJDFElement.EnumVersiongetVersion()Deprecated.060505 use getVersion(boolean);JDFElement.EnumVersiongetVersion(boolean bInherit)get the version of this elementVElementgetvHRefRes(boolean bRecurse)Deprecated.use getvHRefRes(true,false);VElementgetvHRefRes(boolean bRecurse, boolean bExpand)get inter-resource linked resource vectorXMLDocUserDatagetXMLDocUserData()get/create the associated XMLDocUserDatabooleanhasMissingAttributes()Checks, if this has any missing attributesbooleanhasMissingElements()Tests, whether 'this' has any missing direct child elementsprotected booleanhasPartMap(JDFAttributeMap mPart)checks whether the part defined in mPart is included in thisbooleanhasSettingsPolicy(boolean bInherit)Deprecated.use hasAttributebooleanhasUnknownAttributes(boolean bIgnorePrivate)Checks, if this has are any unknown attributesbooleanhasUnknownElements(boolean bIgnorePrivate)Tests, whether 'this' has any unknown direct child elementsjava.lang.StringidString(int id)Deprecated.060307 internal legacy methodbooleanincludesMatchingAttribute(java.lang.String attName, java.lang.String attVal, AttributeInfo.EnumAttributeType dataType)test whether the attributes described by attName and attVal exist
booleaninit()Method init.voidinlineRefElements(java.lang.String nodeName, java.lang.String nameSpaceURI, boolean bDirect)inline refelements that match nodename and nameSpaceURIKElementinsertBefore(java.lang.String elementName, org.w3c.dom.Node beforeChild, java.lang.String nameSpaceURI)Inserts the Element elementName before the existing Element node beforeChild.booleanisComment()Deprecated.use instanceof JDFResourceLink insteadstatic booleanisCommentStatic(KElement kElem)Deprecated.use instanceof JDFComment insteadbooleanisDeprecated()booleanisDirty()Get the dirty status of this elementstatic booleanisInAnyCIP4NameSpaceStatic(java.lang.String ns)checks whether kElem is in the XJDF or the JDF namespacestatic booleanisInAnyCIP4NameSpaceStatic(KElement kElem)checks whether kElem is in the JDF namespacestatic booleanisInAnyJDFNameSpaceStatic(java.lang.String ns)checks whether kElem is in the XJDF or the JDF namespacestatic booleanisInAnyJDFNameSpaceStatic(KElement kElem)checks whether kElem is in the JDF namespacebooleanisInJDFNameSpace()Deprecated.- use isInJDFNameSpaceStatic(kElem)static booleanisInJDFNameSpaceStatic(java.lang.String ns)checks whether kElem is in the JDF namespacestatic booleanisInJDFNameSpaceStatic(KElement kElem)checks whether kElem is in the JDF namespacestatic booleanisInXJDFNameSpaceStatic(java.lang.String ns)checks whether kElem is in the JDF namespacestatic booleanisInXJDFNameSpaceStatic(KElement kElem)checks whether kElem is in the JDF namespacebooleanisJDFNode()Deprecated.use instanceof JDFNode insteadbooleanisRefElement()Deprecated.use instanceof JDFRefElementstatic booleanisRefElementStatic(KElement kElem)Deprecated.use instanceof JDFRefElementbooleanisResource()Deprecated.use instanceof JDFResource insteadbooleanisResourceLink()Deprecated.use instanceof JDFResourceLink.IsResourceLink insteadstatic booleanisResourceLinkStatic(KElement kElem)Deprecated.use instanceof JDFResourceLink insteadstatic booleanisResourceStatic(KElement e)Deprecated.use instanceof JDFResource insteadbooleanisResourceUpdate()is this thing a ResourceUpdate?booleanisValid(JDFElement.EnumValidationLevel level)Mother of all validatorsbooleanisValid_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 methodsbooleanisXJDF()are we an XJDF or child of XJDF/XJMFjava.lang.StringjdfVersion()get the LDFLib versionVStringknownAttributes()KElement is generic, therefore the list is emptyVStringknownElements()Comma separated list of all known element names;booleanmatchesPath(java.lang.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 "*"java.lang.StringnewID(java.lang.String lastID)gets a new ID for the elementintnumChildElements(java.lang.String nodeName, java.lang.String nameSpaceURI)same asKElement.numChildElements(String, String), but also follows references.
Invalid refelements are simply skipped.intnumChildElements_JDFElement(java.lang.String nodeName, java.lang.String nameSpaceURI)VStringoptionalAttributes()Comma separated list of all optional attributes.VStringoptionalElements()list of all optional element names; KElement is generic, therefore the list is emptystatic JDFElementparseFile(java.io.File file)static JDFElementparseFile(java.lang.String filename)static JDFElementparseStream(java.io.InputStream s)static JDFElementparseString(java.lang.String string)VStringprereleaseAttributes()Comma separated list of all deprecated attributes.java.lang.StringprereleaseElements()comma separated list of all prerelease Elements that may occur in a future versionJDFRefElementrefElement(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)voidremoveBestEffortExceptions()Deprecated.use removeAttributeKElementremoveChild(java.lang.String node, java.lang.String nameSpaceURI, int n)remove child nodeorg.w3c.dom.NoderemoveChild(org.w3c.dom.Node arg0)voidremoveChildren(java.lang.String nodeName, java.lang.String nameSpaceURI, JDFAttributeMap mAttrib)Remove children that match nodeName and nameSpaceURIvoidremoveExtensions()remove all private extensions form a jdf element and its childrenvoidremoveFromBestEffortExceptions(java.lang.String value)Remove a token from attribute BestEffortExceptionsvoidremoveFromMustHonorExceptions(java.lang.String value)Remove a token from attribute MustHonorExceptionsvoidremoveFromOperatorInterventionExceptions(java.lang.String value)Remove a token from attribute OperatorInterventionExceptionsintremoveFromrRefs(java.lang.String value)Deprecated.rRefs was deprecated in JDF 1.2voidremoveGeneralID(java.lang.String idUsage)removes GeneralID with the IDUsage idUsageprotected voidremovePartMap(JDFAttributeMap mPart)removes the part defined in mPartvoidremoveRefElement(JDFResource target)Removes an inter resource link from this Element.voidremoveSettingsPolicy()Deprecated.use removeAttributeorg.w3c.dom.NodereplaceChild(org.w3c.dom.Node arg0, org.w3c.dom.Node arg1)VStringrequiredAttributes()Comma separated list of all required attributes.VStringrequiredElements()static booleanrequiredLevel(JDFElement.EnumValidationLevel level)Deprecated.use EnumValidationLevel.isRequired()voidsetAttribute(java.lang.String key, JDFNumList value, java.lang.String nameSpaceURI)Sets an element attributevoidsetAttribute(java.lang.String key, JDFNumList value, java.lang.String nameSpaceURI, int precision)Sets an element attributevoidsetAttribute(java.lang.String key, JDFRangeList value, java.lang.String nameSpaceURI)Sets an element attributevoidsetAttribute(java.lang.String key, JDFRangeList value, java.lang.String nameSpaceURI, int precision)Sets an element attributevoidsetAttribute(java.lang.String key, JDFRange value, java.lang.String nameSpaceURI)Sets an element attributevoidsetAttribute(java.lang.String key, JDFRange value, java.lang.String nameSpaceURI, int precision)Sets an element attributevoidsetAttribute(java.lang.String key, JDFDuration value, java.lang.String nameSpaceURI)Sets an element attributevoidsetAttributeNameTimeStamp(java.lang.String attributeName, JDFDate timestamp)put a timestamp in an attribute of the current nodeintsetAttributes(KElement kElem, VString ignoreList)Sets the attributes from the curent element to the attributes from kElem.voidsetBestEffortExceptions(VString value)Sets attribute BestEffortExceptions with the vector of valuesJDFCommentsetCommentText(java.lang.String text)set comment text , also creates the comment if not thereJDFCommentsetCommentText(java.lang.String text, java.lang.String name)set comment text , also creates the comment if not therevoidsetCommentURL(java.lang.String value)Set attribute CommentURLstatic voidsetDefaultJDFVersion(JDFElement.EnumVersion vers)sets the JDFElement::EnumVersion, where new elements will be generated in by default
Attention this is static and global.voidsetDescriptiveName(java.lang.String value)Set attribute DescriptiveNamevoidsetDirty(boolean bAttribute)Set this element as dirtyprotected voidsetEnumerationsAttribute(java.lang.String key, java.util.Vector<? extends org.apache.commons.lang.enums.ValuedEnum> value, java.lang.String nameSpaceURI)set an enumerated list of attributes; used by the automated code generatorJDFGeneralIDsetGeneralID(java.lang.String idUsage, java.lang.String idValue)Creates or Updates a GeneralID with the IDUsage idUsage and IDValue=idValue all entries with a duplicate idUsage are removedstatic voidsetLongID(boolean bLong)set the ID generation algorithm to include a datevoidsetMustHonorExceptions(VString value)Sets attribute MustHonorExceptions with the vector of valuesvoidsetOperatorInterventionExceptions(VString value)Sets attribute OperatorInterventionExceptions with the vector of valuesprotected voidsetPartMap(JDFAttributeMap mPart)sets part to mPartprotected voidsetPartMapVector(VJDFAttributeMap vPart)sets all parts to those defined in vPartsvoidsetSettingsPolicy(JDFElement.EnumSettingsPolicy value)Set attribute SettingsPolicyvoidsetStatus(JDFElement.EnumNodeStatus s)Sets attribute StatusvoidsetVersion(JDFElement.EnumVersion enumVer)set Version to enumVervoidsetvStringAttribute(java.lang.String key, JDFNameRange value, java.lang.String nameSpaceURI)Deprecated.static JDFElement.EnumVersionstringToVersion(java.lang.String enumName)Deprecated.use EnumVersion.getEnumVStringuniqueElements()list of all unique Elements that may occur at most once; KElement is generic, therefore the list is emptyVStringupDaterRefs()Deprecated.use KElement.fillHashSet(ElementName.RREF,null,hashSet)booleanvalidAttribute(java.lang.String key, java.lang.String nameSpaceURI, JDFElement.EnumValidationLevel level)is the attribute valid and of type iType.booleanvalidAttribute(java.lang.String key, AttributeInfo.EnumAttributeType iType, boolean bRequired, java.lang.String nameSpaceURI)Deprecated.clean up attributeInfo tables instead use KElement public boolean validAttribute(String key,String nameSpaceURI, EnumValidationLevel level)booleanvalidEnumAttribute(java.lang.String key, java.util.Vector v, boolean bRequired, java.lang.String nameSpaceURI)Deprecated.use getTheAttributeInfo insteadbooleanvalidEnumerationsAttribute(java.lang.String key, java.util.Vector vs, boolean bRequired, java.lang.String nameSpaceURI)Deprecated.use getTheAttributeInfo insteadprotected booleanvalidResourcePosition(JDFResource r)is the ressource r linkable by this? used by ResorceLink and refElementjava.lang.Stringversion()Deprecated.use getDefaultJDFVersion()java.io.Filewrite2Dir(java.lang.String dir)write to a directory - potentially generating a jobPartID-
Methods inherited from class org.cip4.jdflib.core.KElement
addAttribute, addAttribute, addNameSpace, ancestorDistance, appendAttribute, appendAttribute, appendAttributes, appendCData, appendCData, appendChild, appendElement, appendElementN, appendElementRaw, appendEntityReference, appendText, appendTextElement, appendXMLComment, appendXMLComment, buildRelativeXPath, buildXPath, buildXPath, buildXPath, cleanup, clearNSMap, clone, copyAttribute, copyAttribute, copyAttribute, copyAttribute, copyElement, copyElements, copyXPathValue, createRoot, deleteNode, ensureCase, eraseEmptyAttributes, eraseEmptyNodes, fillHashSet, fitsName, fitsName_KElement, flush, generateDotID, getAttribute, getAttribute, getAttribute, getAttribute_KElement, getAttribute_KElement, getAttributeArray_KElement, getAttributeIgnoreCase, getAttributeMap, getAttributeMap_KElement, getAttributeRaw, getAttributeVector, getAttributeVector_KElement, getBoolAttribute, getCData, getChildArray, getChildArray_KElement, getChildArrayByClass, getChildArrayByClass_KElement, getChildAttributeList, getChildByTagName, getChildElementArray, getChildElementVector, getChildElementVector, getChildElementVector_KElement, getChildFromList, getChildFromList, getChildList, getChildList, getChildNode, getChildNodes_KElement, getChildNodeVector, getChildrenByClass, getChildrenByTagName, getChildrenByTagName_KElement, getChildrenFromList, getChildrenIgnoreList, getChildrenWithAttribute, getChildWithAttribute, getChildWithAttribute, getCreateChildWithAttribute, getCreateElement, getCreateElement, getCreateElement_KElement, getCreateXPathElement, getDeepElement, getDeepParent, getDeepParent, getDeepParentChild, getDeepParentNotName, getDocRoot, getDOMAttr, getElement, getElement_KElement, getElementByClass, getElementHashMap, getElementsByTagName_KElement, getFirstChildElement, getFirstChildElement, getFirstChildElement, getFirstElementNode, getID, getIDPrefix, getIgnoreCase, getIgnoreCase_KElement, getInheritedAttribute, getInheritedElement, getInheritedXPathAttribute, getIntAttribute, getLocalNameStatic, getLongAttribute, getMultipleIDs, getNamespaceURI, getNamespaceURIFromPrefix, getNextElementNode, getNextSiblingElement, getNextSiblingElement, getNextSiblingElement, getNonEmpty, getNonEmpty_KElement, getNumCDatas, getNumChildNodes, getNumChildText, getNumXMLComments, getOwnerDocument_KElement, getParentNode_KElement, getPreviousSiblingElement, getPreviousSiblingElement, getRealAttribute, getTarget_KElement, getText, getText, getTree, getTree, getTreeByClass, getTreeElement, getXMLComment, getXMLNSNameSpace, getXMLNSPrefix, getXPathAttribute, getXPathAttributeMap, getXPathElement, getXPathElementVector, getXPathValueMap, getXPathValueMap, getXSIType, hasAttribute, hasAttribute, hasAttribute_KElement, hasAttributes, hasChildElement, hasChildElements, hasChildNodes, hasChildText, hasNonEmpty, hasNonEmpty_KElement, hasXPathNode, includesAttribute, includesAttributes, insertAt, insertBefore, isAncestor, isEqual, isEqual, isWildCard, matchesPath, matchesPathName, mergeElement, moveArray, moveAttribute, moveAttribute, moveElement, moveElements, moveMe, normalize, numChildElements_KElement, numChildNodes, numChildNodes, numChildrenByClass, numSiblingElements, pushUp, removeAllText, removeAttribute, removeAttribute, removeAttribute_KElement, removeAttributeNode, removeAttributeNS, removeAttributes, removeCData, removeChildNode, removeChildren, removeChildrenByClass, removeChildText, removeExtensions, removeFromAttribute, removeIgnoreCase, removeIgnoreCase_KElement, removeXMLComment, removeXPathAttribute, removeXPathElement, renameAttribute, renameAttribute, renameElement, replaceElement, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setAttributeNSRaw, setAttributeRaw, setAttributes, setAttributes, setAttributes, setAttributesRaw, setBoolAttribute, setDirty, setID, setIntAttribute, setNamespaceURI, setNodeValue, setNonEmpty, setPrefix, setRealAttribute, setText, setvStringAttribute, setXMLComment, setXMLComment, setXPathAttribute, setXPathValue, setXPathValues, setXSIType, sortChild, sortChild, sortChildren, sortChildren, sortChildren, sortChildren, toDisplayXML, toString, toValueString, toXML, toXML, uniqueID, uniqueID, write2File, write2File, write2Stream, writeStream, xmlNameSpace, xmlnsLocalName, xmlnsPrefix
-
Methods inherited from class org.apache.xerces.dom.ElementNSImpl
getLocalName, getPrefix, getTypeName, getTypeNamespace, getXMLBaseAttribute, isDerivedFrom, setType
-
Methods inherited from class org.apache.xerces.dom.ElementImpl
cloneNode, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getBaseURI, getChildElementCount, getDefaultAttributes, getElementsByTagName, getElementsByTagNameNS, getFirstElementChild, getLastElementChild, getNextElementSibling, getNodeName, getNodeType, getPreviousElementSibling, getSchemaTypeInfo, getTagName, getXercesAttribute, hasAttributeNS, isEqualNode, reconcileDefaultAttributes, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setOwnerDocument, setReadOnly, setupDefaultAttributes, setXercesAttributeNode, synchronizeData
-
Methods inherited from class org.apache.xerces.dom.ParentNode
getChildNodes, getChildNodesUnoptimized, getFirstChild, getLastChild, getLength, getOwnerDocument, getTextContent, hasChildNodes, item, setTextContent, synchronizeChildren
-
Methods inherited from class org.apache.xerces.dom.ChildNode
getNextSibling, getParentNode, getPreviousSibling
-
Methods inherited from class org.apache.xerces.dom.NodeImpl
addEventListener, changed, changes, compareDocumentPosition, compareTreePosition, dispatchEvent, getContainer, getFeature, getNodeNumber, getNodeValue, getReadOnly, getUserData, getUserData, getUserDataRecord, isDefaultNamespace, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, needsSyncChildren, removeEventListener, setUserData, setUserData
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.w3c.dom.Element
getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS
-
Methods inherited from interface org.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, java.lang.String qualifiedName)Constructor for JDFElement- Parameters:
myOwnerDocument- the DOM document where this elements will be insertedqualifiedName- the qualified name of the element (see www.w3.org/XML/)
-
JDFElement
public JDFElement(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument, java.lang.String myNamespaceURI, java.lang.String qualifiedName)Constructor for JDFElement- Parameters:
myOwnerDocument- the DOM document where this elements will be insertedmyNamespaceURI- 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, java.lang.String myNamespaceURI, java.lang.String qualifiedName, java.lang.String myLocalName)Constructor for JDFElement- Parameters:
myOwnerDocument- the DOM document where this elements will be insertedmyNamespaceURI- the namespace of the elements to createqualifiedName- 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
-
createRoot
public static JDFElement createRoot(java.lang.String nodename)
create a new root document- Parameters:
nodename-- Returns:
-
createRoot
public static JDFElement createRoot(java.lang.String nodename, JDFElement.EnumVersion v)
create a new root document- Parameters:
nodename-namespaceURI-- Returns:
-
getTheAttributeInfo
protected AttributeInfo getTheAttributeInfo()
- Returns:
-
getAttributeInfo
public final AttributeInfo getAttributeInfo()
public version of getTheAttributeInfo- Returns:
-
getAtrType
public AttributeInfo.EnumAttributeType getAtrType(java.lang.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(java.lang.String eaName, boolean bElement)
get the first JDF version where attribute name or element name is valid- Parameters:
eaName- attribute namebElement- 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
-
isDeprecated
public boolean isDeprecated()
- Returns:
- true if we are deprecated
-
setDirty
public void setDirty(boolean bAttribute)
Set this element as dirty
-
getXMLDocUserData
public XMLDocUserData getXMLDocUserData()
get/create the associated XMLDocUserData- Returns:
- the XMLDocUserData of this
-
getLastVersion
public JDFElement.EnumVersion getLastVersion(java.lang.String eaName, boolean bElement)
get the last JDF version where attribute name or element name is valid- Parameters:
eaName- attribute namebElement- 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 havenMax- vector with the missing attributes- Returns:
- Vector the vector with the missing attributes
-
getTheElementInfo
protected ElementInfo getTheElementInfo()
- Returns:
- the elementinfo
-
getElementInfo
public final ElementInfo getElementInfo()
- Returns:
- the elementinfo
-
getMissingElements
public VString getMissingElements(int nMax)
get the missing elements as a vectordefault: 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()
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()
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 java.lang.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 attributesdefault: getUnknownAttributes(bIgnorePrivate, 9999999)
- Parameters:
bIgnorePrivate- if true the private attributes will be ignorednMax- 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 attributesdefault: getUnknownAttributeVector(vKnownKeys, new Vector(), 99999999)
- Parameters:
vKnownKeys- vector with all known keysvInNameSpace- vector with all namespaces to search innMax- 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 elementsdefault: getUnknownElements(bIgnorePrivate, 99999999)
- Parameters:
bIgnorePrivate- true, to ignore the private elementsnMax- 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 elementsdefault: getUnknownElementVector(vKnownKeys, vInNameSpace, 9999999)
- Parameters:
vKnownKeys- vector of all known elementsvInNameSpace- vector of all namespaces to search innMax- maximum amount of elements to return- Returns:
- Vector a vector containing the unknown elements
-
getTypeForAttribute
public org.apache.commons.lang.enums.ValuedEnum getTypeForAttribute(java.lang.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(java.lang.String key, java.lang.String nameSpaceURI, JDFElement.EnumValidationLevel level)is the attribute valid and of type iType. iType is of type EnumAttributeType but may be expanded in child classesdefault: validAttribute(key, null)
- Parameters:
key- the attribute namenameSpaceURI- attribute namespace urilevel- the validation level- Returns:
- boolean: true if the attribute is valid
-
getEnumforAttribute
public org.apache.commons.lang.enums.ValuedEnum getEnumforAttribute(java.lang.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
vStringthat contains missing element keys
-
getInsertElementVector
public VString getInsertElementVector(VString vKnownKeys, VString vUnique)
get avStringvector 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 returnedvString- Parameters:
vKnownKeys- avStringlist of known element tag names. If you want a complete list of all known Elements useKnownElements()from KElement to get a list. Or callGetInsertElements(int nMax)vUnique-vStringa list of elements that may occur only once. Use UniqueElements() to get aStringwhich 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(java.lang.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(java.lang.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 elementsdefault: getMissingElementVector(vRequiredKeys, 9999999)
- Parameters:
vRequiredKeys- vector with all element which are requirednMax- maximum amount of missing element inside the returned vector- Returns:
- Vector the vector with the missing elements
-
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 hasAttributeCheck Existance of attribute SettingsPolicy- Parameters:
bInherit- recurse through ancestors when searching- Returns:
- true if attribute exists
-
removeSettingsPolicy
@Deprecated public void removeSettingsPolicy()
Deprecated.use removeAttributeRemove attribute SettingsPolicy
-
removeBestEffortExceptions
@Deprecated public void removeBestEffortExceptions()
Deprecated.use removeAttributeRemove attribute BestEffortExceptions
-
getHRef
@Deprecated public java.lang.String getHRef()
Deprecated.use getrRef of the coresponding sub classes insteadGets the one and reference to an ID- Returns:
- String the rRef attribute
-
appendHRef
public JDFElement appendHRef(JDFResource target, java.lang.String refAttribute, java.lang.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 referencerefAttribute- name of the refering attribute, e.g. hRef, rRefpreSet- preset value of the ID attribute - defaults to autogenerated- Returns:
- JDFElement
-
appendHRef
public JDFElement appendHRef(java.lang.String idRef, java.lang.String refAttribute, java.lang.String nameSpaceURI)
append a reference with a specific id- Parameters:
idRef- value of the ID-IDREF pairrefAttribute- value of the IDREF tagnameSpaceURI- nameSpaceURI of the IDREF tag- Returns:
- JDFElement
-
setAttribute
public void setAttribute(java.lang.String key, JDFDuration value, java.lang.String nameSpaceURI)Sets an element attribute- Parameters:
key- the name of the attribute to setvalue- the JDFDuration to setnameSpaceURI- the nameSpace the attribute is in default: setAttribute(key, value, null)
-
setAttribute
public void setAttribute(java.lang.String key, JDFNumList value, java.lang.String nameSpaceURI)Sets an element attribute- Parameters:
key- the name of the attribute to setvalue- the JDFNumList to setnameSpaceURI- the nameSpace the attribute is in
-
setAttribute
public void setAttribute(java.lang.String key, JDFNumList value, java.lang.String nameSpaceURI, int precision)Sets an element attribute- Parameters:
key- the name of the attribute to setvalue- the JDFNumList to setnameSpaceURI- the nameSpace the attribute is inprecision- number of digits
-
setAttribute
public void setAttribute(java.lang.String key, JDFRangeList value, java.lang.String nameSpaceURI)Sets an element attribute- Parameters:
key- the name of the attribute to setvalue- the JDFNumberRangeList to setnameSpaceURI- the nameSpace the attribute is in
-
setAttribute
public void setAttribute(java.lang.String key, JDFRangeList value, java.lang.String nameSpaceURI, int precision)Sets an element attribute- Parameters:
key- the name of the attribute to setvalue- the JDFNumberRangeList to setnameSpaceURI- the nameSpace the attribute is inprecision-
-
setAttribute
public void setAttribute(java.lang.String key, JDFRange value, java.lang.String nameSpaceURI)Sets an element attribute- Parameters:
key- the name of the attribute to setvalue- the JDFXYRange to setnameSpaceURI- the nameSpace the attribute is in
-
setAttribute
public void setAttribute(java.lang.String key, JDFRange value, java.lang.String nameSpaceURI, int precision)Sets an element attribute- Parameters:
key- the name of the attribute to setvalue- the JDFXYRange to setnameSpaceURI- the nameSpace the attribute is inprecision-
-
setvStringAttribute
@Deprecated public void setvStringAttribute(java.lang.String key, JDFNameRange value, java.lang.String nameSpaceURI)Deprecated.Sets an element attribute- Parameters:
key- the name of the attribute to setvalue- the JDFNameRange to setnameSpaceURI- the nameSpace the attribute is in
-
exclusiveOneOfAttribute
public boolean exclusiveOneOfAttribute(JDFElement.EnumValidationLevel level, java.lang.String att1, java.lang.String att2, java.lang.String att3, java.lang.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 trueatt1- name of first attributeatt2- name of second attributeatt3- name of third optional attributeatt4- name of fourth optional attribute- Returns:
- boolean true combination is valid
-
exclusiveOneOfElement
public boolean exclusiveOneOfElement(JDFElement.EnumValidationLevel level, java.lang.String elm1, java.lang.String ns1, java.lang.String elm2, java.lang.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 trueelm1- name of first attributens1- namespace URI of first attributeelm2- name of first attributens2- namespace URI of first attribute- Returns:
- boolean true combination is valid
-
getChildIds
public VString getChildIds(java.lang.String attrib, java.lang.String element, java.lang.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 searchednameSpaceURI- 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 functionsGet the target element of a link (string id)- Returns:
- JDFElement - the element that this reference refers to
-
getTarget
public KElement getTarget(java.lang.String id, java.lang.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)
-
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 JDFRefElementIsRefElement - is this thing a RefElement?- Returns:
- true, if this is a refElement
-
isRefElementStatic
@Deprecated public static boolean isRefElementStatic(KElement kElem)
Deprecated.use instanceof JDFRefElementIsRefElement - is this thing a RefElement?- Parameters:
kElem-- Returns:
- true, if this is a refElement
-
isResource
@Deprecated public boolean isResource()
Deprecated.use instanceof JDFResource insteadtests 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 insteadtests 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.IsResourceLink insteadMethod IsResourceLink.- Returns:
- boolean
-
isResourceLinkStatic
@Deprecated public static boolean isResourceLinkStatic(KElement kElem)
Deprecated.use instanceof JDFResourceLink insteadMethod IsResourceLinkStatic.- Parameters:
kElem-- Returns:
- boolean
-
isComment
@Deprecated public boolean isComment()
Deprecated.use instanceof JDFResourceLink insteadCheck, 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 insteadMethod isCommentStatic.- Parameters:
kElem-- Returns:
- boolean - true, if this is an Comment-Element, otherwise false
-
isJDFNode
@Deprecated public boolean isJDFNode()
Deprecated.use instanceof JDFNode insteadis this thing a JDF Node?- Returns:
- true if this is a JDF Node
-
isXJDF
public boolean isXJDF()
are we an XJDF or child of XJDF/XJMF- Returns:
-
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(java.lang.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
-
isInXJDFNameSpaceStatic
public static boolean isInXJDFNameSpaceStatic(java.lang.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
-
isInAnyCIP4NameSpaceStatic
public static boolean isInAnyCIP4NameSpaceStatic(java.lang.String ns)
checks whether kElem is in the XJDF or the JDF namespace- Parameters:
ns- the KElement to check- Returns:
- boolean - true, if kElem is in the JDF namespace
-
isInAnyCIP4NameSpaceStatic
public static boolean isInAnyCIP4NameSpaceStatic(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
-
isInAnyJDFNameSpaceStatic
public static boolean isInAnyJDFNameSpaceStatic(java.lang.String ns)
checks whether kElem is in the XJDF or the JDF namespace- Parameters:
ns- the KElement to check- Returns:
- boolean - true, if kElem is in the JDF namespace
-
isInAnyJDFNameSpaceStatic
public static boolean isInAnyJDFNameSpaceStatic(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
-
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
-
isInXJDFNameSpaceStatic
public static boolean isInXJDFNameSpaceStatic(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:
-
getCreateElement_JDFElement
public KElement getCreateElement_JDFElement(java.lang.String nodeName, java.lang.String nameSpaceURI, int iSkip)
Gets the iSkip-th child node with matching nodeName and nameSpaceURI, optionally creates it if it doesn't exist.
If iSkip is more than one larger that the number of elements only one is appended- Parameters:
nodeName- name of the child node to getnameSpaceURI- namespace to search foriSkip- number of matching child nodes to skip- Returns:
- KElement the matching child element
-
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(java.lang.String nodeName, java.lang.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(java.lang.String nodeName, java.lang.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:
getChildElementVectorin classKElement- Parameters:
nodeName- element name you are searching fornameSpaceURI- nameSpace you are searching formAttrib- attributes you are lokking forbAnd- if true, a child is only added if it has all attributes specified in Attributes mAttribmaxSize- maximum size of the element vectorbResolveTarget- 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(java.lang.String elementName, java.lang.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:
getChildrenByTagNamein classKElement- Parameters:
elementName- elementname you are searching fornameSpaceURI- nameSpace you are searching formAttrib- map of attributes you are looking for
Wildcards in the attribute map are supportedbDirect- if true, return value is a vector only of all direct child elements.
Otherwise the returned vector contains nodes of arbitrary depthbAnd- if true, a child is only added, if it includes all attributes, specified in mAttribmaxSize- 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(java.lang.String elementName, java.lang.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 fornameSpaceURI- nameSpace you are searching formAttrib- map of attributes you are looking for
Wildcards in the attribute map are supportedbDirect- if true, return value is a vector only of all direct child elements.
Otherwise the returned vector contains nodes of arbitrary depthbAnd- if true, a child is only added, if it includes all attributes, specified in mAttribmaxSize- maximum size of the element vector. maxSize is ignored if bDirect is falsebFollowRefs- 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(java.lang.String nodeName, java.lang.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:KElementReturns a vector which contains the childs of the actual element. But every child only once.- Overrides:
getElementNameVectorin classKElement- 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(java.lang.String nodeName, java.lang.String nameSpaceURI, int iSkip)
Description copied from class:KElementGets an existing iSkip-th child node with matching nodeName and nameSpaceURI- Overrides:
getElementin classKElement- Parameters:
nodeName- name of the child node to getnameSpaceURI- namespace to search foriSkip- 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(java.lang.String nodeName, java.lang.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 getnameSpaceURI- namespace to search foriSkip- get the iSkipth element that fits- Returns:
- KElement the matching element
-
numChildElements
public int numChildElements(java.lang.String nodeName, java.lang.String nameSpaceURI)same asKElement.numChildElements(String, String), but also follows references.
Invalid refelements are simply skipped.- Overrides:
numChildElementsin classKElement- Parameters:
nodeName- the nodes to countnameSpaceURI- the nameSpace to look in- Returns:
- int - the number of child elements
-
numChildElements_JDFElement
public int numChildElements_JDFElement(java.lang.String nodeName, java.lang.String nameSpaceURI)- Parameters:
nodeName-nameSpaceURI-- Returns:
-
removeChildren
public void removeChildren(java.lang.String nodeName, java.lang.String nameSpaceURI, JDFAttributeMap mAttrib)Remove children that match nodeName and nameSpaceURI- Overrides:
removeChildrenin classKElement- Parameters:
nodeName- name of the child node to get, if empty or null remove allnameSpaceURI- namespace to search formAttrib- 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(java.lang.String node, java.lang.String nameSpaceURI, int n)
remove child node- Overrides:
removeChildin classKElement- Parameters:
node- name of the child node to remove, if empty or "*" remove allnameSpaceURI- namespace to search forn- number of nodes to skip before deleting- Returns:
- KElement - the removed node
-
appendAnchor
public java.lang.String appendAnchor(java.lang.String strName)
create and append a unique id, keep the existing one if it already exists- Overrides:
appendAnchorin classKElement- Parameters:
strName-- Returns:
- String - the value of the ID attribute after setting
-
setAttributeNameTimeStamp
public void setAttributeNameTimeStamp(java.lang.String attributeName, JDFDate timestamp)put a timestamp in an attribute of the current node- Parameters:
attributeName- the attribute name to timestamptimestamp- 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:
setAttributesin classKElement- Parameters:
kElem- the attribute sourceignoreList-- Returns:
- int number of elements from kElem
-
idString
@Deprecated public java.lang.String idString(int id)
Deprecated.060307 internal legacy methodcreate 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 levelbIgnorePrivate- if true, do not worry about attributes in other namespacesnMax- maximum size of the returned vector- Returns:
- VString - a vector of invalid attribute names
-
getInvalidElements
public VString getInvalidElements(JDFElement.EnumValidationLevel level, boolean bIgnorePrivate, int nMax)
get invalid elements- Parameters:
level- validation levelbIgnorePrivate- if true, do not worry about elements in other namespacesnMax- 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 levelbIgnorePrivate- if true, do not worry about elements in other namespacesnMax- maximum size of the returned vector- Returns:
- VString - a vector of invalid element names
-
setCommentURL
public void setCommentURL(java.lang.String value)
Set attribute CommentURL- Parameters:
value- the CommentURL value
-
setCommentText
public JDFComment setCommentText(java.lang.String text)
set comment text , also creates the comment if not there- Parameters:
text- the comment text to set- Returns:
JDFCommentthe comment
-
setCommentText
public JDFComment setCommentText(java.lang.String text, java.lang.String name)
set comment text , also creates the comment if not there- Parameters:
text- the comment text to set- Returns:
JDFCommentthe comment
-
getCommentURL
public java.lang.String getCommentURL()
Get string attribute CommentURL- Returns:
- the value of the attribute commentURL
-
getRefString
protected java.lang.String getRefString()
Get the string of a refelement that points to this, i.e.NodeName+"Ref"- Returns:
- the nodename of a refelement
-
jdfVersion
public java.lang.String jdfVersion()
get the LDFLib version- Returns:
- the JDFLib version
-
getSchemaURL
public static java.lang.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 java.lang.String getSchemaURL(int majorVersion, int minorVersion)- Parameters:
majorVersion- the major version - only 1 is supportedminorVersion- 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 java.lang.String getElementIDPrefix()
get Element ID prefix- Returns:
- the ID prefix of JDFElement
-
newID
public java.lang.String newID(java.lang.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(java.lang.String key, java.util.Vector v, java.lang.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 namev- comma separated string of allowed valuesnameSpaceURI- attribute namespace uridef- the default enum if it does not existbInherit- 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 java.util.Vector getEnumerationsAttribute(java.lang.String key, java.util.Vector v, java.lang.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 namev- comma separated string of allowed valuesnameSpaceURI- attribute namespace uridef- the default enum if it does not existbInherit- 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 java.util.Vector<? extends org.apache.commons.lang.enums.ValuedEnum> getEnumerationsAttribute(java.lang.String key, java.lang.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 namenameSpaceURI- the namespace URIenu- 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(java.lang.String key, java.util.Vector<? extends org.apache.commons.lang.enums.ValuedEnum> value, java.lang.String nameSpaceURI)set an enumerated list of attributes; used by the automated code generator- Parameters:
key- the attribute namevalue- the enumeration vectornameSpaceURI- attribute namespace uri- Throws:
JDFException- wrong data type in vector
-
validAttribute
@Deprecated public boolean validAttribute(java.lang.String key, AttributeInfo.EnumAttributeType iType, boolean bRequired, java.lang.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 nameiType- the attribute typebRequired- true if this attribute is requirednameSpaceURI- attribute namespace uri- Returns:
- boolean: true if the attribute is valid
-
validEnumAttribute
@Deprecated public boolean validEnumAttribute(java.lang.String key, java.util.Vector v, boolean bRequired, java.lang.String nameSpaceURI)Deprecated.use getTheAttributeInfo insteadValidEnumAttribute - 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 namev- Vector with all valid enumsbRequired- true if this attribute is requirednameSpaceURI- attribute namespace uri- Returns:
- booelan - true if the attribute is valid
-
validEnumerationsAttribute
@Deprecated public boolean validEnumerationsAttribute(java.lang.String key, java.util.Vector vs, boolean bRequired, java.lang.String nameSpaceURI)Deprecated.use getTheAttributeInfo insteadis the attribute valid and does it fit allowedValues. iType is of type EnumAttributeType but may be expanded in child classes- Parameters:
key- the attribute namevs- comma separated string of allowed valuesbRequired- true if this attribute is requirednameSpaceURI- attribute namespace uri- Returns:
- true, if the attribute is valid
-
replaceChild
public org.w3c.dom.Node replaceChild(org.w3c.dom.Node arg0, org.w3c.dom.Node arg1) throws org.w3c.dom.DOMException- Specified by:
replaceChildin interfaceorg.w3c.dom.Node- Overrides:
replaceChildin classKElement- Throws:
org.w3c.dom.DOMException- See Also:
ParentNode.replaceChild(org.w3c.dom.Node, org.w3c.dom.Node)
-
removeChild
public org.w3c.dom.Node removeChild(org.w3c.dom.Node arg0) throws org.w3c.dom.DOMException- Specified by:
removeChildin interfaceorg.w3c.dom.Node- Overrides:
removeChildin classKElement- Throws:
org.w3c.dom.DOMException- See Also:
ParentNode.removeChild(org.w3c.dom.Node)
-
getTarget_JDFElement
public KElement getTarget_JDFElement(java.lang.String id, java.lang.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 searchattrib- name of the ID tag, defaults to "ID"- Returns:
- KElement the target of link - the element node.
-
insertBefore
public KElement insertBefore(java.lang.String elementName, org.w3c.dom.Node beforeChild, java.lang.String nameSpaceURI)
Inserts the Element elementName before the existing Element node beforeChild. If beforeChild isnull, 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:
insertBeforein classKElement- Parameters:
elementName- The elementName to insert the element itself will be createdbeforeChild- The reference element, i.e., the elemente before which the new element must be insertednameSpaceURI- The namespace to create elementName in- Returns:
- KElement the element being inserted
-
clearTargets
protected void clearTargets()
- Overrides:
clearTargetsin classKElement
-
cloneNewDoc
public KElement cloneNewDoc()
same as @see clone but the clone is in a new document- Overrides:
cloneNewDocin classKElement- 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
-
getEnumString
@Deprecated public java.lang.String getEnumString(int value, java.lang.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 stringallowedValues- - 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(java.util.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
-
getPartMapArray
protected JDFAttributeMapArray getPartMapArray()
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 refsbExpand- 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 linksbExpand- 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(java.lang.String value)
Deprecated.rRefs was deprecated in JDF 1.2Append to attribute rRefs if it is not yet in the list- Parameters:
value- the rRef token to append
-
removeFromrRefs
@Deprecated public int removeFromrRefs(java.lang.String value)
Deprecated.rRefs was deprecated in JDF 1.2Remove 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.2Get string attribute rRefs, i.e. split the blank separed attribute list- Returns:
-
getLinkRoot
public JDFResource getLinkRoot(java.lang.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
-
getLinkFromUserData
protected JDFResource getLinkFromUserData(java.lang.String myid)
-
version
@Deprecated public final java.lang.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
-
write2Dir
public java.io.File write2Dir(java.lang.String dir)
write to a directory - potentially generating a jobPartID- Parameters:
dir-- Returns:
-
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(java.lang.String enumName)
Deprecated.use EnumVersion.getEnum- Parameters:
enumName-- Returns:
- EnumVersion
-
getChildElements
@Deprecated public KElement[] getChildElements()
Deprecated.useKElement.getChildElementArray()
not typesafe in case of elements in foreign namespaces note that this method previously returned JDFElement[]Method getChildElements.- Returns:
- JDFElement[]
-
copyChildren
public void copyChildren(java.lang.String elementName, KElement src)- Overrides:
copyChildrenin classKElement- Parameters:
elementName-src-
-
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 fornMax- 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(java.lang.String value)
Append a token to attribute BestEffortExceptions- Parameters:
value- the new BestEffortExceptions token
-
removeFromBestEffortExceptions
public void removeFromBestEffortExceptions(java.lang.String value)
Remove a token from attribute BestEffortExceptions- Parameters:
value- the BestEffortExceptions token to remove
-
getBestEffortExceptions
public java.lang.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(java.lang.String value)
Append a token to attribute MustHonorExceptions- Parameters:
value- the new of MustHonorExceptions token
-
removeFromMustHonorExceptions
public void removeFromMustHonorExceptions(java.lang.String value)
Remove a token from attribute MustHonorExceptions- Parameters:
value- the new of MustHonorExceptions token
-
getMustHonorExceptions
public java.lang.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(java.lang.String value)
Append a token to attribute OperatorInterventionExceptions- Parameters:
value- the new of OperatorInterventionExceptions token
-
removeFromOperatorInterventionExceptions
public void removeFromOperatorInterventionExceptions(java.lang.String value)
Remove a token from attribute OperatorInterventionExceptions- Parameters:
value- the new of OperatorInterventionExceptions token
-
getOperatorInterventionExceptions
public java.lang.String getOperatorInterventionExceptions()
gets the value of attribute OperatorInterventionExceptions- Returns:
- the attribute value
-
setDescriptiveName
public void setDescriptiveName(java.lang.String value)
Set attribute DescriptiveName- Parameters:
value- value to set the attribute to
-
getDescriptiveName
public java.lang.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(java.lang.String idUsage, java.lang.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 generalIDidValue- the IDValue attribute of the generalID- Returns:
- the newly created GeneralID
-
appendGeneralID
public JDFGeneralID appendGeneralID(java.lang.String idUsage, java.lang.String idValue, JDFAutoGeneralID.EnumDataType namedfeature)
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 generalIDidValue- the IDValue attribute of the generalIDnamedfeature- the datatype - may be null- 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(java.lang.String idUsage, java.lang.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 toidValue- value to set the attribute to- Returns:
- the newly set GeneralID
-
removeGeneralID
public void removeGeneralID(java.lang.String idUsage)
removes GeneralID with the IDUsage idUsage- Parameters:
idUsage- value to set the attribute to
-
getGeneralID
public java.lang.String getGeneralID(java.lang.String idUsage)
Gets IDValue of the GeneralID with IDUsage=idUsage null, if none exists- Parameters:
idUsage-- Returns:
- String the attribute value
-
getGeneralID
public java.lang.String getGeneralID(java.lang.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
@Deprecated public VectorMap<java.lang.String,JDFGeneralID> getGeneralIDVectorMap()
Deprecated.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
-
getGeneralIDListMap
public ListMap<java.lang.String,JDFGeneralID> getGeneralIDListMap()
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(java.lang.String elementName, java.lang.String nameSpaceURI)
- Overrides:
appendElementin classKElement- 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(java.lang.String _name, int index)
Gets the Comment with a given @Name- Parameters:
_name- Comment/@Nameindex- number of elements to skip- Returns:
- JDFComment - the matching element
-
getCommentText
public java.lang.String getCommentText(java.lang.String _name, int index)Gets the Comment with a given @Name- Parameters:
_name- Comment/@Nameindex- number of elements to skip- Returns:
- JDFComment - the matching element
-
getCreateComment
public JDFComment getCreateComment(java.lang.String _name, int index)
Gets the Comment with a give @Name- Parameters:
_name- Comment/@Nameindex- 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(java.lang.String nodeName, java.lang.String attName, java.lang.String nameSpaceURI, java.lang.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 forattName- attribute name to search fornameSpaceURI- namespace to search forattVal- a special value to search forindex- if more then one child meets the condition, you can specify the one to return via an indexbDirect- 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(java.lang.String nodeName, java.lang.String attName, java.lang.String nameSpaceURI, java.lang.String attVal, int index, boolean bDirect)
GetChildWithAttribute - Get a child with matching attributesdefault: getChildWithAttribute(nodeName, attName, null,attValue, 0, true)
- Overrides:
getChildWithAttributein classKElement- Parameters:
nodeName- name of the child node to search forattName- attribute name to search fornameSpaceURI- namespace to search forattVal- 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 indexbDirect- 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(java.lang.String attName, java.lang.String attVal, AttributeInfo.EnumAttributeType dataType)test whether the attributes described by attName and attVal exist
- Parameters:
attName- the name of the attribute to look forattVal- the value of the attribute to look for; a values of "*" is treated as true if the attribute exists, regardless of its valuedataType- 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, java.lang.String attName, java.lang.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 nameid- attribute ID valuechildToExclude- here can be specified, if this method should exclude a child-element when searching This is useful, when searching a tree upud- userdata with reference to id cache, if null, no caching- Returns:
- KElement the element specified by id and name
-
getAllRefs
public java.util.HashSet<JDFElement> getAllRefs(java.util.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(java.lang.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:
matchesPathin classKElement- Parameters:
path- xpath to match- Returns:
- boolean true, if this matches the given xpath
-
getValueForNewAttribute
public static java.lang.String getValueForNewAttribute(KElement ke, java.lang.String attName)
gets a reasonable value for an attribute- Parameters:
ke-attName-- Returns:
-
getURLDoc
protected JDFDoc getURLDoc(java.lang.String url)
returns the jdf doc referenced by url- Parameters:
url-- Returns:
- the document
-
getURLInputStream
protected java.io.InputStream getURLInputStream(java.lang.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
-
getSchemaURL
public static java.lang.String getSchemaURL(JDFElement.EnumVersion version)
get the schemaURL based on a version- Parameters:
version-- Returns:
-
init
public boolean init()
Description copied from class:KElementMethod init. Superclass of all inits- Overrides:
initin classKElement- Returns:
- boolean true always
- See Also:
KElement.init()
-
parseFile
public static JDFElement parseFile(java.io.File file)
- Parameters:
filename-- Returns:
-
parseFile
public static JDFElement parseFile(java.lang.String filename)
- Parameters:
filename-- Returns:
-
parseStream
public static JDFElement parseStream(java.io.InputStream s)
- Parameters:
s-- Returns:
-
parseString
public static JDFElement parseString(java.lang.String string)
- Parameters:
string-- Returns:
-
-