org.geotools.xml.transform
Interface Translator

All Known Implementing Classes:
TransformerBase.TranslatorSupport

public interface Translator

A Translator is used in an XMLEncoding process by the FeatureTransformer class.

Author:
Ian Schneider

Method Summary
 void abort()
          Abort any translating activity.
 void encode(java.lang.Object o)
          Encode the object.
 java.lang.String getDefaultNamespace()
          Get the default URI used by this Translator for encoding.
 java.lang.String getDefaultPrefix()
          Get the default prefix used by this Translator for encoding.
 org.xml.sax.helpers.NamespaceSupport getNamespaceSupport()
          Obtain the namespace prefixes and URIs to be included in the output document.
 TransformerBase.SchemaLocationSupport getSchemaLocationSupport()
          Gets the location of the schemas used in this translator.
 

Method Detail

getNamespaceSupport

public org.xml.sax.helpers.NamespaceSupport getNamespaceSupport()
Obtain the namespace prefixes and URIs to be included in the output document.

Returns:
An instance of NamespaceSupport.

getDefaultNamespace

public java.lang.String getDefaultNamespace()
Get the default URI used by this Translator for encoding. Optional.


getDefaultPrefix

public java.lang.String getDefaultPrefix()
Get the default prefix used by this Translator for encoding. Optional.


encode

public void encode(java.lang.Object o)
            throws java.lang.IllegalArgumentException
Encode the object.

Parameters:
o - The Object to encode.
Throws:
java.lang.IllegalArgumentException - if the Object is not encodeable.

getSchemaLocationSupport

public TransformerBase.SchemaLocationSupport getSchemaLocationSupport()
Gets the location of the schemas used in this translator. Optional.


abort

public void abort()
Abort any translating activity. This is needed as some translators iterate internally on a data structure. The abort method should silently fail or succeed based upon the state of a translation.



Copyright © GeoTools. All Rights Reserved.