Package aterm

Examples of aterm.ATerm


      Statement stmt = rawModel.getProperty(s, OWL.onProperty);
//        usedStatements.add(stmt);

      Resource p = stmt.getResource();
      ATerm pt = node2term(p);     
 
      if(s.hasProperty(OWL.hasValue)) {
          stmt = rawModel.getProperty(s, OWL.hasValue);
          RDFNode o = stmt.getObject();
//          usedStatements.add(stmt);
         
          ATerm ot = node2term(o);       
          aTerm = ATermUtils.makeHasValue(pt, ot);
      }
      else if(s.hasProperty(OWL.allValuesFrom)) {
          stmt = rawModel.getProperty(s, OWL.allValuesFrom);
//          usedStatements.add(stmt);
         
          Resource o = stmt.getResource();
          ATerm ot = node2term(o);
          aTerm = ATermUtils.makeAllValues(pt, ot);
      }
      else if(s.hasProperty(OWL.someValuesFrom)) {
          stmt = rawModel.getProperty(s, OWL.someValuesFrom);
//          usedStatements.add(stmt);
         
          Resource o = stmt.getResource();
          ATerm ot = node2term(o);             
          aTerm = ATermUtils.makeSomeValues(pt, ot);
      }
      else if(s.hasProperty(OWL.minCardinality)) {
          stmt = rawModel.getProperty(s, OWL.minCardinality);
//          usedStatements.add(stmt);
View Full Code Here


            System.err.println("Invalid list structure: List " + r
                    + " does not have a rdf:first property. Ignoring rest of the list.");
            return ATermUtils.EMPTY_LIST;
        }

        ATerm first = node2term(rawModel.getProperty(r, RDF.first).getObject());
        Resource rest = rawModel.getProperty(r, RDF.rest).getResource();
        return ATermUtils.makeList(first, createList(rest));
    } // createList
View Full Code Here

              kb.addSubClass( st, ot );
            }
      break;

    case RDFS_subPropertyOf:
      ATerm subProp = null;
      if( s.isBlank() ) {
        Triple expr = getExpression( s );
        if( expr == null ) {
          addUnsupportedFeature( "Bnode in rdfs:subProperty axioms is not a valid property expression" );
        }
View Full Code Here

    // transitive closure
    Map<ATerm, DependencySet> immSubs = new HashMap<ATerm, DependencySet>();
    computeImmediateSubRoles(r, immSubs);
    for (Entry<ATerm, DependencySet> entry : immSubs.entrySet()) {
      ATerm sub = entry.getKey();
      DependencySet subDS = PelletOptions.USE_TRACING ? ds.union(entry.getValue(), true)
                      : DependencySet.INDEPENDENT;
      if (sub instanceof ATermAppl) {
        Role subRole = getRole(sub);
View Full Code Here

      else if( set.size() == 1 ) {
        simp = set.iterator().next();
      }
    }
    else if( fun.equals( ATermUtils.SOMEFUN ) ) {
      ATerm p = elConcept.getArgument( 0 );
      ATermAppl q = (ATermAppl) elConcept.getArgument( 1 ); // complex
      // role?
      ATermAppl qSimp = simplify( q );
      if( qSimp.equals( ATermUtils.BOTTOM ) ) {
        simp = ATermUtils.BOTTOM;
View Full Code Here

      defineProperty( p1 );
      defineProperty( p2 );
      kb.addDisjointProperty( p1, p2 );
    }
    else if( afun.equals( ATermUtils.SUBPROPFUN ) ) {
      ATerm p1 = axiom.getArgument( 0 );
      ATermAppl p2 = (ATermAppl) axiom.getArgument( 1 );

      defineProperty( p1 );
      defineProperty( p2 );
      kb.addSubProperty( p1, p2 );
View Full Code Here

   
    //two cases depending on input
    if(edge == null){
      //get all edges to this node
      for( int i = 0; i < applicableRoles.size(); i++ ){
        ATerm p = applicableRoles.get( i );
        Role role = abox.getRole( p );

        edges.addEdgeList( neighbor.getRNeighborEdges( role, node ) );
      }     
    }else{
View Full Code Here

      if (pred.isIrreflexive()) {
        abox.setClash(Clash.unexplained(subj, ds.union(pred.getExplainIrreflexive(), abox.doExplanation()),
                        "Irreflexive property " + pred));
      }
      else {
        ATerm notSelfP = ATermUtils.makeNot(ATermUtils.makeSelf(pred.getName()));
        if (subj.hasType(notSelfP)) {
          abox.setClash(Clash.unexplained(subj, ds.union(subj.getDepends(notSelfP), abox.doExplanation()),
                          "Local irreflexive property " + pred));
        }
      }
View Full Code Here

* @author Evren Sirin
*/
public class Block2 implements BlockingCondition {
  public boolean isBlocked(BlockingContext cxt) {
    for (ATermAppl av : cxt.blocker.getTypes(Node.ALL)) {
      ATerm p = av.getArgument(0);
      ATermAppl c = (ATermAppl) av.getArgument(1);
      Role s = cxt.blocked.getABox().getRole(p);

      if (p instanceof ATermList) {
        ATermList chain = (ATermList) p;
View Full Code Here

        term = ATermUtils.makePlainLiteral( lexicalValue );
    }
    else {
      String lexicalValue = constant.getLiteral();
      constant.getDatatype().accept( this );
      ATerm datatype = term;
 
      term = ATermUtils.makeTypedLiteral( lexicalValue, datatype.toString() );
    }
  }
View Full Code Here

TOP

Related Classes of aterm.ATerm

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.