public boolean verify( Model model, Object content, QName name, Object valueObject, Locator locator, VerifierContext context) { String value = (String) valueObject; Integer[] minMax = new Integer[] {2, 2}; Object[] treatments = new Object[] {NegativeTreatment.Error, ZeroTreatment.Error}; if (Integers.isIntegers(value, locator, context, minMax, treatments, null)) return true; else { Integers.badIntegers(value, locator, context, minMax, treatments); return false; } }
private Extent parseCellResolution(String value) { if (value != null) { Integer[] minMax = new Integer[] {2, 2}; Object[] treatments = new Object[] {NegativeTreatment.Error, ZeroTreatment.Error}; List<Integer> integers = new java.util.ArrayList<Integer>(); if (Integers.isIntegers(value, new Location(), context, minMax, treatments, integers)) return new Extent(integers.get(0), integers.get(1)); } return null; }