Package com.clarkparsia.pellet.rules.model

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


                }
                else if( argument == null ) {
                  addUnsupportedFeature( "Term not found " + SWRL.argument1 );
                }
                else {
                  atom = new DataRangeAtom( datatype, argument );
                }
      }

      if( atom == null ) {
        addUnsupportedFeature( "Ignoring SWRL " + atomType + ": " + atomNode );
View Full Code Here


  public void visit(SWRLDataRangeAtom atom) {
    // set the term field
    atom.getPredicate().accept( this );

    atom.getArgument().accept( this );
    swrlAtom = new DataRangeAtom( term, swrlDObject );
  }
View Full Code Here

        }
      }
      else if( afun.equals( ATermUtils.RESTRDATATYPEFUN ) ) {
        ATermAppl baseDatatype = (ATermAppl) c.getArgument( 0 );
       
        atoms.add( new DataRangeAtom( baseDatatype, var ) );
       
        for( ATermList list = (ATermList) c.getArgument( 1 ); !list.isEmpty(); list = list.getNext() ) {
          ATermAppl facetRestriction = (ATermAppl) list.getFirst();       
          ATermAppl facet = (ATermAppl) facetRestriction.getArgument( 0 );       
          String builtin = FACETS.get( facet );
          if( builtin != null ) {         
            ATermAppl value = (ATermAppl) facetRestriction.getArgument( 1 );
            atoms.add( new BuiltInAtom( builtin, var, new AtomDConstant( value ) ) );
          }
          else {
            atoms.add( new DataRangeAtom( c, var ) );
            return;
          }
        }     
      }
      else {
        atoms.add( new DataRangeAtom( c, var ) );
      }
    }   
View Full Code Here

  public void visit(SWRLDataRangeAtom atom) {
    // set the term field
    atom.getPredicate().accept( this );

    atom.getArgument().accept( this );
    swrlAtom = new DataRangeAtom( term, swrlDObject );
  }
View Full Code Here

                }
                else if( argument == null ) {
                  addUnsupportedFeature( "Term not found " + SWRL.argument1 );
                }
                else {
                  atom = new DataRangeAtom( datatype, argument );
                }
      }

      if( atom == null ) {
        addUnsupportedFeature( "Ignoring SWRL " + atomType + ": " + atomNode );
View Full Code Here

    assertEquals(triple, ruleTranslator.translateAtom(atom, DependencySet.INDEPENDENT));
  }

  @Test
  public void testDataRangeAtom() {
    DataRangeAtom atom = new DataRangeAtom(XSDString.getInstance().getName(), vz);
    assertNull(ruleTranslator.translateAtom(atom, DependencySet.INDEPENDENT));
  }
View Full Code Here

      }
    }
    else if( afun.equals( ATermUtils.RESTRDATATYPEFUN ) ) {
      ATermAppl baseDatatype = (ATermAppl) c.getArgument( 0 );
     
      atoms.add( new DataRangeAtom( baseDatatype, var ) );
     
      for( ATermList list = (ATermList) c.getArgument( 1 ); !list.isEmpty(); list = list.getNext() ) {
        ATermAppl facetRestriction = (ATermAppl) list.getFirst();       
        ATermAppl facet = (ATermAppl) facetRestriction.getArgument( 0 );       
        String builtin = FACETS.get( facet );
        if( builtin != null ) {         
          ATermAppl value = (ATermAppl) facetRestriction.getArgument( 1 );
          atoms.add( new BuiltInAtom( builtin, var, new AtomDConstant( value ) ) );
        }
        else {
          atoms.add( new DataRangeAtom( c, var ) );
          return;
        }
      }     
    }
    else {
      atoms.add( new DataRangeAtom( c, var ) );
    }
  }
View Full Code Here

  }

  @Test
  public void testDataRangeBindingHelper() {
    DatavaluedPropertyAtom pattern = new DatavaluedPropertyAtom(dp2, x, z);
    DataRangeAtom atom = new DataRangeAtom(ATermUtils.makeTermAppl(Namespaces.XSD + "integer"), z);

    BindingHelper patternHelper = new DatavaluePropertyBindingHelper(kb.getABox(), pattern);
    BindingHelper rangeHelper = new DataRangeBindingHelper(kb.getABox(), atom);
    BindingGenerator gen = new BindingGeneratorImpl(kb.getABox(), new VariableBinding(kb.getABox()), Arrays
                    .asList(new BindingHelper[] { patternHelper, rangeHelper, }));
View Full Code Here

TOP

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

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.