Package com.clarkparsia.pellet.rules.model

Examples of com.clarkparsia.pellet.rules.model.IndividualPropertyAtom


                }
                else if( argument2 == null ) {
                  addUnsupportedFeature( "Term not found " + SWRL.argument2 );
                }
                else {
                  atom = new IndividualPropertyAtom( pred, argument1, argument2 );
                }
      }
      else if( hasObject( atomNode, RDF.type.asNode(), SWRL.DifferentIndividualsAtom.asNode() ) ) {
        AtomIObject argument1 = null;
        AtomIObject argument2 = null;
View Full Code Here


      defineProperty( p );

      if( originalKB.isObjectProperty( p ) ) {
        kb.addObjectProperty( p );
        AtomIObject io2 = convertAtomIObject( i2 );
        atom = new IndividualPropertyAtom( p, io1, io2 );
      }
      else if( originalKB.isDatatypeProperty( p ) ) {
        kb.addDatatypeProperty( p );
        AtomDObject do2 = convertAtomDObject( i2 );
        atom = new DatavaluedPropertyAtom( p, io1, do2 );
View Full Code Here

    atom.getSecondArgument().accept( this );
    AtomIObject obj = swrlIObject;

    atom.getPredicate().accept( this );
    swrlAtom = new IndividualPropertyAtom( term, subj, obj );

  }
View Full Code Here

            RuleAtom atom = new DatavaluedPropertyAtom( p, var, arg );
            atoms.add(atom);
          }
          else {
            AtomIConstant arg = new AtomIConstant( nominal );
            RuleAtom atom = new IndividualPropertyAtom( p, var, arg );
            atoms.add(atom);
          }
        }
        else {
          varCount++;
          if( kb.isDatatypeProperty( p ) ) {
            AtomDObject newVar = new AtomDVariable( "var" + varCount );
            RuleAtom atom = new DatavaluedPropertyAtom( p, var, newVar );
            atoms.add(atom);
            processDatatype( newVar, filler, atoms );
          }
          else{
            AtomIObject newVar = new AtomIVariable( "var" + varCount );
            RuleAtom atom = new IndividualPropertyAtom( p, var, newVar );
            atoms.add(atom);
            varCount = processClass( newVar, filler, atoms, varCount );
          }
        }
      }
View Full Code Here

    // Process the body
    // First add the property atom pairs for each property
    for( ATermAppl property : properties ) {
      if( isObjectProperty( property ) ) {
        AtomIVariable z = new AtomIVariable( "z" + varId );
        body.add( new IndividualPropertyAtom( property, x, z ) );
        body.add( new IndividualPropertyAtom( property, y, z ) );
      }
      else if( isDatatypeProperty( property ) ) {
        AtomDVariable z = new AtomDVariable( "z" + varId );
        body.add( new DatavaluedPropertyAtom( property, x, z ) );
        body.add( new DatavaluedPropertyAtom( property, y, z ) );
View Full Code Here

    Map<AtomIObject, Set<ATermAppl>> types = new HashMap<AtomIObject, Set<ATermAppl>>();

    for( RuleAtom atom : rule.getBody() ) {
      if( atom instanceof IndividualPropertyAtom ) {
        IndividualPropertyAtom propAtom = (IndividualPropertyAtom) atom;
        ATermAppl prop = propAtom.getPredicate();

        AtomIObject subj = propAtom.getArgument1();
        if( subj instanceof AtomIVariable ) {
          Set<ATermAppl> domains = getRole( prop ).getDomains();
          if( domains != null )
            MultiMapUtils.addAll( types, subj, domains );
        }

        AtomIObject obj = propAtom.getArgument2();
        if( obj instanceof AtomIVariable ) {
          Set<ATermAppl> ranges = getRole( prop ).getRanges();
          if( ranges != null )
            MultiMapUtils.addAll( types, obj, ranges );
        }
View Full Code Here

    atom.getSecondArgument().accept( this );
    AtomIObject obj = swrlIObject;

    atom.getPredicate().accept( this );
    swrlAtom = new IndividualPropertyAtom( term, subj, obj );

  }
View Full Code Here

                }
                else if( argument2 == null ) {
                  addUnsupportedFeature( "Term not found " + SWRL.argument2 );
                }
                else {
                  atom = new IndividualPropertyAtom( pred, argument1, argument2 );
                }
      }
      else if( hasObject( atomNode, RDF.type.asNode(), SWRL.DifferentIndividualsAtom.asNode() ) ) {
        AtomIObject argument1 = null;
        AtomIObject argument2 = null;
View Full Code Here

    kb.addPropertyValue( r, j, k );

    AtomIVariable x = new AtomIVariable( "x" ), y = new AtomIVariable( "y" );
    AtomDVariable z = new AtomDVariable( "z" );

    RuleAtom body1 = new IndividualPropertyAtom( r, x, y );
    RuleAtom body2 = new DatavaluedPropertyAtom( p, x, z ), head = new DatavaluedPropertyAtom(
        p, y, z );

    Rule rule = new Rule( Collections.singleton( head ), Arrays.asList( new RuleAtom[] {
        body1, body2 } ) );
View Full Code Here

    kb.addPropertyValue( p, i, d );

    AtomIVariable x = new AtomIVariable( "x" ), y = new AtomIVariable( "y" );
    AtomDVariable z = new AtomDVariable( "z" );

    RuleAtom body1 = new IndividualPropertyAtom( r, x, y );
    RuleAtom body2 = new DatavaluedPropertyAtom( p, x, z ), head = new DatavaluedPropertyAtom(
        p, y, z );

    Rule rule = new Rule( Collections.singleton( head ), Arrays.asList( new RuleAtom[] {
        body1, body2 } ) );
View Full Code Here

TOP

Related Classes of com.clarkparsia.pellet.rules.model.IndividualPropertyAtom

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.