Package com.clarkparsia.owlwg.testcase.filter

Examples of com.clarkparsia.owlwg.testcase.filter.FilterCondition


    log = Logger.getLogger( FilterConditionParser.class.getCanonicalName() );
  }

  public static FilterCondition parse(String filterString) {

    FilterCondition filter;
    LinkedList<FilterCondition> filterStack = new LinkedList<FilterCondition>();
    String[] splits = filterString.split( "\\s" );
    for( int i = 0; i < splits.length; i++ ) {
      if( splits[i].equalsIgnoreCase( "and" ) ) {
        ConjunctionFilter and = ConjunctionFilter.and( filterStack );
        filterStack.clear();
        filterStack.add( and );
      }
      else if( splits[i].equalsIgnoreCase( "approved" ) ) {
        filterStack.add( StatusFilter.APPROVED );
      }
      else if( splits[i].equalsIgnoreCase( "direct" ) ) {
        filterStack.add( new SemanticsFilter( Semantics.DIRECT ) );
      }
      else if( splits[i].equalsIgnoreCase( "dl" ) ) {
        filterStack.add( SatisfiedSyntaxConstraintFilter.DL );
      }
      else if( splits[i].equalsIgnoreCase( "!dl" ) ) {
        filterStack.add( new UnsatisfiedSyntaxConstraintFilter( SyntaxConstraint.DL ) );
      }
      else if( splits[i].equalsIgnoreCase( "el" ) ) {
        filterStack.add( SatisfiedSyntaxConstraintFilter.EL );
      }
      else if( splits[i].equalsIgnoreCase( "!el" ) ) {
        filterStack.add( new UnsatisfiedSyntaxConstraintFilter( SyntaxConstraint.EL ) );
      }
      else if( splits[i].equalsIgnoreCase( "extracredit" ) ) {
        filterStack.add( StatusFilter.EXTRACREDIT );
      }
      else if( splits[i].equalsIgnoreCase( "not" ) ) {
        FilterCondition a = filterStack.removeLast();
        filterStack.add( NegationFilter.not( a ) );
      }
      else if( splits[i].equalsIgnoreCase( "or" ) ) {
        DisjunctionFilter or = DisjunctionFilter.or( filterStack );
        filterStack.clear();
View Full Code Here


  @Parameters
    public static List<Object[]> data() throws OWLOntologyCreationException, OWLOntologyChangeException {
      final OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
      OwlApi3TestCaseFactory factory = new OwlApi3TestCaseFactory();
     
      FilterCondition filter = FilterConditionParser.parse( "approved proposed extracredit or direct dl and" );
     
     
      /*
     * Load the test and results ontology from local files before
     * reading the test cases, otherwise import of them is likely to
View Full Code Here

TOP

Related Classes of com.clarkparsia.owlwg.testcase.filter.FilterCondition

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.