public class ARP extends Object implements ARPConfig
getHandlers()
method, and then.
Xerces is used for parsing the XML.
The SAXEvents generated by Xerces are then
analysed as RDF by ARP.
Errors may occur
in either the XML or the RDF part, see
ARPHandlers.setErrorHandler(org.xml.sax.ErrorHandler)
for details
of how to distinguish between them.
For very large files, ARP does not use any additional
memory except when either the ExtendedHandler.discardNodesWithNodeID()
returns false or when the AResource.setUserData(java.lang.Object)
method has been
used. In these cases ARP needs to remember the rdf:nodeID
usage through the file life time.
See ARP documentation for more information.
Includes contributions from Simon Raboczi and Andrew NewmanConstructor and Description |
---|
ARP()
Creates a new RDF Parser.
|
Modifier and Type | Method and Description |
---|---|
ARPHandlers |
getHandlers()
The handlers used during parsing.
|
Locator |
getLocator()
When parsing a file, this returns a Locator giving the
position of the last XML event processed by ARP.
|
ARPOptions |
getOptions()
The options used during parsing.
|
void |
load(InputStream in)
Load RDF/XML from an InputStream, leaving relative URIs as relative.
|
void |
load(InputStream in,
String xmlBase)
Load RDF/XML from an InputStream.
|
void |
load(Reader in)
Load RDF/XML from a Reader, leaving relative URIs as relative.
|
void |
load(Reader in,
String xmlBase)
Load RDF/XML from a Reader.
|
void |
setHandlersWith(ARPHandlers handlers)
Copies the handlers from the argument
to be used by this instance.
|
void |
setOptionsWith(ARPOptions opts)
Copies the options from the argument
to be used by this instance.
|
public Locator getLocator()
public void load(Reader in, String xmlBase) throws SAXException, IOException
in
- The input XML document.xmlBase
- The base URI for the document.SAXException
- More serious error during XML or RDF processing; or thrown from the ErrorHandler.IOException
- Occurring during XML processing.public void load(InputStream in, String xmlBase) throws SAXException, IOException
in
- The input XML document.xmlBase
- The base URI for the document.SAXException
- More serious error during XML or RDF processing; or thrown from the ErrorHandler.IOException
- Occurring during XML processing.public void load(InputStream in) throws SAXException, IOException
in
- The input XML document.SAXException
- More serious error during XML or RDF processing; or thrown from the ErrorHandler.IOException
- Occurring during XML processing.public void load(Reader in) throws SAXException, IOException
in
- The input XML document.SAXException
- More serious error during XML or RDF processing; or thrown from the ErrorHandler.IOException
- Occurring during XML processing.public ARPHandlers getHandlers()
set..Handler
methods
in ARPHandlers
.
The handlers can be copied onto another ARP instance
using the setHandlersWith(org.apache.jena.rdfxml.xmlinput.ARPHandlers)
method.getHandlers
in interface ARPConfig
ARPHandlers.setStatementHandler(StatementHandler)
,
ARPHandlers.setErrorHandler(ErrorHandler)
,
ARPHandlers.setExtendedHandler(ExtendedHandler)
,
ARPHandlers.setNamespaceHandler(NamespaceHandler)
,
setHandlersWith(org.apache.jena.rdfxml.xmlinput.ARPHandlers)
public void setHandlersWith(ARPHandlers handlers)
getHandlers()
to retrieve this
instance's copy of the handler information.setHandlersWith
in interface ARPConfig
handlers
- The new values to use.public ARPOptions getOptions()
set..
methods
in ARPOptions
.
The options can be copied onto another ARP instance
using the setOptionsWith(org.apache.jena.rdfxml.xmlinput.ARPOptions)
method.getOptions
in interface ARPConfig
ARPOptions.setDefaultErrorMode()
,
ARPOptions.setLaxErrorMode()
,
ARPOptions.setStrictErrorMode()
,
ARPOptions.setStrictErrorMode(int)
,
ARPOptions.setEmbedding(boolean)
,
ARPOptions.setErrorMode(int, int)
,
setOptionsWith(org.apache.jena.rdfxml.xmlinput.ARPOptions)
public void setOptionsWith(ARPOptions opts)
getOptions()
to retrieve this
instance's copy of the options.setOptionsWith
in interface ARPConfig
opts
- The new values to use.Licenced under the Apache License, Version 2.0