/** Set the error/warning state of a violation code. * @param factory IRIFactory * @param code ViolationCodes constant * @param isError Whether it is to be treated an error. * @param isWarning Whether it is to be treated a warning. */ private static void setErrorWarning(IRIFactory factory, int code, boolean isError, boolean isWarning) { factory.setIsWarning(code, isWarning); factory.setIsError(code, isError); }
private static void setErrorWarning(IRIFactory factory, int code, boolean isError, boolean isWarning) { factory.setIsWarning(code, isWarning); factory.setIsError(code, isError); }
/** * Set condition #<code>code</code> * to be treated as an error; or clear it as an error condition. * <p> * Care must be taken when using this to clear the error behaviour * on a code documented * in {@link ViolationCodes} * as having SHOULD force: * see the documentation at {@link #shouldViolation(boolean, boolean)}, * concerning the necessary steps. * Using this method with <code>code</code> * being one that is documented as having MUST force * will result in non-conformant behaviour. * </p> * @param code A condition code from {@link ViolationCodes}. * @param set True to set this as an error, false to clear. * @throws IllegalStateException If this factory has already been used to create an IRI. */ public void setIsError(int code, boolean set) { initializing(); if (set) { errors |= (1l<<code); setIsWarning(code,false); } else errors &= ~(1l<<code); }
/** * Set condition #<code>code</code> * to be treated as an error; or clear it as an error condition. * <p> * Care must be taken when using this to clear the error behaviour * on a code documented * in {@link ViolationCodes} * as having SHOULD force: * see the documentation at {@link #shouldViolation(boolean, boolean)}, * concerning the necessary steps. * Using this method with <code>code</code> * being one that is documented as having MUST force * will result in non-conformant behaviour. * </p> * @param code A condition code from {@link ViolationCodes}. * @param set True to set this as an error, false to clear. * @throws IllegalStateException If this factory has already been used to create an IRI. */ public void setIsError(int code, boolean set) { initializing(); if (set) { errors |= (1l<<code); setIsWarning(code,false); } else errors &= ~(1l<<code); }
/** * Set condition #<code>code</code> * to be treated as an error; or clear it as an error condition. * <p> * Care must be taken when using this to clear the error behaviour * on a code documented * in {@link ViolationCodes} * as having SHOULD force: * see the documentation at {@link #shouldViolation(boolean, boolean)}, * concerning the necessary steps. * Using this method with <code>code</code> * being one that is documented as having MUST force * will result in non-conformant behaviour. * </p> * @param code A condition code from {@link ViolationCodes}. * @param set True to set this as an error, false to clear. * @throws IllegalStateException If this factory has already been used to create an IRI. */ public void setIsError(int code, boolean set) { initializing(); if (set) { errors |= (1l<<code); setIsWarning(code,false); } else errors &= ~(1l<<code); }
setIsError(UNWISE_CHARACTER,false); setIsError(WHITESPACE,false); setIsWarning(UNWISE_CHARACTER,warning); setIsWarning(WHITESPACE,warning); if (!usingSpecXMLSchema ) { setIsError(DOUBLE_WHITESPACE,false); setIsWarning(DOUBLE_WHITESPACE,warning);
setIsError(UNWISE_CHARACTER,false); setIsError(WHITESPACE,false); setIsWarning(UNWISE_CHARACTER,warning); setIsWarning(WHITESPACE,warning); if (!usingSpecXMLSchema ) { setIsError(DOUBLE_WHITESPACE,false); setIsWarning(DOUBLE_WHITESPACE,warning);
setIsError(UNWISE_CHARACTER,false); setIsError(WHITESPACE,false); setIsWarning(UNWISE_CHARACTER,warning); setIsWarning(WHITESPACE,warning); if (!usingSpecXMLSchema ) { setIsError(DOUBLE_WHITESPACE,false); setIsWarning(DOUBLE_WHITESPACE,warning);
iriFactory.setIsWarning(ViolationCodes.UNREGISTERED_IANA_SCHEME, false) ;