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>();
for (UriDepthPairType uriXMLPair : ontoSpreadXMLState.getUriDepthPair().getUriDepthPairs()) {
sortedList.add(new UriDepthPair(uriXMLPair.getConceptUri(),uriXMLPair.getDepth()));
}
ontoSpreadState.setSortedList(sortedList);
Map<String, Double> concepts = new HashMap<String, Double>();
for (EntryConceptsType entryXML : ontoSpreadXMLState.getConcepts().getEntryConceptTOs()) {
concepts.put(entryXML.getUri(), entryXML.getValue());
}
ontoSpreadState.setConcepts(concepts );
HashMap<PathTO, Integer> prizeTable = ontoSpreadState.getConceptsToPrize().getPrizeTable();
for (EntryPrizeTableTOType entry : ontoSpreadXMLState.getPrizeTable().getEntryPrizeTableTOs()) {
int value = entry.getHits();
PathTO pathTO = new PathTO(entry.getPathTO().getUri(),entry.getPathTO().getRelations().getRelations().toArray(new String[entry.getPathTO().getRelations().getRelations().size()]));
prizeTable.put(pathTO , value);
}
ontoSpreadState.setConceptToSpread(new ConceptTO(ontoSpreadXMLState.getConceptTOSpread()));
ontoSpreadState.setHasIteration( ontoSpreadXMLState.isHasIteration());
ontoSpreadState.setCurrentScore(ontoSpreadXMLState.getCurrentScore());
return ontoSpreadState;
}