|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gov.nasa.arc.brahms.common.data.format.xml.XMLFormat
public class XMLFormat
The XMLFormat writes out BrahmsObjects in the Extended Markup Language
Field Summary | |
---|---|
protected static java.lang.String |
LOG_PROPERTY
|
Constructor Summary | |
---|---|
XMLFormat()
Constructor, creates a new XMLFormat |
Method Summary | |
---|---|
protected static java.lang.String |
convertPackageToDirectory(java.lang.String sPackage)
Converts a package to a directory by replacing the dots '.' to a path separator. |
protected static java.lang.String |
createXMLString(java.lang.String s)
Creates a new String from the specified String converting special characters such as &, <, >, " and ' to XML codes for support by XML parsers. |
protected static java.lang.String |
getDTDLocation()
Returns the default location of the Document Type Definitions |
static IFormat |
getFormat()
Returns an instance of the XMLFormat |
IFormatter |
getFormatter(BrahmsObject obj)
Returns the XML formatter for the given object. |
void |
init()
Initialize the format linking the objects to the appropriate formatter |
protected static java.io.DataOutputStream |
openXMLFile(BrahmsObject o,
java.util.Properties p)
Determines the file name for the XML file for the given Brahms object, creates the file, opens it and returns the stream to that file. |
void |
writeFormat(BrahmsObject obj,
java.util.Properties p,
java.io.DataOutputStream out)
Writes the given object out in the format defined for that object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String LOG_PROPERTY
Constructor Detail |
---|
public XMLFormat()
Method Detail |
---|
public static IFormat getFormat()
protected static java.io.DataOutputStream openXMLFile(BrahmsObject o, java.util.Properties p)
o
- the BrahmsObject for which a file is to be opened for writing
protected static java.lang.String getDTDLocation()
protected static java.lang.String createXMLString(java.lang.String s)
s
- the String to be converted to an XML String
protected static java.lang.String convertPackageToDirectory(java.lang.String sPackage)
sPackage
- the package
public void init()
public IFormatter getFormatter(BrahmsObject obj)
getFormatter
in interface IFormat
obj
- the BrahmsObject to be formatted
public void writeFormat(BrahmsObject obj, java.util.Properties p, java.io.DataOutputStream out)
writeFormat
in interface IFormat
obj
- the BrahmsObject to be written out in this formatp
- the Properties relevant for the formatting of the outputout
- the DataOutputStream to write the format output to
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |