public int getLength() { return feature.getNumberOfAttributes(); }
public boolean setPosition(int position) { this.position = position; return position <= feature.getNumberOfAttributes(); }
public boolean setPosition(int position) { this.position = position; return position <= feature.getNumberOfAttributes(); }
public int getLength() { return feature.getNumberOfAttributes(); }
/** * The number of columns in the feature table. Note: for the moment, this is * determined by the first feature. * * @return the number of columns in this feature table. * * @todo Just gets first feature type - should use typed feature * collection. Revisit when we have FeatureDocument. */ public int getColumnCount() { if (featureTable==null || featureTable.isEmpty()) { return 0; } return featureTable.features().next().getNumberOfAttributes(); }
private void writeImplementation( Feature f ) throws IOException{ writer.next(); writer.writeFeatureID( f.getID() ); for( int i=0; i<f.getNumberOfAttributes(); i++){ writer.write( i, f.getAttribute( i )); } } public Feature next() throws IOException {
private void writeImplementation( Feature f ) throws IOException{ writer.next(); writer.writeFeatureID( f.getID() ); for( int i=0; i<f.getNumberOfAttributes(); i++){ writer.write( i, f.getAttribute( i )); } } public Feature next() throws IOException {
this.state = UPDATED; List changedAttributes = new ArrayList(); for (int i = 0; i < oldFeature.getNumberOfAttributes(); i++) { String attName = oldFeature.getFeatureType().getAttributeType(i).getName(); Object toAttribute = newFeature.getAttribute(attName);
+ " SET "); for (int i = 0; i < current.getNumberOfAttributes(); i++) { Object currAtt = current.getAttribute(i); Object liveAtt = live.getAttribute(i);
public void handleFeatureReader(FeatureReader reader) throws IOException { try { while (reader.hasNext() && running) { Feature f = reader.next(); handleFeature(f); FeatureType t = f.getFeatureType(); for (int i = 0, ii = f.getNumberOfAttributes(); i < ii; i++) { handleAttribute(t.getAttributeType(i), f.getAttribute(i)); } endFeature(f); } } catch (Exception ioe) { throw new RuntimeException("Error reading Features", ioe); } finally { if (reader != null) { LOGGER.finer("closing reader " + reader); reader.close(); } } }
protected void doUpdate(Feature live, Feature current) throws IOException, SQLException { try { // Can we create for array getAttributes more efficiently? for (int i = 0; i < current.getNumberOfAttributes(); i++) { Object currAtt = current.getAttribute(i); Object liveAtt = live.getAttribute(i); if ((live == null) || !DataUtilities.attributesEqual(liveAtt, currAtt)) { if (LOGGER.isLoggable(Level.INFO)) { LOGGER.info("modifying att# " + i + " to " + currAtt); } queryData.write(i, currAtt); } } } catch (IOException ioe) { String message = "problem modifying row"; if (queryData.getTransaction() != Transaction.AUTO_COMMIT) { queryData.getTransaction().rollback(); message += "(transaction canceled)"; } throw ioe; } queryData.updateRow(); }
public void handleFeatureIterator(FeatureIterator iterator) throws IOException { try { while (iterator.hasNext() && running) { Feature f = iterator.next(); handleFeature(f); FeatureType t = f.getFeatureType(); for (int i = 0, ii = f.getNumberOfAttributes(); i < ii; i++) { handleAttribute(t.getAttributeType(i), f.getAttribute(i)); } endFeature(f); } } catch (Exception ioe) { throw new RuntimeException("Error reading Features", ioe); } finally { if (iterator != null) { LOGGER.finer("closing reader " + iterator); iterator.close(); } } }
for (int i = 0, ii = feature1.getNumberOfAttributes(); i < ii; i++) { Object otherAtt = feature2.getAttribute(i);
new Object[temp.getNumberOfAttributes()]), null);
for (int i = 0; i < current.getNumberOfAttributes(); i++) { Object currAtt = current.getAttribute(i); String attName = current.getFeatureType().getAttributeType(i).getName();
for (int i = 0; i < liveFeature.getNumberOfAttributes(); i++) { AttributeType at = liveFeature.getFeatureType().getAttributeType(i); Object newValue = liveFeature.getAttribute(at.getName()); for (int i = 0; i < liveFeature.getNumberOfAttributes(); i++) { AttributeType at = liveFeature.getFeatureType().getAttributeType(i); oldFeature.setAttribute(at.getName(), liveFeature.getAttribute(at.getName())); for (int i = 0; i < liveFeature.getNumberOfAttributes(); i++) { AttributeType at = liveFeature.getFeatureType().getAttributeType(i); newFeature.setAttribute(at.getName(), liveFeature.getAttribute(at.getName()));