/** * Validate that all unbound variables are of a PC type. If not, assume * that the user actually made a typo that we took for an implicit * unbound variable. */ protected void assertUnboundVariablesValid() { if (_seenVars == null) return; Value var; for (Map.Entry<String,Value> entry : _seenVars.entrySet()) { var = entry.getValue(); if (var.getMetaData() == null && !isBound(var) && !isDeclaredVariable(entry.getKey())) { throw parseException(EX_USER, "not-unbound-var", new Object[]{ entry.getKey() }, null); } } }
/** * Validate that all unbound variables are of a PC type. If not, assume * that the user actually made a typo that we took for an implicit * unbound variable. */ protected void assertUnboundVariablesValid() { if (_seenVars == null) return; Value var; for (Map.Entry<String,Value> entry : _seenVars.entrySet()) { var = entry.getValue(); if (var.getMetaData() == null && !isBound(var) && !isDeclaredVariable(entry.getKey())) { throw parseException(EX_USER, "not-unbound-var", new Object[]{ entry.getKey() }, null); } } }
/** * Validate that all unbound variables are of a PC type. If not, assume * that the user actually made a typo that we took for an implicit * unbound variable. */ protected void assertUnboundVariablesValid() { if (_seenVars == null) return; Value var; for (Map.Entry<String,Value> entry : _seenVars.entrySet()) { var = entry.getValue(); if (var.getMetaData() == null && !isBound(var) && !isDeclaredVariable(entry.getKey())) { throw parseException(EX_USER, "not-unbound-var", new Object[]{ entry.getKey() }, null); } } }
/** * Validate that all unbound variables are of a PC type. If not, assume * that the user actually made a typo that we took for an implicit * unbound variable. */ protected void assertUnboundVariablesValid() { if (_seenVars == null) return; Map.Entry entry; Value var; for (Iterator itr = _seenVars.entrySet().iterator(); itr.hasNext();) { entry = (Map.Entry) itr.next(); var = (Value) entry.getValue(); if (var.getMetaData() == null && !isBound(var) && !isDeclaredVariable((String) entry.getKey())) { throw parseException(EX_USER, "not-unbound-var", new Object[]{ entry.getKey() }, null); } } }
/** * Validate that all unbound variables are of a PC type. If not, assume * that the user actually made a typo that we took for an implicit * unbound variable. */ protected void assertUnboundVariablesValid() { if (_seenVars == null) return; Value var; for (Map.Entry<String,Value> entry : _seenVars.entrySet()) { var = entry.getValue(); if (var.getMetaData() == null && !isBound(var) && !isDeclaredVariable(entry.getKey())) { throw parseException(EX_USER, "not-unbound-var", new Object[]{ entry.getKey() }, null); } } }
ClassMetaData meta = path.getMetaData(); if (meta == null) throw parseException(EX_USER, "path-no-meta", new Object[]{ field, path.getType() }, null); if (val == null) { if (isMultiValuedTraversalAttempt(path, field)) { throw parseException(EX_USER, "multi-valued-travesal", new Object[]{field, path.last()}, null); throw parseException(EX_USER, "no-field", new Object[] {field, cls.getSimpleName(), StringDistance.getClosestLevenshteinDistance(field, all),
ClassMetaData meta = path.getMetaData(); if (meta == null) throw parseException(EX_USER, "path-no-meta", new Object[]{ field, path.getType() }, null); if (val == null) { if (isMultiValuedTraversalAttempt(path, field)) { throw parseException(EX_USER, "multi-valued-travesal", new Object[]{field, path.last()}, null); throw parseException(EX_USER, "no-field", new Object[] {field, cls.getSimpleName(), StringDistance.getClosestLevenshteinDistance(field, all),
ClassMetaData meta = path.getMetaData(); if (meta == null) throw parseException(EX_USER, "path-no-meta", new Object[]{ field, path.getType() }, null); if (val == null) { if (isMultiValuedTraversalAttempt(path, field)) { throw parseException(EX_USER, "multi-valued-travesal", new Object[]{field, path.last()}, null); throw parseException(EX_USER, "no-field", new Object[] {field, cls.getSimpleName(), StringDistance.getClosestLevenshteinDistance(field, all),
ClassMetaData meta = path.getMetaData(); if (meta == null) throw parseException(EX_USER, "path-no-meta", new Object[]{ field, path.getType() }, null); if (val == null) { if (isMultiValuedTraversalAttempt(path, field)) { throw parseException(EX_USER, "multi-valued-travesal", new Object[]{field, path.last()}, null); throw parseException(EX_USER, "no-field", new Object[] {field, cls.getSimpleName(), StringDistance.getClosestLevenshteinDistance(field, all),
protected Value traverseXPath(Path path, String field) { XMLMetaData meta = path.getXmlMapping(); if (meta.getFieldMapping(field) == null) { throw parseException(EX_USER, "no-field", new Object[]{ meta.getType(), field }, null); } else { // collection-valued xpath is not allowed int type = meta.getFieldMapping(field).getTypeCode(); switch (type) { case JavaTypes.ARRAY: case JavaTypes.COLLECTION: case JavaTypes.MAP: throw new UserException(_loc.get("collection-valued-path", field)); } } path.get(meta, field); return path; }
protected Value traverseXPath(Path path, String field) { XMLMetaData meta = path.getXmlMapping(); if (meta.getFieldMapping(field) == null) { throw parseException(EX_USER, "no-field", new Object[]{ meta.getType(), field }, null); } else { // collection-valued xpath is not allowed int type = meta.getFieldMapping(field).getTypeCode(); switch (type) { case JavaTypes.ARRAY: case JavaTypes.COLLECTION: case JavaTypes.MAP: throw new UserException(_loc.get("collection-valued-path", field)); } } path.get(meta, field); return path; }
protected Value traverseXPath(Path path, String field) { XMLMetaData meta = path.getXmlMapping(); if (meta.getFieldMapping(field) == null) { throw parseException(EX_USER, "no-field", new Object[]{ meta.getType(), field }, null); } else { // collection-valued xpath is not allowed int type = meta.getFieldMapping(field).getTypeCode(); switch (type) { case JavaTypes.ARRAY: case JavaTypes.COLLECTION: case JavaTypes.MAP: throw new UserException(_loc.get("collection-valued-path", field)); } } path.get(meta, field); return path; }
protected Value traverseXPath(Path path, String field) { XMLMetaData meta = path.getXmlMapping(); if (meta.getFieldMapping(field) == null) { throw parseException(EX_USER, "no-field", new Object[]{ meta.getType(), field }, null); } else { // collection-valued xpath is not allowed int type = meta.getFieldMapping(field).getTypeCode(); switch (type) { case JavaTypes.ARRAY: case JavaTypes.COLLECTION: case JavaTypes.MAP: throw new UserException(_loc.get("collection-valued-path", field)); } } path.get(meta, field); return path; }
protected Value traverseXPath(Path path, String field) { XMLMetaData meta = path.getXmlMapping(); if (meta.getFieldMapping(field) == null) { throw parseException(EX_USER, "no-field", new Object[]{ meta.getType(), field }, null); } else { // collection-valued xpath is not allowed int type = meta.getFieldMapping(field).getTypeCode(); switch (type) { case JavaTypes.ARRAY: case JavaTypes.COLLECTION: case JavaTypes.MAP: throw new UserException(_loc.get("collection-valued-path", field)); } } path.get(meta, field); return path; }
ClassMetaData meta = path.getMetaData(); if (meta == null) throw parseException(EX_USER, "path-no-meta", new Object[]{ field, path.getType() }, null); Object val = traverseStaticField(meta.getDescribedType(), field); if (val == null) throw parseException(EX_USER, "no-field", new Object[]{ meta.getDescribedType(), field }, null);