|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.simBio.serialize.xml.XMLSerializer
public class XMLSerializer
XML serializer. It constructs models from XML, and writes them to XML.
モデルをXMLから構築し、書き出す。
Constructor Summary | |
---|---|
XMLSerializer(InputSource source)
An XMLSerializer constructor which takes an XML input source as a parameter. |
|
XMLSerializer(InputSource source,
ClassLoader loader)
An XMLSerializer constructor which takes an XML input source and a class loader as parameters. |
|
XMLSerializer(Reader input)
An XMLSerializer constructor which takes an XML file Reader as a parameter. |
|
XMLSerializer(String uri)
Set location of the xml file and set default tags. |
Method Summary | |
---|---|
URL[] |
getCodebases()
This returns the search path of URLs for loading classes |
Component |
getComponent(String className)
Return Class instance designated by the complete class name. |
Component |
read()
Deserialize from xml file. |
void |
setEncoding(String encoding)
Set source encoding. |
void |
update(Component component,
OutputStream stream,
InputSource original)
Updates an XML file. |
void |
update(Component component,
String uri,
Reader reference)
Updates an XML file. |
void |
write(Component component)
Serialize to the xml file. |
void |
write(Component component,
String uri)
Serializes a component to the xml file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XMLSerializer(InputSource source, ClassLoader loader)
source
- an xml of a modelloader
- where to find a classpublic XMLSerializer(InputSource source)
source
- model xmlpublic XMLSerializer(String uri)
uri
- the location of the xml filepublic XMLSerializer(Reader input)
input
- Reader of the xml fileMethod Detail |
---|
public void write(Component component) throws IOException
component
- component node of the model tree
IOException
public void write(Component component, String uri) throws IOException
write
in interface Serializer
component
- component node of the model treeuri
- location of the xml file
IOException
public Component read() throws InstantiationException
read
in interface Serializer
InstantiationException
Serializer.read()
public void setEncoding(String encoding)
encoding
- character encoding of the XML sourcepublic Component getComponent(String className) throws InstantiationException
className
- complete class name
InstantiationException
public void update(Component component, String uri, Reader reference) throws IOException
component
- component node of the model treeuri
- system identifier for an input sourcereference
- Reader for an XML input source
IOException
Serializer
public void update(Component component, OutputStream stream, InputSource original)
update
in interface Serializer
component
- component node of the model treestream
- output stream which will be written tooriginal
- original XML input sourcepublic URL[] getCodebases()
getCodebases
in interface Serializer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |