Package com.hp.hpl.jena.sdb

Examples of com.hp.hpl.jena.sdb.SDBException


            return DriverManager.getConnection(jdbcURL,
                                               Access.getUser(),
                                               Access.getPassword()) ;
        } catch (SQLException ex)
        {
            throw new SDBException("SQL Exception while connecting to database: "+jdbcURL+" : "+ex.getMessage()) ;
        }
    }
View Full Code Here


            rsx = conn.execQuery(sqlStmt) ;
            ResultSet rs = rsx.get();
            if ( ! rs.next() )
            {
                if ( ! create )
                    throw new SDBException("No such node in table: "+node) ;
                insertNode(conn, lex, node) ;
                // And get it again to find the auto-allocate ID.
                return getIndex(conn, node, false) ;
            }
View Full Code Here

        // Hack?
        if ( databaseTypeName.startsWith("oracle:") )
            return Oracle ;

        LoggerFactory.getLogger(DatabaseType.class).warn("Can't turn '"+databaseTypeName+"' into a database type") ;
        throw new SDBException("Can't turn '"+databaseTypeName+"' into a database type") ;
    }
View Full Code Here

        try {
            connection().exec("DELETE FROM Triples") ;
        } catch (SQLException ex)
        {
            log.warn("Exception truncating tables") ;
            throw new SDBException("SQLException truncating tables",ex) ;
        }
    }
View Full Code Here

            }
           
        } catch (SQLException ex)
        {
            log.warn("Exception resetting table 'Prefixes'") ;
            throw new SDBException("SQLException resetting table 'Prefixes'",ex) ;
        }
    }
View Full Code Here

                )) ;
            connection().exec(sqlStr("ALTER TABLE Triples ADD PRIMARY KEY (s,p,o)")) ;
        } catch (SQLException ex)
        {
            log.warn("Exception resetting table 'Triples'") ;
            throw new SDBException("SQLException resetting table 'Triples'",ex) ;
        }
    }
View Full Code Here

        }

        if ( type.equals("none") )
            return jdbcNone ;
       
        throw new SDBException("Don't know how to construct a JDBC URL for "+type) ;
    }
View Full Code Here

   
    private static SDBConnectionDesc worker(Model m)
    {
        Resource r = GraphUtils.getResourceByType(m, AssemblerVocab.SDBConnectionAssemblerType) ;
        if ( r == null )
            throw new SDBException("Can't find connection description") ;
        SDBConnectionDesc desc = (SDBConnectionDesc)AssemblerBase.general.open(r) ;
        desc.initJDBC() ;
        return desc ;
    }
View Full Code Here

    public static String nodeToLex(Node node)
    {
        if ( node.isURI() )        return node.getURI() ;
        if ( node.isLiteral() )    return node.getLiteralLexicalForm() ;
        if ( node.isBlank() )      return node.getBlankNodeId().getLabelString() ;
        throw new SDBException("Can't create lexical representation for "+node) ;
    }
View Full Code Here

        String lexForm = null ;
       
        if ( n.isURI() )           lexForm = n.getURI() ;
        else if ( n.isLiteral() )  lexForm = n.getLiteralLexicalForm() ;
        else if ( n.isBlank() )    lexForm = n.getBlankNodeLabel() ;
        else throw new SDBException("Attempt to hash a variable") ;
                        
        String datatypeStr = "" ;
        if ( n.isLiteral() )
            datatypeStr = n.getLiteralDatatypeURI() ;
        String langStr = "" ;
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.sdb.SDBException

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.