| com.hp.hpl.jena.rdf.arp.SAX2RDF com.hp.hpl.jena.rdf.arp.SAX2Model
All known Subclasses: com.hp.hpl.jena.rdf.arp.DOM2Model,
Constructor Summary | |
protected | SAX2Model(String base, Model m, String lang) Constructor, see
SAX2Model.create(String,Model,String) for top-level
javadoc. | protected | SAX2Model(String base, Model m, String lang, int dummy) | | SAX2Model(String base, Model m, String lang, boolean dummy) |
Method Summary | |
public void | close() | public static SAX2Model | create(String base, Model m) Factory method to create a new SAX2Model.
Parameters: base - The retrieval URL, or the base URI to be used while parsing. Parameters: m - A Jena Model in which to put the triples, this can be null. | public static SAX2Model | create(String base, Model m, String lang) Factory method to create a new SAX2Model. | public static SAX2Model | newInstance(String base, Model m) Factory method to create a new SAX2Model.
Parameters: base - The retrieval URL, or the base URI to be used while parsing. Parameters: m - A Jena Model in which to put the triples, this can be null. | public static SAX2Model | newInstance(String base, Model m, String lang) Factory method to create a new SAX2Model. | public RDFErrorHandler | setErrorHandler(RDFErrorHandler errHandler) Change the error handler.
Note that errors of class
ParseException can be promoted using
the
ParseException.promote method. | public Object | setProperty(String str, Object value) Change a property of the RDF or XML parser.
I do not believe that many of the XML features or properties are in fact
useful for ARP users. | public void | startPrefixMapping(String prefix, String uri) Begin the scope of a prefix-URI Namespace mapping.
This is passed to any
NamespaceHandler associated with this
parser. |
close | public void close()(Code) | | |
create | public static SAX2Model create(String base, Model m, String lang) throws SAXParseException(Code) | | Factory method to create a new SAX2Model. This is particularly intended
for when parsing a non-root element within an XML document. In which case
the application needs to find this value in the outer context.
Optionally, namespace prefixes can be passed from the outer context using
SAX2Model.startPrefixMapping .
Parameters: base - The retrieval URL, or the base URI to be used while parsing. Parameters: m - A Jena Model in which to put the triples, this can be null. Ifit is null, then use SAX2RDF.getHandlers orSAX2RDF.setHandlersWith to provide aStatementHandler, and usually anorg.xml.sax.ErrorHandler Parameters: lang - The current value of xml:lang when parsingstarts, usually "". A new SAX2Model throws: SAXParseException - On a fatal error during setup, maybe malformed base URI |
newInstance | public static SAX2Model newInstance(String base, Model m, String lang) throws MalformedURIException(Code) | | Factory method to create a new SAX2Model. This is particularly intended
for when parsing a non-root element within an XML document. In which case
the application needs to find this value in the outer context.
Optionally, namespace prefixes can be passed from the outer context using
SAX2Model.startPrefixMapping .
Parameters: base - The retrieval URL, or the base URI to be used while parsing. Parameters: m - A Jena Model in which to put the triples, this can be null. Ifit is null, then use SAX2RDF.getHandlers orSAX2RDF.setHandlersWith to provide aStatementHandler, and usually anorg.xml.sax.ErrorHandler Parameters: lang - The current value of xml:lang when parsingstarts, usually "". A new SAX2Model throws: MalformedURIException - SAX2Model.create(String,Model,String) |
setProperty | public Object setProperty(String str, Object value) throws JenaException(Code) | | Change a property of the RDF or XML parser.
I do not believe that many of the XML features or properties are in fact
useful for ARP users. The ARP properties allow fine-grained control over
error reporting.
This interface can be used to set and get:
- SAX2 features
- See Xerces
features . Value should be given as a String "true" or "false" or a
Boolean.
- SAX2 properties
- See Xerces
properties .
- Xerces features
- See Xerces
features . Value should be given as a String "true" or "false" or a
Boolean.
- Xerces properties
- See Xerces
properties .
- ARP properties
- These are referred to either by their property name, (see below) or
by an absolute URL of the form
http://jena.hpl.hp.com/arp/properties/<PropertyName> .
The value should be a String, an Integer or a Boolean depending on the
property.
ARP property names and string values are case insensitive.
Parameters: str - The property to set. Parameters: value - The new value; values of class String will be converted intoappropriate classes. Values of class Boolean or Integer willbe used for appropriate properties. throws: JenaException - For bad values. The old value, or null if none, or old value is inaccesible. See Also: SAX2RDF.getOptions See Also: ARPOptions |
startPrefixMapping | public void startPrefixMapping(String prefix, String uri) throws SAXParseException(Code) | | Begin the scope of a prefix-URI Namespace mapping.
This is passed to any
NamespaceHandler associated with this
parser. It can be called before the initial startElement
event, or other events associated with the elements being processed. When
building a Jena Model, it is not required to match this with
corresponding endPrefixMapping events. Other
NamespaceHandler s may be fussier. When building a Jena Model,
the prefix bindings are remembered with the Model, and may be used in
some output routines. It is permitted to not call this method for
prefixes declared in the outer context, in which case, any output routine
will need to use a gensym for such namespaces.
Parameters: prefix - The Namespace prefix being declared. Parameters: uri - The Namespace URI the prefix is mapped to. |
|
|