Package com.hp.hpl.jena.tdb

Examples of com.hp.hpl.jena.tdb.TDBException


            return NodeFactory.createURI(str) ;
        }

        Tokenizer tokenizer = TokenizerFactory.makeTokenizerString(str) ;
        if ( ! tokenizer.hasNext() )
            throw new TDBException("Failed to tokenise: "+str) ;
        Token t = tokenizer.next() ;

        try {
            Node n = t.asNode() ;
            if ( n == null ) throw new TDBException("Not a node: "+str) ;
            return n ;
        } catch (RiotException ex)
        {
            throw new TDBException("Bad string for node: "+str) ;
        }
    }
View Full Code Here


                return 2+maxLength(node.getLiteralLexicalForm()) ;
        }
        if ( node.isVariable() )
            // "?"
            return 1+maxLength(node.getName()) ;
        throw new TDBException("Unrecognized node type: "+node) ;
    }
View Full Code Here

            case DATETIME:
            case DATE:
            case BOOLEAN:
                return true ;
            default:
                throw new TDBException("Unrecognized node id type: "+type) ;
        }
    }
View Full Code Here

            case BOOLEAN:
            {
                long val = BitsLong.clear(v, 56, 64) ;
                if ( val == 0 ) return NodeConst.nodeFalse ;
                if ( val == 1 ) return NodeConst.nodeTrue ;
                throw new TDBException("Unrecognized boolean node id : "+val) ;
            }
            default:
                throw new TDBException("Unrecognized node id type: "+type) ;
        }
    }
View Full Code Here

        {
            error(string) ;
            for ( Long id : blocks )
                info("    Block: "+id) ;
            history() ;
            throw new TDBException() ;
            //debugPoint() ;
        }
    }
View Full Code Here

     * addRow, deleteRow or find*
     */

    public NodeTupleTableConcrete(int N, TupleIndex[] indexes, NodeTable nodeTable, DatasetControl dsControl)
    {
        if (indexes.length == 0 || indexes[0] == null) throw new TDBException("A primary index is required") ;
        for (TupleIndex index : indexes)
        {
            if (N != index.getTupleLength())
                throw new TDBException(format("Inconsistent: TupleTable width is %d but index %s is %d",
                                              N, index.getMapping(), index.getTupleLength())) ;
        }

        this.dsPolicy = dsControl ;
        this.tupleTable = new TupleTable(N, indexes) ;
View Full Code Here

    // ==== Node

    protected final NodeId idForNode(Node node)
    {
        if (node == null || node == Node.ANY) return NodeId.NodeIdAny ;
        if (node.isVariable()) throw new TDBException("Can't pass variables to NodeTupleTable.find*") ;
        return nodeTable.getNodeIdForNode(node) ;
    }
View Full Code Here

     */
    public static DatasetGraphTDB getBaseDatasetGraphTDB(DatasetGraph datasetGraph)
    {
        if ( datasetGraph instanceof DatasetGraphTransaction )
            return ((DatasetGraphTransaction)datasetGraph).getBaseDatasetGraph() ;
        throw new TDBException("Not a suitable DatasetGraph to get it's base storage: "+Utils.classShortName(datasetGraph.getClass())) ;
    }
View Full Code Here

    {}

    @Override
    public NodeId getNodeIdForNode(Node node)
    {
        throw new TDBException("NodeTableSink.nodeIdForNode") ;
    }
View Full Code Here

    }

    @Override
    public Node getNodeForNodeId(NodeId id)
    {
        throw new TDBException("NodeTableSink.retrieveNodeByNodeId") ;
    }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.tdb.TDBException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.