/** * Adds current ID (as seen during (un)marshalling) to the ID cache. If this * ID was previously added to the Set of unresolved IDs, then remove it from * that Set. * * @param id The current ID * @throws ValidationException If an ID is used more than once. * @see #getUnresolvedIdRefs() */ public void addID(final String id) throws ValidationException { if (!_ids.contains(id)) { _ids.add(id); _unresolvedIdrefs.remove(id); } else if (!_internalContext.getLenientIdValidation()){ throw new ValidationException ("ID " + id + " is already used within current document."); } }
/** * Adds current ID (as seen during (un)marshalling) to the ID cache. If this ID was previously * added to the Set of unresolved IDs, then remove it from that Set. * * @param id The current ID * @throws ValidationException If an ID is used more than once. * @see #getUnresolvedIdRefs() */ public void addID(final String id) throws ValidationException { if (!_ids.contains(id)) { _ids.add(id); _unresolvedIdrefs.remove(id); } else if (!_internalContext.getLenientIdValidation()) { throw new ValidationException("ID " + id + " is already used within current document."); } }
&& context.getInternalContext().getLenientIdValidation()) { return;
&& _descriptor.getSchemaType() != null && _descriptor.getSchemaType().equals("IDREF") && context.getInternalContext().getLenientIdValidation()) { return;
isValidating() && !getInternalContext().getLenientIdValidation()); } catch (ValidationException e) { String errorMsg =
_idResolver.bind(attValue, parent, isValidating() && !getInternalContext().getLenientIdValidation()); } catch (ValidationException e) { throw new SAXException("Duplicate ID " + attValue + " encountered.", e);
if (_resolveTable != null && !getInternalContext().getLenientIdValidation()) { Enumeration enumeration = _resolveTable.keys(); while (enumeration.hasMoreElements()) { if (!getInternalContext().getLenientIdValidation()) { validator.checkUnresolvedIdrefs(context);
&& !_unmarshalHandler.getInternalContext().getLenientIdValidation()) { Enumeration enumeration = _unmarshalHandler.getResolveTable().keys(); while (enumeration.hasMoreElements()) { context.setInternalContext(_unmarshalHandler.getInternalContext()); validator.validate(state.getObject(), context); if (!_unmarshalHandler.getInternalContext().getLenientIdValidation()) { validator.checkUnresolvedIdrefs(context);