/** 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 a warning; * or clear it as a warning condition. * Setting a code to be a warning, clears it from * being an error. Care must be taken * if the <code>code</code> is one that is documented * in {@link ViolationCodes} has having SHOULD or MUST * force, since ignoring any resulting warning may * result in a nonconformant application. * @param code A condition code from {@link ViolationCodes}. * @param set True to set this as a warning, false to clear. * @throws IllegalStateException If this factory has already been used to create an IRI. */ public void setIsWarning(int code, boolean set) { initializing(); if (set) { warnings |= (1l<<code); setIsError(code,false); } else warnings &= ~(1l<<code); }
/** * Set condition #<code>code</code> * to be treated as a warning; * or clear it as a warning condition. * Setting a code to be a warning, clears it from * being an error. Care must be taken * if the <code>code</code> is one that is documented * in {@link ViolationCodes} has having SHOULD or MUST * force, since ignoring any resulting warning may * result in a nonconformant application. * @param code A condition code from {@link ViolationCodes}. * @param set True to set this as a warning, false to clear. * @throws IllegalStateException If this factory has already been used to create an IRI. */ public void setIsWarning(int code, boolean set) { initializing(); if (set) { warnings |= (1l<<code); setIsError(code,false); } else warnings &= ~(1l<<code); }
/** * Set condition #<code>code</code> * to be treated as a warning; * or clear it as a warning condition. * Setting a code to be a warning, clears it from * being an error. Care must be taken * if the <code>code</code> is one that is documented * in {@link ViolationCodes} has having SHOULD or MUST * force, since ignoring any resulting warning may * result in a nonconformant application. * @param code A condition code from {@link ViolationCodes}. * @param set True to set this as a warning, false to clear. * @throws IllegalStateException If this factory has already been used to create an IRI. */ public void setIsWarning(int code, boolean set) { initializing(); if (set) { warnings |= (1l<<code); setIsError(code,false); } else warnings &= ~(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.setIsError(ViolationCodes.UNREGISTERED_IANA_SCHEME, false) ; iriFactory.setIsWarning(ViolationCodes.UNREGISTERED_IANA_SCHEME, false) ;