Search in sources :

Example 21 with TDBException

use of org.apache.jena.tdb.TDBException in project jena by apache.

the class AbstractTestNodeTable method writeBadNode.

protected static void writeBadNode(NodeTable nt, Node badNode) {
    NodeId id1 = nt.allocOffset();
    try {
        NodeId nodeId = nt.getAllocateNodeId(badNode);
        fail("Expected exception for bad node: " + badNode);
    } catch (TDBException ex) {
    }
    NodeId id2 = nt.allocOffset();
    assertEquals(id1, id2);
}
Also used : TDBException(org.apache.jena.tdb.TDBException) NodeId(org.apache.jena.tdb.store.NodeId)

Aggregations

TDBException (org.apache.jena.tdb.TDBException)21 NodeId (org.apache.jena.tdb.store.NodeId)5 Node (org.apache.jena.graph.Node)4 File (java.io.File)2 Record (org.apache.jena.tdb.base.record.Record)2 NodeTable (org.apache.jena.tdb.store.nodetable.NodeTable)2 BufferedWriter (java.io.BufferedWriter)1 FileWriter (java.io.FileWriter)1 IOException (java.io.IOException)1 BigDecimal (java.math.BigDecimal)1 HashSet (java.util.HashSet)1 JsonArray (org.apache.jena.atlas.json.JsonArray)1 Tuple (org.apache.jena.atlas.lib.tuple.Tuple)1 Triple (org.apache.jena.graph.Triple)1 RiotException (org.apache.jena.riot.RiotException)1 Token (org.apache.jena.riot.tokens.Token)1 Tokenizer (org.apache.jena.riot.tokens.Tokenizer)1 Binding (org.apache.jena.sparql.engine.binding.Binding)1 Block (org.apache.jena.tdb.base.block.Block)1 FileSet (org.apache.jena.tdb.base.file.FileSet)1