@DeprecatedSE public class JibxMarshaller extends AbstractMarshaller implements InitializingBean
Marshaller
および Unmarshaller
インターフェースの実装。 典型的な使用箇所は、この Bean で targetClass
およびオプションで bindingName
プロパティを設定することです。
IMarshallingContext
, IUnmarshallingContext
logger
コンストラクターと説明 |
---|
JibxMarshaller() 使用すべきではありません。 |
修飾子と型 | メソッドと説明 |
---|---|
void | afterPropertiesSet() 使用すべきではありません。 |
XmlMappingException | convertJibxException(org.jibx.runtime.JiBXException ex, boolean marshalling) 使用すべきではありません。 指定された JiBXException を org.springframework.oxm 階層からの適切な例外に変換します。 |
protected org.jibx.runtime.IMarshallingContext | createMarshallingContext() 使用すべきではありません。 正しいインデントで構成された新しい IMarshallingContext を作成します。 |
protected org.jibx.runtime.IUnmarshallingContext | createUnmarshallingContext() 使用すべきではありません。 新しい IUnmarshallingContext を作成します。 |
protected StringSE | getDefaultEncoding() 使用すべきではありません。 バイトストリームからのマーシャリングまたはアンマーシャリングに使用するデフォルトエンコーディングを決定します。存在しない場合は null を決定します。 |
protected void | marshalDomNode(ObjectSE graph, NodeSE node) 使用すべきではありません。 指定されたオブジェクトグラフを DOM Node にマーシャリングする抽象テンプレートメソッド。 |
protected void | marshalOutputStream(ObjectSE graph, OutputStreamSE outputStream) 使用すべきではありません。 指定されたオブジェクトグラフを OutputStream にマーシャリングする抽象テンプレートメソッド。 |
protected void | marshalSaxHandlers(ObjectSE graph, ContentHandlerSE contentHandler, LexicalHandlerSE lexicalHandler) 使用すべきではありません。 指定されたオブジェクトグラフを SAX ContentHandler にマーシャリングする抽象テンプレートメソッド。 |
protected void | marshalWriter(ObjectSE graph, WriterSE writer) 使用すべきではありません。 指定されたオブジェクトグラフを Writer にマーシャリングする抽象テンプレートメソッド。 |
protected void | marshalXmlEventWriter(ObjectSE graph, XMLEventWriterSE eventWriter) 使用すべきではありません。 指定されたオブジェクトを StAX XMLEventWriter にマーシャリングする抽象テンプレートメソッド。 |
protected void | marshalXmlStreamWriter(ObjectSE graph, XMLStreamWriterSE streamWriter) 使用すべきではありません。 指定されたオブジェクトを StAX XMLStreamWriter にマーシャリングする抽象テンプレートメソッド。 |
void | setBindingName(StringSE bindingName) 使用すべきではありません。 このインスタンスのオプションのバインディング名を設定します。 |
void | setDocTypeInternalSubset(StringSE docTypeInternalSubset) 使用すべきではありません。 マーシャリング時に書き込まれる DTD 宣言の内部サブセット ID を設定します。 |
void | setDocTypePublicId(StringSE docTypePublicId) 使用すべきではありません。 マーシャリング時に書き込まれる DTD 宣言のパブリック ID を設定します。 |
void | setDocTypeRootElementName(StringSE docTypeRootElementName) 使用すべきではありません。 マーシャリング時に書き込まれる DTD 宣言のルート要素名を設定します。 |
void | setDocTypeSystemId(StringSE docTypeSystemId) 使用すべきではありません。 マーシャリング時に書き込まれる DTD 宣言のシステム ID を設定します。 |
void | setEncoding(StringSE encoding) 使用すべきではありません。 マーシャリングに使用するドキュメントエンコーディングを設定します。 |
void | setIndent(int indent) 使用すべきではありません。 ネストするインデントスペースの数を設定します。 |
void | setStandalone(BooleanSE standalone) 使用すべきではありません。 マーシャリング用にドキュメントのスタンドアロンフラグを設定します。 |
void | setTargetClass(ClassSE<?> targetClass) 使用すべきではありません。 このインスタンスのターゲットクラスを設定します。 |
void | setTargetPackage(StringSE targetPackage) 使用すべきではありません。 このインスタンスのターゲットパッケージを設定します。 |
boolean | supports(ClassSE<?> clazz) 使用すべきではありません。 このマーシャラーが、指定された型のインスタンスをマーシャリングできるかどうかを示します。 |
protected ObjectSE | unmarshalDomNode(NodeSE node) 使用すべきではありません。 指定された DOM Node から非整列化するための抽象テンプレートメソッド。 |
protected ObjectSE | unmarshalInputStream(InputStreamSE inputStream) 使用すべきではありません。 指定された InputStream から非整列化するための抽象テンプレートメソッド。 |
protected ObjectSE | unmarshalReader(ReaderSE reader) 使用すべきではありません。 指定された Reader から非整列化するための抽象テンプレートメソッド。 |
protected ObjectSE | unmarshalSaxReader(XMLReaderSE xmlReader, InputSourceSE inputSource) 使用すべきではありません。 特定の SAX XMLReader および InputSource を使用して非整列化するための抽象テンプレートメソッド。 |
protected ObjectSE | unmarshalXmlEventReader(XMLEventReaderSE eventReader) 使用すべきではありません。 指定された Stax XMLEventReader から非整列化するための抽象テンプレートメソッド。 |
protected ObjectSE | unmarshalXmlStreamReader(XMLStreamReaderSE streamReader) 使用すべきではありません。 指定された Stax XMLStreamReader から非整列化するための抽象テンプレートメソッド。 |
buildDocument, createDocumentBuilder, createDocumentBuilderFactory, createXmlReader, isProcessExternalEntities, isSupportDtd, marshal, marshalDomResult, marshalSaxResult, marshalStaxResult, marshalStreamResult, setProcessExternalEntities, setSupportDtd, unmarshal, unmarshalDomSource, unmarshalSaxSource, unmarshalStaxSource, unmarshalStreamSource
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
public void setTargetClass(ClassSE<?> targetClass)
targetPackage
プロパティのいずれかを設定する必要があります。 このプロパティが設定されている場合、targetPackage
は無視されます。
public void setTargetPackage(StringSE targetPackage)
targetClass
プロパティのいずれかを設定する必要があります。targetClass
が設定されている場合、このプロパティは無視されます。
public void setBindingName(StringSE bindingName)
public void setIndent(int indent)
-1
です。つまり、インデントはありません。public void setEncoding(StringSE encoding)
protected StringSE getDefaultEncoding()
AbstractMarshaller
null
を決定します。 デフォルトの実装は null
を返します。
AbstractMarshaller
の getDefaultEncoding
public void setStandalone(BooleanSE standalone)
public void setDocTypeRootElementName(StringSE docTypeRootElementName)
null
です(つまり、DTD 宣言は記述されていません)。値に設定する場合は、システム ID またはパブリック ID も設定する必要があります。
public void setDocTypeSystemId(StringSE docTypeSystemId)
null
です。ルート要素も設定されている場合にのみ使用されます。 このプロパティまたは docTypePublicId
のいずれかを設定します。両方を設定することはできません。
public void setDocTypePublicId(StringSE docTypePublicId)
null
です。ルート要素も設定されている場合にのみ使用されます。 このプロパティまたは docTypeSystemId
のいずれかを設定します。両方を設定することはできません。
public void setDocTypeInternalSubset(StringSE docTypeInternalSubset)
null
です。ルート要素も設定されている場合にのみ使用されます。public void afterPropertiesSet() throws org.jibx.runtime.JiBXException
InitializingBean
BeanFactoryAware
、ApplicationContextAware
などを満たした後、包含 BeanFactory
によって呼び出されます。このメソッドにより、Bean インスタンスは、すべての Bean プロパティが設定されたときに、その全体的な構成の検証と最終的な初期化を実行できます。
InitializingBean
の afterPropertiesSet
org.jibx.runtime.JiBXException
public boolean supports(ClassSE<?> clazz)
Marshaller
Marshaller
の supports
Unmarshaller
の supports
clazz
- このマーシャラーがマーシャリングできるかどうか尋ねられているクラス true
。それ以外の場合は false
protected void marshalOutputStream(ObjectSE graph, OutputStreamSE outputStream) throws XmlMappingException, IOExceptionSE
AbstractMarshaller
OutputStream
にマーシャリングする抽象テンプレートメソッド。AbstractMarshaller
の marshalOutputStream
graph
- マーシャリングするオブジェクトグラフのルート outputStream
- 書き込む OutputStream
XmlMappingException
- 指定されたオブジェクトをライターにマーシャリングできない場合 IOExceptionSE
- I/O 例外が発生した場合 protected void marshalWriter(ObjectSE graph, WriterSE writer) throws XmlMappingException, IOExceptionSE
AbstractMarshaller
Writer
にマーシャリングする抽象テンプレートメソッド。AbstractMarshaller
の marshalWriter
graph
- マーシャリングするオブジェクトグラフのルート writer
- 書き込む Writer
XmlMappingException
- 指定されたオブジェクトをライターにマーシャリングできない場合 IOExceptionSE
- I/O 例外が発生した場合 protected void marshalDomNode(ObjectSE graph, NodeSE node) throws XmlMappingException
AbstractMarshaller
Node
にマーシャリングする抽象テンプレートメソッド。 実際には、ノードは Document
ノード、DocumentFragment
ノード、Element
ノードです。つまり、子を受け入れるノードです。
AbstractMarshaller
の marshalDomNode
graph
- マーシャリングするオブジェクトグラフのルート node
- 結果ツリーを含む DOM ノード XmlMappingException
- 指定されたオブジェクトを DOM ノードに整列化できない場合 Document
SE, DocumentFragment
SE, Element
SEprotected void marshalXmlEventWriter(ObjectSE graph, XMLEventWriterSE eventWriter)
AbstractMarshaller
XMLEventWriter
にマーシャリングする抽象テンプレートメソッド。AbstractMarshaller
の marshalXmlEventWriter
graph
- マーシャリングするオブジェクトグラフのルート eventWriter
- 書き込む XMLEventWriter
protected void marshalXmlStreamWriter(ObjectSE graph, XMLStreamWriterSE streamWriter) throws XmlMappingException
AbstractMarshaller
XMLStreamWriter
にマーシャリングする抽象テンプレートメソッド。AbstractMarshaller
の marshalXmlStreamWriter
graph
- マーシャリングするオブジェクトグラフのルート streamWriter
- 書き込む XMLStreamWriter
XmlMappingException
- 指定されたオブジェクトを DOM ノードに整列化できない場合 protected void marshalSaxHandlers(ObjectSE graph, ContentHandlerSE contentHandler, @Nullable LexicalHandlerSE lexicalHandler) throws XmlMappingException
AbstractMarshaller
ContentHandler
にマーシャリングする抽象テンプレートメソッド。AbstractMarshaller
の marshalSaxHandlers
graph
- マーシャリングするオブジェクトグラフのルート contentHandler
- SAX ContentHandler
lexicalHandler
- SAX2 LexicalHandler
null
にすることができます。XmlMappingException
- 指定されたオブジェクトをハンドラーにマーシャリングできない場合 protected ObjectSE unmarshalXmlEventReader(XMLEventReaderSE eventReader)
AbstractMarshaller
XMLEventReader
から非整列化するための抽象テンプレートメソッド。AbstractMarshaller
の unmarshalXmlEventReader
eventReader
- 読み込む XMLEventReader
protected ObjectSE unmarshalXmlStreamReader(XMLStreamReaderSE streamReader)
AbstractMarshaller
XMLStreamReader
から非整列化するための抽象テンプレートメソッド。AbstractMarshaller
の unmarshalXmlStreamReader
streamReader
- 読み込む XMLStreamReader
protected ObjectSE unmarshalInputStream(InputStreamSE inputStream) throws XmlMappingException, IOExceptionSE
AbstractMarshaller
InputStream
から非整列化するための抽象テンプレートメソッド。AbstractMarshaller
の unmarshalInputStream
inputStream
- 読み込む InputStreamStream
XmlMappingException
- 指定されたストリームをオブジェクトに変換できない場合 IOExceptionSE
- I/O 例外が発生した場合 protected ObjectSE unmarshalReader(ReaderSE reader) throws XmlMappingException, IOExceptionSE
AbstractMarshaller
Reader
から非整列化するための抽象テンプレートメソッド。AbstractMarshaller
の unmarshalReader
reader
- 読み込む Reader
XmlMappingException
- 指定されたリーダーをオブジェクトに変換できない場合 IOExceptionSE
- I/O 例外が発生した場合 protected ObjectSE unmarshalDomNode(NodeSE node) throws XmlMappingException
AbstractMarshaller
Node
から非整列化するための抽象テンプレートメソッド。AbstractMarshaller
の unmarshalDomNode
node
- 非整列化するオブジェクトを含む DOM ノード XmlMappingException
- 指定された DOM ノードをオブジェクトにマップできない場合 protected ObjectSE unmarshalSaxReader(XMLReaderSE xmlReader, InputSourceSE inputSource) throws XmlMappingException, IOExceptionSE
AbstractMarshaller
XMLReader
および InputSource
を使用して非整列化するための抽象テンプレートメソッド。AbstractMarshaller
の unmarshalSaxReader
xmlReader
- 解析する SAX XMLReader
inputSource
- 解析する入力ソース XmlMappingException
- 指定されたリーダーと入力ソースをオブジェクトに変換できない場合 IOExceptionSE
- I/O 例外が発生した場合 protected org.jibx.runtime.IMarshallingContext createMarshallingContext() throws org.jibx.runtime.JiBXException
IMarshallingContext
を作成します。org.jibx.runtime.JiBXException
- エラーの場合 protected org.jibx.runtime.IUnmarshallingContext createUnmarshallingContext() throws org.jibx.runtime.JiBXException
IUnmarshallingContext
を作成します。org.jibx.runtime.JiBXException
- エラーの場合 public XmlMappingException convertJibxException(org.jibx.runtime.JiBXException ex, boolean marshalling)
JiBXException
を org.springframework.oxm
階層からの適切な例外に変換します。JiBX 自体は例外階層でこの区別を行わないため、ブール化フラグを使用して、この例外がマーシャリング中に発生するかアンマーシャリング中に発生するかを示します。
ex
- 発生した JiBXException
marshalling
- マーシャリング中に例外が発生するか(true
)、アンマーシャリングするかを示します (false
)XmlMappingException