Examples of IOntology


Examples of edu.pitt.dbmi.nlp.noble.ontology.IOntology

  private void doRemove(){
    int r = JOptionPane.showConfirmDialog(frame,"Are you sure you want to delete selected ontologies?","Confirm",JOptionPane.YES_NO_OPTION);
    // if not canceled, remove entry
    if(r == JOptionPane.YES_OPTION){
      for(Object o : ontologies.getSelectedValues()){
        IOntology ont = (IOntology) o;
        // remove entry
        repository.removeOntology(ont);
        // remove data
        ont.delete();
       
      }
    }
  }
View Full Code Here

Examples of edu.pitt.dbmi.nlp.noble.ontology.IOntology

          }
          //selected
          if(importer.isSelected()){
            setBusy(true);
         
            IOntology source = importer.getSelectedOntology();
            IClass [] scls = importer.getSelectedClasses();
           
            // create new ontology
            IOntology ont = repository.createOntology(source.getURI());
           
            //copy content
            importer.copy(scls,ont.getRoot());
           
            // import ontology
            repository.importOntology(ont);
          }
          importer.removePropertyChangeListener(RepositoryManager.this);
View Full Code Here

Examples of edu.pitt.dbmi.nlp.noble.ontology.IOntology

      if(chooser.showSaveDialog(frame) == JFileChooser.APPROVE_OPTION){
        final File f = chooser.getSelectedFile();
        setBusy(true);
        (new Thread(new Runnable(){
          public void run(){
            IOntology ont = (IOntology) value;
            try{
              ont.load();
              ont.write(new FileOutputStream(f),IOntology.OWL_FORMAT);
              JOptionPane.showMessageDialog(frame,ont.getName()+" saved as "+f.getAbsolutePath());
            }catch(Exception ex){
              ex.printStackTrace();
              JOptionPane.showMessageDialog(frame,ex.getMessage(),"Error",JOptionPane.ERROR_MESSAGE);             
            }
            setBusy(false);
View Full Code Here

Examples of edu.pitt.dbmi.nlp.noble.ontology.IOntology

    f.pack();
    f.setVisible(true);
    // set root
    Object value = getSelectedValue();
    if(value instanceof IOntology){
      final IOntology ont = (IOntology) value;
      explorer.setBusy(true);
      (new Thread(new Runnable(){
        public void run(){
          /*
          try{
            ont.load();
          }catch(IOntologyException ex){
            ex.printStackTrace();
          }*/
          explorer.setRoot(ont.getRootClasses());
          explorer.setBusy(false);
        }
      })).start();
    }else if(value instanceof Terminology){
      final Terminology term = (Terminology) value;
View Full Code Here

Examples of edu.pitt.dbmi.nlp.noble.ontology.IOntology

    f.pack();
    f.setVisible(true);
    // set root
    Object value = getSelectedValue();
    if(value instanceof IOntology){
      final IOntology ont = (IOntology) value;
      explorer.setBusy(true);
      (new Thread(new Runnable(){
        public void run(){
          try{
            ont.load();
          }catch(IOntologyException ex){
            ex.printStackTrace();
          }
          explorer.setOntology(ont);
          explorer.setBusy(false);
View Full Code Here

Examples of edu.pitt.dbmi.nlp.noble.ontology.IOntology

            String name = n.getTextContent().trim();
            //String uri =  ouri+"#"+name;
            //IClass cls = (IClass) repository.getResource(URI.create(uri));
           
            //if(cls == null){
            IOntology ont = repository.getOntology(URI.create(ouri));
            if(ont != null){
              IClass cls = new BClass((BOntology)ont,name);
              cls.getConcept().setTerminology(this);
              cls.getConcept().setSearchString(text);
              list.add(cls.getConcept());
View Full Code Here

Examples of edu.pitt.dbmi.nlp.noble.ontology.IOntology

            map.put("location",u);
          }else if((""+map.get("format")).equals(IRepository.FORMAT_DATABASE)){
            map.putAll((Map)repository.get(CONFIGURATION));
          }
          map.put("uri",URI.create(""+map.get("uri")));
          IOntology ont = new POntology(createProperties(map));
          ont.setRepository(this);
          map.put("object",ont);
          ontologies.add(map.get("object"));
          repository.put(""+map.get("uri"),map);
        }else if((""+map.get("type")).equals(IRepository.TYPE_TERMINOLOGY)){
          if((""+map.get("format")).equalsIgnoreCase("EVS")){
View Full Code Here

Examples of edu.pitt.dbmi.nlp.noble.ontology.IOntology

  */
  /**
   * create new ontology
   */
  public IOntology createOntology(URI paththrows IOntologyException {
    IOntology ont =  POntology.createOntology(path, directory);
    ont.setRepository(this);
    return ont;
  }
View Full Code Here

Examples of edu.pitt.dbmi.nlp.noble.ontology.IOntology

    if(i > -1){
      uri = uri.substring(0,i);
    }
   
    // get ontology
    IOntology ont = getOntology(URI.create(uri));
   
    // if ontology is all you want, fine Girish
    if(i == -1 && ont != null)
      return ont;
   
    // if ontology is null try again w/ a different convention
    if(ont == null){
      i = uri.lastIndexOf("/");
      if(i > -1){
        uri = uri.substring(0,i);
       
        // get ontology
        ont = getOntology(URI.create(uri));
      }
    }
   
    // now return resource
    if(ont != null)
      return ont.getResource(""+path);
    return null;
  }
View Full Code Here

Examples of edu.pitt.dbmi.nlp.noble.ontology.IOntology

   * @return
   */
  public static boolean isOfParent(IClass cls,String parent){
    if(cls == null)
      return false;
    IOntology o = cls.getOntology();
    IClass p = o.getClass(parent);
    return cls.equals(p) || cls.hasSuperClass(p);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.