/** * @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; }