|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.cip4.jdflib.core.XMLDoc
org.cip4.jdflib.core.JDFDoc
public class JDFDoc
| Field Summary |
|---|
| Fields inherited from class org.cip4.jdflib.core.XMLDoc |
|---|
log, m_doc, sm_strENCODING |
| Constructor Summary | |
|---|---|
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(XMLDoc document)
constructor note that the constructor will create a copy of the document in case it is not a typesafe DocumentJDFImpl |
|
| Method Summary | |
|---|---|
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(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) |
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. 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+xml |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public 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" ...| Method Detail |
|---|
protected void reparse(Document document)
protected JDFDoc createRoot(Document document)
createRoot in class XMLDocprotected DocumentXMLImpl getImpl()
getImpl in class XMLDocpublic JDFNode getJDFRoot()
protected void setMemberDoc(DocumentXMLImpl myDoc)
setMemberDoc in class XMLDocpublic JDFJMF getJMFRoot()
public JDFDoc clone()
clone in class XMLDocpublic String toString()
toString in class XMLDoc@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 empty
public String getContentType()
public static JDFDoc parseStream(InputStream is)
is -
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 in
public KElement setRoot(String strDocType,
String namespaceURI)
setRoot in class XMLDocstrDocType - qualified tag name of the doc root to create if still emptynamespaceURI - namespace URI of the doc root
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+xml
strURL - the URL to write to
protected XMLParser getXMLParser()
getXMLParser in class XMLDoc
public 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)
XMLDoc
createElement in class XMLDocelementName - name of the element that is created
protected 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 checked
public XMLDoc getValidationResult()
public void setInitOnCreate(boolean bInitOnCreate)
bInitOnCreate - public boolean getInitOnCreate()
public DocumentJDFImpl getMemberDocument()
getMemberDocument in class XMLDoc
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||