📄 arperrornumbers.java
字号:
/*
* (c) Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007 Hewlett-Packard Development Company, LP
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
$Id: ARPErrorNumbers.java,v 1.32 2007/01/11 11:48:24 jeremy_carroll Exp $
AUTHOR: Jeremy J. Carroll
*/
/*
* ARPErrorNumbers.java
*
* Created on July 10, 2001, 8:34 AM
*/
package com.hp.hpl.jena.rdf.arp;
/**
* Error numbers used by ARP.
* @author jjc
*/
public interface ARPErrorNumbers {
/** Used as ErrorMode to not report an error.
* @see ARPOptions#setErrorMode
*
*
*/
public int EM_IGNORE = 0;
/** Used as ErrorMode to report warning and continue processing.
* @see ARPOptions#setErrorMode
*/
public int EM_WARNING = 1;
/** Used as ErrorMode to report error, and not generate associated triples.
*
* In the event of an error (i.e. a condition with this error mode),
* no further triples involving the resources and literals associated with the error are created.
* The precise definition of 'associated with' is deliberately
* undefined, and may change in future releases.
*
* When the file includes fatal error conditions the parsing is aborted immediately after such an error.
Otherwise, it is possible to see all the triples, including those involving resources and literals associated with any condition, by ensuring that the error mode of every error code is WARNING or IGNORE. (i.e. ARP optionally permits all errors to be downgraded to warnings, or to be ignored).
In this case, the precise rules which ARP uses to generate triples for 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.
* @see ARPOptions#setErrorMode
*/
public int EM_ERROR = 2;
/** Used as ErrorMode to stop processing after reporting error.
* @see ARPOptions#setErrorMode
*/
public int EM_FATAL = 3;
// All error numbers must be between 1 and 399.
// Divide by 100 to get class.
/**
An xml:lang attribute uses one or more of the extension
facilities in RFC3066 or ISO639.
*In some way, the langauge specified is non-standard.
*
*In both default and strict modes this is ignored; a conservative application
*in verbose mode may wish to raise a warning.
* (W001)
*@see com.hp.hpl.jena.rdf.arp.lang.LanguageTagCodes#LT_PRIVATE_USE
*@see com.hp.hpl.jena.rdf.arp.lang.LanguageTagCodes#LT_LOCAL_USE
*@see com.hp.hpl.jena.rdf.arp.lang.LanguageTagCodes#LT_EXTRA
*/
public int IGN_PRIVATE_XMLLANG = 1;
/**
Indicates that somewhere, other than in an XML Literal
an xml:base attribute has been used.
This is ignored in default and strict mode. (W002)
@see #IGN_XMLBASE_SIGNIFICANT
*/
public int IGN_XMLBASE_USED = 2;
/**
Indicates that somewhere,
an xml:base attribute has been used and
changes the interpretation of some URI (either through a
relative URI-reference or rdf:ID). (W003)
This is ignored in default and strict mode.
@see #IGN_XMLBASE_USED
*/
public int IGN_XMLBASE_SIGNIFICANT = 3;
/**
The use of rdf:parseType="daml:collection" does
not conform with RDF2004.
This is ignored in default mode.
In strict mode the parser follows the conformant behaviour
which is to silently
treat this as rdf:parseType="Literal" (W004).
*/
public int IGN_DAML_COLLECTION = 4;
/**
Indicates that no name is known for the current file being parsed.
* (W005)
*/
public int IGN_NO_BASE_URI_SPECIFIED = 5;
/**
* (W100)
* @deprecated {@link #IGN_NO_BASE_URI_SPECIFIED}
*/
public int WARN_XMLBASE_MISSING = 100;
/**
A standard rdf attribute like type or about is used
without a namespace qualifier. In default and strict mode ARP adds the
*rdf: qualifier and reports a warning. (W101).
*/
public int WARN_UNQUALIFIED_RDF_ATTRIBUTE = 101;
/**
*Some attribute that is not an RDF keyword is used in an
unqualified fashion. In default mode, then the namespace of
the enclosing element
is used.
In strict mode this is an error. (W102).
*
*/
public int WARN_UNQUALIFIED_ATTRIBUTE = 102;
/**
An attribute name in the RDF namespace has been
used that is not a reserved RDF attribute name.
*In default and strict modes, a statement is generated with the given name as property.
* In default and strict modes this is a warning. (W103).
**/
public int WARN_UNKNOWN_RDF_ATTRIBUTE = 103;
/**
An element tag is not a qualified name.
In default mode, a resource or property is generated with a malformed URI.
* Strict mode treats this as an error. (W104).
*/
public int WARN_UNQUALIFIED_ELEMENT = 104;
/**
*The same name has been used for more than one rdf:ID or rdf:bagID,
* in the context of the same xml:base (if any).
The default mode allows this with a warning.
This check is expensive in memory. When processing very large files,
it may be sensible to switch the check off by using
{@link ARPOptions#setErrorMode(int,int)} to ignore this condition.
* (W105).
@see #WARN_LEGAL_REUSE_OF_ID
*/
public int WARN_REDEFINITION_OF_ID = 105;
/**
An unrecognised value for rdf:parseType has been found.
In strict mode, this error is ignored, and it is treated
as rdf:parseType="Literal", in default mode a warning is issued.
* (W106)
*/
public int WARN_UNKNOWN_PARSETYPE = 106;
/**
*A URI reference does not conform to the definition of RDF URI Reference.
Use Exception.getMessage() for details.
In default mode, the malformed URI is passed to the RDF
processing application; strict mode treats this as an error.
* (W107)
*
*/
public int WARN_MALFORMED_URI = 107;
/**
*An ID symbol or other grammar production that should be an
XML name is malformed. In default mode,
the malformed string is passed to the RDF application. (W108)
*Strict mode treats this as an error.
*
*/
public int WARN_BAD_NAME = 108;
/**
*A namespace has been declared with a relative URI.
Such relative URI namespaces have been
<a href="http://www.w3.org/2000/09/xppa">deprecated</a>.
This often results in related {@link #WARN_RELATIVE_URI}
warnings.
(W109)
*
*/
public int WARN_RELATIVE_NAMESPACE_URI_DEPRECATED = 109;
// public int WARN_EMPTY_ABOUT_EACH =110;
/**
*No longer used.
*(W111)
* @deprecated
*/
public int WARN_BAD_XML = 111;
/**
*
*Should not happen.
*(W112)
*@deprecated No longer used.
*/
public int WARN_MINOR_INTERNAL_ERROR = 112;
/**
*An element is tagged rdf:XXX where XXX is not a recognised RDF element name.
*The typed node or property element construction is matched.
*In both default and strict modes this is a warning. (W113).
*/
public int WARN_UNKNOWN_RDF_ELEMENT = 113;
/**
* rdf:_NNN is being used in the typed node construction.
*
* In default mode this is a warning; in strict mode it is ignored.(W114)
*/
public int WARN_RDF_NN_AS_TYPE = 114;
/**
* The value of an xml:lang attribute does not conform to the
syntactic rules of RFC3066.
In default mode this is a warning, in strict mode an error. (W115)
*/
public int WARN_MALFORMED_XMLLANG = 115;
/**
* The value of an xml:lang attribute while syntactically conforming
to RFC3066 does not conform with other rules, possibly through not
being listed in ISO639 or ISO3166 or the IANA language tag
registry. The databases used of these registries was a snapshot of
July 24, 2001. If you are using language tags that postdate this snapshot,
you should ignore this condition.
*The use of a three letter tag instead of a two letter tag or use of
the language tag "und" is also reported under this condition, see RFC3066.
*
In default mode this is a warning, in strict mode an error. (W116)
*/
public int WARN_BAD_XMLLANG = 116;
/**
* An attribute from the xml namespace has been used that is not
recognised. (W118).
* In default mode this is a warning; in strict mode it is ignored.
*/
public int WARN_UNKNOWN_XML_ATTRIBUTE = 118;
/**
* An XML processing instruction occurred in RDF content.
* Such instructions are ignored, and are usually in error. (W119).
* In default mode this is a warning; in strict mode it is ignored.
*/
public int WARN_PROCESSING_INSTRUCTION_IN_RDF = 119;
/**
* No longer used.
* @see #WARN_REDEFINITION_OF_ID
@deprecated Last supported in Jena 2.1 - too expensive.
*/
public int WARN_LEGAL_REUSE_OF_ID = 120;
/**
* String Literals in RDF should not start with a composing char,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -