When possible, classes (not interfaces) should be supported explicitly, i.e., the getObjectClass()
method of the SerializableState
returned by getState(Object)
should return the same value which would be returned by invoking getClass()
on the object passed to getState(Object)
. In particular, whenever feasible a Serializer
should not be used to serialize a given object into a form which when deserialized would yield an instance of the superclass of the class of which the object is an instance. When it is not possible to provide a class-specific Serializer
, such as when a factory class generate subclasses of itself via factory methods, then permitsSubclasses()
should return true
; in the case of class-specific Serializer
s it should return false
.
@see SerializableState
@see java.io.Serializable
@since JAI 1.1
To serialize a document using SAX events, create a compatible serializer and pass it around as a {@link org.xml.sax.DocumentHandler}. If an I/O error occurs while serializing, it will be thrown by {@link DocumentHandler#endDocument}. The SAX serializer may also be used as {@link org.xml.sax.DTDHandler}, {@link org.xml.sax.ext.DeclHandler} and{@link org.xml.sax.ext.LexicalHandler}.
To serialize a DOM document or DOM element, create a compatible serializer and call it's {@link DOMSerializer#serialize(Document)} or {@link DOMSerializer#serialize(Element)} methods.Both methods would produce a full XML document, to serizlie only the portion of the document use {@link OutputFormat#setOmitXMLDeclaration}and specify no document type.
The {@link OutputFormat} dictates what underlying serialized is usedto serialize the document based on the specified method. If the output format or method are missing, the default is an XML serializer with UTF-8 encoding and now indentation. @version $Revision: 1.2.6.1 $ $Date: 2005/09/09 07:26:17 $ @author Assaf Arkin @author Scott Boag @see DocumentHandler @see ContentHandler @see OutputFormat @see DOMSerializer
When possible, classes (not interfaces) should be supported explicitly, i.e., the getObjectClass()
method of the SerializableState
returned by getState(Object)
should return the same value which would be returned by invoking getClass()
on the object passed to getState(Object)
. In particular, whenever feasible a Serializer
should not be used to serialize a given object into a form which when deserialized would yield an instance of the superclass of the class of which the object is an instance. When it is not possible to provide a class-specific Serializer
, such as when a factory class generate subclasses of itself via factory methods, then permitsSubclasses()
should return true
; in the case of class-specific Serializer
s it should return false
.
@see SerializableState
@see java.io.Serializable
@since JAI 1.1
To serialize a document using SAX events, create a compatible serializer and pass it around as a {@link org.xml.sax.DocumentHandler}. If an I/O error occurs while serializing, it will be thrown by {@link DocumentHandler#endDocument}. The SAX serializer may also be used as {@link org.xml.sax.DTDHandler}, {@link org.xml.sax.ext.DeclHandler} and{@link org.xml.sax.ext.LexicalHandler}.
To serialize a DOM document or DOM element, create a compatible serializer and call it's {@link DOMSerializer#serialize(Document)} or {@link DOMSerializer#serialize(Element)} methods.Both methods would produce a full XML document, to serizlie only the portion of the document use {@link OutputFormat#setOmitXMLDeclaration}and specify no document type.
The {@link OutputFormat} dictates what underlying serialized is usedto serialize the document based on the specified method. If the output format or method are missing, the default is an XML serializer with UTF-8 encoding and now indentation. @deprecated This class was deprecated in Xerces 2.9.0. It is recommended that new applications use the DOM Level 3 LSSerializer or JAXP's Transformation API for XML (TrAX) for serializing XML and HTML. See the Xerces documentation for more information. @version $Revision: 699892 $ $Date: 2008-09-28 17:08:27 -0400 (Sun, 28 Sep 2008) $ @author Assaf Arkin @author Scott Boag @see DocumentHandler @see ContentHandler @see OutputFormat @see DOMSerializer
In order to transfer the information from the plugin to the reporting plugin, the data is serialized to disk. This also allows developers to deserialize the object and use the information in other plugins. @author phillip
Serialization parameters defined via this interface take precedence over any serialization parameters defined within the source of the query or stylesheet.
Outputs a Document
object in a specific encoding using various options for controlling white space, normalization, indenting, line breaking, and base URIs. However, in general these options do affect the document's infoset. In particular, if you set either the maximum line length or the indent size to a positive value, then the serializer will not respect input white space. It may trim leading and trailing space, condense runs of white space to a single space, convert carriage returns and linefeeds to spaces, add extra space where none was present before, and otherwise muck with the document's white space. The defaults, however, preserve all significant white space including ignorable white space and boundary white space.
As an alternate to supplying a series of SAX events as input through the ContentHandler interface, the input to serialize may be given as a DOM.
For example:
org.w3c.dom.Document inputDoc; org.ajax4jsf.xml.serializer.Serializer ser; java.io.Writer owriter; java.util.Properties props = OutputPropertiesFactory.getDefaultMethodProperties(Method.XML); Serializer ser = SerializerFactory.getSerializer(props); owriter = ...; // create a writer to serialize the document to ser.setWriter( owriter ); inputDoc = ...; // create the DOM document to be serialized DOMSerializer dser = ser.asDOMSerializer(); // a DOM will be serialized dser.serialize(inputDoc); // serialize the DOM, sending output to owriter ser.reset(); // get ready to use the serializer for another document // of the same output method.This interface is a public API. @see Method @see OutputPropertiesFactory @see SerializerFactory @see DOMSerializer @see ContentHandler @xsl.usage general
serialize
to transform a {@link Graph} into serialized RDF forms.Functionality is delegated to registered {@link SerializingProvider}s. Such SerializingProvider
s can be registered and unregistered, later registered SerializingProvider
s shadow previously registered providers for the same format. Note on synchronization: SerializingProvider
s must be able to handle concurrent requests.
@author mir
@scr.component
@scr.service interface="org.apache.clerezza.rdf.core.serializedform.Serializer"
@scr.reference name="serializingProvider" cardinality="0..n" policy="dynamic" interface="org.apache.clerezza.rdf.core.serializedform.SerializingProvider"
Provides a facility for serializing objects of type
Serializers are stateful, but must not buffer the output since other producers may write to the output between calls to {@link #serialize(Object)}.
@param < T>Serializer
...
<custom-serializer>
<java-serializable-type>the new type</java-concrete-class>
<java-serializer-class>the type's serializer</java-serializer-class>
</custom-serializer>
This package contains many Serializers for built-in types, including primitives and simple types. These built-in types have their Serializers loaded at startup by Muse.
@author Dan Jemiolo (danj)
Serializer
...
@author Matthew J. Duftler (duftler@us.ibm.com)
@author Sanjiva Weerawarana (sanjiva@watson.ibm.com)
@author Francisco Curbera (curbera@us.ibm.com)
To serialize a document using SAX events, create a compatible serializer using {@link #makeSAXSerializer} and pass it around as a {@link DocumentHandler}. If an I/O error occurs while serializing, it will be thrown by {@link DocumentHandler#endDocument}. The SAX serializer may also be used as {@link DTDHandler}, {@link DeclHandler} and{@link LexicalHandler}.
To serialize a DOM document or DOM element, create a compatible serializer using {@link #makeSerializer} and call it's {@link #serialize(Document)} or {@link #serialize(Element)} methods.Both methods would produce a full XML document, to serizlie only the portion of the document use {@link OutputFormat#setOmitXMLDeclaration}and specify no document type.
The convenience method {@link #serialize(Document,Writer,OutputFormat)}creates a serializer and calls {@link #serizlie(Document)} on thatserialized.
The {@link OutputFormat} dictates what underlying serialized is usedto serialize the document based on the specified method. If the output format or method are missing, the default is an XML serializer with UTF-8 encoding and now indentation. @version $Revision: 1.9 $ $Date: 2000/08/30 18:59:21 $ @author Assaf Arkin @author Scott Boag @see DocumentHandler @see ContentHandler @see OutputFormat @see DOMSerializer
As an alternate to supplying a series of SAX events as input through the ContentHandler interface, the input to serialize may be given as a DOM.
For example:
org.w3c.dom.Document inputDoc; org.apache.xml.serializer.Serializer ser; java.io.Writer owriter; java.util.Properties props = OutputPropertiesFactory.getDefaultMethodProperties(Method.XML); Serializer ser = SerializerFactory.getSerializer(props); owriter = ...; // create a writer to serialize the document to ser.setWriter( owriter ); inputDoc = ...; // create the DOM document to be serialized DOMSerializer dser = ser.asDOMSerializer(); // a DOM will be serialized dser.serialize(inputDoc); // serialize the DOM, sending output to owriter ser.reset(); // get ready to use the serializer for another document // of the same output method.This interface is a public API. @see Method @see OutputPropertiesFactory @see SerializerFactory @see DOMSerializer @see ContentHandler @xsl.usage general
T
to an output stream and read the object back in from an input stream.
@author Allard Buijze
@since 1.2
Basic abstract serializer - contains common logic for descendants (methods writeXXX()
.
To serialize a document using SAX events, create a compatible serializer and pass it around as a {@link org.xml.sax.DocumentHandler}. If an I/O error occurs while serializing, it will be thrown by {@link DocumentHandler#endDocument}. The SAX serializer may also be used as {@link org.xml.sax.DTDHandler}, {@link org.xml.sax.ext.DeclHandler} and{@link org.xml.sax.ext.LexicalHandler}.
To serialize a DOM document or DOM element, create a compatible serializer and call it's {@link DOMSerializer#serialize(Document)} or {@link DOMSerializer#serialize(Element)} methods.Both methods would produce a full XML document, to serizlie only the portion of the document use {@link OutputFormat#setOmitXMLDeclaration}and specify no document type.
The {@link OutputFormat} dictates what underlying serialized is usedto serialize the document based on the specified method. If the output format or method are missing, the default is an XML serializer with UTF-8 encoding and now indentation. @version $Revision: 19776 $ $Date: 2010-01-14 16:17:21 -0600 (Thu, 14 Jan 2010) $ @author Assaf Arkin @author Scott Boag @see DocumentHandler @see ContentHandler @see OutputFormat @see DOMSerializer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|