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

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


  public OWLKBPropertyHierarchyGraphModel(OWLModel model) {
    this.model = model;
  }

  private Collection getAppropriateChildren(Object obj) {
    RDFProperty prop = (RDFProperty) obj;
    return prop.getSubproperties(false);
  }
View Full Code Here


    RDFProperty prop = (RDFProperty) obj;
    return prop.getSubproperties(false);
  }

  private Collection getAppropriateParents(Object obj) {
    RDFProperty prop =(RDFProperty) obj;
    return prop.getSuperproperties(false);
  }
View Full Code Here

    this.tab = tab;
    this.model = model;
  }

  public void actionPerformed(ActionEvent e) {
    RDFProperty property = OWLUI.pickRDFProperty(model.getUserDefinedOWLObjectProperties(), "Select a property");
    OWLObjectProperty objProperty = (OWLObjectProperty) property;
    if(property != null && property instanceof OWLObjectProperty) {
      tab.addExistentialPanel(objProperty);
    }
  }
View Full Code Here

  }
 

  public IProperty getProperty(String name) {
    checkModel();
    RDFProperty c = model.getRDFProperty(getResourceName(name));
    return (c != null)?new PProperty(c,this):null;
  }
View Full Code Here

   
    // if property is null, well nothing to be done
    if(prop == null)
      return null;
   
    RDFProperty p = (RDFProperty) ((PProperty)prop).getResource();
    Object value = resource.getPropertyValue(p,true);
   
    // if there are implied values then replace the real ones
    // if implied are defaults
    if(value == null || value instanceof Number){
View Full Code Here

   
    // if property is null, well nothing to be done
    if(prop == null)
      return new Object [0];
   
    RDFProperty p = (RDFProperty) ((PProperty)prop).getResource();
    List list = new ArrayList();
    Collection own = (prop.isFunctional())?
            Collections.singletonList(resource.getPropertyValue(p,true)):
            resource.getPropertyValues(p,true);
    Collection impl = resource.getHasValuesOnTypes(p);
View Full Code Here

  public boolean hasPropetyValue(IProperty prop, Object value) {
    if(resource == null && ontology != null)
      ontology.checkModel();
   
    RDFProperty p = (RDFProperty) ((PProperty)prop).getResource();
    return resource.hasPropertyValue(p,convertSetValue(value),true);
  }
View Full Code Here

  public void removePropertyValues(IProperty prop) {
    if(resource == null && ontology != null)
      ontology.checkModel();
   
    RDFProperty p = (RDFProperty) ((PProperty)prop).getResource();
    for(Object o: resource.getPropertyValues(p))
      resource.removePropertyValue(p,o);
  }
View Full Code Here

   
    // if property is null, well nothing to be done
    if(prop == null)
      return;
   
    RDFProperty p = (RDFProperty) convertSetValue(prop);
    resource.removePropertyValue(p,convertSetValue(value));
  }
View Full Code Here

  public void removePropertyValues(){
    if(resource == null && ontology != null)
      ontology.checkModel();
     
    for(Object o: resource.getPossibleRDFProperties()){
      RDFProperty p = (RDFProperty) o;
      for(Object v: resource.getPropertyValues(p)){
        resource.removePropertyValue(p,v);
      }
    }
  }
View Full Code Here

TOP

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

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.