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:
Serializable,Cloneable,IStreamWriter,Element,ElementTraversal,EventTarget,Node,NodeList,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
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBoolean Enumeration from JDF Spec Orientation of a physical resource.static final classColors of preprocessed products such as Wire-O binders and cover leaflets.static final classEnumeration of valid nodestatus types Identifies the status of the node.static final classOrientation Enumeration
Orientation of a physical resource.static final classEnumeration of various pool typesstatic final classSeparation Enumeration identifies the separation name.static final classThe policy for this element indicates what happens when unsupported settings, (i.e., subelements, attributes or attribute values), are present in the element.static final classEnumeration 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 final classEnumeration strings for Version NOTE: If not specified the version defaults to Version 1.3static final classXYRelation Enumeration
XML attributes of type XYRelation define the relationship between two ordered numbers.static enumNested classes/interfaces inherited from class org.cip4.jdflib.core.KElement
KElement.MultiAttributeComparator, KElement.SimpleElementNameComparator, KElement.SimpleNodeComparator, KElement.SingleAttributeComparator, KElement.SingleXPathComparator -
Field Summary
Fields inherited from class org.apache.xerces.dom.ElementNSImpl
localName, namespaceURIFields inherited from class org.apache.xerces.dom.ElementImpl
attributes, nameFields inherited from class org.apache.xerces.dom.ParentNode
firstChild, fNodeListCache, ownerDocumentFields inherited from class org.apache.xerces.dom.ChildNode
nextSibling, previousSiblingFields 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_NODEFields 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_NODEFields inherited from interface org.w3c.dom.TypeInfo
DERIVATION_EXTENSION, DERIVATION_LIST, DERIVATION_RESTRICTION, DERIVATION_UNION -
Constructor Summary
ConstructorsConstructorDescriptionJDFElement(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument, String qualifiedName) Constructor for JDFElementJDFElement(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument, String myNamespaceURI, String qualifiedName) Constructor for JDFElementJDFElement(org.apache.xerces.dom.CoreDocumentImpl myOwnerDocument, String myNamespaceURI, String qualifiedName, String myLocalName) Constructor for JDFElement -
Method Summary
Modifier and TypeMethodDescriptionappendAnchor(String strName) create and append a unique id, keep the existing one if it already existsvoidappendBestEffortExceptions(String value) Append a token to attribute BestEffortExceptionsAppends element Comment to the end of 'this'appendElement(String elementName, String nameSpaceURI) append an empty GeneralIDappendGeneralID(String idUsage, String idValue) append a GeneralID with idValue, duplicate entries are retained generalID elements are always placed first and new GeneralID elements are appended at the end of the listappendGeneralID(String idUsage, 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 listappendHRef(String idRef, String refAttribute, String nameSpaceURI) append a reference with a specific idappendHRef(JDFResource target, String refAttribute, String preSet) append a reference to a target node automatically generate a unique ID attribute for target, if it does not existvoidappendMustHonorExceptions(String value) Append a token to attribute MustHonorExceptionsvoidAppend a token to attribute OperatorInterventionExceptionsAppends element JDFPreview to the end of 'this'voidappendrRefs(String value) Deprecated.rRefs was deprecated in JDF 1.2attributeType(String attributeName) Returns the type of the given attribute for the latest JDF version.protected voidsame as @see clone but the clone is in a new documentvoidcopyChildren(String elementName, KElement src) copies a node into this, ignoring identical node names i.e.static JDFElementcreateRoot(String nodename) create a new root documentstatic JDFElementcreateRoot(String nodename, JDFElement.EnumVersion v) create a new root documentlist of all deprecated attributes.voideraseDefaultAttributes(boolean bRecurse) remove all default attributes from this i.e.booleanexclusiveOneOfAttribute(JDFElement.EnumValidationLevel level, String att1, String att2, String att3, String att4) return true if no more than one of att1 or att2 exists or exactly one of att1 or att2 exists depending on levelbooleanexclusiveOneOfElement(JDFElement.EnumValidationLevel level, String elm1, String ns1, String elm2, String ns2) return true if no more than one of att1 or att2 exists or exactly one of att1 or att2 exists depending on levelfinal booleanfixVersion(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 versionsgetAllRefs(HashSet<JDFElement> vDoneRefs, boolean bRecurse) Gets inter-resource linked resource IDsgetAtrType(String attributeName) returns the data type of a given attributefinal AttributeInfopublic version of getTheAttributeInfoGets the value of attribute BestEffortExceptionsgetChildElement(int n) Deprecated.use getElement(null, null ,n)KElement[]Deprecated.useKElement.getChildElementArray()
not typesafe in case of elements in foreign namespaces note that this method previously returned JDFElement[]getChildElementVector(String nodeName, String nameSpaceURI, JDFAttributeMap mAttrib, boolean bAnd, int maxSize, boolean bResolveTarget) Get all children from the actual element matching the given conditions
does NOT get refElement targets although the attributes are checked in the target elements in case of refElementsgetChildElementVector_JDFElement(String nodeName, String nameSpaceURI, JDFAttributeMap mAttrib, boolean bAnd, int maxSize, boolean bResolveTarget) getChildIds(String attrib, String element, String nameSpaceURI) GetChildIds - get a set of all known id's in child nodesgetChildrenByTagName(String elementName, String nameSpaceURI, JDFAttributeMap mAttrib, boolean bDirect, boolean bAnd, int maxSize) Gets children of 'this' by tag name, nameSpaceURI and attribute map, if the attribute map is not empty.
Searches the entire tree including hidden nodes that are children of non-matching nodesgetChildrenByTagName(String elementName, String nameSpaceURI, JDFAttributeMap mAttrib, boolean bDirect, boolean bAnd, int maxSize, boolean bFollowRefs) Gets children of 'this' by tag name, nameSpaceURI and attribute map, if the attribute map is not empty.
Searches the entire tree including hidden nodes that are children of non-matching nodesgetChildWithAttribute(String nodeName, String attName, String nameSpaceURI, String attVal, int index, boolean bDirect) GetChildWithAttribute - Get a child with matching attributesgetChildWithMatchingAttribute(String nodeName, String attName, String nameSpaceURI, String attVal, int index, boolean bDirect, AttributeInfo.EnumAttributeType dataType) Gets a child with matching attributes, also follows refelementsgetComment(int iSkip) Gets the iSkip-th element CommentgetComment(String _name, int index) Gets the Comment with a given @NamegetCommentText(String _name, int index) Gets the Comment with a given @NameGet string attribute CommentURLgetCreateComment(int iSkip) Gets the iSkip-th element Comment.getCreateComment(String _name, int index) Gets the Comment with a give @NamegetCreateElement_JDFElement(String nodeName, String nameSpaceURI, int iSkip) Gets the iSkip-th child node with matching nodeName and nameSpaceURI, optionally creates it if it doesn't exist.getCreatePreview(int iSkip) Gets the iSkip-th element JDFPreview.getCreateRefElement(JDFResource target) gets an inter resource link to a target resource., creates it if it does not existprotected static KElementgetDeepElementByID(KElement base, String attName, String id, KElement childToExclude, XMLDocUserData ud) this is an optimized version of GetDeepElement() which returns a complete list of elements.map of all defaults from the schemastatic JDFElement.EnumVersionreturns the JDFElement::EnumVersion, where new elements will be generated in by defaultgetDeprecatedAttributes(int nMax) This function first, gets all deprecated attributesgetDeprecatedElements(int nMax) Vector of deprecated elements below the current element.Get string attribute DescriptiveNamegetElement(String nodeName, String nameSpaceURI, int iSkip) Gets an existing iSkip-th child node with matching nodeName and nameSpaceURIgetElement_JDFElement(String nodeName, String nameSpaceURI, int iSkip) same as KElement.GetElement, but follows references as well.
Thus the returned value is the target of the refElement unless the requested element is explicitely a refElement, which is specified by requesting an element with nodeName="XXXRef".
Invalid refelements are simply skipped and are not filled into the vectorget Element ID prefixfinal ElementInfoReturns a vector which contains the childs of the actual element.intgetEnumAttribute(String key, Vector v, String nameSpaceURI, int def, boolean bInherit) Deprecated.use EnumXYZ.getEnum(getAttribute(key, namespaceURI, def)Vector<? extends org.apache.commons.lang.enums.ValuedEnum>getEnumerationsAttribute(String key, String nameSpaceURI, org.apache.commons.lang.enums.ValuedEnum enu, boolean bInherit) defines an enumerated list of attributes; used by the automated code generatorgetEnumerationsAttribute(String key, Vector v, String nameSpaceURI, int def, boolean bInherit) Deprecated.use getEnumerationsAttribute(key, nameSpaceURI, EnumXYZ.getEnum(0), bInherit)org.apache.commons.lang.enums.ValuedEnumGet the ValuedEnum for an enumerated attributeintgetEnumNodeName(Vector allowedValues) Deprecated.getEnumString(int value, String allowedValues) Deprecated.use EnumXYZ.getEnum(int)getFirstVersion(String eaName, boolean bElement) get the first JDF version where attribute name or element name is validgetGeneralID(int i) gets attribute GeneralIDgetGeneralID(String idUsage) Gets IDValue of the GeneralID with IDUsage=idUsage null, if none existsgetGeneralID(String idUsage, int iPos) Gets IDValue of the GeneralID with IDUsage=idUsage null, if none existsGets a map of all GeneralID key-value Pair lists if multiple generalIDs with the same IDUsage are specified, each GeneralID is added to the VectorMapGets a map of all GeneralID key-value Pairs if multiple generalIDs with the same IDUsage are specified, the last one is added to the mapDeprecated.getHRef()Deprecated.use getrRef of the coresponding sub classes insteadDeprecated.use getHRefs(VString vDoneRefs, boolean bRecurse, boolean bExpand)GetHRefs - get inter-resource linked resource IDsGet a vector of direct child element names that exist but are unknown in this element.getInsertElementVector(VString vKnownKeys, VString vUnique) get avStringvector of direct child element names that may be inserted in this element.getInvalidAttributes(JDFElement.EnumValidationLevel level, boolean bIgnorePrivate, int nMax) get invalid attributesgetInvalidElements(JDFElement.EnumValidationLevel level, boolean bIgnorePrivate, int nMax) get invalid elementsgetInvalidElements_JDFElement(JDFElement.EnumValidationLevel level, boolean bIgnorePrivate, int nMax) Method GetInvalidElements_JDFElement.Get the JDF rootGet the JMF rootgetLastVersion(String eaName, boolean bElement) get the last JDF version where attribute name or element name is validprotected JDFResourcegetLinkFromUserData(String myid) getLinkRoot(String id) Gets the root resource of the target returns a null JDFElement if it does not exist or the name mangling is illegalgetMaxVersion(boolean bInherit) get attribute MaxVersion, defaults to version if not setgetMissingAttributes(int nMax) This function first, gets all required attributes and then compare them with the attributes present and returns a Vector with the missing attributesgetMissingAttributeVector(VString vReqKeys, int nMax) checks if the curent element has other attributes then also present in vReqKeys.getMissingElements(int nMax) get the missing elements as a vectorgetMissingElementVector(VString vRequiredKeys, int nMax) Returns a vector with missing elementsgets the value of attribute MustHonorExceptionsgetNamesVector(String key) Get the vector of valid attribute values for an enumerated attributegets the value of attribute OperatorInterventionExceptionsGet the document object that owns thisget 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 JDFNodestatic version of GetParentJDF - get the local JDF node that this element resides in.protected JDFAttributeMapgets the part mapprotected JDFAttributeMapArrayGetPartMapVector returns a vector of partmaps, null if no parts are presentprotected VJDFAttributeMapGetPartMapVector returns a vector of partmaps, null if no parts are presentgetPrereleaseAttributes(int nMax) This function first, gets all prerelease attributes It ignores any atrributes that have been added by a schema parsergetPrereleaseElements(int nMax) Comma separated list of all prerelease elements.getPreview(int iSkip) Gets the iSkip-th element CommentgetRefElement(JDFResource target) gets an inter resource link to a target resource.gets the vector of all RefElementsprotected StringGet the string of a refelement that points to this, i.e.NodeName+"Ref"getrRefs()Deprecated.rRefs was deprecated in JDF 1.2static Stringreturns the official JDF schema URI for a particular version fool proof schema url as of November 5th, 2003static StringgetSchemaURL(int majorVersion, int minorVersion) static StringgetSchemaURL(JDFElement.EnumVersion version) get the schemaURL based on a versiongetSettingsPolicy(boolean bInherit) Typesafe enumerated attribute SettingsPolicygets the value of attribute StatusDeprecated.use the respective subclasses getTarget functionslooking for a specified target with an id, e.g.getTarget_JDFElement(String id, String attrib) Gets the target of link.protected AttributeInfoprotected AttributeInfoprotected ElementInfoprotected ElementInfoorg.apache.commons.lang.enums.ValuedEnumGet the EnumAttributeType for an attributegetUnknownAttributes(boolean bIgnorePrivate, int nMax) Get the unknown attributesgetUnknownAttributeVector(VString vKnownKeys, VString vInNameSpace, int nMax) Gets the unknown attributesgetUnknownElements(boolean bIgnorePrivate, int nMax) Get a vector with the unknown elementsgetUnknownElementVector(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 JDFDocreturns the jdf doc referenced by urlprotected InputStreamgetURLInputStream(String url) get the input stream that reads from URLstatic StringgetValueForNewAttribute(KElement ke, String attName) gets a reasonable value for an attributeDeprecated.060505 use getVersion(boolean);getVersion(boolean bInherit) get the version of this elementgetvHRefRes(boolean bRecurse) Deprecated.use getvHRefRes(true,false);getvHRefRes(boolean bRecurse, boolean bExpand) get inter-resource linked resource vectorget/create the associated XMLDocUserDatabooleanChecks, if this has any missing attributesbooleanTests, 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 elementsidString(int id) Deprecated.060307 internal legacy methodbooleanincludesMatchingAttribute(String attName, String attVal, AttributeInfo.EnumAttributeType dataType) test whether the attributes described by attName and attVal exist<br< also checking ranges and NMTOKENS etc.booleaninit()Method init.voidinlineRefElements(String nodeName, String nameSpaceURI, boolean bDirect) inline refelements that match nodename and nameSpaceURIinsertBefore(String elementName, Node beforeChild, String nameSpaceURI) Inserts the Element elementName before the existing Element node beforeChild.booleanDeprecated.use instanceof JDFResourceLink insteadstatic booleanisCommentStatic(KElement kElem) Deprecated.use instanceof JDFComment insteadbooleanbooleanisDirty()Get the dirty status of this elementstatic booleanchecks whether kElem is in the XJDF or the JDF namespacestatic booleanchecks whether kElem is in the JDF namespacestatic booleanchecks whether kElem is in the XJDF or the JDF namespacestatic booleanchecks whether kElem is in the JDF namespacebooleanDeprecated.- use isInJDFNameSpaceStatic(kElem)static booleanchecks whether kElem is in the JDF namespacestatic booleanisInJDFNameSpaceStatic(KElement kElem) checks whether kElem is in the JDF namespacestatic booleanchecks whether kElem is in the JDF namespacestatic booleanisInXJDFNameSpaceStatic(KElement kElem) checks whether kElem is in the JDF namespacebooleanDeprecated.use instanceof JDFNode insteadbooleanDeprecated.use instanceof JDFRefElementstatic booleanisRefElementStatic(KElement kElem) Deprecated.use instanceof JDFRefElementbooleanDeprecated.use instanceof JDFResource insteadbooleanDeprecated.use instanceof JDFResourceLink.IsResourceLink insteadstatic booleanisResourceLinkStatic(KElement kElem) Deprecated.use instanceof JDFResourceLink insteadstatic booleanDeprecated.use instanceof JDFResource insteadbooleanis this thing a ResourceUpdate?booleanMother of all validatorsbooleanMother 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/XJMFget the LDFLib versionKElement is generic, therefore the list is emptyComma separated list of all known element names;booleanmatchesPath(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 "*"gets a new ID for the elementintnumChildElements(String nodeName, String nameSpaceURI) same asKElement.numChildElements(String, String), but also follows references.
Invalid refelements are simply skipped.intnumChildElements_JDFElement(String nodeName, String nameSpaceURI) Comma separated list of all optional attributes.list of all optional element names; KElement is generic, therefore the list is emptystatic JDFElementstatic JDFElementstatic JDFElementstatic JDFElementparseString(String string) Comma separated list of all deprecated attributes.comma separated list of all prerelease Elements that may occur in a future versionrefElement(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)voidDeprecated.use removeAttributeremoveChild(String node, String nameSpaceURI, int n) remove child noderemoveChild(Node arg0) voidremoveChildren(String nodeName, String nameSpaceURI, JDFAttributeMap mAttrib) Remove children that match nodeName and nameSpaceURIvoidDeprecated.use RemovePrivatevoidRemove a token from attribute BestEffortExceptionsvoidRemove a token from attribute MustHonorExceptionsvoidRemove a token from attribute OperatorInterventionExceptionsintremoveFromrRefs(String value) Deprecated.rRefs was deprecated in JDF 1.2voidremoveGeneralID(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.voidDeprecated.use removeAttributereplaceChild(Node arg0, Node arg1) Comma separated list of all required attributes.static booleanDeprecated.use EnumValidationLevel.isRequired()voidsetAttribute(String key, JDFNumList value, String nameSpaceURI) Sets an element attributevoidsetAttribute(String key, JDFNumList value, String nameSpaceURI, int precision) Sets an element attributevoidsetAttribute(String key, JDFRangeList value, String nameSpaceURI) Sets an element attributevoidsetAttribute(String key, JDFRangeList value, String nameSpaceURI, int precision) Sets an element attributevoidsetAttribute(String key, JDFRange value, String nameSpaceURI) Sets an element attributevoidsetAttribute(String key, JDFRange value, String nameSpaceURI, int precision) Sets an element attributevoidsetAttribute(String key, JDFDuration value, String nameSpaceURI) Sets an element attributevoidsetAttributeNameTimeStamp(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 valuessetCommentText(String text) set comment text , also creates the comment if not theresetCommentText(String text, String name) set comment text , also creates the comment if not therevoidsetCommentURL(String value) Set attribute CommentURLstatic voidsets the JDFElement::EnumVersion, where new elements will be generated in by default
Attention this is static and global.voidsetDescriptiveName(String value) Set attribute DescriptiveNamevoidsetDirty(boolean bAttribute) Set this element as dirtyprotected voidsetEnumerationsAttribute(String key, Vector<? extends org.apache.commons.lang.enums.ValuedEnum> value, String nameSpaceURI) set an enumerated list of attributes; used by the automated code generatorsetGeneralID(String idUsage, 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 valuesvoidSets attribute OperatorInterventionExceptions with the vector of valuesprotected voidsetPartMap(JDFAttributeMap mPart) sets part to mPartprotected voidsetPartMapVector(VJDFAttributeMap vPart) sets all parts to those defined in vPartsvoidSet attribute SettingsPolicyvoidSets attribute StatusvoidsetVersion(JDFElement.EnumVersion enumVer) set Version to enumVervoidsetvStringAttribute(String key, JDFNameRange value, String nameSpaceURI) Deprecated.static JDFElement.EnumVersionstringToVersion(String enumName) Deprecated.use EnumVersion.getEnumlist of all unique Elements that may occur at most once; KElement is generic, therefore the list is emptyDeprecated.use KElement.fillHashSet(ElementName.RREF,null,hashSet)booleanvalidAttribute(String key, String nameSpaceURI, JDFElement.EnumValidationLevel level) is the attribute valid and of type iType.booleanvalidAttribute(String key, AttributeInfo.EnumAttributeType iType, boolean bRequired, String nameSpaceURI) Deprecated.clean up attributeInfo tables instead use KElement public boolean validAttribute(String key,String nameSpaceURI, EnumValidationLevel level)booleanvalidEnumAttribute(String key, Vector v, boolean bRequired, String nameSpaceURI) Deprecated.use getTheAttributeInfo insteadbooleanvalidEnumerationsAttribute(String key, Vector vs, boolean bRequired, String nameSpaceURI) Deprecated.use getTheAttributeInfo insteadprotected booleanis the ressource r linkable by this? used by ResorceLink and refElementfinal Stringversion()Deprecated.use getDefaultJDFVersion()write to a directory - potentially generating a jobPartIDMethods 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, xmlnsPrefixMethods inherited from class org.apache.xerces.dom.ElementNSImpl
getLocalName, getPrefix, getTypeName, getTypeNamespace, getXMLBaseAttribute, isDerivedFrom, setTypeMethods 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, synchronizeDataMethods inherited from class org.apache.xerces.dom.ParentNode
getChildNodes, getChildNodesUnoptimized, getFirstChild, getLastChild, getLength, getOwnerDocument, getTextContent, hasChildNodes, item, setTextContent, synchronizeChildrenMethods inherited from class org.apache.xerces.dom.ChildNode
getNextSibling, getParentNode, getPreviousSiblingMethods 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, setUserDataMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.w3c.dom.Element
getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getSchemaTypeInfo, getTagName, hasAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNSMethods 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 Details
-
JDFElement
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, String myNamespaceURI, 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, String myNamespaceURI, String qualifiedName, 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 Details
-
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
create a new root document- Parameters:
nodename-- Returns:
-
createRoot
create a new root document- Parameters:
nodename-namespaceURI-- Returns:
-
getTheAttributeInfo
- Returns:
-
getAttributeInfo
public version of getTheAttributeInfo- Returns:
-
getAtrType
returns the data type of a given attribute- Parameters:
attributeName- the localname of the attribute to check- Returns:
- the data type of attributeName
-
getFirstVersion
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
get/create the associated XMLDocUserData- Returns:
- the XMLDocUserData of this
-
getLastVersion
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
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
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
map of all defaults from the schema- Returns:
- JDFAttributeMap the comma separated list of deprecated attribute keys
-
getTheAttributeInfo_JDFElement
- Returns:
-
getTheElementInfo_JDFElement
-
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
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
KElement is generic, therefore the list is empty- Returns:
- String the comma separated list of known attribute keys
-
getMissingAttributeVector
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
- Returns:
- the elementinfo
-
getElementInfo
- Returns:
- the elementinfo
-
getMissingElements
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
- Returns:
- required elements
- Since:
- 060517 changed signature to 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
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
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
Comma separated list of all prerelease elements.default: getPrereleaseElements(99999999)
- Parameters:
nMax-- Returns:
- VString vector with nMax missing elements
-
getDeprecatedElements
Vector of deprecated elements below the current element.default: getDeprecatedElements(99999999)
- Parameters:
nMax-- Returns:
- VString vector with nMax missing elements
-
knownElements
Comma separated list of all known element names;- Returns:
- String the comma separated list of known element names
-
getMissingAttributes
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
This function first, gets all deprecated attributes- Parameters:
nMax- maximum size of the returned Vector- Returns:
- Vector vector with the deprecated attributes
-
getUnknownAttributes
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
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
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
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
Get the EnumAttributeType for an attribute- Parameters:
key- the local name of the attribute- Returns:
- EnumAttributeType of the attribute
-
validAttribute
public boolean validAttribute(String key, String nameSpaceURI, JDFElement.EnumValidationLevel level) is the attribute valid and of type iType. iType is of type EnumAttributeType but may be expanded in child classesdefault: validAttribute(key, null)
- Parameters:
key- the attribute namenameSpaceURI- attribute namespace urilevel- the validation level- Returns:
- boolean: true if the attribute is valid
-
getEnumforAttribute
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
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
Get a vector of direct child element names that exist but are unknown in this element.- Returns:
- a
vStringthat contains missing element keys
-
getInsertElementVector
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:
-
attributeType
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
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
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
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
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
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.use hasAttributeCheck Existance of attribute SettingsPolicy- Parameters:
bInherit- recurse through ancestors when searching- Returns:
- true if attribute exists
-
removeSettingsPolicy
Deprecated.use removeAttributeRemove attribute SettingsPolicy -
removeBestEffortExceptions
Deprecated.use removeAttributeRemove attribute BestEffortExceptions -
getHRef
Deprecated.use getrRef of the coresponding sub classes insteadGets the one and reference to an ID- Returns:
- String the rRef attribute
-
appendHRef
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
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
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
Sets an element attribute- Parameters:
key- the name of the attribute to setvalue- the JDFNumList to setnameSpaceURI- the nameSpace the attribute is in
-
setAttribute
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
Sets an element attribute- Parameters:
key- the name of the attribute to setvalue- the JDFNumberRangeList to setnameSpaceURI- the nameSpace the attribute is in
-
setAttribute
Sets an element attribute- Parameters:
key- the name of the attribute to setvalue- the JDFNumberRangeList to setnameSpaceURI- the nameSpace the attribute is inprecision-
-
setAttribute
Sets an element attribute- Parameters:
key- the name of the attribute to setvalue- the JDFXYRange to setnameSpaceURI- the nameSpace the attribute is in
-
setAttribute
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.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, String att1, String att2, String att3, String att4) return true if no more than one of att1 or att2 exists or exactly one of att1 or att2 exists depending on level- Parameters:
level- validation level, if level allows optional, no attribute also returns 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, String elm1, String ns1, String elm2, String ns2) return true if no more than one of att1 or att2 exists or exactly one of att1 or att2 exists depending on level- Parameters:
level- validation level, if level allows optional, no attribute also returns 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
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.use the respective subclasses getTarget functionsGet the target element of a link (string id)- Returns:
- JDFElement - the element that this reference refers to
-
getTarget
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
Get the JDF root- Returns:
- JDFNode - The root of the JDF File
-
getJMFRoot
Get the JMF root- Returns:
- JDFJMF - the root of the JMF file
-
isRefElement
Deprecated.use instanceof JDFRefElementIsRefElement - is this thing a RefElement?- Returns:
- true, if this is a refElement
-
isRefElementStatic
Deprecated.use instanceof JDFRefElementIsRefElement - is this thing a RefElement?- Parameters:
kElem-- Returns:
- true, if this is a refElement
-
isResource
Deprecated.use instanceof JDFResource insteadtests whether this Element is a Resource.- Returns:
- boolean - true, if it is a Resource.
-
isResourceStatic
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.use instanceof JDFResourceLink.IsResourceLink insteadMethod IsResourceLink.- Returns:
- boolean
-
isResourceLinkStatic
Deprecated.use instanceof JDFResourceLink insteadMethod IsResourceLinkStatic.- Parameters:
kElem-- Returns:
- 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.use instanceof JDFComment insteadMethod isCommentStatic.- Parameters:
kElem-- Returns:
- boolean - true, if this is an Comment-Element, otherwise false
-
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.- use isInJDFNameSpaceStatic(kElem)Method IsInJDFNameSpace.- Returns:
- boolean
-
removeExtensions
Deprecated.use RemovePrivateremove all private extensions form a jdf element and its children -
isInJDFNameSpaceStatic
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
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
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
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
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
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
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
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
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
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
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
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
Removes an inter resource link from this Element.- Parameters:
target- Target to remove
-
getRefElements
gets the vector of all RefElements- Returns:
- VElement - vector of JDFRefElements
-
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
inline refelements that match nodename and nameSpaceURI- Parameters:
nodeName- name of the refelement (without the "Ref")nameSpaceURI-bDirect- if true, get direct children only, else recurse into all sub-elements
-
getChildElementVector
public VElement getChildElementVector(String nodeName, String nameSpaceURI, JDFAttributeMap mAttrib, boolean bAnd, int maxSize, boolean bResolveTarget) Get all children from the actual element matching the given conditions
does NOT get refElement targets although the attributes are checked in the target elements in case of refElements- Overrides:
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:
-
getChildrenByTagName
public VElement getChildrenByTagName(String elementName, String nameSpaceURI, JDFAttributeMap mAttrib, boolean bDirect, boolean bAnd, int maxSize) Gets children of 'this' by tag name, nameSpaceURI and attribute map, if the attribute map is not empty.
Searches the entire tree including hidden nodes that are children of non-matching nodes- Overrides:
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:
-
getChildrenByTagName
public VElement getChildrenByTagName(String elementName, String nameSpaceURI, JDFAttributeMap mAttrib, boolean bDirect, boolean bAnd, int maxSize, boolean bFollowRefs) Gets children of 'this' by tag name, nameSpaceURI and attribute map, if the attribute map is not empty.
Searches the entire tree including hidden nodes that are children of non-matching nodes- Parameters:
elementName- elementname you are searching 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:
-
getChildElementVector_JDFElement
public VElement getChildElementVector_JDFElement(String nodeName, String nameSpaceURI, JDFAttributeMap mAttrib, boolean bAnd, int maxSize, boolean bResolveTarget) - Parameters:
nodeName-nameSpaceURI-mAttrib-bAnd-maxSize-bResolveTarget- - additional control how refelements are followed- Returns:
- See Also:
-
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:
-
getElement
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:
-
getElement_JDFElement
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
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
- Parameters:
nodeName-nameSpaceURI-- Returns:
-
removeChildren
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
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
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
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
put a timestamp in an attribute of the current node- Parameters:
attributeName- the attribute name to timestamptimestamp- the timestamp
-
setAttributes
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.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
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
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
Set attribute CommentURL- Parameters:
value- the CommentURL value
-
setCommentText
set comment text , also creates the comment if not there- Parameters:
text- the comment text to set- Returns:
JDFCommentthe comment
-
setCommentText
set comment text , also creates the comment if not there- Parameters:
text- the comment text to set- Returns:
JDFCommentthe comment
-
getCommentURL
Get string attribute CommentURL- Returns:
- the value of the attribute commentURL
-
getRefString
Get the string of a refelement that points to this, i.e.NodeName+"Ref"- Returns:
- the nodename of a refelement
-
jdfVersion
get the LDFLib version- Returns:
- the JDFLib version
-
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
- 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
returns the JDFElement::EnumVersion, where new elements will be generated in by default- Returns:
- the default version
-
setDefaultJDFVersion
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
get Element ID prefix- Returns:
- the ID prefix of JDFElement
-
newID
gets a new ID for the element- Parameters:
lastID- the highest ID that has been created before- Returns:
- the unique ID string
-
getEnumAttribute
@Deprecated public int getEnumAttribute(String key, Vector v, String nameSpaceURI, int def, boolean bInherit) Deprecated.use EnumXYZ.getEnum(getAttribute(key, namespaceURI, def)defines an enumerated list of attributes ; used by the automated code generator- Parameters:
key- the attribute 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 Vector getEnumerationsAttribute(String key, Vector v, String nameSpaceURI, int def, boolean bInherit) Deprecated.use getEnumerationsAttribute(key, nameSpaceURI, EnumXYZ.getEnum(0), bInherit)defines an enumerated list of attributes ; used by the automated code generator- Parameters:
key- the attribute 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 Vector<? extends org.apache.commons.lang.enums.ValuedEnum> getEnumerationsAttribute(String key, String nameSpaceURI, org.apache.commons.lang.enums.ValuedEnum enu, boolean bInherit) defines an enumerated list of attributes; used by the automated code generator- Parameters:
key- the attribute local 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(String key, Vector<? extends org.apache.commons.lang.enums.ValuedEnum> value, String nameSpaceURI) set an enumerated list of attributes; used by the automated code generator- Parameters:
key- the attribute namevalue- the enumeration vectornameSpaceURI- attribute namespace uri- Throws:
JDFException- wrong data type in vector
-
validAttribute
@Deprecated public boolean validAttribute(String key, AttributeInfo.EnumAttributeType iType, boolean bRequired, String nameSpaceURI) Deprecated.clean up attributeInfo tables instead use KElement public boolean validAttribute(String key,String nameSpaceURI, EnumValidationLevel level)is the attribute valid and of type iType?
iType is of type EnumAttributeType, but may be expanded in child classes- Parameters:
key- the attribute 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(String key, Vector v, boolean bRequired, 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(String key, Vector vs, boolean bRequired, 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
- Specified by:
replaceChildin interfaceNode- Overrides:
replaceChildin classKElement- Throws:
DOMException- See Also:
-
ParentNode.replaceChild(org.w3c.dom.Node, org.w3c.dom.Node)
-
removeChild
- Specified by:
removeChildin interfaceNode- Overrides:
removeChildin classKElement- Throws:
DOMException- See Also:
-
ParentNode.removeChild(org.w3c.dom.Node)
-
getTarget_JDFElement
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
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
same as @see clone but the clone is in a new document- Overrides:
cloneNewDocin classKElement- Returns:
- See Also:
-
copyInto
copies a node into this, ignoring identical node names i.e. duplicating elements -
getEnumString
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
Get the document object that owns this- Returns:
- JDFDoc the owner document of this
-
getEnumNodeName
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
GetPartMapVector returns a vector of partmaps, null if no parts are present- Returns:
- Vector
-
getPartMapArray
GetPartMapVector returns a vector of partmaps, null if no parts are present- Returns:
- Vector
-
getPartMap
gets the part map- Returns:
- JDFAttributeMap, of the part element
-
setPartMapVector
sets all parts to those defined in vParts- Parameters:
vPart- vector of attribute maps for the parts
-
setPartMap
sets part to mPart- Parameters:
mPart- attribute map for the part to set
-
removePartMap
removes the part defined in mPart- Parameters:
mPart- attribute map for the part to remove
-
hasPartMap
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.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.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
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.use getvHRefRes(true,false);get inter-resource linked resource vector- Parameters:
bRecurse-- Returns:
- VElement
-
getvHRefRes
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.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.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.rRefs was deprecated in JDF 1.2Get string attribute rRefs, i.e. split the blank separed attribute list- Returns:
-
getLinkRoot
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
-
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
write to a directory - potentially generating a jobPartID- Parameters:
dir-- Returns:
-
setVersion
set Version to enumVer- Parameters:
enumVer- the EnumVersion to set
-
getVersion
Deprecated.060505 use getVersion(boolean);get EnumVersion attribute Version- Returns:
- EnumVersion - attribute value
-
getVersion
get the version of this element- Parameters:
bInherit- if true, check ancestor nodes- Returns:
- the version corresponding to this element
-
getMaxVersion
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.use EnumVersion.getEnum- Parameters:
enumName-- Returns:
- EnumVersion
-
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
- Overrides:
copyChildrenin classKElement- Parameters:
elementName-src-
-
getChildElement
Deprecated.use getElement(null, null ,n)Method getChildElement- Parameters:
n- Element index n (1 based)- Returns:
- JDFElement
-
getUnknownPoolElements
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
Set attribute SettingsPolicy- Parameters:
value- the SettingsPolicy to set
-
getSettingsPolicy
Typesafe enumerated attribute SettingsPolicy- Parameters:
bInherit- recurse through ancestors when searching- Returns:
-
setBestEffortExceptions
Sets attribute BestEffortExceptions with the vector of values- Parameters:
value- vector of BestEffortExceptions tokens
-
appendBestEffortExceptions
Append a token to attribute BestEffortExceptions- Parameters:
value- the new BestEffortExceptions token
-
removeFromBestEffortExceptions
Remove a token from attribute BestEffortExceptions- Parameters:
value- the BestEffortExceptions token to remove
-
getBestEffortExceptions
Gets the value of attribute BestEffortExceptions- Returns:
- the attribute value
-
setMustHonorExceptions
Sets attribute MustHonorExceptions with the vector of values- Parameters:
value- vector of MustHonorExceptions tokens
-
appendMustHonorExceptions
Append a token to attribute MustHonorExceptions- Parameters:
value- the new of MustHonorExceptions token
-
removeFromMustHonorExceptions
Remove a token from attribute MustHonorExceptions- Parameters:
value- the new of MustHonorExceptions token
-
getMustHonorExceptions
gets the value of attribute MustHonorExceptions- Returns:
- the attribute value
-
setOperatorInterventionExceptions
Sets attribute OperatorInterventionExceptions with the vector of values- Parameters:
value- the vector of OperatorInterventionExceptions tokens
-
appendOperatorInterventionExceptions
Append a token to attribute OperatorInterventionExceptions- Parameters:
value- the new of OperatorInterventionExceptions token
-
removeFromOperatorInterventionExceptions
Remove a token from attribute OperatorInterventionExceptions- Parameters:
value- the new of OperatorInterventionExceptions token
-
getOperatorInterventionExceptions
gets the value of attribute OperatorInterventionExceptions- Returns:
- the attribute value
-
setDescriptiveName
Set attribute DescriptiveName- Parameters:
value- value to set the attribute to
-
getDescriptiveName
Get string attribute DescriptiveName- Returns:
- the attribute value
-
appendGeneralID
append an empty GeneralID- Returns:
- the newly created GeneralID
-
appendGeneralID
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(String idUsage, 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
gets attribute GeneralID- Parameters:
i- get the i'th element that fits- Returns:
- the attribute value
-
setGeneralID
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
removes GeneralID with the IDUsage idUsage- Parameters:
idUsage- value to set the attribute to
-
getGeneralID
Gets IDValue of the GeneralID with IDUsage=idUsage null, if none exists- Parameters:
idUsage-- Returns:
- String the attribute value
-
getGeneralID
Gets IDValue of the GeneralID with IDUsage=idUsage null, if none exists- Parameters:
idUsage-iPos-- Returns:
- String the attribute value
-
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<String, JDFGeneralID> the map of lists of attribute values
-
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<String, JDFGeneralID> the map of lists of attribute values
-
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
- 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
Appends element Comment to the end of 'this'- Returns:
- the newly created JDFComment
-
getCreateComment
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
Gets the iSkip-th element Comment- Parameters:
iSkip- number of elements to skip- Returns:
- JDFComment - the matching element
-
getComment
Gets the Comment with a given @Name- Parameters:
_name- Comment/@Nameindex- number of elements to skip- Returns:
- JDFComment - the matching element
-
getCommentText
Gets the Comment with a given @Name- Parameters:
_name- Comment/@Nameindex- number of elements to skip- Returns:
- JDFComment - the matching element
-
getCreateComment
Gets the Comment with a give @Name- Parameters:
_name- Comment/@Nameindex- number of elements to skip- Returns:
- JDFComment - the matching element
-
appendPreview
Appends element JDFPreview to the end of 'this'- Returns:
- the newly created JDFPreview
-
getCreatePreview
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
Gets the iSkip-th element Comment- Parameters:
iSkip- number of elements to skip- Returns:
- JDFPreview - the matching element
-
getChildWithMatchingAttribute
public JDFElement getChildWithMatchingAttribute(String nodeName, String attName, String nameSpaceURI, String attVal, int index, boolean bDirect, AttributeInfo.EnumAttributeType dataType) Gets a child with matching attributes, also follows refelements- Parameters:
nodeName- name of the child node to search 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(String nodeName, String attName, String nameSpaceURI, 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(String attName, String attVal, AttributeInfo.EnumAttributeType dataType) test whether the attributes described by attName and attVal exist<br< also checking ranges and NMTOKENS etc.- 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
Sets attribute Status- Parameters:
s- the status to set the attribute to
-
getStatus
gets the value of attribute Status- Returns:
- EnumNodeStatus
-
getDeepElementByID
protected static KElement getDeepElementByID(KElement base, String attName, String id, KElement childToExclude, XMLDocUserData ud) this is an optimized version of GetDeepElement() which returns a complete list of elements. Here we abort, when we found the first element that fits. (There is only one element, because the id must be unique)- Parameters:
base-attName- attribute 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
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
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
gets a reasonable value for an attribute- Parameters:
ke-attName-- Returns:
-
getURLDoc
returns the jdf doc referenced by url- Parameters:
url-- Returns:
- the document
-
getURLInputStream
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
get the schemaURL based on a version- Parameters:
version-- Returns:
-
init
public boolean init()Description copied from class:KElementMethod init. Superclass of all inits -
parseFile
- Parameters:
filename-- Returns:
-
parseFile
- Parameters:
filename-- Returns:
-
parseStream
- Parameters:
s-- Returns:
-
parseString
- Parameters:
string-- Returns:
-