Package org.semanticweb.owlapi.model

Examples of org.semanticweb.owlapi.model.OWLObjectSomeValuesFrom


  public static Set<String> getClsValueObjectProperty(OWLOntology ont, String clsuri, String propuri) {
    Set<String> valset = new HashSet<String>();
    Set<OWLClassExpression> clsex = factory.getOWLClass(IRI.create(clsuri)).getSuperClasses(ont);
    for(OWLClassExpression oneclsex : clsex){
      if(oneclsex instanceof OWLObjectSomeValuesFrom){
        OWLObjectSomeValuesFrom hasvalex = (OWLObjectSomeValuesFrom)oneclsex;
        if(hasvalex.getProperty().asOWLObjectProperty().getIRI().toString().equals(propuri)){
          if(hasvalex.isAnonymous()){
            //System.out.println("Value for " + hasvalex.toString() + " (" + propuri + ") is anonymous");
//            hasvalex.
          }
//          else{
            valset.add(hasvalex.getFiller().asOWLClass().getIRI().toString());
//          }
        }
      }
    }
    return valset;
View Full Code Here


    OWLClassExpression classD = OWL.Class( "D" );
    OWLClassExpression classE = OWL.Class( "E" );
    OWLObjectProperty propertyP = OWL.ObjectProperty( "p" );
    SWRLVariable variable = SWRL.variable( "x" );

    OWLObjectSomeValuesFrom restriction = OWL.some( propertyP, classD );

    // C(?x)
    bodyAtoms.add( SWRL.classAtom( classC, variable ) );
    // Ep.D(?x)
    headAtoms.add( SWRL.classAtom( restriction, variable ) );
View Full Code Here

                sb.append(" \u2229 ");
                sb.append(formatClassExpression(ops.get(i), ont));
            }
            return sb.toString();
        } else if (ce instanceof OWLObjectSomeValuesFrom) {
            OWLObjectSomeValuesFrom osv = (OWLObjectSomeValuesFrom) ce;
            OWLObjectPropertyExpression ope = osv.getProperty();
            String role = (!ope.isAnonymous()) ? getLabel(
                    ope.asOWLObjectProperty(), ont) : ope.toString();
            return "\u2203" + role + ".("
                    + formatClassExpression(osv.getFiller(), ont) + ")";
        } else {
            return ce.toString();
        }
    }
View Full Code Here

                sb.append(" \u2229 ");
                sb.append(formatClassExpression(ops.get(i), ont));
            }
            return sb.toString();
        } else if (ce instanceof OWLObjectSomeValuesFrom) {
            OWLObjectSomeValuesFrom osv = (OWLObjectSomeValuesFrom) ce;
            OWLObjectPropertyExpression ope = osv.getProperty();
            String role = (!ope.isAnonymous()) ? getLabel(
                    ope.asOWLObjectProperty(), ont) : ope.toString();
            return "\u2203" + role + ".("
                    + formatClassExpression(osv.getFiller(), ont) + ")";
        } else {
            return ce.toString();
        }
    }
View Full Code Here

    OWLClassExpression classD = OWL.Class( "D" );
    OWLClassExpression classE = OWL.Class( "E" );
    OWLObjectProperty propertyP = OWL.ObjectProperty( "p" );
    SWRLVariable variable = SWRL.variable( "x" );

    OWLObjectSomeValuesFrom restriction = OWL.some( propertyP, classD );

    // C(?x)
    bodyAtoms.add( SWRL.classAtom( classC, variable ) );
    // Ep.D(?x)
    headAtoms.add( SWRL.classAtom( restriction, variable ) );
View Full Code Here

                                {if (true) return factory.getOWLFunctionalObjectPropertyAxiom(restriction.getProperty());}
                            }
                        }
                    }
                    else if(lhs instanceof OWLObjectSomeValuesFrom) {
                        OWLObjectSomeValuesFrom restriction = (OWLObjectSomeValuesFrom) lhs;
                        if(restriction.getFiller().isOWLThing()) {
                            {if (true) return factory.getOWLObjectPropertyDomainAxiom(restriction.getProperty(), rhs);}
                        }
                    }
                    if(rhs instanceof OWLObjectComplementOf && !rhs.isAnonymous()) {
                        {if (true) return factory.getOWLDisjointClassesAxiom(lhs, ((OWLObjectComplementOf) rhs).getOperand());}
                    }
View Full Code Here

TOP

Related Classes of org.semanticweb.owlapi.model.OWLObjectSomeValuesFrom

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.