Package org.ontospread.to

Examples of org.ontospread.to.SpreadedConceptTO


          path[j++] = new PathTO(pathTo.getUri(),
              pathTo.getRelations().getRelations().toArray(new String[pathTo.getRelations().getRelations().size()]));
       
      }     
      double score = spreadedXML.getScore();
      result[i++] = new SpreadedConceptTO(new ConceptTO(spreadedXML.getConceptUri()),path,score );
     
    }
    ontoSpreadState.setFinalSpreadedConcepts(result);
   
    List<UriDepthPair> sortedList = new LinkedList<UriDepthPair>();
View Full Code Here


        for (PathTOType pathTo : pathTOs.getPathTOs()) {
          path[j++] = new PathTO(pathTo.getUri(),pathTo.getRelations().getRelations().toArray(new String[pathTo.getRelations().getRelations().size()]));
       
      }     
      double score = spreadedXML.getScore();
      result[i++] = new SpreadedConceptTO(new ConceptTO(spreadedXML.getConceptUri()),path,score );
     
    }
    ontoSpreadState.setFinalSpreadedConcepts(result);
   
    List<UriDepthPair> sortedList = new LinkedList<UriDepthPair>();
View Full Code Here

        ontoSpreadState);   
    while(player.hasNext()){
      ontoSpreadState = player.next();     
    }
   
    SpreadedConceptTO spreadedConcepts[] = ontoSpreadState.getFinalSpreadedConcepts();
    for (int i = 0; i < spreadedConcepts.length; i++) {
      System.out.println(spreadedConcepts[i]);
    }
   
  }
View Full Code Here

  }
 
  class CompareFinaSpreadConcepts implements Comparator{

    public int compare(Object o1, Object o2) {
      SpreadedConceptTO spreadedConceptTO1  = (SpreadedConceptTO) o1;
      SpreadedConceptTO spreadedConceptTO2  = (SpreadedConceptTO) o2;
      return Double.compare(spreadedConceptTO2.getScore(),spreadedConceptTO1.getScore());
    }
View Full Code Here

          PathTO[] spreadPathTOs = OntoSpreadCommonUtils.getSpreadPath(spreadPathTable,uri);
//              ConceptTO[] spreadPath = new ConceptTO[spreadPathUris.length];
//              for ( int j = 0 ; j < spreadPath.length ; j++ ) {
//                  spreadPath[j] = getConceptTO(spreadPathUris[j].getConceptUri());
//              }
              final SpreadedConceptTO pair = new SpreadedConceptTO(concept, spreadPathTOs,
                      ((Double) concepts.get(uri)).doubleValue());
              resultList.add(pair);
    }
        return (SpreadedConceptTO[]) resultList.toArray(new SpreadedConceptTO[resultList.size()]);
    }
View Full Code Here

    }
    ontoSpreadState.setSpreadedConcepts(spreadedConcepts);
    List <SpreadedConceptTO>finalSpreadedConcepts = new LinkedList<SpreadedConceptTO>();
    for(int i = 0; i<spreaded.length;i++){
      finalSpreadedConcepts.add(
          new SpreadedConceptTO(new ConceptTO(spreaded[i]),new PathTO[]{},i));
    }
    ontoSpreadState.setFinalSpreadedConcepts((SpreadedConceptTO[])
        finalSpreadedConcepts.toArray(new SpreadedConceptTO[finalSpreadedConcepts.size()]));
    Map <String,PathTO[]>spreadPathTable = new HashMap<String,PathTO[]>();
    for(int i = 0;i<spreaded.length;i++){
View Full Code Here

TOP

Related Classes of org.ontospread.to.SpreadedConceptTO

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.