Examples of SemanticType


Examples of edu.pitt.terminology.lexicon.SemanticType

    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

Examples of edu.pitt.terminology.lexicon.SemanticType

          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

Examples of edu.pitt.terminology.lexicon.SemanticType

    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

Examples of edu.pitt.terminology.lexicon.SemanticType

    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

Examples of edu.pitt.terminology.lexicon.SemanticType

      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

Examples of edu.ucla.sspace.beagle.Beagle.SemanticType

    /**
     * {@inheritDoc}
     */
    public SemanticSpace getSpace() {
        SemanticType type = (argOptions.hasOption('s'))
            ? SemanticType.valueOf(
                    argOptions.getStringOption('s').toUpperCase())
            : SemanticType.COMPOSITE;

        return new Beagle(dimension, type, generatorMap);
View Full Code Here

Examples of org.opengis.style.SemanticType

    public void setSemanticTypeIdentifiers(String[] types) {
        semantics.clear();
       
        for(String id : types){
           
            SemanticType st = SemanticType.valueOf(id);
           
            if(st != null) semantics.add(st);
        }
       
    }
View Full Code Here

Examples of wycs.core.SemanticType

      SyntacticType.Set t = (SyntacticType.Set) type;
      return SemanticType.Set(true,convert(t.element,generics,context));
    } else if(type instanceof SyntacticType.Map) {
      // FIXME: need to include the map constraints here
      SyntacticType.Map t = (SyntacticType.Map) type;
      SemanticType key = convert(t.key,generics,context);
      SemanticType value = convert(t.value,generics,context);
      if (key instanceof SemanticType.Void
          || value instanceof SemanticType.Void) {
        // surprisingly, this case is possible and does occur.
        return SemanticType.Set(true, SemanticType.Void);
      } else {
        return SemanticType.Set(true, SemanticType.Tuple(key, value));
      }
    } else if(type instanceof SyntacticType.List) {
      // FIXME: need to include the list constraints here
      SyntacticType.List t = (SyntacticType.List) type;
      SemanticType element = convert(t.element,generics,context);
      if (element instanceof SemanticType.Void) {
        // surprisingly, this case is possible and does occur.
        return SemanticType.Set(true, SemanticType.Void);
      } else {
        return SemanticType.Set(true,
View Full Code Here

Examples of wycs.core.SemanticType

  private WycsFile getModuleStub(WyalFile wyalFile) {
    ArrayList<WycsFile.Declaration> declarations = new ArrayList<WycsFile.Declaration>();
    for (WyalFile.Declaration d : wyalFile.declarations()) {
      if (d instanceof WyalFile.Macro) {
        WyalFile.Macro def = (WyalFile.Macro) d;
        SemanticType from = convert(def.from, def.generics, d);
        SemanticType to = SemanticType.Bool;
        SemanticType.Var[] generics = new SemanticType.Var[def.generics
            .size()];
        for (int i = 0; i != generics.length; ++i) {
          generics[i] = SemanticType.Var(def.generics.get(i));
        }
        SemanticType.Function type = SemanticType.Function(from, to,
            generics);
        declarations.add(new WycsFile.Macro(def.name, type, null, def
            .attribute(Attribute.Source.class)));
      } else if (d instanceof WyalFile.Function) {
        WyalFile.Function fun = (WyalFile.Function) d;
        SemanticType from = convert(fun.from, fun.generics, d);
        SemanticType to = convert(fun.to, fun.generics, d);
        SemanticType.Var[] generics = new SemanticType.Var[fun.generics
            .size()];
        for (int i = 0; i != generics.length; ++i) {
          generics[i] = SemanticType.Var(fun.generics.get(i));
        }
View Full Code Here

Examples of wycs.core.SemanticType

    HashMap<String,Integer> nEnvironment = new HashMap<String,Integer>(environment);
    Pair<SemanticType,Integer>[] variables = code.types;
    int[] vars = new int[variables.length];
    for (int i = 0; i != variables.length; ++i) {
      Pair<SemanticType,Integer> p = variables[i];
      SemanticType type = p.first();
      String var = "r" + p.second();
      int varIdx = Var(automaton, var);
      nEnvironment.put(var, varIdx);
      int srcIdx;
      // FIXME: generate actual type of variable here
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.