Package org.simpleframework.xml.core
Interface Schema
-
- All Known Implementing Classes:
ClassSchema
interface Schema
TheSchema
object is used to track which fields within an object have been visited by a converter. This object is necessary for processingComposite
objects. In particular it is necessary to keep track of which required nodes have been visited and which have not, if a required not has not been visited then the XML source does not match the XML class schema and serialization must fail before processing any further.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Caller
getCaller()
This is used to acquire theCaller
object.Decorator
getDecorator()
This is used to acquire theDecorator
for this.Instantiator
getInstantiator()
This is used to acquire the instantiator for the type.Version
getRevision()
This is theVersion
for the scanned class.Section
getSection()
This is used to acquire theSection
that defines the XML structure for this class schema.Label
getText()
This returns theLabel
that represents the text annotation for the scanned class.Label
getVersion()
This returns theLabel
that represents the version annotation for the scanned class.boolean
isPrimitive()
This is used to determine whether the scanned class represents a primitive type.
-
-
-
Method Detail
-
isPrimitive
boolean isPrimitive()
This is used to determine whether the scanned class represents a primitive type. A primitive type is a type that contains no XML annotations and so cannot be serialized with an XML form. Instead primitives a serialized using transformations.- Returns:
- this returns true if no XML annotations were found
-
getVersion
Label getVersion()
This returns theLabel
that represents the version annotation for the scanned class. Only a single version can exist within the class if more than one exists an exception is thrown. This will read only floating point types such as double.- Returns:
- this returns the label used for reading the version
-
getRevision
Version getRevision()
This is theVersion
for the scanned class. It allows the deserialization process to be configured such that if the version is different from the schema class none of the fields and methods are required and unmatched elements and attributes will be ignored.- Returns:
- this returns the version of the class that is scanned
-
getDecorator
Decorator getDecorator()
This is used to acquire theDecorator
for this. A decorator is an object that adds various details to the node without changing the overall structure of the node. For example comments and namespaces can be added to the node with a decorator as they do not affect the deserialization.- Returns:
- this returns the decorator associated with this
-
getInstantiator
Instantiator getInstantiator()
This is used to acquire the instantiator for the type. This is used to create object instances based on the constructors that have been annotated. If no constructors have been annotated then this can be used to create default no argument instances.- Returns:
- this instantiator responsible for creating instances
-
getCaller
Caller getCaller()
This is used to acquire theCaller
object. This is used to call the callback methods within the object. If the object contains no callback methods then this will return an object that does not invoke any methods that are invoked.- Returns:
- this returns the caller for the specified type
-
getSection
Section getSection()
This is used to acquire theSection
that defines the XML structure for this class schema. A section, is the section of XML that the class is represented within. A section contains all the elements and attributes defined for the class in a tree like structure.- Returns:
- this returns the section defined for the schama
-
getText
Label getText()
This returns theLabel
that represents the text annotation for the scanned class. Only a single text annotation can be used per class, so this returns only a single label rather than aLabelMap
object. Also if this is not null then the elements label map will be empty.- Returns:
- this returns the text label for the scanned class
-
-