Package edu.stanford.smi.protege.util

Examples of edu.stanford.smi.protege.util.PropertyList


  }
 
  // return true if sources are complete and 'ok' was pressed
  // copy/pasted from Protege code
    private void loadNewSources(Project project, KnowledgeBaseFactory factory) {
        PropertyList sources = project.getSources();
        File   dir = (File) info.get("directory");
       
        // send a flag to url
        String driver = ""+info.get("driver");
        String url = ""+info.get("url");
        if(driver.contains("mysql") && !url.contains("relaxAutoCommit")){
          url += ((url.lastIndexOf("?") > -1)?"&":"?")+"relaxAutoCommit=true";
        }
       
        // set project file
        File f = new File(dir,PUtils.getOntologyName(getURI())+".pprj");
        project.setProjectURI(f.toURI());
       
        // setup drivers
        OWLDatabaseKnowledgeBaseFactory.setDriver(sources,driver);
        OWLDatabaseKnowledgeBaseFactory.setURL(sources,url);
        OWLDatabaseKnowledgeBaseFactory.setTablename(sources,""+info.get("location"));
        OWLDatabaseKnowledgeBaseFactory.setUsername(sources,""+info.get("username"));
        OWLDatabaseKnowledgeBaseFactory.setPassword(sources,""+info.get("password"));
       
        sources.setString(KnowledgeBaseFactory.FACTORY_CLASS_NAME, factory.getClass().getName());
       
      
       
        //TODO: handle includes !!!
        Iterator i = Collections.EMPTY_LIST.iterator();//editor.getIncludedProjects().iterator();
View Full Code Here


  }
 
  // return true if sources are complete and 'ok' was pressed
  // copy/pasted from Protege code
    private void loadNewSources(Project project, KnowledgeBaseFactory factory) {
        PropertyList sources = project.getSources();
        File   dir = (File) info.get("directory");
       
        // send a flag to url
        String driver = ""+info.get("driver");
        String url = ""+info.get("url");
        if(driver.contains("mysql") && !url.contains("relaxAutoCommit")){
          url += ((url.lastIndexOf("?") > -1)?"&":"?")+"relaxAutoCommit=true";
        }
       
        // set project file
        File f = new File(dir,PUtils.getOntologyName(getURI())+".pprj");
        project.setProjectURI(f.toURI());
       
        // setup drivers
        OWLDatabaseKnowledgeBaseFactory.setDriver(sources,driver);
        OWLDatabaseKnowledgeBaseFactory.setURL(sources,url);
        OWLDatabaseKnowledgeBaseFactory.setTablename(sources,""+info.get("location"));
        OWLDatabaseKnowledgeBaseFactory.setUsername(sources,""+info.get("username"));
        OWLDatabaseKnowledgeBaseFactory.setPassword(sources,""+info.get("password"));
       
        sources.setString(KnowledgeBaseFactory.FACTORY_CLASS_NAME, factory.getClass().getName());
       
      
       
        //TODO: handle includes !!!
        Iterator i = Collections.EMPTY_LIST.iterator();//editor.getIncludedProjects().iterator();
View Full Code Here

TOP

Related Classes of edu.stanford.smi.protege.util.PropertyList

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.