Class FeatureTypeTransformer.FeatureTypeTranslator

    • Constructor Detail

      • FeatureTypeTranslator

        public FeatureTypeTranslator​(ContentHandler handler)
        Creates a new FeatureTypeTranslator. The default prefix is "xs" and the default namespace is "http://www.w3.org/2001/XMLSchema".
        Parameters:
        handler - the content handler that receives the SAX events
    • Method Detail

      • encode

        public void encode​(Object o)
                    throws IllegalArgumentException
        Encode object o, which must be an instance of FeatureType. If it is not an IllegalArgumentException will be thrown.
        Parameters:
        o - The Object to encode.
        Throws:
        IllegalArgumentException - if supplied object is not an instance of FeatureType
        See Also:
        Translator.encode(java.lang.Object)
      • encode

        protected void encode​(SimpleFeatureType type)
        Encode the supplied feature type.
        Parameters:
        type - the feature type to encode
      • startSchemaType

        protected final void startSchemaType​(String name,
                                             String namespace)
                                      throws SAXException
        Start the schema fragment for a feature type.
        Throws:
        SAXException
      • endSchemaType

        protected void endSchemaType()
                              throws SAXException
        End the schema fragment for a feature type.
        Throws:
        SAXException
      • encode

        protected void encode​(AttributeDescriptor attribute)
                       throws SAXException
        Encode an AttributeType.
        Throws:
        SAXException
      • encodeBoolean

        protected void encodeBoolean​(AttributeDescriptor attribute)
                              throws SAXException
        Encode an AttributeType whose value type is a Boolean.
        Throws:
        SAXException
      • encodeString

        protected void encodeString​(AttributeDescriptor attribute)
                             throws SAXException
        Encode an AttributeType whose value type is a String.
        Parameters:
        attribute - the attribute to encode
        Throws:
        SAXException
      • encodeNumber

        protected void encodeNumber​(AttributeDescriptor attribute)
                             throws SAXException
        Encode an AttributeType whose value type is a Number.
        Throws:
        SAXException
      • encodeDate

        protected void encodeDate​(AttributeDescriptor attribute)
                           throws SAXException
        Encode an AttributeType whose value type is a Date.
        Throws:
        SAXException
      • encodeGeometry

        protected void encodeGeometry​(AttributeDescriptor attribute)
                               throws SAXException
        Encode an AttributeType whose value type is a Geometry.
        Throws:
        SAXException
      • createStandardAttributes

        protected AttributesImpl createStandardAttributes​(AttributeDescriptor attribute)
        Creates standard xml attributes present on all xs:element elements. These are name, maxOccurs, minOccurs and nillable.
        Parameters:
        attribute - the attribute type from which the information is retrieved
        Returns:
        an org.xml.sax.helpers.AttributesImpl object that contains the standard attributes