Package de.fuberlin.wiwiss.d2rq.find.URIMakerRule

Examples of de.fuberlin.wiwiss.d2rq.find.URIMakerRule.URIMakerRuleChecker


 

  private List<TripleRelation> selectedTripleRelations() {
    URIMakerRule rule = new URIMakerRule();
    List<TripleRelation> sortedTripleRelations = rule.sortRDFRelations(tripleRelations);
    URIMakerRuleChecker subjectChecker = rule.createRuleChecker(triplePattern.getSubject());
    URIMakerRuleChecker predicateChecker = rule.createRuleChecker(triplePattern.getPredicate());
    URIMakerRuleChecker objectChecker = rule.createRuleChecker(triplePattern.getObject());
    List<TripleRelation> result = new ArrayList<TripleRelation>();
    for (TripleRelation tripleRelation: sortedTripleRelations) {
      TripleRelation selectedTripleRelation = tripleRelation.selectTriple(triplePattern);
      if (selectedTripleRelation != null
          && subjectChecker.canMatch(tripleRelation.nodeMaker(TripleRelation.SUBJECT))
          && predicateChecker.canMatch(tripleRelation.nodeMaker(TripleRelation.PREDICATE))
          && objectChecker.canMatch(tripleRelation.nodeMaker(TripleRelation.OBJECT))) {
        subjectChecker.addPotentialMatch(tripleRelation.nodeMaker(TripleRelation.SUBJECT));
        predicateChecker.addPotentialMatch(tripleRelation.nodeMaker(TripleRelation.PREDICATE));
        objectChecker.addPotentialMatch(tripleRelation.nodeMaker(TripleRelation.OBJECT));
        TripleRelation r = new JoinOptimizer(selectedTripleRelation).optimize();
        if (limitPerRelation != Relation.NO_LIMIT) {
          r = r.limit(limitPerRelation);
        }
        result.add(r);
View Full Code Here

TOP

Related Classes of de.fuberlin.wiwiss.d2rq.find.URIMakerRule.URIMakerRuleChecker

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.