ontoSpreadXMLState.getSpreadPathTable().getSpreadTableTOs().add(entry );
}
ontoSpreadXMLState.setFinalSpreadedConcepts(factory.createSpreadedConceptTOListType());
for (SpreadedConceptTO spreadedConcept : ontoSpreadState.getFinalSpreadedConcepts()) {
SpreadedConceptTOType spreadedXML = new SpreadedConceptTOType();
spreadedXML.setConceptUri(spreadedConcept.getConcept().getUri());
PathTO[] pathTOs = spreadedConcept.getSpreadPath();
for (PathTO pathTO : pathTOs) {
PathTOType pathToAdd = new PathTOType();
pathToAdd.setUri(pathTO.getConceptUri());
pathToAdd.setRelations(factory.createListUrisType());
if(pathTO.getRelationsUri() != null){
pathToAdd.getRelations().getRelations().addAll(Arrays.asList(pathTO.getRelationsUri()));
}
spreadedXML.setPathTOs(factory.createPathTOTypeList());
spreadedXML.getPathTOs().getPathTOs().add(pathToAdd);
}
spreadedXML.setScore(spreadedConcept.getScore());
ontoSpreadXMLState.getFinalSpreadedConcepts().getSpreadedConceptTOs().add(spreadedXML);
}
ontoSpreadXMLState.setUriDepthPair(factory.createUriDepthListType());
List<UriDepthPairType> uriDepthPairs = ontoSpreadXMLState.getUriDepthPair().getUriDepthPairs();