Examples of OntoSpreadPreAdjustmentConfig


Examples of org.ontospread.process.pre.OntoSpreadPreAdjustmentConfig

    return scoredConcepts.toArray(new ScoredConceptTO[uris.length]);
  }

  public static OntoSpreadPreAdjustment createDefaultPreAdjustment(){
    OntoSpreadPreAdjustment pre = new OntoSpreadPreAdjustmentImpl();
    OntoSpreadPreAdjustmentConfig ontoSpreadPreConfig = new OntoSpreadPreAdjustmentConfigImpl(10.0);
    pre.setOntoPreAdjustmentConfig(ontoSpreadPreConfig );
    return pre;
  }
View Full Code Here

Examples of org.ontospread.process.pre.OntoSpreadPreAdjustmentConfig

    }
    return scoredConcepts.toArray(new ScoredConceptTO[scoredConcepts.size()]);
  }
  public static OntoSpreadPreAdjustment createDefaultPreAdjustment(double value){
    OntoSpreadPreAdjustment pre = new OntoSpreadPreAdjustmentImpl();
    OntoSpreadPreAdjustmentConfig ontoSpreadPreConfig = new OntoSpreadPreAdjustmentConfigImpl(value);
    pre.setOntoPreAdjustmentConfig(ontoSpreadPreConfig );
    return pre;
  }
View Full Code Here

Examples of org.ontospread.process.pre.OntoSpreadPreAdjustmentConfig

    return scoredConcepts.toArray(new ScoredConceptTO[uris.length]);
  }

  public static OntoSpreadPreAdjustment createDefaultPreAdjustment(){
    OntoSpreadPreAdjustment pre = new OntoSpreadPreAdjustmentImpl();
    OntoSpreadPreAdjustmentConfig ontoSpreadPreConfig = new OntoSpreadPreAdjustmentConfigImpl(10.0);
    pre.setOntoPreAdjustmentConfig(ontoSpreadPreConfig );
    return pre;
  }
View Full Code Here

Examples of org.ontospread.process.pre.OntoSpreadPreAdjustmentConfig

public class OntoSpreadPreAdjustmentTest extends TestCase {

  public void testPreAdjustment() throws ConceptNotFoundException{
    OntoSpreadPreAdjustment pre = new OntoSpreadPreAdjustmentImpl();
    OntoSpreadPreAdjustmentConfig ontoSpreadPreConfig = new OntoSpreadPreAdjustmentConfigImpl(10.0);
    pre.setOntoPreAdjustmentConfig(ontoSpreadPreConfig );
    OntoSpreadState ontoSpreadState = new OntoSpreadState();
    ScoredConceptTO []initialConcepts = new ScoredConceptTO[10];
    double initialValue = 1.0;
    for(int i = 0; i<initialConcepts.length; i++){
      initialConcepts[i] = new ScoredConceptTO("http://uri",initialValue);
    }
    ontoSpreadState.setInitialConcepts(initialConcepts);
    pre.applyPreAdjustment(ontoSpreadState);
    initialConcepts = ontoSpreadState.getInitialConcepts();
    for(int i = 0; i< initialConcepts.length;i++){
      assertEquals(initialValue, initialConcepts[i].getScore());
    }
    assertEquals(ontoSpreadState.getCurrentScore(),ontoSpreadPreConfig.getInitialScore());
    List <UriDepthPair> sortedList = ontoSpreadState.getSortedList();
    assertEquals(initialConcepts.length, sortedList.size());
    for (UriDepthPair pair : sortedList) {
      assertEquals(1, pair.getDepth());
    }
View Full Code Here

Examples of org.ontospread.process.pre.OntoSpreadPreAdjustmentConfig

    return scoredConcepts.toArray(new ScoredConceptTO[uris.length]);
  }

  public static OntoSpreadPreAdjustment createDefaultPreAdjustment(){
    OntoSpreadPreAdjustment pre = new OntoSpreadPreAdjustmentImpl();
    OntoSpreadPreAdjustmentConfig ontoSpreadPreConfig = new OntoSpreadPreAdjustmentConfigImpl(10.0);
    pre.setOntoPreAdjustmentConfig(ontoSpreadPreConfig );
    return pre;
  }
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.