public class ARPOptions extends Object implements ARPErrorNumbers
ARPErrorNumbers
through this
class is not supported. The inheritance of this interface will be removed.EM_ERROR, EM_FATAL, EM_IGNORE, EM_WARNING, ERR_ABOUTEACH_NOT_TOPLEVEL, ERR_BAD_RDF_ATTRIBUTE, ERR_BAD_RDF_ELEMENT, ERR_ENCODING_MISMATCH, ERR_GENERIC_IO, ERR_INTERNAL_ERROR, ERR_INTERRUPTED, ERR_LI_AS_TYPE, ERR_NOT_WHITESPACE, ERR_RESOLVING_AGAINST_MALFORMED_BASE, ERR_RESOLVING_AGAINST_RELATIVE_BASE, ERR_RESOLVING_URI_AGAINST_NULL_BASE, ERR_SAX_ERROR, ERR_SAX_FATAL_ERROR, ERR_STRING_NOT_NORMAL_FORM_C, ERR_SYNTAX_ERROR, ERR_UNABLE_TO_RECOVER, ERR_URI_NOT_NORMAL_FORM_C, ERR_UTF_ENCODING, IGN_NO_BASE_URI_SPECIFIED, IGN_PRIVATE_XMLLANG, IGN_XMLBASE_SIGNIFICANT, IGN_XMLBASE_USED, WARN_BAD_NAME, WARN_BAD_NAMESPACE_URI, WARN_BAD_RDF_NAMESPACE_URI, WARN_BAD_XML, WARN_BAD_XML_NAMESPACE_URI, WARN_BAD_XMLLANG, WARN_BIG_FILE, WARN_DEPRECATED_XMLLANG, WARN_ENCODING_MISMATCH, WARN_IN_STRICT_MODE, WARN_LEGAL_REUSE_OF_ID, WARN_MALFORMED_URI, WARN_MALFORMED_XMLLANG, WARN_MINOR_INTERNAL_ERROR, WARN_NON_IANA_ENCODING, WARN_NONCANONICAL_IANA_NAME, WARN_NOT_RDF_NAMESPACE, WARN_PROCESSING_INSTRUCTION_IN_RDF, WARN_QNAME_AS_ID, WARN_RDF_NN_AS_TYPE, WARN_REDEFINITION_OF_ID, WARN_RELATIVE_NAMESPACE_URI_DEPRECATED, WARN_RELATIVE_URI, WARN_RESOLVING_URI_AGAINST_EMPTY_BASE, WARN_SAX_WARNING, WARN_STRING_COMPOSING_CHAR, WARN_STRING_NOT_NORMAL_FORM_C, WARN_UNKNOWN_PARSETYPE, WARN_UNKNOWN_RDF_ATTRIBUTE, WARN_UNKNOWN_RDF_ELEMENT, WARN_UNKNOWN_XML_ATTRIBUTE, WARN_UNQUALIFIED_ATTRIBUTE, WARN_UNQUALIFIED_ELEMENT, WARN_UNQUALIFIED_RDF_ATTRIBUTE, WARN_UNSUPPORTED_ENCODING, WARN_URI_COMPOSING_CHAR, WARN_XMLBASE_MISSING
Modifier and Type | Method and Description |
---|---|
ARPOptions |
copy()
Internal use only.
|
static ARPOptions |
createNewOptions()
Internal use only
|
boolean |
getEmbedding()
True if the embedding flag is set.
|
int |
getErrorMode(int eCode)
Returns the error mode for the given error code.
|
IRIFactory |
getIRIFactory()
Get the IRI factory (and hence the IRI checking rules)
|
static IRIFactory |
getIRIFactoryGlobal()
Get the default (global) IRI factory (and hence the IRI checking rules)
|
void |
setDefaultErrorMode()
Resets error mode to the default values:
many errors are reported as warnings, and resulting triples are produced.
|
boolean |
setEmbedding(boolean embed)
Sets whether the XML document is only RDF, or contains RDF embedded in other XML.
|
int |
setErrorMode(int errno,
int mode)
Sets or gets the error handling mode for a specific error condition.
|
void |
setIRIFactory(IRIFactory f)
Set the IRI factory (and hence the IRI checking rules)
|
static void |
setIRIFactoryGlobal(IRIFactory f)
Set the system-wide default IRI factory, which incorporates the checking rules.
|
void |
setLaxErrorMode()
As many errors as possible are ignored.
|
void |
setStrictErrorMode()
This sets strict conformance to the W3C Recommendations.
|
void |
setStrictErrorMode(int nonErrorMode)
This method detects and prohibits errors according to
the W3C Recommendations.
|
public static ARPOptions createNewOptions()
public int setErrorMode(int errno, int mode)
When the condition is a violation of the RDF/XML Syntax (Revised) Recommendations,
and the error mode is ARPErrorNumbers.EM_IGNORE
or ARPErrorNumbers.EM_WARNING
,
the precise rules which ARP uses to generate triples for such ill-formed input are
not defined by any standard and are subject to change with future releases.
For input involving no errors, ARP creates triples in accordance with
the RDF/XML Syntax Revised Recommendation.
The mode can have one of the following four values.
ARPErrorNumbers.EM_IGNORE
ARPErrorNumbers.EM_WARNING
ARPErrorNumbers.EM_ERROR
ARPErrorNumbers.EM_FATAL
errno
- The specific error condition to change.mode
- The new mode for this condition.public void setDefaultErrorMode()
public void setLaxErrorMode()
public void setStrictErrorMode()
public void setStrictErrorMode(int nonErrorMode)
ARPErrorNumbers.WARN_PROCESSING_INSTRUCTION_IN_RDF
, nonErrorMode is used.nonErrorMode
- The way of treating non-error conditions.public ARPOptions copy()
public boolean setEmbedding(boolean embed)
embed
- true: Look for embedded RDF; or false: match a typed node or rdf:Description against the whole document (the default).public int getErrorMode(int eCode)
eCode
- ARPErrorNumbers.EM_IGNORE
,
ARPErrorNumbers.EM_WARNING
,
ARPErrorNumbers.EM_ERROR
,
ARPErrorNumbers.EM_FATAL
public boolean getEmbedding()
public void setIRIFactory(IRIFactory f)
public IRIFactory getIRIFactory()
public static void setIRIFactoryGlobal(IRIFactory f)
public static IRIFactory getIRIFactoryGlobal()
Licenced under the Apache License, Version 2.0