|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.optimizationservices.oscommon.representationparser.OSgLReader
public class OSgLReader
The OSgLReader
class is a general and generic reader class for all the other OSxL reader classes
to extend, which mostly parse an OSxL instance into a DOM tree and
provide a set of "get" methods that can be used to retrieve different pieces of information of
the OSxL instance.
Field Summary | |
---|---|
org.w3c.dom.Document |
m_document
m_document holds the W3C DOM type document to create XML elements and attributes. |
Constructor Summary | |
---|---|
OSgLReader()
Constructor. |
|
OSgLReader(boolean validate)
constructor |
Method Summary | |
---|---|
org.w3c.dom.Document |
getDocument()
get document |
org.w3c.dom.Element |
getRootElement()
|
boolean |
isValidate()
|
static void |
main(java.lang.String[] argv)
main for test purposes. |
boolean |
readFile(java.lang.String fileName)
Read the xml file that contains the OSxL instance. |
boolean |
readString(java.lang.String osxlString)
Read the xml string that contains the OSxL instance. |
void |
setDocument(org.w3c.dom.Document document)
set document |
void |
setRootElement(org.w3c.dom.Element rootElement)
Set root element |
void |
setValidate(boolean xsdValidate)
|
boolean |
writeToFile(java.lang.String fileName)
Write the xml file from the internally constructed DOM tree structure that contains the OSxL instance to a file. |
java.lang.String |
writeToSring()
Write the xml file from the internally constructed DOM tree structure that contains the OSxL instance to a string to be returned. |
boolean |
writeToStandardOutput()
Write the xml file from the internally constructed DOM tree structure that contains the OSxL instance to the standard output (e.g. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public org.w3c.dom.Document m_document
Constructor Detail |
---|
public OSgLReader()
public OSgLReader(boolean validate)
validate
- holds whether the OSgLReader should be validating against the schema or not.Method Detail |
---|
public void setDocument(org.w3c.dom.Document document)
document
- holds the W3C DOM type document to create XML elements and attributes.
It is the parent of the root element, e.g. the <OSiL> element in OSiL. It is used
to create all the nodes in the DOM tree.public org.w3c.dom.Document getDocument()
public void setRootElement(org.w3c.dom.Element rootElement)
rootElement
- holds the root element to be set.public org.w3c.dom.Element getRootElement()
public boolean isValidate()
public void setValidate(boolean xsdValidate)
xsdValidate
- holds whether the parser should be validating against the schema or not.public boolean readFile(java.lang.String fileName)
fileName
- holds the xml filename that contains the OSxL instance
public boolean readString(java.lang.String osxlString)
osxlString
- holds the xml string that contains the OSxL instance
public boolean writeToFile(java.lang.String fileName)
fileName
- holds the xml filename to write out the file to.
public boolean writeToStandardOutput()
public java.lang.String writeToSring()
public static void main(java.lang.String[] argv)
argv
- command line arguments.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |