Package com.hp.hpl.jena.db

Examples of com.hp.hpl.jena.db.ModelRDB


            String bkpPath = outPath + ".old" + "-" + System.currentTimeMillis();
            if ( outPath.startsWith( "jdbc:" ) )
              {
              if ( dataName.startsWith( "jdbc:" ) )// We need to backup the old data
                  new JDBCLoader().load( bkpPath ).add( input );
              ModelRDB dbm = (ModelRDB) new JDBCLoader().load( outPath );
              dbm.begin().remove( input ).add( repaired ).commit();
              }
            else
              {
                File outFile = new File( outPath );
                if ( outFile.exists() ) // Don't overwrite the old file if we can help it!
View Full Code Here


    IDBConnection conn = new DBConnection(dbUrl, userName, password, "MySQL");

    // create a model maker with the given connection parameters
    ModelMaker maker = ModelFactory.createModelRDBMaker(conn);

    ModelRDB model = (ModelRDB) maker.openModel(modelName);
    InputStream file = new FileInputStream(rdfFileName);
    model.read(file,null,"N3");
    file.close();
  }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.db.ModelRDB

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.