/** * Encode object o, which must be an instance of FeatureType. If it is not an * IllegalArgumentException will be thrown. * * @param o DOCUMENT ME! * @throws IllegalArgumentException if supplied object is not an instance of FeatureType * @see org.geotools.xml.transform.Translator#encode(java.lang.Object) */ public void encode(Object o) throws IllegalArgumentException { if (o instanceof SimpleFeatureType) { encode((SimpleFeatureType) o); } else { throw new IllegalArgumentException( "Translator does not know how to translate " + o.getClass().getName()); } }
/** * Encode the supplied feature type. * * @param type the feature type to encode * @throws RuntimeException DOCUMENT ME! */ protected void encode(SimpleFeatureType type) { List attributes = type.getAttributeDescriptors(); try { startSchemaType(type.getTypeName(), type.getName().getNamespaceURI()); for (int i = 0; i < attributes.size(); i++) { encode((AttributeDescriptor) attributes.get(i)); } endSchemaType(); } catch (SAXException e) { throw new RuntimeException(e); } }
/** * Encode object o, which must be an instance of FeatureType. If it is * not an IllegalArgumentException will be thrown. * * @param o DOCUMENT ME! * * @throws IllegalArgumentException if supplied object is not an * instance of FeatureType * * @see org.geotools.xml.transform.Translator#encode(java.lang.Object) */ public void encode(Object o) throws IllegalArgumentException { if (o instanceof SimpleFeatureType) { encode((SimpleFeatureType) o); } else { throw new IllegalArgumentException( "Translator does not know how to translate " + o.getClass().getName()); } }
/** * Encode object o, which must be an instance of FeatureType. If it is * not an IllegalArgumentException will be thrown. * * @param o DOCUMENT ME! * * @throws IllegalArgumentException if supplied object is not an * instance of FeatureType * * @see org.geotools.xml.transform.Translator#encode(java.lang.Object) */ public void encode(Object o) throws IllegalArgumentException { if (o instanceof FeatureType) { encode((FeatureType) o); } else { throw new IllegalArgumentException( "Translator does not know how to translate " + o.getClass().getName()); } }
/** * Encode the supplied feature type. * * @param type the feature type to encode * * @throws RuntimeException DOCUMENT ME! */ protected void encode(SimpleFeatureType type) { List attributes = type.getAttributeDescriptors(); try { startSchemaType(type.getTypeName(), type.getName().getNamespaceURI()); for (int i = 0; i < attributes.size(); i++) { encode((AttributeDescriptor) attributes.get(i)); } endSchemaType(); } catch (SAXException e) { throw new RuntimeException(e); } }
/** * Encode the supplied feature type. * * @param type the feature type to encode * * @throws RuntimeException DOCUMENT ME! */ protected void encode(FeatureType type) { AttributeType[] attributes = type.getAttributeTypes(); try { startSchemaType(type.getTypeName(), type.getNamespace()); for (int i = 0; i < attributes.length; i++) { encode(attributes[i]); } endSchemaType(); } catch (SAXException e) { throw new RuntimeException(e); } }