|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openrdf.rio.helpers.RDFHandlerBase
org.openrdf.rio.helpers.StatementCollector
public class StatementCollector
A RDFHandler that can be used to collect reported statements in collections.
| Constructor Summary | |
|---|---|
StatementCollector()
Creates a new StatementCollector that uses a new ArrayList to store the reported statements and a new LinkedHashMap to store the reported namespaces. |
|
StatementCollector(Collection<Statement> statements)
Creates a new StatementCollector that stores reported statements in the supplied collection and that uses a new LinkedHashMap to store the reported namespaces. |
|
StatementCollector(Collection<Statement> statements,
Map<String,String> namespaces)
Creates a new StatementCollector that stores reported statements and namespaces in the supplied containers. |
|
| Method Summary | |
|---|---|
void |
clear()
Clear the set of collected statements. |
Map<String,String> |
getNamespaces()
Gets the map that contains the collected namespaces. |
Collection<Statement> |
getStatements()
Gets the collection that contains the collected statements. |
void |
handleNamespace(String prefix,
String uri)
Handles a namespace declaration/definition. |
void |
handleStatement(Statement st)
Handles a statement. |
| Methods inherited from class org.openrdf.rio.helpers.RDFHandlerBase |
|---|
endRDF, handleComment, startRDF |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StatementCollector()
public StatementCollector(Collection<Statement> statements)
public StatementCollector(Collection<Statement> statements,
Map<String,String> namespaces)
| Method Detail |
|---|
public void clear()
public Collection<Statement> getStatements()
public Map<String,String> getNamespaces()
public void handleNamespace(String prefix,
String uri)
throws RDFHandlerException
RDFHandler
handleNamespace in interface RDFHandlerhandleNamespace in class RDFHandlerBaseprefix - The prefix for the namespace, or an empty string in case of a
default namespace.uri - The URI that the prefix maps to.
RDFHandlerException - If the RDF handler has encountered an unrecoverable error.public void handleStatement(Statement st)
RDFHandler
handleStatement in interface RDFHandlerhandleStatement in class RDFHandlerBasest - The statement.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||