Class Persister
- All Implemented Interfaces:
Serializer
Persister object is used to provide an implementation
of a serializer. This implements the Serializer interface
and enables objects to be persisted and loaded from various sources.
This implementation makes use of Filter objects to
replace template variables within the source XML document. It is fully
thread safe and can be shared by multiple threads without concerns.
Deserialization is performed by passing an XML schema class into one
of the read methods along with the source of an XML stream.
The read method then reads the contents of the XML stream and builds
the object using annotations within the XML schema class.
Serialization is performed by passing an object and an XML stream into
one of the write methods. The serialization process will
use the class of the provided object as the schema class. The object
is traversed and all fields are marshalled to the result stream.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final FormatThis object is used to format the the generated XML document.private final SessionManagerThis is used to manage the serialization sessions created/private final StrategyThis is the strategy object used to load and resolve classes.private final SupportThis support is used to convert the strings encountered. -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for thePersisterobject.Constructor for thePersisterobject.Constructor for thePersisterobject.Constructor for thePersisterobject.Constructor for thePersisterobject.Constructor for thePersisterobject.Constructor for thePersisterobject.Constructor for thePersisterobject.Constructor for thePersisterobject.Constructor for thePersisterobject.Constructor for thePersisterobject.Constructor for thePersisterobject.Constructor for thePersisterobject.Constructor for thePersisterobject.Constructor for thePersisterobject.Constructor for thePersisterobject.Constructor for thePersisterobject.Constructor for thePersisterobject.Constructor for thePersisterobject.Constructor for thePersisterobject. -
Method Summary
Modifier and TypeMethodDescription<T> TThisreadmethod will read the contents of the XML document from the provided source and convert it into an object of the specified type.<T> TThisreadmethod will read the contents of the XML document from the provided source and convert it into an object of the specified type.<T> Tread(Class<? extends T> type, InputStream source) Thisreadmethod will read the contents of the XML document from the provided source and convert it into an object of the specified type.<T> Tread(Class<? extends T> type, InputStream source, boolean strict) Thisreadmethod will read the contents of the XML document from the provided source and convert it into an object of the specified type.<T> TThisreadmethod will read the contents of the XML document from the provided source and convert it into an object of the specified type.<T> TThisreadmethod will read the contents of the XML document from the provided source and convert it into an object of the specified type.<T> TThisreadmethod will read the contents of the XML document from the provided source and convert it into an object of the specified type.<T> TThisreadmethod will read the contents of the XML document from the provided source and convert it into an object of the specified type.<T> TThisreadmethod will read the contents of the XML document from the provided source and convert it into an object of the specified type.<T> TThisreadmethod will read the contents of the XML document from the provided source and convert it into an object of the specified type.private <T> TThisreadmethod will read the contents of the XML document provided and convert it to an object of the specified type.private <T> TThisreadmethod will read the contents of the XML document provided and convert it to an object of the specified type.<T> TThisreadmethod will read the contents of the XML document from the provided source and populate the object with the values deserialized.<T> TThisreadmethod will read the contents of the XML document from the provided source and populate the object with the values deserialized.<T> Tread(T value, InputStream source) Thisreadmethod will read the contents of the XML document from the provided source and populate the object with the values deserialized.<T> Tread(T value, InputStream source, boolean strict) Thisreadmethod will read the contents of the XML document from the provided source and populate the object with the values deserialized.<T> TThisreadmethod will read the contents of the XML document from the provided source and populate the object with the values deserialized.<T> TThisreadmethod will read the contents of the XML document from the provided source and populate the object with the values deserialized.<T> TThisreadmethod will read the contents of the XML document from the provided source and populate the object with the values deserialized.<T> TThisreadmethod will read the contents of the XML document from the provided source and populate the object with the values deserialized.<T> TThisreadmethod will read the contents of the XML document from the provided source and populate the object with the values deserialized.<T> TThisreadmethod will read the contents of the XML document from the provided source and populate the object with the values deserialized.private <T> TThisreadmethod will read the contents of the XML document from the provided source and populate the object with the values deserialized.private <T> TThisreadmethod will read the contents of the XML document from the provided source and populate the object with the values deserialized.booleanThisvalidatemethod will validate the contents of the XML document against the specified XML class schema.booleanThisvalidatemethod will validate the contents of the XML document against the specified XML class schema.booleanvalidate(Class type, InputStream source) Thisvalidatemethod will validate the contents of the XML document against the specified XML class schema.booleanvalidate(Class type, InputStream source, boolean strict) Thisvalidatemethod will validate the contents of the XML document against the specified XML class schema.booleanThisvalidatemethod will validate the contents of the XML document against the specified XML class schema.booleanThisvalidatemethod will validate the contents of the XML document against the specified XML class schema.booleanThisvalidatemethod will validate the contents of the XML document against the specified XML class schema.booleanThisvalidatemethod will validate the contents of the XML document against the specified XML class schema.booleanThisvalidatemethod will validate the contents of the XML document against the specified XML class schema.booleanThisvalidatemethod will validate the contents of the XML document against the specified XML class schema.private booleanThisvalidatemethod will validate the contents of the XML document against the specified XML class schema.private booleanThisvalidatemethod will validate the contents of the XML document against the specified XML class schema.voidThiswritemethod will traverse the provided object checking for field annotations in order to compose the XML data.voidwrite(Object source, OutputStream out) Thiswritemethod will traverse the provided object checking for field annotations in order to compose the XML data.voidwrite(Object source, OutputStream out, String charset) Thiswritemethod will traverse the provided object checking for field annotations in order to compose the XML data.voidThiswritemethod will traverse the provided object checking for field annotations in order to compose the XML data.voidwrite(Object source, OutputNode root) Thiswritemethod will traverse the provided object checking for field annotations in order to compose the XML data.private voidwrite(Object source, OutputNode node, Context context) Thiswritemethod will traverse the provided object checking for field annotations in order to compose the XML data.private voidwrite(Object source, OutputNode root, Session session) Thiswritemethod will traverse the provided object checking for field annotations in order to compose the XML data.
-
Field Details
-
manager
This is used to manage the serialization sessions created/ -
strategy
This is the strategy object used to load and resolve classes. -
support
This support is used to convert the strings encountered. -
format
This object is used to format the the generated XML document.
-
-
Constructor Details
-
Persister
public Persister()Constructor for thePersisterobject. This is used to create a serializer object that will use an empty filter. This means that template variables will remain unchanged within the XML document parsed when an object is deserialized. -
Persister
Constructor for thePersisterobject. This is used to create a serializer object that will use the provided format instructions. The persister uses theFormatobject to structure the generated XML. It determines the indent size of the document and whether it should contain a prolog.- Parameters:
format- this is used to structure the generated XML
-
Persister
Constructor for thePersisterobject. This is used to create a serializer object that will use a platform filter object using the overrides within the provided map. This means that template variables will be replaced firstly with mappings from within the provided map, followed by system properties.- Parameters:
filter- this is the map that contains the overrides
-
Persister
Constructor for thePersisterobject. This is used to create a serializer object that will use a platform filter object using the overrides within the provided map. This means that template variables will be replaced firstly with mappings from within the provided map, followed by system properties.- Parameters:
filter- this is the map that contains the overridesformat- this is the format used to format the documents
-
Persister
Constructor for thePersisterobject. This is used to create a serializer object that will use the provided filter. This persister will replace all variables encountered when deserializing an object with mappings found in the filter.- Parameters:
filter- the filter used to replace template variables
-
Persister
Constructor for thePersisterobject. This is used to create a serializer object that will use the provided filter. This persister will replace all variables encountered when deserializing an object with mappings found in the filter.- Parameters:
filter- the filter used to replace template variablesformat- this is used to structure the generated XML
-
Persister
Constructor for thePersisterobject. This is used to create a serializer object that will use the provided matcher for customizable transformations. TheMatcherwill enable the persister to determine the correct way to transform the types that are not annotated and considered primitives.- Parameters:
matcher- this is used to customize the transformations
-
Persister
Constructor for thePersisterobject. This is used to create a serializer object that will use the provided matcher for customizable transformations. TheMatcherwill enable the persister to determine the correct way to transform the types that are not annotated and considered primitives.- Parameters:
matcher- this is used to customize the transformationsformat- this is used to structure the generated XML
-
Persister
Constructor for thePersisterobject. This is used to create a serializer object that will use a strategy object. This persister will use the providedStrategyto intercept the XML elements in order to read and write persistent data, such as the class name or version of the document.- Parameters:
strategy- this is the strategy used to resolve classes
-
Persister
Constructor for thePersisterobject. This is used to create a serializer object that will use a strategy object. This persister will use the providedStrategyto intercept the XML elements in order to read and write persistent data, such as the class name or version of the document.- Parameters:
strategy- this is the strategy used to resolve classesformat- this is used to structure the generated XML
-
Persister
Constructor for thePersisterobject. This is used to create a serializer object that will use the provided filter. This persister will replace all variables encountered when deserializing an object with mappings found in the filter.- Parameters:
filter- the filter used to replace template variablesmatcher- this is used to customize the transformations
-
Persister
Constructor for thePersisterobject. This is used to create a serializer object that will use the provided filter. This persister will replace all variables encountered when deserializing an object with mappings found in the filter.- Parameters:
filter- the filter used to replace template variablesmatcher- this is used to customize the transformationsformat- this is used to structure the generated XML
-
Persister
Constructor for thePersisterobject. This is used to create a serializer object that will use a platform filter object using the overrides within the provided map. This means that template variables will be replaced firstly with mappings from within the provided map, followed by system properties.This persister will use the provided
Strategyto intercept the XML elements in order to read and write persistent data, such as the class name or version of the document.- Parameters:
strategy- this is the strategy used to resolve classesdata- this is the map that contains the overrides
-
Persister
Constructor for thePersisterobject. This is used to create a serializer object that will use the provided filter. This persister will replace all variables encountered when deserializing an object with mappings found in the filter.This persister will use the provided
Strategyto intercept the XML elements in order to read and write persistent data, such as the class name or version of the document.- Parameters:
strategy- this is the strategy used to resolve classesdata- the filter data used to replace template variablesformat- this is used to format the generated XML document
-
Persister
Constructor for thePersisterobject. This is used to create a serializer object that will use the provided filter. This persister will replace all variables encountered when deserializing an object with mappings found in the filter.This persister will use the provided
Strategyto intercept the XML elements in order to read and write persistent data, such as the class name or version of the document.- Parameters:
strategy- this is the strategy used to resolve classesfilter- the filter used to replace template variables
-
Persister
Constructor for thePersisterobject. This is used to create a serializer object that will use the provided filter. This persister will replace all variables encountered when deserializing an object with mappings found in the filter.This persister will use the provided
Strategyto intercept the XML elements in order to read and write persistent data, such as the class name or version of the document.- Parameters:
strategy- this is the strategy used to resolve classesfilter- the filter used to replace template variablesformat- this is used to format the generated XML document
-
Persister
Constructor for thePersisterobject. This is used to create a serializer object that will use the provided matcher for customizable transformations. TheMatcherwill enable the persister to determine the correct way to transform the types that are not annotated and considered primitives.This persister will use the provided
Strategyto intercept the XML elements in order to read and write persistent data, such as the class name or version of the document.- Parameters:
strategy- this is the strategy used to resolve classesmatcher- this is used to customize the transformations
-
Persister
Constructor for thePersisterobject. This is used to create a serializer object that will use the provided matcher for customizable transformations. TheMatcherwill enable the persister to determine the correct way to transform the types that are not annotated and considered primitives.This persister will use the provided
Strategyto intercept the XML elements in order to read and write persistent data, such as the class name or version of the document.- Parameters:
strategy- this is the strategy used to resolve classesmatcher- this is used to customize the transformationsformat- this is used to format the generated XML document
-
Persister
Constructor for thePersisterobject. This is used to create a serializer object that will use the provided matcher for customizable transformations. TheMatcherwill enable the persister to determine the correct way to transform the types that are not annotated and considered primitives.This persister will use the provided
Strategyto intercept the XML elements in order to read and write persistent data, such as the class name or version of the document.- Parameters:
strategy- this is the strategy used to resolve classesfilter- the filter used to replace template variablesmatcher- this is used to customize the transformations
-
Persister
Constructor for thePersisterobject. This is used to create a serializer object that will use the provided matcher for customizable transformations. TheMatcherwill enable the persister to determine the correct way to transform the types that are not annotated and considered primitives.This persister will use the provided
Strategyto intercept the XML elements in order to read and write persistent data, such as the class name or version of the document.- Parameters:
strategy- this is the strategy used to resolve classesfilter- the filter used to replace template variablesmatcher- this is used to customize the transformations
-
-
Method Details
-
read
Thisreadmethod will read the contents of the XML document from the provided source and convert it into an object of the specified type. If the XML source cannot be deserialized or there is a problem building the object graph an exception is thrown. The instance deserialized is returned.- Specified by:
readin interfaceSerializer- Parameters:
type- this is the class type to be deserialized from XMLsource- this provides the source of the XML document- Returns:
- the object deserialized from the XML document
- Throws:
Exception- if the object cannot be fully deserialized
-
read
Thisreadmethod will read the contents of the XML document from the provided source and convert it into an object of the specified type. If the XML source cannot be deserialized or there is a problem building the object graph an exception is thrown. The instance deserialized is returned.- Specified by:
readin interfaceSerializer- Parameters:
type- this is the class type to be deserialized from XMLsource- this provides the source of the XML document- Returns:
- the object deserialized from the XML document
- Throws:
Exception- if the object cannot be fully deserialized
-
read
Thisreadmethod will read the contents of the XML document from the provided source and convert it into an object of the specified type. If the XML source cannot be deserialized or there is a problem building the object graph an exception is thrown. The instance deserialized is returned.- Specified by:
readin interfaceSerializer- Parameters:
type- this is the class type to be deserialized from XMLsource- this provides the source of the XML document- Returns:
- the object deserialized from the XML document
- Throws:
Exception- if the object cannot be fully deserialized
-
read
Thisreadmethod will read the contents of the XML document from the provided source and convert it into an object of the specified type. If the XML source cannot be deserialized or there is a problem building the object graph an exception is thrown. The instance deserialized is returned.- Specified by:
readin interfaceSerializer- Parameters:
type- this is the class type to be deserialized from XMLsource- this provides the source of the XML document- Returns:
- the object deserialized from the XML document
- Throws:
Exception- if the object cannot be fully deserialized
-
read
Thisreadmethod will read the contents of the XML document from the provided source and convert it into an object of the specified type. If the XML source cannot be deserialized or there is a problem building the object graph an exception is thrown. The instance deserialized is returned.- Specified by:
readin interfaceSerializer- Parameters:
type- this is the class type to be deserialized from XMLsource- this provides the source of the XML document- Returns:
- the object deserialized from the XML document
- Throws:
Exception- if the object cannot be fully deserialized
-
read
Thisreadmethod will read the contents of the XML document from the provided source and convert it into an object of the specified type. If the XML source cannot be deserialized or there is a problem building the object graph an exception is thrown. The instance deserialized is returned.- Specified by:
readin interfaceSerializer- Parameters:
type- this is the class type to be deserialized from XMLsource- this provides the source of the XML documentstrict- this determines whether to read in strict mode- Returns:
- the object deserialized from the XML document
- Throws:
Exception- if the object cannot be fully deserialized
-
read
Thisreadmethod will read the contents of the XML document from the provided source and convert it into an object of the specified type. If the XML source cannot be deserialized or there is a problem building the object graph an exception is thrown. The instance deserialized is returned.- Specified by:
readin interfaceSerializer- Parameters:
type- this is the class type to be deserialized from XMLsource- this provides the source of the XML documentstrict- this determines whether to read in strict mode- Returns:
- the object deserialized from the XML document
- Throws:
Exception- if the object cannot be fully deserialized
-
read
Thisreadmethod will read the contents of the XML document from the provided source and convert it into an object of the specified type. If the XML source cannot be deserialized or there is a problem building the object graph an exception is thrown. The instance deserialized is returned.- Specified by:
readin interfaceSerializer- Parameters:
type- this is the class type to be deserialized from XMLsource- this provides the source of the XML documentstrict- this determines whether to read in strict mode- Returns:
- the object deserialized from the XML document
- Throws:
Exception- if the object cannot be fully deserialized
-
read
Thisreadmethod will read the contents of the XML document from the provided source and convert it into an object of the specified type. If the XML source cannot be deserialized or there is a problem building the object graph an exception is thrown. The instance deserialized is returned.- Specified by:
readin interfaceSerializer- Parameters:
type- this is the class type to be deserialized from XMLsource- this provides the source of the XML documentstrict- this determines whether to read in strict mode- Returns:
- the object deserialized from the XML document
- Throws:
Exception- if the object cannot be fully deserialized
-
read
Thisreadmethod will read the contents of the XML document from the provided source and convert it into an object of the specified type. If the XML source cannot be deserialized or there is a problem building the object graph an exception is thrown. The instance deserialized is returned.- Specified by:
readin interfaceSerializer- Parameters:
type- this is the class type to be deserialized from XMLnode- this provides the source of the XML documentstrict- this determines whether to read in strict mode- Returns:
- the object deserialized from the XML document
- Throws:
Exception- if the object cannot be fully deserialized
-
read
Thisreadmethod will read the contents of the XML document provided and convert it to an object of the specified type. If the XML document cannot be deserialized or there is a problem building the object graph an exception is thrown. The object graph deserialized is returned.- Parameters:
type- this is the XML schema class to be deserializednode- this provides the source of the XML documentsession- this is the session used for deserialization- Returns:
- the object deserialized from the XML document given
- Throws:
Exception- if the object cannot be fully deserialized
-
read
Thisreadmethod will read the contents of the XML document provided and convert it to an object of the specified type. If the XML document cannot be deserialized or there is a problem building the object graph an exception is thrown. The object graph deserialized is returned.- Parameters:
type- this is the XML schema class to be deserializednode- this provides the source of the XML documentcontext- the contextual object used for deserialization- Returns:
- the object deserialized from the XML document given
- Throws:
Exception- if the object cannot be fully deserialized
-
read
Thisreadmethod will read the contents of the XML document from the provided source and populate the object with the values deserialized. This is used as a means of injecting an object with values deserialized from an XML document. If the XML source cannot be deserialized or there is a problem building the object graph an exception is thrown.- Specified by:
readin interfaceSerializer- Parameters:
value- this is the object to deserialize the XML in tosource- this provides the source of the XML document- Returns:
- the same instance provided is returned when finished
- Throws:
Exception- if the object cannot be fully deserialized
-
read
Thisreadmethod will read the contents of the XML document from the provided source and populate the object with the values deserialized. This is used as a means of injecting an object with values deserialized from an XML document. If the XML source cannot be deserialized or there is a problem building the object graph an exception is thrown.- Specified by:
readin interfaceSerializer- Parameters:
value- this is the object to deserialize the XML in tosource- this provides the source of the XML document- Returns:
- the same instance provided is returned when finished
- Throws:
Exception- if the object cannot be fully deserialized
-
read
Thisreadmethod will read the contents of the XML document from the provided source and populate the object with the values deserialized. This is used as a means of injecting an object with values deserialized from an XML document. If the XML source cannot be deserialized or there is a problem building the object graph an exception is thrown.- Specified by:
readin interfaceSerializer- Parameters:
value- this is the object to deserialize the XML in tosource- this provides the source of the XML document- Returns:
- the same instance provided is returned when finished
- Throws:
Exception- if the object cannot be fully deserialized
-
read
Thisreadmethod will read the contents of the XML document from the provided source and populate the object with the values deserialized. This is used as a means of injecting an object with values deserialized from an XML document. If the XML source cannot be deserialized or there is a problem building the object graph an exception is thrown.- Specified by:
readin interfaceSerializer- Parameters:
value- this is the object to deserialize the XML in tosource- this provides the source of the XML document- Returns:
- the same instance provided is returned when finished
- Throws:
Exception- if the object cannot be fully deserialized
-
read
Thisreadmethod will read the contents of the XML document from the provided source and populate the object with the values deserialized. This is used as a means of injecting an object with values deserialized from an XML document. If the XML source cannot be deserialized or there is a problem building the object graph an exception is thrown.- Specified by:
readin interfaceSerializer- Parameters:
value- this is the object to deserialize the XML in tosource- this provides the source of the XML document- Returns:
- the same instance provided is returned when finished
- Throws:
Exception- if the object cannot be fully deserialized
-
read
Thisreadmethod will read the contents of the XML document from the provided source and populate the object with the values deserialized. This is used as a means of injecting an object with values deserialized from an XML document. If the XML source cannot be deserialized or there is a problem building the object graph an exception is thrown.- Specified by:
readin interfaceSerializer- Parameters:
value- this is the object to deserialize the XML in tosource- this provides the source of the XML documentstrict- this determines whether to read in strict mode- Returns:
- the same instance provided is returned when finished
- Throws:
Exception- if the object cannot be fully deserialized
-
read
Thisreadmethod will read the contents of the XML document from the provided source and populate the object with the values deserialized. This is used as a means of injecting an object with values deserialized from an XML document. If the XML source cannot be deserialized or there is a problem building the object graph an exception is thrown.- Specified by:
readin interfaceSerializer- Parameters:
value- this is the object to deserialize the XML in tosource- this provides the source of the XML documentstrict- this determines whether to read in strict mode- Returns:
- the same instance provided is returned when finished
- Throws:
Exception- if the object cannot be fully deserialized
-
read
Thisreadmethod will read the contents of the XML document from the provided source and populate the object with the values deserialized. This is used as a means of injecting an object with values deserialized from an XML document. If the XML source cannot be deserialized or there is a problem building the object graph an exception is thrown.- Specified by:
readin interfaceSerializer- Parameters:
value- this is the object to deserialize the XML in tosource- this provides the source of the XML documentstrict- this determines whether to read in strict mode- Returns:
- the same instance provided is returned when finished
- Throws:
Exception- if the object cannot be fully deserialized
-
read
Thisreadmethod will read the contents of the XML document from the provided source and populate the object with the values deserialized. This is used as a means of injecting an object with values deserialized from an XML document. If the XML source cannot be deserialized or there is a problem building the object graph an exception is thrown.- Specified by:
readin interfaceSerializer- Parameters:
value- this is the object to deserialize the XML in tosource- this provides the source of the XML documentstrict- this determines whether to read in strict mode- Returns:
- the same instance provided is returned when finished
- Throws:
Exception- if the object cannot be fully deserialized
-
read
Thisreadmethod will read the contents of the XML document from the provided source and populate the object with the values deserialized. This is used as a means of injecting an object with values deserialized from an XML document. If the XML source cannot be deserialized or there is a problem building the object graph an exception is thrown.- Specified by:
readin interfaceSerializer- Parameters:
value- this is the object to deserialize the XML in tonode- this provides the source of the XML documentstrict- this determines whether to read in strict mode- Returns:
- the same instance provided is returned when finished
- Throws:
Exception- if the object cannot be fully deserialized
-
read
Thisreadmethod will read the contents of the XML document from the provided source and populate the object with the values deserialized. This is used as a means of injecting an object with values deserialized from an XML document. If the XML source cannot be deserialized or there is a problem building the object graph an exception is thrown.- Parameters:
value- this is the object to deserialize the XML in tonode- this provides the source of the XML documentsession- this is the session used for the deserialization- Returns:
- the same instance provided is returned when finished
- Throws:
Exception- if the object cannot be fully deserialized
-
read
Thisreadmethod will read the contents of the XML document from the provided source and populate the object with the values deserialized. This is used as a means of injecting an object with values deserialized from an XML document. If the XML source cannot be deserialized or there is a problem building the object graph an exception is thrown.- Parameters:
value- this is the object to deserialize the XML in tonode- this provides the source of the XML documentcontext- the contextual object used for deserialization- Returns:
- the same instance provided is returned when finished
- Throws:
Exception- if the object cannot be fully deserialized
-
validate
Thisvalidatemethod will validate the contents of the XML document against the specified XML class schema. This is used to perform a read traversal of the class schema such that the document can be tested against it. This is preferred to reading the document as it does not instantiate the objects or invoke any callback methods, thus making it a safe validation.- Specified by:
validatein interfaceSerializer- Parameters:
type- this is the class type to be validated against XMLsource- this provides the source of the XML document- Returns:
- true if the document matches the class XML schema
- Throws:
Exception- if the class XML schema does not fully match
-
validate
Thisvalidatemethod will validate the contents of the XML document against the specified XML class schema. This is used to perform a read traversal of the class schema such that the document can be tested against it. This is preferred to reading the document as it does not instantiate the objects or invoke any callback methods, thus making it a safe validation.- Specified by:
validatein interfaceSerializer- Parameters:
type- this is the class type to be validated against XMLsource- this provides the source of the XML document- Returns:
- true if the document matches the class XML schema
- Throws:
Exception- if the class XML schema does not fully match
-
validate
Thisvalidatemethod will validate the contents of the XML document against the specified XML class schema. This is used to perform a read traversal of the class schema such that the document can be tested against it. This is preferred to reading the document as it does not instantiate the objects or invoke any callback methods, thus making it a safe validation.- Specified by:
validatein interfaceSerializer- Parameters:
type- this is the class type to be validated against XMLsource- this provides the source of the XML document- Returns:
- true if the document matches the class XML schema
- Throws:
Exception- if the class XML schema does not fully match
-
validate
Thisvalidatemethod will validate the contents of the XML document against the specified XML class schema. This is used to perform a read traversal of the class schema such that the document can be tested against it. This is preferred to reading the document as it does not instantiate the objects or invoke any callback methods, thus making it a safe validation.- Specified by:
validatein interfaceSerializer- Parameters:
type- this is the class type to be validated against XMLsource- this provides the source of the XML document- Returns:
- true if the document matches the class XML schema
- Throws:
Exception- if the class XML schema does not fully match
-
validate
Thisvalidatemethod will validate the contents of the XML document against the specified XML class schema. This is used to perform a read traversal of the class schema such that the document can be tested against it. This is preferred to reading the document as it does not instantiate the objects or invoke any callback methods, thus making it a safe validation.- Specified by:
validatein interfaceSerializer- Parameters:
type- this is the class type to be validated against XMLsource- this provides the source of the XML document- Returns:
- true if the document matches the class XML schema
- Throws:
Exception- if the class XML schema does not fully match
-
validate
Thisvalidatemethod will validate the contents of the XML document against the specified XML class schema. This is used to perform a read traversal of the class schema such that the document can be tested against it. This is preferred to reading the document as it does not instantiate the objects or invoke any callback methods, thus making it a safe validation.- Specified by:
validatein interfaceSerializer- Parameters:
type- this is the class type to be validated against XMLsource- this provides the source of the XML documentstrict- this determines whether to read in strict mode- Returns:
- true if the document matches the class XML schema
- Throws:
Exception- if the class XML schema does not fully match
-
validate
Thisvalidatemethod will validate the contents of the XML document against the specified XML class schema. This is used to perform a read traversal of the class schema such that the document can be tested against it. This is preferred to reading the document as it does not instantiate the objects or invoke any callback methods, thus making it a safe validation.- Specified by:
validatein interfaceSerializer- Parameters:
type- this is the class type to be validated against XMLsource- this provides the source of the XML documentstrict- this determines whether to read in strict mode- Returns:
- true if the document matches the class XML schema
- Throws:
Exception- if the class XML schema does not fully match
-
validate
Thisvalidatemethod will validate the contents of the XML document against the specified XML class schema. This is used to perform a read traversal of the class schema such that the document can be tested against it. This is preferred to reading the document as it does not instantiate the objects or invoke any callback methods, thus making it a safe validation.- Specified by:
validatein interfaceSerializer- Parameters:
type- this is the class type to be validated against XMLsource- this provides the source of the XML documentstrict- this determines whether to read in strict mode- Returns:
- true if the document matches the class XML schema
- Throws:
Exception- if the class XML schema does not fully match
-
validate
Thisvalidatemethod will validate the contents of the XML document against the specified XML class schema. This is used to perform a read traversal of the class schema such that the document can be tested against it. This is preferred to reading the document as it does not instantiate the objects or invoke any callback methods, thus making it a safe validation.- Specified by:
validatein interfaceSerializer- Parameters:
type- this is the class type to be validated against XMLsource- this provides the source of the XML documentstrict- this determines whether to read in strict mode- Returns:
- true if the document matches the class XML schema
- Throws:
Exception- if the class XML schema does not fully match
-
validate
Thisvalidatemethod will validate the contents of the XML document against the specified XML class schema. This is used to perform a read traversal of the class schema such that the document can be tested against it. This is preferred to reading the document as it does not instantiate the objects or invoke any callback methods, thus making it a safe validation.- Specified by:
validatein interfaceSerializer- Parameters:
type- this is the class type to be validated against XMLnode- this provides the source of the XML documentstrict- this determines whether to read in strict mode- Returns:
- true if the document matches the class XML schema
- Throws:
Exception- if the class XML schema does not fully match
-
validate
Thisvalidatemethod will validate the contents of the XML document against the specified XML class schema. This is used to perform a read traversal of the class schema such that the document can be tested against it. This is preferred to reading the document as it does not instantiate the objects or invoke any callback methods, thus making it a safe validation.- Parameters:
type- this is the class type to be validated against XMLnode- this provides the source of the XML documentsession- this is the session that is used for validation- Returns:
- true if the document matches the class XML schema
- Throws:
Exception- if the class XML schema does not fully match
-
validate
Thisvalidatemethod will validate the contents of the XML document against the specified XML class schema. This is used to perform a read traversal of the class schema such that the document can be tested against it. This is preferred to reading the document as it does not instantiate the objects or invoke any callback methods, thus making it a safe validation.- Parameters:
type- this is the class type to be validated against XMLnode- this provides the source of the XML documentcontext- the contextual object used for deserialization- Returns:
- true if the document matches the class XML schema
- Throws:
Exception- if the class XML schema does not fully match
-
write
Thiswritemethod will traverse the provided object checking for field annotations in order to compose the XML data. This uses thegetClassmethod on the object to determine the class file that will be used to compose the schema. If there is noRootannotation for the class then this will throw an exception. The root annotation is the only annotation required for an object to be serialized.- Specified by:
writein interfaceSerializer- Parameters:
source- this is the object that is to be serializedroot- this is where the serialized XML is written to- Throws:
Exception- if the schema for the object is not valid
-
write
Thiswritemethod will traverse the provided object checking for field annotations in order to compose the XML data. This uses thegetClassmethod on the object to determine the class file that will be used to compose the schema. If there is noRootannotation for the class then this will throw an exception. The root annotation is the only annotation required for an object to be serialized.- Parameters:
source- this is the object that is to be serializedroot- this is where the serialized XML is written tosession- this is the session used for serialization- Throws:
Exception- if the schema for the object is not valid
-
write
Thiswritemethod will traverse the provided object checking for field annotations in order to compose the XML data. This uses thegetClassmethod on the object to determine the class file that will be used to compose the schema. If there is noRootannotation for the class then this will throw an exception. The root annotation is the only annotation required for an object to be serialized.- Parameters:
source- this is the object that is to be serializedcontext- this is a contextual object used for serialization- Throws:
Exception- if the schema for the object is not valid
-
write
Thiswritemethod will traverse the provided object checking for field annotations in order to compose the XML data. This uses thegetClassmethod on the object to determine the class file that will be used to compose the schema. If there is noRootannotation for the class then this will throw an exception. The root annotation is the only annotation required for an object to be serialized.- Specified by:
writein interfaceSerializer- Parameters:
source- this is the object that is to be serializedout- this is where the serialized XML is written to- Throws:
Exception- if the schema for the object is not valid
-
write
Thiswritemethod will traverse the provided object checking for field annotations in order to compose the XML data. This uses thegetClassmethod on the object to determine the class file that will be used to compose the schema. If there is noRootannotation for the class then this will throw an exception. The root annotation is the only annotation required for an object to be serialized.- Specified by:
writein interfaceSerializer- Parameters:
source- this is the object that is to be serializedout- this is where the serialized XML is written to- Throws:
Exception- if the schema for the object is not valid
-
write
Thiswritemethod will traverse the provided object checking for field annotations in order to compose the XML data. This uses thegetClassmethod on the object to determine the class file that will be used to compose the schema. If there is noRootannotation for the class then this will throw an exception. The root annotation is the only annotation required for an object to be serialized.- Parameters:
source- this is the object that is to be serializedout- this is where the serialized XML is written tocharset- this is the character encoding to be used- Throws:
Exception- if the schema for the object is not valid
-
write
Thiswritemethod will traverse the provided object checking for field annotations in order to compose the XML data. This uses thegetClassmethod on the object to determine the class file that will be used to compose the schema. If there is noRootannotation for the class then this will throw an exception. The root annotation is the only annotation required for an object to be serialized.- Specified by:
writein interfaceSerializer- Parameters:
source- this is the object that is to be serializedout- this is where the serialized XML is written to- Throws:
Exception- if the schema for the object is not valid
-