Examples of PathTO


Examples of org.ontospread.to.PathTO

      PathTOTypeList pathTOs = entry.getPathTOs();
      PathTO []path = new PathTO[pathTOs==null?0:pathTOs.getPathTOs().size()];
      if(pathTOs != null){
        int i = 0;
        for (PathTOType pathTo : pathTOs.getPathTOs()) {
          path[i++] = new PathTO(pathTo.getUri(),pathTo.getRelations().getRelations().toArray(new String[pathTo.getRelations().getRelations().size()]));
       
      }     
      spreadPathTable.put(key, path);     
    }
    ontoSpreadState.setSpreadPathTable(spreadPathTable);
   
    SpreadedConceptTO[] result = new SpreadedConceptTO[ontoSpreadXMLState.getFinalSpreadedConcepts().getSpreadedConceptTOs().size()];
    int i = 0;
    for (SpreadedConceptTOType spreadedXML : ontoSpreadXMLState.getFinalSpreadedConcepts().getSpreadedConceptTOs()){
      PathTOTypeList pathTOs = spreadedXML.getPathTOs();
      PathTO []path = new PathTO[pathTOs==null?0:pathTOs.getPathTOs().size()];
      if(pathTOs != null){
        int j = 0;
        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());
View Full Code Here

Examples of org.ontospread.to.PathTO

      PathTOTypeList pathTOs = entry.getPathTOs();
      PathTO []path = new PathTO[pathTOs==null?0:pathTOs.getPathTOs().size()];
      if(pathTOs != null){
        int i = 0;
        for (PathTOType pathTo : pathTOs.getPathTOs()) {
          path[i++] = new PathTO(pathTo.getUri(),pathTo.getRelations().getRelations().toArray(new String[pathTo.getRelations().getRelations().size()]));
       
      }     
      spreadPathTable.put(key, path);     
    }
    ontoSpreadState.setSpreadPathTable(spreadPathTable);
   
    SpreadedConceptTO[] result = new SpreadedConceptTO[ontoSpreadXMLState.getFinalSpreadedConcepts().getSpreadedConceptTOs().size()];
    int i = 0;
    for (SpreadedConceptTOType spreadedXML : ontoSpreadXMLState.getFinalSpreadedConcepts().getSpreadedConceptTOs()){
      PathTOTypeList pathTOs = spreadedXML.getPathTOs();
      PathTO []path = new PathTO[pathTOs==null?0:pathTOs.getPathTOs().size()];
      if(pathTOs != null){
        int j = 0;
        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());
View Full Code Here

Examples of org.ontospread.to.PathTO

        finalSpreadedConcepts.toArray(new SpreadedConceptTO[finalSpreadedConcepts.size()]));
    Map <String,PathTO[]>spreadPathTable = new HashMap<String,PathTO[]>();
    for(int i = 0;i<spreaded.length;i++){
      PathTO []value = new PathTO[3];
      for(int j=0; j<value.length;j++){
        value[j]=new PathTO(spreaded[i]+"."+j, new String[0]);
      }
      spreadPathTable.put(spreaded[i], value);
    }
    ontoSpreadState.setSpreadPathTable(spreadPathTable);
    ontoSpreadState.setConceptToSpread(new ConceptTO("http://uri.concept.spread"));
View Full Code Here

Examples of org.ontospread.to.PathTO

                newSpreadPath = new PathTO[spreadPath.length];
              }else{
                newSpreadPath = new PathTO[spreadPath.length+1];
              }
              System.arraycopy(spreadPath, 0, newSpreadPath, 0, spreadPath.length);
              newSpreadPath[newSpreadPath.length - 1] = new PathTO(fromUri,relations.toArray(new String[relations.size()]));
              spreadPathTable.put(conceptRelatedUri, newSpreadPath);
          }else{
              /************** Prize relations ********************/           
              PathTO []  pathOld = spreadPath;
              PathTO [] pathNew = (PathTO[]) spreadPathTable.get(conceptRelatedUri);
View Full Code Here

Examples of org.ontospread.to.PathTO

            System.arraycopy(spreadPath, 0, newSpreadPath, 0, spreadPath.length);
            List<String> relations = new LinkedList<String>();
            if(relation != null) {
              relations.add(relation);           
            }
            newSpreadPath[newSpreadPath.length - 1] = new PathTO(concept,
                relations.toArray(new String[relations.size()]));
            ontoSpreadState.getSpreadPathTable().put(concept, newSpreadPath);           
        }
    }
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.