Package edu.pitt.terminology.lexicon

Examples of edu.pitt.terminology.lexicon.SemanticType


      Iterator<String> styIterator = stys.iterator();
      int tdx = 0;
      while (tuiIterator.hasNext() && styIterator.hasNext()) {
        String sty = styIterator.next();
        String tui = tuiIterator.next();
        semTypeFilters[tdx++] = new SemanticType(sty, tui);
      }
      coder.setFilterSemanticType(semTypeFilters);
    } else {
      coder.setFilterSemanticType(null);
    }
View Full Code Here


          if(c != null){
            // filter out by source
            if(filterSemTypes != null && !filterSemTypes.contains(text)){
              removeConcept(c);
            }else{
              c.addSemanticType(new SemanticType(text,tui));
              // replace with new concept
              conceptMap.put(cui,c.getContent());
            }
          }
        }
View Full Code Here

    if (!StringUtils.isEmpty(colonSeparatedTuis) && !StringUtils.isEmpty(colonSeparatedStys)) {
      final String[] tuis = colonSeparatedTuis.split(":");
      final String[] stys = colonSeparatedStys.split(":");
      final SemanticType[] semTypeFilters = new SemanticType[tuis.length];
      for (int tdx = 0; tdx < tuis.length; tdx++) {
        semTypeFilters[tdx] = new SemanticType(stys[tdx],tuis[tdx]);
      }
      terminology.setFilterSemanticType(semTypeFilters);
    }
    else {
      terminology.setFilterSemanticType(null);
View Full Code Here

          concept.setTerms(terms.toArray(new Term [0]));
          concept.setDefinitions(defs.toArray(new Definition[0]));
          concept.setSources(sources.toArray(new Source [0]));
          concept.setProperties(props);
          if(props.containsKey("Semantic_Type")){
            concept.setSemanticTypes(new SemanticType []{new SemanticType(props.getProperty("Semantic_Type"))});
          }
         
          concept.setInitialized(true);
         
          return concept;
View Full Code Here

    IProperty sem_p = ont.getProperty("Semantic_Type");
    if(sem_p != null){
      Object [] val = cls.getPropertyValues(sem_p);
      SemanticType [] types = new SemanticType [val.length];
      for(int i=0;i<val.length;i++){
        types[i] = new SemanticType(val[i].toString());
      }
      setSemanticTypes(types);
    }
   
    // do codes
View Full Code Here

    IProperty sem_p = ont.getProperty(BioPortalHelper.SEMANTIC_TYPE);
    if(sem_p != null){
      Object [] val = cls.getPropertyValues(sem_p);
      SemanticType [] types = new SemanticType [val.length];
      for(int i=0;i<val.length;i++){
        types[i] = new SemanticType(val[i].toString());
      }
      setSemanticTypes(types);
    }
  }
View Full Code Here

      if(properties.containsKey(SEMANTIC_TYPE)){
        Object val = properties.get(SEMANTIC_TYPE);
        List<SemanticType> sems = new ArrayList<SemanticType>();
        if(val instanceof Collection){
          for(Object o :(Collection) val)
            sems.add(new SemanticType(""+o));
        }else
          sems.add(new SemanticType(""+val));
        concept.setSemanticTypes(sems.toArray(new SemanticType [0]));
      }
     
     
    }
View Full Code Here

TOP

Related Classes of edu.pitt.terminology.lexicon.SemanticType

Copyright © 2018 www.massapicom. 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.