public class ContextStatementCollector extends AbstractRDFHandler
Constructor and Description |
---|
ContextStatementCollector(Collection<Statement> statements,
Map<String,String> namespaces,
ValueFactory vf,
Resource... contexts)
Creates a new StatementCollector that stores reported statements and namespaces in the supplied containers.
|
ContextStatementCollector(Collection<Statement> statements,
ValueFactory vf,
Resource... contexts)
Creates a new StatementCollector that stores reported statements in the supplied collection and that uses a new
LinkedHashMap to store the reported namespaces.
|
ContextStatementCollector(ValueFactory vf,
Resource... contexts)
Creates a new StatementCollector that uses a new ArrayList to store the reported statements and a new
LinkedHashMap to store the reported namespaces.
|
Modifier and Type | Method and Description |
---|---|
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.
|
endRDF, handleComment, startRDF
public ContextStatementCollector(ValueFactory vf, Resource... contexts)
public ContextStatementCollector(Collection<Statement> statements, ValueFactory vf, Resource... contexts)
public ContextStatementCollector(Collection<Statement> statements, Map<String,String> namespaces, ValueFactory vf, Resource... contexts)
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 RDFHandler
handleNamespace
in class AbstractRDFHandler
prefix
- 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 RDFHandler
handleStatement
in class AbstractRDFHandler
st
- The statement.Copyright © 2015-2022 Eclipse Foundation. All Rights Reserved.