Examples of OntoSpreadRelationWeight


Examples of org.ontospread.constraints.OntoSpreadRelationWeight

    return ontoSpreadProcess != null;
  }
  public void createProcess(LoadConfigurationForm lcform) throws ConceptNotFoundException {
    this.ontoSpreadProcess =OntoSpreadGuiUtils.createDefaultOntoSpreadProcess(lcform);
    RelationTO[] allRelations = this.ontoSpreadProcess.getOntologyDAO().getAllRelations();
    OntoSpreadRelationWeight relationWeight = this.ontoSpreadProcess.getRelationWeight();
    for (int i = 0; i < allRelations.length; i++) {
      if(
      Double.compare(relationWeight.getWeight(allRelations[i].getUri()),
          relationWeight.getDefault()) == 0){
        relationWeight.setWeight(allRelations[i].getUri(), relationWeight.getDefault());
      }
    }
   
  }
View Full Code Here

Examples of org.ontospread.constraints.OntoSpreadRelationWeight

  //  this.player.next();
  //  this.player.previous();
  }
 
  public void updateRelationsWeight(ScoredConceptTO[] relationConceptsTOs) {
    OntoSpreadRelationWeight relationWeight = this.getOntoSpreadProcess().getRelationWeight();
    for (int i = 0; i < relationConceptsTOs.length; i++) {
      relationWeight.setWeight(relationConceptsTOs[i].getConceptUri(), relationConceptsTOs[i].getScore());
    }
  }
View Full Code Here

Examples of org.ontospread.constraints.OntoSpreadRelationWeight

  private StateDAOPairTO execute(Test test, RestrictionManagerHelper manager) throws ConceptNotFoundException {
    logger.info("Execute");
    OntoSpreadState state = new OntoSpreadState();
    ScoredConceptTO[] initialConcepts = OntoSpreadTestUtils.createScoredConcepts(test.getOntoSpreadConfig().getInitialConcepts());
    state.setInitialConcepts(initialConcepts);
    OntoSpreadRelationWeight relationWeight = OntoSpreadTestUtils.createRelationWeight(test.getOntoSpreadConfig().getRelations().getLocations());
    OntologyDAO ontologyDAO = OntoSpreadTestUtils.createOntologyDAO(test.getResources().getLocations());
    OntoSpreadProcess process = new OntoSpreadProcess(
        ontologyDAO,
        OntoSpreadTestUtils.createDefaultPreAdjustment(test.getOntoSpreadConfig().getInitialConcepts().getValue()),
        OntoSpreadTestUtils.createDefaultRun(ontologyDAO, manager.asStopRestriction(),manager.asSelectRestriction(),relationWeight, manager.getDegradationFunction()),
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.