| | |
| | | private HashMap<String, FeatureWriter> featuresWriterContext = new HashMap<String, FeatureWriter>(); |
| | | |
| | | private PessimisticMapWrapper txFeaturesContext; |
| | | private FeatureTypeBuilder typeBuilder2 = null; |
| | | private FeatureTypeBuilder typeBuilder = null; |
| | | private FeatureTypeBuilder typeBuilderPnt = null; |
| | | private FeatureTypeBuilder typeBuilderRect = null; |
| | | private FeatureType featureType = null; |
| | | private FeatureType featureType2 = null; |
| | | |
| | |
| | | |
| | | public FeatureType createFeatureElement(String featureName) throws SchemaException |
| | | { |
| | | if (typeBuilder == null) |
| | | if (typeBuilderRect != null) |
| | | { |
| | | typeBuilder = FeatureTypeBuilder.newInstance(featureName); |
| | | typeBuilder.addType(AttributeTypeFactory.newAttributeType("GEOM", Geometry.class)); |
| | | typeBuilder.addType(AttributeTypeFactory.newAttributeType("X1", Double.class)); |
| | | typeBuilder.addType(AttributeTypeFactory.newAttributeType("Y1", Double.class)); |
| | | typeBuilder.addType(AttributeTypeFactory.newAttributeType("X2", Double.class)); |
| | | typeBuilder.addType(AttributeTypeFactory.newAttributeType("Y2", Double.class)); |
| | | typeBuilder.addType(AttributeTypeFactory.newAttributeType("TPCID", String.class)); |
| | | typeBuilder.addType(AttributeTypeFactory.newAttributeType("SYMCOLOR", String.class)); |
| | | typeBuilder.addType(AttributeTypeFactory.newAttributeType("SYMWEIGHT", Integer.class)); |
| | | typeBuilder.addType(AttributeTypeFactory.newAttributeType("SYMSTYLE", Integer.class)); |
| | | typeBuilderRect = FeatureTypeBuilder.newInstance(featureName); |
| | | typeBuilderRect.addType(AttributeTypeFactory.newAttributeType("GEOM", Geometry.class)); |
| | | typeBuilderRect.addType(AttributeTypeFactory.newAttributeType("X1", Double.class)); |
| | | typeBuilderRect.addType(AttributeTypeFactory.newAttributeType("Y1", Double.class)); |
| | | typeBuilderRect.addType(AttributeTypeFactory.newAttributeType("X2", Double.class)); |
| | | typeBuilderRect.addType(AttributeTypeFactory.newAttributeType("Y2", Double.class)); |
| | | typeBuilderRect.addType(AttributeTypeFactory.newAttributeType("TPCID", String.class)); |
| | | typeBuilderRect.addType(AttributeTypeFactory.newAttributeType("SYMCOLOR", String.class)); |
| | | typeBuilderRect.addType(AttributeTypeFactory.newAttributeType("SYMWEIGHT", Integer.class)); |
| | | typeBuilderRect.addType(AttributeTypeFactory.newAttributeType("SYMSTYLE", Integer.class)); |
| | | } |
| | | return typeBuilder.getFeatureType(); |
| | | return typeBuilderRect.getFeatureType(); |
| | | } |
| | | |
| | | public FeatureType createFeatureElement2(String featureName) throws SchemaException |
| | | { |
| | | if (typeBuilder2 == null) |
| | | if (typeBuilderPnt == null) |
| | | { |
| | | typeBuilder2 = FeatureTypeBuilder.newInstance(featureName); |
| | | typeBuilder2.addType(AttributeTypeFactory.newAttributeType("GEOM", Geometry.class)); |
| | | typeBuilder2.addType(AttributeTypeFactory.newAttributeType("SYMCOLOR", String.class)); |
| | | typeBuilder2.addType(AttributeTypeFactory.newAttributeType("SYMWEIGHT", Integer.class)); |
| | | typeBuilder2.addType(AttributeTypeFactory.newAttributeType("SYMSTYLE", Integer.class)); |
| | | typeBuilder2.addType(AttributeTypeFactory.newAttributeType("JUST", Integer.class)); |
| | | typeBuilder2.addType(AttributeTypeFactory.newAttributeType("HEIGHT", Double.class)); |
| | | typeBuilder2.addType(AttributeTypeFactory.newAttributeType("WIDTH", Double.class)); |
| | | typeBuilder2.addType(AttributeTypeFactory.newAttributeType("ANGLE", Double.class)); |
| | | typeBuilder2.addType(AttributeTypeFactory.newAttributeType("TPCID", String.class)); |
| | | typeBuilderPnt = FeatureTypeBuilder.newInstance(featureName); |
| | | typeBuilderPnt.addType(AttributeTypeFactory.newAttributeType("GEOM", Geometry.class)); |
| | | typeBuilderPnt.addType(AttributeTypeFactory.newAttributeType("SYMCOLOR", String.class)); |
| | | typeBuilderPnt.addType(AttributeTypeFactory.newAttributeType("SYMWEIGHT", Integer.class)); |
| | | typeBuilderPnt.addType(AttributeTypeFactory.newAttributeType("SYMSTYLE", Integer.class)); |
| | | typeBuilderPnt.addType(AttributeTypeFactory.newAttributeType("JUST", Integer.class)); |
| | | typeBuilderPnt.addType(AttributeTypeFactory.newAttributeType("HEIGHT", Double.class)); |
| | | typeBuilderPnt.addType(AttributeTypeFactory.newAttributeType("WIDTH", Double.class)); |
| | | typeBuilderPnt.addType(AttributeTypeFactory.newAttributeType("ANGLE", Double.class)); |
| | | typeBuilderPnt.addType(AttributeTypeFactory.newAttributeType("TPCID", String.class)); |
| | | } |
| | | return typeBuilder2.getFeatureType(); |
| | | return typeBuilderPnt.getFeatureType(); |
| | | } |
| | | |
| | | public Feature createFeature(FeatureType featureType, Element element) throws IllegalAttributeException |