public class JDFDoc extends XMLDoc
| Constructor and Description |
|---|
JDFDoc()
constructor
|
JDFDoc(Document document)
constructor from a document
note that the constructor will create a copy of the document in case it is not a typesafe DocumentJDFImpl
|
JDFDoc(DocumentJDFImpl document)
constructor
|
JDFDoc(String strDocType)
constructor - create the kind of JDF you need
|
JDFDoc(String strDocType,
JDFElement.EnumVersion version)
constructor - create the kind of JDF you need
|
JDFDoc(XMLDoc document)
constructor
note that the constructor will create a copy of the document in case it is not a typesafe DocumentJDFImpl
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearDirtyIDs()
clear the vector of all IDs of elements that are dirty
|
JDFDoc |
clone()
clone
|
int |
collectGarbageResources(VString nodeNames)
Deprecated.
use JDFNode.eraseUnlinkedResources
|
Element |
createElement(String elementName)
createElement create a JDFElement that floats in nirvana.
|
static JDFDoc |
createJDF(String jdfPath)
Deprecated.
simply use constructor
|
protected JDFDoc |
createRoot(Document document) |
String |
getContentType()
gets the content type
|
static String |
getContentType(KElement e)
gets the contentType for a given root element
|
XMLDocUserData |
getCreateXMLDocUserData()
get/create the associated XMLDocUserData - it is always there!
|
VString |
getDirtyIDs()
get a vector of all IDs of elements that are dirty
|
protected DocumentXMLImpl |
getImpl() |
boolean |
getInitOnCreate()
if true (the default) initialize element when they are created,
else don't call init() when an element is initially created
|
JDFNode |
getJDFNodeByID(String id)
Deprecated.
use getRoot().getTarget(id, AttributeName.ID) and cast.
|
JDFNode |
getJDFRoot()
GetJDFRoot - get the jdf root
|
JDFJMF |
getJMFRoot()
GetJMFRoot - get the jmf root
|
DocumentJDFImpl |
getMemberDocument()
getMemberDocument
|
XMLDoc |
getValidationResult() |
protected XMLDocUserData |
getXMLDocUserData()
Method getXMLDocUserData - get the associated XMLDocUserData
|
protected XMLParser |
getXMLParser()
get the correct parser for this type of document
|
protected boolean |
hasXMLDocUserData()
does the owner document of this have an associated XMLDocUserData
|
boolean |
isDirty(String strID)
is the node with ID dirty?
|
static JDFDoc |
parseFile(File file)
parse a JDF file
|
static JDFDoc |
parseFile(String fileName)
parse a JDF file
|
static JDFDoc |
parseStream(InputStream is)
parse a JDF input stream
|
static JDFDoc |
parseURL(String url,
javax.mail.BodyPart bp)
parse a given url
|
static void |
registerCustomClass(String strElement,
String packagepath)
register new custom class in the factory
|
protected void |
reparse(Document document) |
void |
setInitOnCreate(boolean bInitOnCreate)
if true (the default) initialize element when they are created,
else don't call init() when an element is initially created
|
protected void |
setMemberDoc(DocumentXMLImpl myDoc) |
KElement |
setRoot(String strDocType,
String namespaceURI)
initialize a new root of strDocType in the document called by constructor XMLDoc(String strDocType)
|
void |
setXPathValues(JDFAttributeMap valueMap)
set the xpath values of thei to the values in the node
|
String |
toString()
toString
|
UrlPart |
write2HttpURL(URL strURL,
UrlUtil.HTTPDetails det) |
HttpURLConnection |
write2HTTPURL(URL strURL,
UrlUtil.HTTPDetails det) |
JDFDoc |
write2URL(String strURL)
This method sends the contents of this JDFDoc to the URL
strURL and receives the response in the returned JDFDoc. |
appendChild, cloneNode, copyMeta, createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createDocumentType, createElementDefinition, createElementNS, createEntity, createEntityReference, createEvent, createNodeIterator, createNodeIterator, createNotation, createProcessingInstruction, createRange, createTextNode, createTreeWalker, createTreeWalker, equals, flush, getAttributes, getBodyPart, getChildNode, getChildNodes, getDocMemoryUsed, getDoctype, getDocumentElement, getElementById, getElementsByTagName, getElementsByTagNameNS, getErrorChecking, getFirstChild, getIdentifier, getIdentifiers, getImplementation, getLastChild, getLocalName, getMultiPart, getNextSibling, getNodeName, getNodeType, getNodeValue, getOriginalFileName, getParentNode, getPrefix, getPreviousSibling, getRoot, getSchemaLocation, getSchemaLocationFile, getXMLComment, getZipReader, hasAttributes, hasChildNodes, hashCode, importNode, insertBefore, isNull, isSupported, normalize, putIdentifier, removeChild, removeIdentifier, replaceChild, setBodyPart, setErrorChecking, setNodeValue, setNSMap, setOriginalFileName, setPrefix, setSchemaLocation, setValidationResult, setXSLTURL, setZipReader, toXML, write2File, write2File, write2File, write2HttpURL, write2HTTPURL, write2Stream, write2Stream, write2StreamStatic, write2StreamStatic, write2String, write2URLpublic JDFDoc()
public JDFDoc(Document document)
document - public JDFDoc(XMLDoc document)
document - public JDFDoc(DocumentJDFImpl document)
document - public JDFDoc(String strDocType)
strDocType - - ElementName.JDF, ElementName.JMF, "Config" ...public JDFDoc(String strDocType, JDFElement.EnumVersion version)
strDocType - - ElementName.JDF, ElementName.JMF, "Config" ...version - protected void reparse(Document document)
protected JDFDoc createRoot(Document document)
createRoot in class XMLDocprotected DocumentXMLImpl getImpl()
public JDFNode getJDFRoot()
protected void setMemberDoc(DocumentXMLImpl myDoc)
setMemberDoc in class XMLDocpublic JDFJMF getJMFRoot()
@Deprecated public static JDFDoc createJDF(String jdfPath)
jdfPath - @Deprecated public JDFNode getJDFNodeByID(String id)
id - the ID parameter of the JDF node@Deprecated public int collectGarbageResources(VString nodeNames)
nodeNames - the list of nodenames to remove, remove all if nodenames is emptypublic String getContentType()
public static JDFDoc parseStream(InputStream is)
is - public static JDFDoc parseFile(File file)
file - public static JDFDoc parseFile(String fileName)
fileName - public static JDFDoc parseURL(String url, javax.mail.BodyPart bp)
url - the url to searchbp - the bodypart that the CID url is located inpublic KElement setRoot(String strDocType, String namespaceURI)
public static void registerCustomClass(String strElement, String packagepath)
strElement - fully qualified namepackagepath - package pathpublic JDFDoc write2URL(String strURL)
strURL and receives the response in the returned JDFDoc. the content type is
automagically set to either text/xml for undefined xml or to application/vnd.cip4-jdf+xml or application/vnd.cip4-jmf+xmlstrURL - the URL to write toprotected XMLParser getXMLParser()
getXMLParser in class XMLDocpublic HttpURLConnection write2HTTPURL(URL strURL, UrlUtil.HTTPDetails det)
strURL - det - public UrlPart write2HttpURL(URL strURL, UrlUtil.HTTPDetails det)
strURL - det - public static String getContentType(KElement e)
e - public Element createElement(String elementName)
XMLDoccreateElement in class XMLDocelementName - name of the element that is createdprotected XMLDocUserData getXMLDocUserData()
protected boolean hasXMLDocUserData()
public XMLDocUserData getCreateXMLDocUserData()
public VString getDirtyIDs()
public void clearDirtyIDs()
public boolean isDirty(String strID)
strID - id the id to be checkedpublic XMLDoc getValidationResult()
public void setInitOnCreate(boolean bInitOnCreate)
bInitOnCreate - public boolean getInitOnCreate()
public DocumentJDFImpl getMemberDocument()
getMemberDocument in class XMLDocpublic void setXPathValues(JDFAttributeMap valueMap)
XMLDocsetXPathValues in class XMLDocvalueMap - the map of values, if this is still null, MUST be fully qualifiedXMLDoc.setXPathValues(org.cip4.jdflib.datatypes.JDFAttributeMap)Copyright © 2015. All rights reserved.