@Test public void testDateTimeFormatEnabled() throws Exception { System.setProperty("org.geotools.dateTimeFormatHandling", "true"); Hints.scanSystemProperties(); TimeZone defaultTimeZone = TimeZone.getDefault(); try { TimeZone.setDefault(TimeZone.getTimeZone("GMT")); SimpleFeatureType ft = DataUtilities.createType("invalidChars", "the_geom:Point,dia:Date"); Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("GMT")); cal.clear(); cal.set(1982, 11, 3); Date dateValue = cal.getTime(); SimpleFeature feature = SimpleFeatureBuilder.build( ft, new Object[] {new WKTReader().read("POINT(0 0)"), dateValue}, "123"); SimpleFeatureCollection fc = DataUtilities.collection(feature); FeatureTransformer tx = new FeatureTransformer(); tx.setIndentation(2); tx.getFeatureTypeNamespaces().declareNamespace(ft, "gt", "http: ByteArrayOutputStream bos = new ByteArrayOutputStream(); tx.transform(fc, bos); String result = bos.toString(); Document dom = XMLUnit.buildControlDocument(result); assertXpathEvaluatesTo("1", "count( assertXpathEvaluatesTo("1982-12-03T00:00:00Z", " } finally { System.getProperties().remove("org.geotools.dateTimeFormatHandling"); TimeZone.setDefault(defaultTimeZone); } }
public FeatureTypeNamespaces getFeatureTypeNamespaces() { return featureTypeNamespaces; }
FeatureTransformer extends TransformerBase { public FeatureTypeNamespaces getFeatureTypeNamespaces() { return featureTypeNamespaces; } }
FeatureTransformer extends TransformerBase { public FeatureTypeNamespaces getFeatureTypeNamespaces() { return featureTypeNamespaces; }  }
FeatureTransformer extends TransformerBase { public FeatureTypeNamespaces getFeatureTypeNamespaces() { return featureTypeNamespaces; }  void setCollectionNamespace(String nsURI); String getCollectionNamespace(); void setCollectionPrefix(String prefix); String getCollectionPrefix(); void setNumDecimals(int numDecimals); void setPadWithZeros(boolean padWithZeros); void setForceDecimalEncoding(boolean forceDecimalEncoding); NamespaceSupport getFeatureNamespaces(); FeatureTypeNamespaces getFeatureTypeNamespaces(); void addSchemaLocation(String nsURI, String uri); void setSrsName(String srsName); void setLockId(String lockId); void setGmlPrefixing(boolean prefixGml); void setFeatureBounding(boolean featureBounding); void setCollectionBounding(boolean collectionBounding); org.geotools.xml.transform.Translator createTranslator(ContentHandler handler); }
FeatureTransformer extends TransformerBase { public FeatureTypeNamespaces getFeatureTypeNamespaces() { return featureTypeNamespaces; }  void setCollectionNamespace(String nsURI); String getCollectionNamespace(); void setCollectionPrefix(String prefix); String getCollectionPrefix(); void setNumDecimals(int numDecimals); void setPadWithZeros(boolean padWithZeros); void setForceDecimalEncoding(boolean forceDecimalEncoding); NamespaceSupport getFeatureNamespaces(); FeatureTypeNamespaces getFeatureTypeNamespaces(); void addSchemaLocation(String nsURI, String uri); void setSrsName(String srsName); void setLockId(String lockId); void setGmlPrefixing(boolean prefixGml); void setFeatureBounding(boolean featureBounding); void setCollectionBounding(boolean collectionBounding); org.geotools.xml.transform.Translator createTranslator(ContentHandler handler);  }