restrictions.put("url", "http://www.google.com/gadget.xml"); ElementIterator iterator = new BlipIterator.ElementIterator(blip, ElementType.GADGET, restrictions, -1);
restrictions.put("url", "http://www.google.com/gadget.xml"); ElementIterator iterator = new BlipIterator.ElementIterator(blip, ElementType.GADGET, restrictions, -1);
/** * Constructs an instance representing the search for element * {@code ElementType}, that has the properties specified in * {@code restrictions}. * * @param blip the blip to find {@code target} in. * @param target the element type to search. * @param maxResult the maximum number of results. * @param restrictions the additional properties filter that need to be * matched. * @return an instance of blip references. */ public static BlipContentRefs all(Blip blip, ElementType target, int maxResult, Restriction... restrictions) { Map<String, String> restrictionsAsMap = new HashMap<String, String>(restrictions.length); for (Restriction restriction : restrictions) { restrictionsAsMap.put(restriction.getKey(), restriction.getValue()); } return new BlipContentRefs(blip, new BlipIterator.ElementIterator(blip, target, restrictionsAsMap, maxResult), Parameter.of(ParamsProperty.MODIFY_QUERY, new DocumentModifyQuery(target, restrictionsAsMap, maxResult))); }