Examples of KOSContext


Examples of org.corrib.jonto.kos.KOSContext

        Map<String,String> tmpMapForThesUris = new HashMap<String, String>();
       
       
        for(ThesaurusEntry thesaurusEntry : thesClassList)
        {
          KOSContext context = thesaurusEntry.getContext();
          Map<String,String> mapToPut = null;
          if(!contextNames.contains(context.getLabel()))
          {
            contextNames.add(context.getLabel());
           
            mapToPut = new HashMap<String, String>();
          }
          else
          {
            mapToPut = tmpThesValues.get(context.getLabel());
          }
          mapToPut.put(thesaurusEntry.getURI().toString(),thesaurusEntry.getLabel());
          tmpThesValues.put(context.getLabel(),mapToPut);
          if(tmpMapForThesUris.get(context.getLabel())==null)
            tmpMapForThesUris.put(context.getLabel(), context.getNamespaceURI());
        }
     
        Set<String> thess= tmpThesValues.keySet();
        for(String thes:thess)
        {
          thesauri.put(thes,tmpMapForThesUris.get(thes));
          thesMap.put(thes, tmpThesValues.get(thes));
        }
      }
         
      dd.setThesauri(thesauri);
      dd.setThesaurusValues(thesMap);
     
      //old-style ddc classification description fetch.
      //TODO: check for DDC implementation
      /*if(ddcClassList!=null&&!ddcClassList.isEmpty())
      {
        String tax1 = "DDC";
        String tax_uri = "";
        try
        {
          tax_uri = DdcContext.getContext().getNamespaceURI();
        }
        catch (IOException e)
        {
          // TODO Auto-generated catch block
          e.printStackTrace();
        }
        taxonomies.put(tax1, tax_uri);
       
        Map<String,String> taxValues = new HashMap<String, String>();
        for(DdcClassification ddcc : ddcClassList)
        {
          taxValues.put(ddcc.getURI(),ddcc.getName());
        }
     
        taxMap.put(tax1, taxValues);
      }*/
     
      //all taxonomies description fetch
      if(taxClassList!=null&&!taxClassList.isEmpty())
      {
 
        Collection<String> contextNames = new ArrayList<String>();
        Map<String,Map<String,String>> tmpTaxValues = new HashMap<String,Map<String,String>>();
        Map<String,String> tmpMapForTaxUris = new HashMap<String, String>();
       
       
        for(TaxonomyEntry taxonomyEntry : taxClassList)
        {
          KOSContext context = taxonomyEntry.getContext();
          Map<String,String> mapToPut = null;
          if(!contextNames.contains(context.getLabel()))
          {
            contextNames.add(context.getLabel());
           
            mapToPut = new HashMap<String, String>();
          }
          else
          {
            mapToPut = tmpTaxValues.get(context.getLabel());
          }
          mapToPut.put(taxonomyEntry.getURI().toString(),taxonomyEntry.getLabel());
          tmpTaxValues.put(context.getLabel(),mapToPut);
          if(tmpMapForTaxUris.get(context.getLabel())==null)
            tmpMapForTaxUris.put(context.getLabel(), context.getNamespaceURI());
        }
     
        Set<String> taxes = tmpTaxValues.keySet();
        for(String tax:taxes)
        {
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.