org.simBio.serialize.xml
クラス XMLSerializer

java.lang.Object
  上位を拡張 org.simBio.serialize.xml.XMLSerializer
すべての実装されたインタフェース:
Serializer

public class XMLSerializer
extends java.lang.Object
implements Serializer

XML serializer. It constructs models from XML, and writes them to XML.
モデルをXMLから構築し、書き出す。

バージョン:
$Id: XMLSerializer.java,v 1.7 2006/12/07 02:11:28 nsarai Exp $
作成者:
Nobuaki Sarai

コンストラクタの概要
XMLSerializer(org.xml.sax.InputSource source)
          An XMLSerializer constructor which takes an XML input source as a parameter.
XMLSerializer(org.xml.sax.InputSource source, java.lang.ClassLoader loader)
          An XMLSerializer constructor which takes an XML input source and a class loader as parameters.
XMLSerializer(java.io.Reader input)
          An XMLSerializer constructor which takes an XML file Reader as a parameter.
XMLSerializer(java.lang.String uri)
          Set location of the xml file and set default tags.
 
メソッドの概要
 java.net.URL[] getCodebases()
          This returns the search path of URLs for loading classes
 Component getComponent(java.lang.String className)
          Return Class instance designated by the complete class name. child nodes are created.
 Component read()
          Deserialize from xml file.
 void setEncoding(java.lang.String encoding)
          Set source encoding.
 void update(Component component, java.io.OutputStream stream, org.xml.sax.InputSource original)
          Updates an XML file.
 void update(Component component, java.lang.String uri, java.io.Reader reference)
          Updates an XML file.
 void write(Component component)
          Serialize to the xml file.
 void write(Component component, java.lang.String uri)
          Serializes a component to the xml file.
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

XMLSerializer

public XMLSerializer(org.xml.sax.InputSource source,
                     java.lang.ClassLoader loader)
An XMLSerializer constructor which takes an XML input source and a class loader as parameters.

パラメータ:
source - an xml of a model
loader - where to find a class

XMLSerializer

public XMLSerializer(org.xml.sax.InputSource source)
An XMLSerializer constructor which takes an XML input source as a parameter.

パラメータ:
source - model xml

XMLSerializer

public XMLSerializer(java.lang.String uri)
Set location of the xml file and set default tags. (URI:Uniform Resource Identifier)

パラメータ:
uri - the location of the xml file

XMLSerializer

public XMLSerializer(java.io.Reader input)
An XMLSerializer constructor which takes an XML file Reader as a parameter.

パラメータ:
input - Reader of the xml file
メソッドの詳細

write

public void write(Component component)
           throws java.io.IOException
Serialize to the xml file.
componentをXML形式で書き出す。

パラメータ:
component - component node of the model tree
例外:
java.io.IOException

write

public void write(Component component,
                  java.lang.String uri)
           throws java.io.IOException
Serializes a component to the xml file. (writes it in XML format)

定義:
インタフェース Serializer 内の write
パラメータ:
component - component node of the model tree
uri - location of the xml file
例外:
java.io.IOException

read

public Component read()
               throws java.lang.InstantiationException
Deserialize from xml file.
XML形式のmodelを解釈してmodelインスタンスを作成する。

定義:
インタフェース Serializer 内の read
戻り値:
root component of the model instance tree
例外:
java.lang.InstantiationException
関連項目:
Serializer.read()

setEncoding

public void setEncoding(java.lang.String encoding)
Set source encoding.

パラメータ:
encoding - character encoding of the XML source

getComponent

public Component getComponent(java.lang.String className)
                       throws java.lang.InstantiationException
Return Class instance designated by the complete class name. child nodes are created.

パラメータ:
className - complete class name
戻り値:
instance of the class.
例外:
java.lang.InstantiationException

update

public void update(Component component,
                   java.lang.String uri,
                   java.io.Reader reference)
            throws java.io.IOException
Updates an XML file.

パラメータ:
component - component node of the model tree
uri - system identifier for an input source
reference - Reader for an XML input source
例外:
java.io.IOException
関連項目:
Serializer

update

public void update(Component component,
                   java.io.OutputStream stream,
                   org.xml.sax.InputSource original)
Updates an XML file.

定義:
インタフェース Serializer 内の update
パラメータ:
component - component node of the model tree
stream - output stream which will be written to
original - original XML input source

getCodebases

public java.net.URL[] getCodebases()
This returns the search path of URLs for loading classes

定義:
インタフェース Serializer 内の getCodebases


???(C) 2002-2007 ?????????????????????