Package edu.stanford.smi.protegex.owl.model

Examples of edu.stanford.smi.protegex.owl.model.OWLModel


      return null;
   
    if(value instanceof PResource){
      return ((PResource)value).getResource();
    }else if(value instanceof ILogicExpression){ 
      OWLModel model = resource.getOWLModel();
      ILogicExpression exp = (ILogicExpression) value;
      Object obj = null;
      if(exp.isSingleton()){
        if(exp.getExpressionType() == ILogicExpression.NOT){
          try{
            obj = model.createOWLComplementClass(
                (RDFSClass)convertSetValue(exp.getOperand()));
          }catch(ClassCastException ex){
            throw new IOntologyError("Cannot complement "+exp.getOperand()+", because it is not a class",ex);
          }
        }else
          obj =  convertSetValue(exp.getOperand());
      }else if(exp.getExpressionType() == ILogicExpression.AND){
        OWLIntersectionClass ac = model.createOWLIntersectionClass();
        for(Object o: exp){
          ac.addOperand((RDFSClass)convertSetValue(o));
        }
        obj = ac;
      }else if(exp.getExpressionType() == ILogicExpression.OR){
        OWLUnionClass oc = model.createOWLUnionClass();
        for(Object o: exp){
          oc.addOperand((RDFSClass)convertSetValue(o));
        }
        obj = oc;
      }
View Full Code Here


   
    return project == null ? null : project.getKnowledgeBase();
  }

  private OWLModel loadOwlModel(URI uri) {
    OWLModel owlModel = null;
    try {
      owlModel = ProtegeOWL.createJenaOWLModelFromURI(uri.toURL().toString());
    } catch (Exception e) {
      Log.getLogger().log(Level.WARNING, "Error at loading ontology from: " + uri, e);
    }
View Full Code Here

    public static void main(String[] args) {
        File file = new File("/tmp/icd10_claml.xml");

        //load into a file that has the empty content model in it
        Project prj = Project.loadProjectFromFile("/tmp/icd_content_model_empty.pprj", new ArrayList());
        OWLModel owlModel = (OWLModel) prj.getKnowledgeBase();

        ClamlImport ci = new ClamlImport(owlModel);
        ci.doImport(file);

        log.info("Started saving of OWL file on " + new Date());
View Full Code Here

        String linearType = this.getSelectedLinearType();
     
        String pprjFileName = this.getUmbrellaProjectName();
        Project prj = Project.loadProjectFromFile(pprjFileName, new ArrayList());
        OWLModel localowlModel = (OWLModel) prj.getKnowledgeBase();
        icdContentModel = new ICDContentModel(localowlModel);
     
        this.updateStatus(1);
        if (Thread.interrupted()) {
          throw new InterruptedException();
View Full Code Here

   
  }
 
  public static void main(String[] args){
        Project prj = Project.loadProjectFromFile("c:\\icdcontent\\icd_umbrella.pprj", new ArrayList());
        OWLModel owlModel = (OWLModel) prj.getKnowledgeBase();
        ICDContentModel icdContentModel = new ICDContentModel(owlModel);
        ICDClaMLLinearizationHierarchicalStructure model = new ICDClaMLLinearizationHierarchicalStructure(icdContentModel, "Morbidity");
        model.generateCodes();
        model.getGeneretadCodes();
  }
View Full Code Here

 
  public void intiUI(){
    setLabel("ICD ClaMLizer");
    //KnowledgeBase kb = getKnowledgeBase();
   
    OWLModel kb = (OWLModel) getKnowledgeBase();
       
    tabbedPane = new JTabbedPane();

    clamlPanel = new ICDClaMLPanel(kb);   
    tabbedPane.add("ClaMLizer", clamlPanel);
View Full Code Here

TOP

Related Classes of edu.stanford.smi.protegex.owl.model.OWLModel

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.