Examples of TaxonomyEntry


Examples of org.corrib.jonto.taxonomy.TaxonomyEntry

         
          Collection<TaxonomyContext<TaxonomyEntry>> cnts = Taxonomies.getInstance().getContexts();
          for(QueryRow qr: rt){
            String qv = qr.getValue(rt.getVariables().get(0)).toString();
           
            TaxonomyEntry taxEntry=null;
            for(TaxonomyContext<TaxonomyEntry> cnt:cnts)
            {
              if(qv.contains(cnt.getNamespaceURI()))
              {
                taxEntry = cnt.getEntryByUri(qv,null);
View Full Code Here

Examples of org.corrib.jonto.taxonomy.TaxonomyEntry

   * @return List of expanded <tt>QueryParameterEntries</tt> according to WordNet
   */
  private List<QueryParameterEntry> processEntry(
      QueryParameterEntry qpe,boolean precise) {
    List<QueryParameterEntry> result = new ArrayList<QueryParameterEntry>();
    TaxonomyEntry taxEntry = qpe.getTaxonomy();
    assert(taxEntry != null);
   
    Double rank = qpe.getRanking();
    if(rank == Double.NaN || rank == null){
      rank = 0.0D;
    }
    //use generalization of the given entry
    //possibly to find more results
    if((getDirection() == UP)||(precise)){
      TaxonomyEntry parent = TaxonomyStorage.getInstance().getParent(taxEntry);
      if(parent != null){
        QueryParameterEntry newqpe = new QueryParameterEntryImpl(parent.getLabel());
        newqpe.setRanking((rank == 0) ? m2resource.taxBoost : m2resource.taxBoost*rank);
        newqpe.setTaxonomy(parent);
        String newInfo = qpe.TellMeAbout()+parent.getLabel()+" has been retrieved as parent of "+taxEntry.getLabel()+" using Taxonomies within JONTO ";
        newqpe.AddInfo(newInfo);
        result.add(newqpe);
    //    //logger.info("wynik:" + newqpe.getTaxonomy().getLabel());
      }
    }else if ((getDirection() == DOWN)||(!precise)){
View Full Code Here

Examples of org.corrib.jonto.taxonomy.TaxonomyEntry

   
//    Resource res = statement.getSubject();
//    URI jontoURI = new URI(JOnto.JONTO_JO_ISIN_TAXONOMY_CONTEXT.toString());
   
   
    TaxonomyEntry category = null;
    //Statement context = RDFObjectFactory.getInstance().createStatement(statements, res, jontoURI, null);
   
 
   
//    TaxonomyContext<TaxonomyEntry> con =;
View Full Code Here

Examples of org.corrib.jonto.taxonomy.TaxonomyEntry

            if (taxonomy!=null)
            {
              List<TaxonomyEntry> taxEntries = new ArrayList<TaxonomyEntry>();
              for(String entry:taxList)
            {
              TaxonomyEntry taxonomyEntry = taxonomy.getEntryByUri(entry,null);
                taxEntries.add(taxonomyEntry);
            }
              domain.setClassification(taxEntries);
            }
        }
View Full Code Here

Examples of org.corrib.jonto.taxonomy.TaxonomyEntry

          TaxonomyContext<TaxonomyEntry> taxonomy = Taxonomies.getInstance().getContext(taxUri);
            if (taxonomy!=null)
            {
              for(String entry:taxList)
            {
              TaxonomyEntry taxonomyEntry = taxonomy.getEntryByUri(entry,null);
                taxEntries.add(taxonomyEntry);
            }
            }
        }
       
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.