Package com.hp.hpl.jena.tdb

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


    public void begin(Transaction txn)
    {
        //debug("%s begin", txn.getLabel()) ;
       
        if ( this.txn.getTxnId() != txn.getTxnId() )
            throw new TDBException(String.format("Different transactions: %s %s", this.txn.getLabel(), txn.getLabel())) ;
        if ( passthrough )
            throw new TDBException("Already active") ;
        passthrough = false ;
       
        allocOffset = base.allocOffset().getId() ;
        // base node table empty e.g. first use.
        journalObjFileStartOffset = journalObjFile.length() ;
View Full Code Here


        System.err.println() ;
        System.err.println() ;
        System.err.println(msg) ;
        dump() ;  
        System.err.println() ;
        throw new TDBException(msg) ;
    }
View Full Code Here

        public StatsCollectorNodeId getCollector() { return stats ; }

        @Override
        public void tuple(Tuple<Node> tuple)
        { throw new TDBException("Unexpected: tuple in bulk load (expected quads or triples)") ; }
View Full Code Here

        // Create an empty records block.
       
        BPTreePage recordsPage = bpTree.getRecordsMgr().create() ;
        if ( recordsPage.getId() != BPlusTreeParams.RootId )
            // [TxTDB:PATCH-UP]
            throw new TDBException("Root blocks must be at position zero (got "+recordsPage.getId()+")") ;
        // Empty data block.
        // [TxTDB:PATCH-UP]
        recordsPage.write();
        recordsPage.release() ;
       
View Full Code Here

    //public static final int BDB_cacheSizePercent    = intValue("BDB_cacheSizePercent", 75) ;
   
    public static void panic(Class<?> clazz, String string)
    {
        Log.fatal(clazz, string) ;
        throw new TDBException(string) ;
    }
View Full Code Here

    }
   
    public static Symbol allocSymbol(String shortName)
    {
        if ( shortName.startsWith(SystemTDB.tdbSymbolPrefix))
            throw new TDBException("Symbol short name begins with the TDB namespace prefix: "+shortName) ;
        if ( shortName.startsWith("http:"))
            throw new TDBException("Symbol short name begins with http: "+shortName) ;
        return allocSymbol(SystemTDB.symbolNamespace, shortName) ;
    }
View Full Code Here

    }
   
    private static int intValue(String name, int defaultValue)
    {
        if ( name == null ) return defaultValue ;
        if ( name.length() == 0 ) throw new TDBException("Empty string for value name") ;
       
        if ( properties == null )
            return defaultValue ;

        String x = properties.getProperty(name) ;
View Full Code Here

                return FileMode.mapped ;
            }
            TDB.logInfo.debug("File mode: Direct") ;
            return FileMode.direct ;
        }
        throw new TDBException("Unrecognized file mode (not one of 'default', 'direct' or 'mapped': "+x) ;
    }
View Full Code Here

    {
        FileRef f = id2name.get(fileId) ;
        if ( f == null )
        {
            Log.fatal(FileRef.class, "No FileRef registered for id: "+fileId) ;
            throw new TDBException("No FileRef registered for id: "+fileId) ;
        }
        return f ;
    }
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

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.