public void visit(FidFilter filter) { fids.addAll(Arrays.asList(filter.getFids())); }
protected void queryFidFilter() { FidFilter fidFilter = (FidFilter) filter; if (fidIndex == -1) { fidIndex = 0; } while( fidIndex < fidFilter.getFids().length && next == null ) { String fid = fidFilter.getFids()[fidIndex]; if( encounteredFids.contains(fid) ){ fidIndex++; continue; } next = (Feature) diff.modified2.get(fid); if( next==null ){ next = (Feature) diff.added.get(fid); } fidIndex++; } }
public void visit(org.geotools.filter.FidFilter filter) { String[] fids = filter.getFids(); for (int i = 0; i < fids.length; i++) { AttributesImpl atts = new AttributesImpl(); atts.addAttribute("", "fid", "fid", "", fids[i]); element("FeatureId",null,atts); } }
public void visit(FidFilter filter) { FidFilter copy = ff.createFidFilter(); String[] fids = filter.getFids(); for (int i = 0; i < fids.length; i++) { copy.addFid(fids[i]); } pages.push(copy); }
String[] fids = filter.getFids(); LOGGER.finer("Exporting FID=" + Arrays.asList(fids));
String[] fids = filter.getFids(); LOGGER.finer("Exporting FID=" + Arrays.asList(fids));
String[] fids = filter.getFids(); LOGGER.finer("Exporting FID=" + Arrays.asList(fids));
/** * @see org.geotools.xml.schema.Type#getValue(org.geotools.xml.schema.Element, * org.geotools.xml.schema.ElementValue[], * org.xml.sax.Attributes, java.util.Map) */ public Object getValue(Element element, ElementValue[] value, Attributes attrs1, Map hints) throws SAXException, SAXNotSupportedException { if ((element == null) || (value == null) || (element.getType() == null)) { throw new SAXException("Invalid parameters : null found"); } if (value.length < 1) { throw new SAXException("Invalid children: too few"); } if (!getName().equals(element.getType().getName())) { throw new SAXException("Invalid type name for element provided"); } List fidList = new ArrayList(); for (int i = 0; i < value.length; i++) fidList.addAll(Arrays.asList( ((FidFilter) value[i].getValue()).getFids())); return fidList; }
/** * @see org.geotools.xml.schema.Type#getValue(org.geotools.xml.schema.Element, * org.geotools.xml.schema.ElementValue[], * org.xml.sax.Attributes, java.util.Map) */ public Object getValue(Element element, ElementValue[] value, Attributes attrs, Map hints) throws SAXException, SAXNotSupportedException { if ((element == null) || (value == null) || (element.getType() == null)) { throw new SAXException("Invalid parameters : null found"); } if (value.length < 1) { throw new SAXException("Invalid children: too few"); } if (!getName().equals(element.getType().getName())) { throw new SAXException("Invalid type name for element provided"); } Set fidSet = new HashSet(); for (int i = 0; i < value.length; i++) fidSet.addAll(Arrays.asList( ((FidFilter) value[i].getValue()).getFids())); FidFilter r = FilterFactoryFinder.createFilterFactory().createFidFilter(); r.addAllFids(fidSet); return r; }
/** * @see org.geotools.xml.schema.Type#getValue(org.geotools.xml.schema.Element, * org.geotools.xml.schema.ElementValue[], * org.xml.sax.Attributes, java.util.Map) */ public Object getValue(Element element, ElementValue[] value, Attributes attrs, Map hints) throws SAXException, SAXNotSupportedException { if ((element == null) || (value == null) || (element.getType() == null)) { throw new SAXException("Invalid parameters : null found"); } if (value.length < 1) { throw new SAXException("Invalid children: too few"); } if (!getName().equals(element.getType().getName())) { throw new SAXException("Invalid type name for element provided"); } Set fidSet = new HashSet(); for (int i = 0; i < value.length; i++) fidSet.addAll(Arrays.asList( ((FidFilter) value[i].getValue()).getFids())); FidFilter r = FilterFactoryFinder.createFilterFactory().createFidFilter(); r.addAllFids(fidSet); return r; }
private void handleDeleteAction(List<Action> actions, int i, InsertAction action, DeleteAction deleteAction) { // if inserted action has been deleted then remove action if (deleteAction.getFilter().evaluate(action.getFeature())) { actions.remove(i); // if filter is a fid filter of size 1 then it only contains the // inserted feature which // no longer exists since it has been deleted. so remove that action // as well. if (deleteAction.getFilter() instanceof FidFilter && ((FidFilter) deleteAction.getFilter()).getFids().length == 1) { actions.remove(i); } } else { swap(actions, i); } }
private int handleUpdateAction(List<Action> actions, int i, InsertAction action, UpdateAction updateAction) { // if update action applies to feature then update feature if (updateAction.getFilter().evaluate(action.getFeature())) { updateAction.update(action.getFeature()); // if filter is a fid filter and there is only 1 fid then filter // uniquely identifies // only the // one features so remove it. if (updateAction.getFilter() instanceof FidFilter && ((FidFilter) updateAction.getFilter()).getFids().length == 1) { actions.remove(i + 1); return i; } } swap(actions, i); return i + 1; }
if (filter instanceof FidFilter && fixURL!=null ) { FidFilter fidFilter = (FidFilter) filter; goodRecs = queryFidIndex(fidFilter.getFids()); } else { if (filter != null) {