Class TransactionSAXParser
java.lang.Object
org.eclipse.rdf4j.common.xml.SimpleSAXAdapter
org.eclipse.rdf4j.http.protocol.transaction.TransactionSAXParser
- All Implemented Interfaces:
SimpleSAXListener
Parses an RDF transaction document into a collection of
TransactionOperation
objects.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate SimpleDataset
private SPARQLUpdateOperation
protected Collection
<TransactionOperation> private final ValueFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate TransactionOperation
private TransactionOperation
private Resource[]
createContexts
(int startIdx) private TransactionOperation
void
Reports an end tag to the listener.getTxn()
get the parsed transactionvoid
Notifies the listener that the parser has started parsing.void
Reports a start tag to the listener.Methods inherited from class org.eclipse.rdf4j.common.xml.SimpleSAXAdapter
endDocument
-
Field Details
-
valueFactory
-
txn
-
parsedValues
-
bindings
-
currentSPARQLUpdate
-
currentDataset
-
-
Constructor Details
-
TransactionSAXParser
public TransactionSAXParser() -
TransactionSAXParser
-
-
Method Details
-
getTxn
get the parsed transaction- Returns:
- the parsed transaction
-
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
-
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
-
createClearOperation
- Throws:
SAXException
-
createAddStatementOperation
- Throws:
SAXException
-
createRemoveStatementsOperation
- Throws:
SAXException
-
createContexts
- Throws:
SAXException
-