|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.hp.hpl.jena.rdf.arp.ARP
public class ARP
Another RDF Parser. To load an RDF file:
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.
Constructor Summary | |
---|---|
ARP()
Creates a new RDF Parser. |
Method Summary | |
---|---|
ARPHandlers |
getHandlers()
The handlers used during parsing. |
org.xml.sax.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(java.io.InputStream in)
Load RDF/XML from an InputStream, leaving relative URIs as relative. |
void |
load(java.io.InputStream in,
java.lang.String xmlBase)
Load RDF/XML from an InputStream. |
void |
load(java.io.Reader in)
Load RDF/XML from a Reader, leaving relative URIs as relative. |
void |
load(java.io.Reader in,
java.lang.String xmlBase)
Load RDF/XML from a Reader. |
void |
setDefaultErrorMode()
Deprecated. Use getOptions() .setDefaultErrorMode() |
void |
setEmbedding(boolean embed)
Deprecated. Use getOptions() .setEmbedding(embed) |
void |
setErrorHandler(org.xml.sax.ErrorHandler eh)
Deprecated. Use getHandlers() .setErrorHandler(eh) |
int |
setErrorMode(int errno,
int mode)
Deprecated. Use getOptions() .setErrorMode(errno,mode) |
ExtendedHandler |
setExtendedHandler(ExtendedHandler eh)
Deprecated. Use getHandlers() .setExtendedHandler(eh) |
void |
setHandlersWith(ARPHandlers handlers)
Copies the handlers from the argument to be used by this instance. |
void |
setLaxErrorMode()
Deprecated. Use getOptions() .setLaxErrorMode() |
NamespaceHandler |
setNamespaceHandler(NamespaceHandler nh)
Deprecated. Use getHandlers() .setNamespaceHandler(nh) |
void |
setOptionsWith(ARPOptions opts)
Copies the options from the argument to be used by this instance. |
StatementHandler |
setStatementHandler(StatementHandler sh)
Deprecated. Use getHandlers() .setStatementHandler(sh) |
void |
setStrictErrorMode()
Deprecated. Use getOptions() .setStrictErrorMode() |
void |
setStrictErrorMode(int nonErrorMode)
Deprecated. Use getOptions() .setStrictErrorMode(nonErrorMode) |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ARP()
Method Detail |
---|
public org.xml.sax.Locator getLocator()
public void load(java.io.Reader in, java.lang.String xmlBase) throws org.xml.sax.SAXException, java.io.IOException
in
- The input XML document.xmlBase
- The base URI for the document.
org.xml.sax.SAXException
- More serious error during XML or RDF processing; or thrown from the ErrorHandler.
java.io.IOException
- Occurring during XML processing.public void load(java.io.InputStream in, java.lang.String xmlBase) throws org.xml.sax.SAXException, java.io.IOException
in
- The input XML document.xmlBase
- The base URI for the document.
org.xml.sax.SAXException
- More serious error during XML or RDF processing; or thrown from the ErrorHandler.
java.io.IOException
- Occurring during XML processing.public void load(java.io.InputStream in) throws org.xml.sax.SAXException, java.io.IOException
in
- The input XML document.
org.xml.sax.SAXException
- More serious error during XML or RDF processing; or thrown from the ErrorHandler.
java.io.IOException
- Occurring during XML processing.public void load(java.io.Reader in) throws org.xml.sax.SAXException, java.io.IOException
in
- The input XML document.
org.xml.sax.SAXException
- More serious error during XML or RDF processing; or thrown from the ErrorHandler.
java.io.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(com.hp.hpl.jena.rdf.arp.ARPHandlers)
method.
getHandlers
in interface ARPConfig
ARPHandlers.setStatementHandler(StatementHandler)
,
ARPHandlers.setErrorHandler(ErrorHandler)
,
ARPHandlers.setExtendedHandler(ExtendedHandler)
,
ARPHandlers.setNamespaceHandler(NamespaceHandler)
,
setHandlersWith(com.hp.hpl.jena.rdf.arp.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(com.hp.hpl.jena.rdf.arp.ARPOptions)
method.
getOptions
in interface ARPConfig
ARPOptions.setDefaultErrorMode()
,
ARPOptions.setLaxErrorMode()
,
ARPOptions.setStrictErrorMode()
,
ARPOptions.setStrictErrorMode(int)
,
ARPOptions.setEmbedding(boolean)
,
ARPOptions.setErrorMode(int, int)
,
setOptionsWith(com.hp.hpl.jena.rdf.arp.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.public ExtendedHandler setExtendedHandler(ExtendedHandler eh)
getHandlers()
.setExtendedHandler(eh)
public NamespaceHandler setNamespaceHandler(NamespaceHandler nh)
getHandlers()
.setNamespaceHandler(nh)
public StatementHandler setStatementHandler(StatementHandler sh)
getHandlers()
.setStatementHandler(sh)
public void setErrorHandler(org.xml.sax.ErrorHandler eh)
getHandlers()
.setErrorHandler(eh)
public int setErrorMode(int errno, int mode)
getOptions()
.setErrorMode(errno,mode)
public void setDefaultErrorMode()
getOptions()
.setDefaultErrorMode()
public void setLaxErrorMode()
getOptions()
.setLaxErrorMode()
public void setStrictErrorMode()
getOptions()
.setStrictErrorMode()
public void setStrictErrorMode(int nonErrorMode)
getOptions()
.setStrictErrorMode(nonErrorMode)
public void setEmbedding(boolean embed)
getOptions()
.setEmbedding(embed)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |