Class SPARQLResultsSAXParser
java.lang.Object
org.eclipse.rdf4j.common.xml.SimpleSAXAdapter
org.eclipse.rdf4j.query.resultio.sparqlxml.SPARQLResultsSAXParser
- All Implemented Interfaces:
SimpleSAXListener
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionThe variable names that are specified in the header.private String
The most recently parsed binding name.private MapBindingSet
The bound variables for the current result.private Value
The most recently parsed value.private final QueryResultHandler
private final org.slf4j.Logger
private final Deque
<SPARQLResultsSAXParser.TripleContainer> stack for handling nested RDF-star triplesprivate final ValueFactory
-
Constructor Summary
ConstructorsConstructorDescriptionSPARQLResultsSAXParser
(ValueFactory valueFactory, QueryResultHandler handler) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Notifies the listener that the parser has finished parsing.void
Reports an end tag to the listener.void
Notifies the listener that the parser has started parsing.void
Reports a start tag to the listener.
-
Field Details
-
logger
private final org.slf4j.Logger logger -
bindingNames
The variable names that are specified in the header. -
currentBindingName
The most recently parsed binding name. -
currentValue
The most recently parsed value. -
currentSolution
The bound variables for the current result. -
valueFactory
-
handler
-
tripleStack
stack for handling nested RDF-star triples
-
-
Constructor Details
-
SPARQLResultsSAXParser
-
-
Method Details
-
startDocument
Description copied from interface:SimpleSAXListener
Notifies the listener that the parser has started parsing.- Specified by:
startDocument
in interfaceSimpleSAXListener
- Overrides:
startDocument
in classSimpleSAXAdapter
- Throws:
SAXException
-
endDocument
Description copied from interface:SimpleSAXListener
Notifies the listener that the parser has finished parsing.- Specified by:
endDocument
in interfaceSimpleSAXListener
- Overrides:
endDocument
in classSimpleSAXAdapter
- Throws:
SAXException
-
startTag
Description copied from interface:SimpleSAXListener
Reports a start tag to the listener. The method call reports the tag's name, the attributes that were found in the start tag and any text that was found after the start tag.- Specified by:
startTag
in interfaceSimpleSAXListener
- Overrides:
startTag
in classSimpleSAXAdapter
- Parameters:
tagName
- The tag name.atts
- A map containing key-value-pairs representing the attributes that were found in the start tag.text
- The text immediately following the start tag, or an empty string if the start tag was followed by a nested start tag or if no text (other than whitespace) was found between start- and end tag.- Throws:
SAXException
-
endTag
Description copied from interface:SimpleSAXListener
Reports an end tag to the listener.- Specified by:
endTag
in interfaceSimpleSAXListener
- Overrides:
endTag
in classSimpleSAXAdapter
- Parameters:
tagName
- The tag name.- Throws:
SAXException
-