Examples of SWRLAtomIObject


Examples of org.semanticweb.owl.model.SWRLAtomIObject

  }

  public void visit(SWRLClassAtom atom) {
    OWLDescription c = atom.getPredicate();

    SWRLAtomIObject v = atom.getArgument();
    v.accept( this );

    AtomIObject subj = swrlIObject;

    c.accept( this );
    swrlAtom = new ClassAtom( term, subj );
View Full Code Here

Examples of org.semanticweb.owl.model.SWRLAtomIObject

  private SWRLAtom parseToSWRLAtom(ATermAppl term) {
    SWRLAtom atom = null;

    if( term.getAFun().equals( ATermUtils.TYPEFUN ) ) {
      ATermAppl i = (ATermAppl) term.getArgument( 0 );
      SWRLAtomIObject io = parseToAtomIObject( i );

      OWLDescription c = (OWLDescription) conceptConverter.convert( (ATermAppl) term
          .getArgument( 1 ) );

      atom = factory.getSWRLClassAtom( c, io );
    }
    else if( term.getAFun().equals( ATermUtils.PROPFUN ) ) {
      ATermAppl p = (ATermAppl) term.getArgument( 0 );
      ATermAppl i1 = (ATermAppl) term.getArgument( 1 );
      ATermAppl i2 = (ATermAppl) term.getArgument( 2 );
      SWRLAtomIObject io1 = parseToAtomIObject( i1 );

      if( kb.isObjectProperty( p ) ) {
        SWRLAtomIObject io2 = parseToAtomIObject( i2 );
        OWLObjectProperty op = factory.getOWLObjectProperty( URI.create( p.getName() ) );
        atom = factory.getSWRLObjectPropertyAtom( op, io1, io2 );
      }
      else if( kb.isDatatypeProperty( p ) ) {
        SWRLAtomDObject do2 = parseToAtomDObject( i2 );
        OWLDataProperty dp = factory.getOWLDataProperty( URI.create( p.getName() ) );
        atom = factory.getSWRLDataValuedPropertyAtom( dp, io1, do2 );
      }
    }
    else if( term.getAFun().equals( ATermUtils.SAMEASFUN ) ) {
      ATermAppl i1 = (ATermAppl) term.getArgument( 0 );
      ATermAppl i2 = (ATermAppl) term.getArgument( 1 );
      SWRLAtomIObject io1 = parseToAtomIObject( i1 );
      SWRLAtomIObject io2 = parseToAtomIObject( i2 );
     
      atom = factory.getSWRLSameAsAtom( io1, io2 );     
    }
    else if( term.getAFun().equals( ATermUtils.DIFFERENTFUN ) ) {
      ATermAppl i1 = (ATermAppl) term.getArgument( 0 );
      ATermAppl i2 = (ATermAppl) term.getArgument( 1 );
      SWRLAtomIObject io1 = parseToAtomIObject( i1 );
      SWRLAtomIObject io2 = parseToAtomIObject( i2 );
     
      atom = factory.getSWRLDifferentFromAtom( io1, io2 );     
    }
    else if( term.getAFun().equals( ATermUtils.BUILTINFUN ) ) {
      ATermList args = (ATermList) term.getArgument( 0 );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.