Package edu.pitt.ontology

Examples of edu.pitt.ontology.IProperty


        // do not dispose of content
      }
    }else{
     
      // create some important properties
      IProperty partOf = target.getProperty(PART_OF);
      if(partOf == null){
        partOf = target.createProperty(PART_OF,IProperty.OBJECT);
        partOf.setDomain(new IClass [] {target.getRoot()});
        partOf.setRange(new IClass [] {target.getRoot()});
      }
     
      IProperty hasPart = target.getProperty(HAS_PART);
      if(hasPart == null){
        hasPart = target.createProperty(HAS_PART,IProperty.OBJECT);
        hasPart.setDomain(new IClass [] {target.getRoot()});
        hasPart.setRange(new IClass [] {target.getRoot()});
      }
      // make them inverses of eachother
      hasPart.setInverseProperty(partOf);
      partOf.setInverseProperty(hasPart);
     
     
      // if we have last processed page
      int lastPageCount = 0;
View Full Code Here


      for(IProperty sp : src.getProperties()){
        // skip PartOf, and has_PART
        if(HAS_PART.equals(sp.getName()) || PART_OF.equals(sp.getName()))
          continue;
       
        IProperty dp = target.getProperty(sp.getName());
       
        // create unknown property for the first time
        if(dp == null && !target.hasResource(sp.getName())){
          dp = target.createProperty(sp.getName(),IProperty.ANNOTATION_DATATYPE);
          dp.setRange(new String [0]);
        }
       
        // copy string values
        dst.setPropertyValues(dp,src.getPropertyValues(sp));
       
View Full Code Here

    for(IProperty sp : src.getProperties()){
      // skip PartOf, and has_PART
      if(HAS_PART.equals(sp.getName()) || PART_OF.equals(sp.getName()))
        continue;
   
      IProperty dp = target.getProperty(sp.getName());
     
      // create unknown property for the first time
      if(dp == null && !target.hasResource(sp.getName())){
        dp = target.createProperty(sp.getName(),IProperty.ANNOTATION_DATATYPE);
        dp.setRange(new String [0]);
      }
     
      // copy string values if not there
      dst.setPropertyValues(dp,src.getPropertyValues(sp));
    }
View Full Code Here

   * @param dst
   * @param relation
   */
  private void copyClassRelations(BClass src, IClass dst, String relation){
    // get or create temp property
    IProperty dp = dst.getOntology().getProperty(relation);
    if(dp == null){
      dp = dst.getOntology().createProperty(relation,IProperty.ANNOTATION_DATATYPE);
      dp.setRange(new String [0]);
    }
   
    // remove prefix
    if(relation.startsWith("annotation_")){
      relation = relation.substring("annotation_".length());
View Full Code Here

        addAxiom(getOWLDataFactory().getOWLDataPropertyRangeAxiom(asOWLDataProperty(),((OWLLiteral)convertOntologyObject(o)).getDatatype()));
    }
  }

  public boolean isInverseOf(IProperty p) {
    IProperty i = getInverseProperty();
    return (i != null)?i.equals(p):false;
  }
View Full Code Here

   */
  public boolean evaluate(Object obj){
    if(obj instanceof IInstance){
      IInstance inst = (IInstance) obj;
      // see if this instance has a value that fits this restriction
      IProperty prop = getProperty();
     
      // is property satisfied
      boolean satisfied = isPropertySatisfied(prop, inst);
     
      // check if there is evidence to contradict inverse property
      // then the instance becomes inconsistent again
      if(satisfied && isPropertySatisfied(prop.getInverseProperty(), inst)){
        satisfied = false;
      }
      return satisfied;
    }else{
      return super.evaluate(obj);
View Full Code Here

   */
  public boolean evaluate(Object obj){
    if(obj instanceof IInstance){
      IInstance inst = (IInstance) obj;
      // see if this instance has a value that fits this restriction
      IProperty prop = getProperty();
     
      // is property satisfied
      boolean satisfied = isPropertySatisfied(prop, inst);
     
      // check if there is evidence to contradict inverse property
      // then the instance becomes inconsistent again
      if(satisfied && isPropertySatisfied(prop.getInverseProperty(), inst)){
        satisfied = false;
      }
      return satisfied;
    }else{
      return super.evaluate(obj);
View Full Code Here

TOP

Related Classes of edu.pitt.ontology.IProperty

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.