MarshalContext (Apache SIS 1.6 API) JavaScript is disabled on your browser.     Skip navigation links Overview Class Use Tree New Deprecated Index Search Help org.apache.sis.metadata org.apache.sis.xml MarshalContext Contents  Description Constructor Summary Method Summary Constructor Details MarshalContext() Method Details getPool() getLocale() getZoneId() getTimeZone() getVersion(String) getDocumentURI() Hide sidebar  Show sidebar Class MarshalContext Object MarshalContext All Implemented Interfaces: Localized public abstract class MarshalContext extends Object implements Localized Context of a marshalling or unmarshalling process. Since: 0.3 Constructor Summary Constructors Modifier Constructor Description protected Marshal­Context() Creates a new (un)marshalling context. Method Summary All MethodsInstance MethodsAbstract MethodsConcrete Methods Modifier and Type Method Description abstract Optional<URI> get­Document­URI() Returns the URI of the document being (un)marshalled, if this URI is known. abstract Locale get­Locale() Returns the locale to use for (un)marshalling, or null if no locale was explicitly specified. abstract Marshaller­Pool get­Pool() Returns the marshaller pool that produced the marshaller or unmarshaller in use. Time­Zone get­Time­Zone() Returns the legacy timezone to use for (un)marshalling, or null if none was explicitly specified. abstract Version get­Version(String prefix) Returns the schema version of the XML document being (un)marshalled. abstract Zone­Id get­Zone­Id() Returns the timezone to use for (un)marshalling, or null if none was explicitly specified. Methods inherited from class Object clone, equals, finalize, get­Class, hash­Code, notify, notify­All, to­String, wait, wait, wait Constructor Details MarshalContext protected MarshalContext() Creates a new (un)marshalling context. Method Details getPool public abstract MarshallerPool getPool() Returns the marshaller pool that produced the marshaller or unmarshaller in use. This pool may be used for creating new (un)marshaller when a document contains xlink:href to another document. Returns: the marshaller pool that produced the marshaller or unmarshaller in use. Since: 1.5 getLocale public abstract Locale getLocale() Returns the locale to use for (un)marshalling, or null if no locale was explicitly specified. The locale returned by this method can be used for choosing a language in an International­String. This locale may vary in different fragments of the same XML document. In particular children of Metadata inherit the locale specified by the Metadata​.get­Language() attribute. Handling of Locale​.ROOT Locale​.ROOT is interpreted as a request for locale-neutral strings. The meaning of "locale-neutral" is implementation specific - this is usually very close to the English locale, but not necessarily. For examples dates are formatted according ISO standard instead of the rules of the English locale. Handling of null locale A null value means that the locale is unspecified. Callers are encouraged to use the root locale as the default value, but some flexibility is allowed. Specified by: get­Locale in interface Localized Returns: the locale for the XML fragment being (un)marshalled, or null if unspecified. See Also: Default­International­String​.to­String(Locale) getZoneId public abstract ZoneId getZoneId() Returns the timezone to use for (un)marshalling, or null if none was explicitly specified. Handling of null timezone A null value means that the timezone is unspecified. Callers are encouraged to use the UTC timezone as the default value, but some flexibility is allowed. Returns: the timezone for the XML fragment being (un)marshalled, or null if unspecified. Since: 1.5 getTimeZone public TimeZone getTimeZone() Returns the legacy timezone to use for (un)marshalling, or null if none was explicitly specified. This is he value returned by get­Zone­Id() converted to the legacy Java object. Returns: the timezone for the XML fragment being (un)marshalled, or null if unspecified. getVersion public abstract Version getVersion(String prefix) Returns the schema version of the XML document being (un)marshalled. The prefix argument can be any of the following values (case-sensitive): Supported schemas Prefix Standard Typical values gml Geographic Markup Language 3.0, 3.2 gmd Geographic MetaData 2007, 2016 Parameters: prefix - one of the above-cited prefix. Returns: the version for the given schema, or null if unknown. getDocumentURI public abstract Optional<URI> getDocumentURI() Returns the URI of the document being (un)marshalled, if this URI is known. The URI is generally unknown if the source of the XML document is, for example, an Input­Stream. Returns: the URI of the document being marshalled or unmarshalled. Since: 1.5