key, current)); JSONValue value = ((JSONObject) current.jsonValue).get((String) key); if (value == null) { throw new IllegalArgumentException(format("Key '%s' does not refer to any attribute of %s",
public Object parseValue(JSONObject aObjectElement, JSONMarshall aMarshall, HashMap aPool) throws MarshallException { JSONMarshall.requireStringAttribute(aObjectElement, JSONMarshall.RNDR_ATTR_VALUE); return Color.decode(((JSONString) aObjectElement.get(JSONMarshall.RNDR_ATTR_VALUE)).getValue()); }
public Object parseValue(JSONObject aObjectElement, JSONMarshall aMarshall, HashMap aPool) throws MarshallException { JSONMarshall.requireStringAttribute(aObjectElement, JSONMarshall.RNDR_ATTR_VALUE); return new BigDecimal(((JSONString) aObjectElement.get(JSONMarshall.RNDR_ATTR_VALUE)).getValue()); }
public Object parseValue(JSONObject aObjectElement, JSONMarshall aMarshall, HashMap aPool) throws MarshallException { JSONMarshall.requireStringAttribute(aObjectElement, JSONMarshall.RNDR_ATTR_VALUE); return new BigInteger(((JSONString) aObjectElement.get(JSONMarshall.RNDR_ATTR_VALUE)).getValue()); }
public Object parseValue(JSONObject aObjectElement, JSONMarshall aMarshall, HashMap aPool) throws MarshallException { JSONMarshall.requireStringAttribute(aObjectElement, JSONMarshall.RNDR_ATTR_VALUE); return new Long(((JSONString) aObjectElement.get(JSONMarshall.RNDR_ATTR_VALUE)).getValue()); }
public Object parseValue(JSONObject aObjectValue, JSONMarshall aMarshall, HashMap aPool) throws MarshallException { JSONMarshall.requireStringAttribute(aObjectValue, JSONMarshall.RNDR_ATTR_VALUE); return new Float(((JSONString) aObjectValue.get(JSONMarshall.RNDR_ATTR_VALUE)).getValue()); }
public Object parseValue(JSONObject aObjectElement, JSONMarshall aMarshall, HashMap aPool) throws MarshallException { JSONMarshall.requireStringAttribute(aObjectElement, JSONMarshall.RNDR_ATTR_VALUE); return new Integer(((JSONString) aObjectElement.get(JSONMarshall.RNDR_ATTR_VALUE)).getValue()); }
public Object parseValue(JSONObject aObjectElement, JSONMarshall aMarshall, HashMap aPool) throws MarshallException { JSONMarshall.requireStringAttribute(aObjectElement, JSONMarshall.RNDR_ATTR_VALUE); return new Double(((JSONString) aObjectElement.get(JSONMarshall.RNDR_ATTR_VALUE)).getValue()); }
public Object parseValue(JSONObject aObjectElement, JSONMarshall aMarshall, HashMap aPool) throws MarshallException { JSONMarshall.requireStringAttribute(aObjectElement, JSONMarshall.RNDR_ATTR_VALUE); return new Byte(((JSONString) aObjectElement.get(JSONMarshall.RNDR_ATTR_VALUE)).getValue()); }
public Object parseValue(JSONObject aObjectElement, JSONMarshall aMarshall, HashMap aPool) throws MarshallException { JSONMarshall.requireStringAttribute(aObjectElement, JSONMarshall.RNDR_ATTR_VALUE); return new Short(((JSONString) aObjectElement.get(JSONMarshall.RNDR_ATTR_VALUE)).getValue()); }
public Object parseValue(JSONObject aObjectElement, JSONMarshall aMarshall, HashMap aPool) throws MarshallException { JSONMarshall.requireStringAttribute(aObjectElement, JSONMarshall.RNDR_ATTR_VALUE); return Boolean.valueOf(((JSONString) aObjectElement.get(JSONMarshall.RNDR_ATTR_VALUE)).getValue()); }
public Not(String aName, JSONObject aRule, HashMap<String,Validator> aRuleset) throws ValidationException { super(aName, aRule); ValidatorUtil.requiresAttribute(aRule, ValidatorUtil.PARAM_RULE, JSONObject.class); rule = ValidatorUtil.buildValidator(aRule.get(ValidatorUtil.PARAM_RULE), aRuleset); }
public Object parseValue(JSONObject aObjectElement, JSONMarshall aMarshall, HashMap aPool) throws MarshallException { JSONMarshall.requireStringAttribute(aObjectElement, JSONMarshall.RNDR_ATTR_VALUE); return ((JSONString) aObjectElement.get(JSONMarshall.RNDR_ATTR_VALUE)).getValue(); }
public Object parseValue(JSONObject aObjectElement, JSONMarshall aMarshall, HashMap aPool) throws MarshallException { JSONMarshall.requireStringAttribute(aObjectElement, JSONMarshall.RNDR_ATTR_VALUE); final String lValue = ((JSONString) aObjectElement.get(JSONMarshall.RNDR_ATTR_VALUE)).getValue(); if(lValue.length() < 1) throw new MarshallException("Length of value too short: " + lValue); return lValue.charAt(0); }
public Enumeration(String aName, JSONObject aRule) throws ValidationException { super(aName, aRule); ValidatorUtil.requiresAttribute(aRule, ValidatorUtil.PARAM_VALUES, JSONArray.class); enumValues = ((JSONArray) aRule.get(ValidatorUtil.PARAM_VALUES)).getValue(); }
public Ref(String aName, JSONObject aRule, HashMap<String,Validator> aRuleset) throws ValidationException { super(aName, aRule); ruleset = aRuleset; ValidatorUtil.requiresAttribute(aRule, ValidatorUtil.PARAM_REF, JSONString.class); ref = ((JSONString) aRule.get(ValidatorUtil.PARAM_REF)).getValue(); }
public Or(String aName, JSONObject aRule, HashMap<String,Validator> aRuleset) throws ValidationException { super(aName, aRule); ValidatorUtil.requiresAttribute(aRule, ValidatorUtil.PARAM_RULES, JSONArray.class); List<JSONValue> lRules = ((JSONArray) aRule.get(ValidatorUtil.PARAM_RULES)).getValue(); for (JSONValue lRule : lRules) { Validator lValidator = ValidatorUtil.buildValidator(lRule, aRuleset); rules.add(lValidator); } }
public And(String aName, JSONObject aRule, HashMap<String,Validator> aRuleset) throws ValidationException { super(aName, aRule); ValidatorUtil.requiresAttribute(aRule, ValidatorUtil.PARAM_RULES, JSONArray.class); List<JSONValue> lRules = ((JSONArray) aRule.get(ValidatorUtil.PARAM_RULES)).getValue(); for (JSONValue lRule : lRules) { Validator lValidator = ValidatorUtil.buildValidator(lRule, aRuleset); rules.add(lValidator); } }
public Object parseValue(JSONObject aObjectElement, JSONMarshall aMarshall, HashMap aPool) throws MarshallException { JSONMarshall.requireStringAttribute(aObjectElement, JSONMarshall.RNDR_ATTR_VALUE); return Font.decode(((JSONString) aObjectElement.get(JSONMarshall.RNDR_ATTR_VALUE)).getValue()); }
public Content(String aName, JSONObject aRule, HashMap<String, Validator> aRuleset) throws ValidationException { super(aName, aRule); rule = new True(aName, aRule); if (aRule.containsKey(ValidatorUtil.PARAM_RULE)) { ValidatorUtil.requiresAttribute(aRule, ValidatorUtil.PARAM_RULE, JSONObject.class); rule = ValidatorUtil.buildValidator(aRule.get(ValidatorUtil.PARAM_RULE), aRuleset); } }