Examples of lookupConcept()


Examples of au.csiro.snorocket.core.concurrent.CR.lookupConcept()

        final Context ctx = contextIndex.get(key);
        CR succ = ctx.getSucc();
       
        for(int roleId : succ.getRoles()) {
            NamedRole role = new NamedRole(factory.lookupRoleId(roleId).toString());
            IConceptSet values = getLeaves(succ.lookupConcept(roleId));
            for (IntIterator itr2 = values.iterator(); itr2.hasNext(); ) {
                int valueInt = itr2.next();
                if (!factory.isVirtualConcept(valueInt)) {
                    final String valueId = factory.lookupConceptId(valueInt).toString();
                    result.add(new Existential(role, new NamedConcept(valueId)));
View Full Code Here

Examples of au.csiro.snorocket.core.concurrent.CR.lookupConcept()

                }
            }
           
            int[] succRoles = succ.getRoles();
            for(int i = 0; i < succRoles.length; i++) {
                IConceptSet cs = succ.lookupConcept(succRoles[i]);
                for(IntIterator it2 = cs.iterator(); it2.hasNext(); ) {
                    int succC = it2.next();
                    r.store(concept, succRoles[i], succC);
                }
            }
View Full Code Here

Examples of au.csiro.snorocket.core.concurrent.CR.lookupConcept()

                }
            }
           
            int[] succRoles = succ.getRoles();
            for(int i = 0; i < succRoles.length; i++) {
                IConceptSet cs = succ.lookupConcept(succRoles[i]);
                for(IntIterator it2 = cs.iterator(); it2.hasNext(); ) {
                    int succC = it2.next();
                    r.store(concept, succRoles[i], succC);
                }
            }
View Full Code Here

Examples of au.csiro.snorocket.core.concurrent.CR.lookupConcept()

        final Context ctx = contextIndex.get(key);
        CR succ = ctx.getSucc();
       
        for(int roleId : succ.getRoles()) {
            NamedRole role = new NamedRole(factory.lookupRoleId(roleId).toString());
            IConceptSet values = getLeaves(succ.lookupConcept(roleId));
            for (IntIterator itr2 = values.iterator(); itr2.hasNext(); ) {
                int valueInt = itr2.next();
                if (!factory.isVirtualConcept(valueInt)) {
                    final String valueId = factory.lookupConceptId(valueInt).toString();
                    result.add(new Existential(role, new NamedConcept(valueId)));
View Full Code Here

Examples of edu.pitt.dbmi.nlp.noble.terminology.Terminology.lookupConcept()

      }else if ( action.equals("search")){
        String text = req.getParameter("text");
        //check if in fact we want to lookup concept
        Object c = null;
        if(text.matches("CL?\\d+") || text.startsWith("http://")){
          c = terminology.lookupConcept(text.trim());
        }else if("ROOT".equals(text)){
          c = terminology.getRootConcepts();
        }else{
          c = terminology.search(text);
        }
View Full Code Here

Examples of edu.pitt.dbmi.nlp.noble.terminology.Terminology.lookupConcept()

        response = processOutput(c);
      }else if ( action.equals("get_roots")){
        response = processOutput(terminology.getRootConcepts());
      }else if ( action.equals("lookup_concept")){
        String text = req.getParameter("code");
        Concept c = terminology.lookupConcept(text.trim());
        response = processOutput(c);
      }else if ( action.equals("get_sources")){
        Source [] src = terminology.getSources();
        response = processOutput(src);
      }else if ( action.equals("get_related_concepts")){
View Full Code Here

Examples of edu.pitt.dbmi.nlp.noble.terminology.Terminology.lookupConcept()

        Source [] src = terminology.getSources();
        response = processOutput(src);
      }else if ( action.equals("get_related_concepts")){
        String code = req.getParameter("code");
        String rel  = req.getParameter("relation");
        Concept c = terminology.lookupConcept(code.trim());
       
        /*
        try{
          code = URLDecoder.decode(code,"utf-8");
        }catch(Exception ex){}
View Full Code Here

Examples of edu.pitt.dbmi.nlp.noble.terminology.Terminology.lookupConcept()

        }else{
          response = processOutput(new Concept [0]);
        }
      }else if ( action.equals("get_related_concept_map")){
        String code = req.getParameter("code");
        Concept c = terminology.lookupConcept(code);
        // find relationship
        Map cs = terminology.getRelatedConcepts(c);
        response = processOutput(cs);
      }
    }catch(TerminologyException ex){
View Full Code Here

Examples of edu.pitt.dbmi.nlp.noble.terminology.Terminology.lookupConcept()

        terminology.setFilterSources(src);
      }else if ( action.equals("search")){
        String txt = (String) parcel.getPayload();
        tosend = terminology.search(txt);
      }else if ( action.equals("lookup_concept")){
        tosend = terminology.lookupConcept((String) parcel.getPayload());
      }else if ( action.equals("get_sources")){
        tosend = terminology.getSources();
      }else if ( action.equals("get_related_concepts")){
        Object [] p = (Object []) parcel.getPayload();
        Concept c = (Concept) p[0];
View Full Code Here

Examples of edu.pitt.dbmi.nlp.noble.terminology.Terminology.lookupConcept()

    //String server = "http://lexevsapi51.nci.nih.gov/lexevsapi51#NCI MetaThesaurus";
    Terminology term = new LexEVSRestTerminology(server);
    long time = System.currentTimeMillis();
    // ZFA_0001234 | C0025202
    System.out.println("--- lookup ---");
    Concept c = term.lookupConcept("C0025202");
    if(c != null){
      c.printInfo(System.out);
    }
    System.out.println("lookup time "+(System.currentTimeMillis()-time));
   
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.