public AttributeDescriptor buildDescriptor(Name name, AttributeType type) { // build the descriptor AttributeDescriptor descriptor = factory.createAttributeDescriptor( type, name, minOccurs(), maxOccurs(), isNillable, defaultValue()); // set the user data descriptor.getUserData().putAll(userData); resetDescriptorState(); return descriptor; }
public TypeBuilder attribute(Name name, AttributeType type) { // TODO: handle default value AttributeDescriptor descriptor = getTypeFactory() .createAttributeDescriptor( type, name, getMinOccurs(), getMaxOccurs(), isNillable(), null); add(descriptor); return this; }
public void addAttribute(Name name, AttributeType type) { // TODO: handle default value AttributeDescriptor descriptor = getTypeFactory() .createAttributeDescriptor( type, name, getMinOccurs(), getMaxOccurs(), isNillable(), null); add(descriptor); }
private AttributeDescriptor reprojectAttribute(AttributeDescriptor descr) { if (reprojection != null && descr.getType() instanceof FeatureType) { AttributeDescriptor ad = ftf.createAttributeDescriptor( reprojectType((FeatureType) descr.getType()), descr.getName(), descr.getMinOccurs(), descr.getMaxOccurs(), descr.isNillable(), descr.getDefaultValue()); ad.getUserData().putAll(descr.getUserData()); return ad; } else { return descr; } }
AttributeDescriptor ad = factory.createAttributeDescriptor( gtType, name(element),minOccurs, maxOccurs, isNillable, null ); AttributeDescriptor ad = factory.createAttributeDescriptor( gtType, name(attribute), 0, 1, true, null);
typeFactory.createAttributeDescriptor( xmlType, name,
} else { descriptor = typeFactory.createAttributeDescriptor( type, elemName, minOccurs, maxOccurs, nillable, defaultValue);
AttributeDescriptor ad = factory.createAttributeDescriptor(gtType, new NameImpl(element.getTargetNamespace(), element.getName()), minOccurs, maxOccurs, isNillable, null); AttributeDescriptor ad = factory.createAttributeDescriptor(gtType, name(attribute), 0, 1, true, null); properties.add(ad);
descriptorFactory.createAttributeDescriptor( targetNodeType, attributeName,
@Before public void setUp() throws Exception { MemoryDataStore ds = createWaterSampleTestFeatures(); targetType = TestData.createComplexWaterSampleType(); FeatureTypeFactory tf = new UniqueNameFeatureTypeFactoryImpl(); AttributeDescriptor targetFeature = tf.createAttributeDescriptor( targetType, targetType.getName(), 0, Integer.MAX_VALUE, true, null); targetName = targetFeature.getName(); List mappings = TestData.createMappingsColumnsAndValues(targetFeature); Name sourceName = TestData.WATERSAMPLE_TYPENAME; FeatureSource<SimpleFeatureType, SimpleFeature> source = ds.getFeatureSource(sourceName); // empty nssupport as the sample types have no namespace defined NamespaceSupport namespaces = new NamespaceSupport(); mapping = new FeatureTypeMapping(source, targetFeature, mappings, namespaces); dataStore = new AppSchemaDataAccess(Collections.singleton(mapping)); }
attribute = getTypeFactory() .createAttributeDescriptor( (AttributeType) propertyType, typeName(),
FeatureTypeFactory tf = new UniqueNameFeatureTypeFactoryImpl(); AttributeDescriptor targetFeature = tf.createAttributeDescriptor( targetType, targetType.getName(), 0, Integer.MAX_VALUE, true, null);
private static AttributeDescriptor readAttributeDescriptor(DataInput in, FeatureTypeFactory typeFactory) throws IOException { final Name name = readName(in); final boolean nillable = in.readBoolean(); final int minOccurs = in.readInt(); final int maxOccurs = in.readInt(); final AttributeType type = readAttributeType(in, typeFactory); if (type instanceof GeometryType) return typeFactory.createGeometryDescriptor((GeometryType) type, name, minOccurs, maxOccurs, nillable, null); else return typeFactory.createAttributeDescriptor(type, name, minOccurs, maxOccurs, nillable, null); }
private static AttributeDescriptor readAttributeDescriptor(DataInput in, FeatureTypeFactory typeFactory) throws IOException { final Name name = readName(in); final boolean nillable = in.readBoolean(); final int minOccurs = in.readInt(); final int maxOccurs = in.readInt(); final AttributeType type = readAttributeType(in, typeFactory); if (type instanceof GeometryType) return typeFactory.createGeometryDescriptor((GeometryType) type, name, minOccurs, maxOccurs, nillable, null); else return typeFactory.createAttributeDescriptor(type, name, minOccurs, maxOccurs, nillable, null); }
private static AttributeDescriptor readAttributeDescriptor(DataInput in, FeatureTypeFactory typeFactory) throws IOException { final Name name = readName(in); final boolean nillable = in.readBoolean(); final int minOccurs = in.readInt(); final int maxOccurs = in.readInt(); final AttributeType type = readAttributeType(in, typeFactory); if (type instanceof GeometryType) return typeFactory.createGeometryDescriptor((GeometryType) type, name, minOccurs, maxOccurs, nillable, null); else return typeFactory.createAttributeDescriptor(type, name, minOccurs, maxOccurs, nillable, null); }
tf.createAttributeDescriptor( targetType, targetType.getName(), 0, Integer.MAX_VALUE, true, null);
public AttributeDescriptor buildDescriptor(Name name, AttributeType type ) { //build the descriptor AttributeDescriptor descriptor = factory.createAttributeDescriptor( type, name, minOccurs(), maxOccurs(), isNillable, defaultValue()); //set the user data descriptor.getUserData().putAll( userData ); resetDescriptorState(); return descriptor; }
public TypeBuilder attribute(Name name, AttributeType type) { // TODO: handle default value AttributeDescriptor descriptor = getTypeFactory().createAttributeDescriptor(type, name, getMinOccurs(), getMaxOccurs(), isNillable(), null); add(descriptor); return this; }
public void addAttribute(Name name, AttributeType type) { // TODO: handle default value AttributeDescriptor descriptor = getTypeFactory().createAttributeDescriptor(type, name, getMinOccurs(), getMaxOccurs(), isNillable(), null); add(descriptor); }
private AttributeDescriptor reprojectAttribute(AttributeDescriptor descr) { if ( reprojection != null && descr.getType() instanceof FeatureType ) { AttributeDescriptor ad = ftf.createAttributeDescriptor(reprojectType((FeatureType) descr.getType()), descr.getName(), descr.getMinOccurs(), descr.getMaxOccurs(), descr.isNillable(), descr.getDefaultValue()); ad.getUserData().putAll(descr.getUserData()); return ad; } else { return descr; } }