Package edu.stanford.smi.protege.model

Examples of edu.stanford.smi.protege.model.Cls



  public Object[] getClses() {
    Collection clses = model.getUserDefinedOWLNamedClasses();
    Iterator it = clses.iterator();
    Cls cls;
    while(it.hasNext()) {
      cls = (Cls) it.next();
      if(cls.isVisible() == false || !(cls instanceof OWLNamedClass)) {
        it.remove();
      }
    }
    return clses.toArray();
  }
View Full Code Here


    categoryIcon = ComponentUtilities.loadImageIcon(ICDTab.class, "resources/icd.png");
    setIcon(categoryIcon);
    adjustButtons();
   
   
    final Cls icd_metaclass = getKnowledgeBase().getCls(ICDConstants.ICD_METACLASS);
    getClsTree().setCellRenderer(new FrameRenderer() {
      @Override
      protected void loadCls(Cls cls) {       
        super.loadCls(cls);
        if (cls.hasType(icd_metaclass)) {
View Full Code Here

                public Cls getResult() {
                                return cls;
                            }
                        };
                        t.execute();
                        Cls cls = t.getResult();
                        clsesPanel.getSubclassPane().extendSelection(cls);
                    }
         
        }
          };
View Full Code Here

         addType(types, ICDConstants.ICD_METACLASS);
         return types;
   }
  
   protected void addType(Collection<Cls> types, String typeName) {
     Cls type = getKnowledgeBase().getCls(typeName);
    if (type != null) {
       types.add(type);
     }
   }
View Full Code Here

    right_cls2Status.clear();
   
    //traversing left tree
    Collection clses1 = kb_left.getClses();
    for (Iterator iterator = clses1.iterator(); iterator.hasNext();) {
      Cls cls1 = (Cls) iterator.next();
      if (cls1.isSystem()) { continue; }
     
      Cls cls2 = kb_right.getCls(cls1.getName());
      if (cls2 != null) { //found a match
        //test if parents are still the same
        if (equalsSetByName(cls1.getDirectSuperclasses(), cls2.getDirectSuperclasses())) {
          setStatus(cls1, FrameStatus.UNCHANGED, left_cls2Status);
          setStatus(cls2, FrameStatus.UNCHANGED, right_cls2Status);
        } else  {
          setStatus(cls1, FrameStatus.MOVED, left_cls2Status);
          setStatus(cls2, FrameStatus.MOVED, right_cls2Status);
          setParentsStatus(cls1, FrameStatus.CHILDREN_MOVED, left_cls2Status);
          setParentsStatus(cls2, FrameStatus.CHILDREN_MOVED, right_cls2Status);
        }
      } else {
        setStatus(cls1, FrameStatus.DELETED, left_cls2Status);
        setParentsStatus(cls1, FrameStatus.CHILDREN_DELETED, left_cls2Status);
      }     
    }
   
    //traversing right tree
    Collection clses2 = kb_right.getClses();
    for (Iterator iterator = clses2.iterator(); iterator.hasNext();) {
      Cls cls2 = (Cls) iterator.next();
      if (cls2.isSystem()) { continue ; }
     
      Cls cls1 = kb_left.getCls(cls2.getName());
      if (cls1 == null) { //found a match       
        setStatus(cls2, FrameStatus.ADDED, right_cls2Status);
        setParentsStatus(cls2, FrameStatus.CHILDREN_ADDED, right_cls2Status);
      }     
    }
View Full Code Here

        }
    }

    private Slot createDisplayNameSlot(KnowledgeBase kb) {
        final Slot displayNameSlot = kb.createSlot(DISPLAY_NAME_SLOT_NAME);
        final Cls policyControlledObjectCls = kb.getCls(POLICY_CONTROLLED_OBJECT_CLS_NAME);
        policyControlledObjectCls.addDirectTemplateSlot(displayNameSlot);
        return displayNameSlot;
    }
View Full Code Here

TOP

Related Classes of edu.stanford.smi.protege.model.Cls

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.