Package org.wymiwyg.knobot.relations

Examples of org.wymiwyg.knobot.relations.InverseDirectRelationIterator


            float minimalRelevance, int till) {
        List resultList = new ArrayList();
        //TopicsList topicsList = new TopicsList(resource, 0);
        RelationIterator iter = new StrengthSortedRelationIterator(
                new InverseIndirectRelationIterator(
                        new InverseDirectRelationIterator(resource),
                        minimalRelevance));
        try {
            for (int i = 0; i < till; i++) {
                Relation current = iter.nextRelation();
                if (current.getStrength() < minimalRelevance) {
View Full Code Here


     */
    public static List addInverseRelations(Resource resource, Model resultModel,
        float minimalRelevance) {
      RelationIterator iter = new StrengthSortedRelationIterator(
          new InverseIndirectRelationIterator(
              new InverseDirectRelationIterator(resource),
              minimalRelevance));
      //TopicsList topicsList = new TopicsList(resource, 0);
      List result = new ArrayList();
      try {
        for (int i = 0; i < 5; i++) {
View Full Code Here

        Resource target = current.getTarget();
        if (target == null) {
          log.warn("target is null");
          continue;
        }
        RelationIterator inverseIter = new InverseDirectRelationIterator(
            target);
        while (inverseIter.hasNext()) {
          Relation currentInverse = inverseIter.nextRelation();
          if (/*
             * (current.getComparativeStrength() >
             * resourceThreshold) ||
             */(!currentInverse.getSource().equals(resource) && (current
              .getCurrentComparativeStrength() > otherThreshold))) {
View Full Code Here

  /**
   * @param target
   * @param removedModel
   */
  private void removeRelationsToTarget(Resource target, Model removedModel) {
    RelationIterator inverseIter = new InverseDirectRelationIterator(target);
    while (inverseIter.hasNext()) {
      Relation currentInverse = inverseIter.nextRelation();
      Resource relationResource = ((ConcreteRelation) currentInverse)
          .getRealResource();
      try {
        RelationManager.removeRelation(relationResource);
      } catch (Exception ex) {
View Full Code Here

TOP

Related Classes of org.wymiwyg.knobot.relations.InverseDirectRelationIterator

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.