/** * Returns the number of attributes at the first 'level' of the schema. * * @return equivalent value to getAttributeTypes().length */ public int getAttributeCount(){ return featureType.getAttributeCount(); }
/** * DOCUMENT ME! * * @return DOCUMENT ME! */ public int getAttributeCount() { return type.getAttributeCount(); }
/** * Returns the number of attributes at the first 'level' of the schema. * * @return equivalent value to getAttributeTypes().length */ public int getAttributeCount(){ return featureType.getAttributeCount(); }
public boolean setPosition(int position) { this.position = position; return position <= featureType.getAttributeCount(); }
/** * DOCUMENT ME! * * @return DOCUMENT ME! */ public int getAttributeCount() { return type.getAttributeCount(); }
public boolean setPosition(int position) { this.position = position; return position <= featureType.getAttributeCount(); }
public int getAttributeCount() { return type.getAttributeCount(); } public AttributeType getAttributeType(int index) throws ArrayIndexOutOfBoundsException {
public int getAttributeCount() { return type.getAttributeCount(); } public AttributeType getAttributeType(int index) throws ArrayIndexOutOfBoundsException {
public int getLength() { return featureType.getAttributeCount(); }
public int getNumberOfAttributes() { return featureType == null ? 1 : featureType.getAttributeCount(); }
public int getLength() { return featureType.getAttributeCount(); }
public static int findGeomIndex(final FeatureType _ftype) { int t; // fill in each of the column defs for (t = 0; t < _ftype.getAttributeCount(); t++) { if (_ftype.getAttributeType(t) instanceof GeometryAttributeType) { return t; } } return -1; }
public Object createDefaultValue() { Object[] t = new Object[featureType.getAttributeCount()]; for(int i=0;i<t.length;i++) t[i] = null; try { return featureType.create(t); } catch (IllegalAttributeException e) { // do nothing return null; } }
public Object createDefaultValue() { Object[] t = new Object[featureType.getAttributeCount()]; for(int i=0;i<t.length;i++) t[i] = null; try { return featureType.create(t); } catch (IllegalAttributeException e) { // do nothing return null; } }
public int getNumberOfAttributes() { return getFeatureType().getAttributeCount(); }
private void createDefault() { default_ = new Object[fType_.getAttributeCount()]; for (int i = default_.length - 1; i >= 0; i--) { default_[i] = fType_.getAttributeType(i).createDefaultValue(); } }
public String[] getPropertyNames(Object object) { Feature feature = (Feature) object; FeatureType featureType = feature.getFeatureType(); //set is ok because jxpath ignores order String[] propertyNames = new String[ featureType.getAttributeCount() ]; for ( int i = 0; i < propertyNames.length; i++ ) { propertyNames[ i ] = featureType.getAttributeType( i ).getName(); } return propertyNames; }
public String[] getPropertyNames(Object object) { Feature feature = (Feature) object; FeatureType featureType = feature.getFeatureType(); //set is ok because jxpath ignores order String[] propertyNames = new String[featureType.getAttributeCount()]; for (int i = 0; i < propertyNames.length; i++) { propertyNames[i] = featureType.getAttributeType(i).getLocalName(); } return propertyNames; }
public Feature next() throws IOException, IllegalAttributeException, NoSuchElementException { Feature feature = wrapped.next(); FeatureType featureType = wrapped.getFeatureType(); String id = feature.getID(); return featureType.create(feature .getAttributes(new Object[featureType.getAttributeCount()]), fidMapper .getUnversionedFid(id)); } }
public void testFixture() throws Exception { FeatureType type = DataUtilities.createType("namespace.typename", "name:String,id:0,geom:MultiLineString"); assertEquals("namespace", new URI("namespace"), type.getNamespace()); assertEquals("typename", "typename", type.getTypeName()); assertEquals("attributes", 3, type.getAttributeCount()); AttributeType[] a = type.getAttributeTypes(); assertEquals("a1", "name", a[0].getName()); assertEquals("a1", String.class, a[0].getType()); assertEquals("a2", "id", a[1].getName()); assertEquals("a2", Integer.class, a[1].getType()); assertEquals("a3", "geom", a[2].getName()); assertEquals("a3", MultiLineString.class, a[2].getType()); }