当前位置: 首页>>代码示例>>Java>>正文


Java Constants类代码示例

本文整理汇总了Java中gov.nih.nci.evs.browser.common.Constants的典型用法代码示例。如果您正苦于以下问题:Java Constants类的具体用法?Java Constants怎么用?Java Constants使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Constants类属于gov.nih.nci.evs.browser.common包,在下文中一共展示了Constants类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getDefaultOntologiesToSearchOnStr

import gov.nih.nci.evs.browser.common.Constants; //导入依赖的package包/类
public static String getDefaultOntologiesToSearchOnStr() {
if (_defaultOntologiesToSearchOnStr != null) return _defaultOntologiesToSearchOnStr;
      if (_ontologies == null) setCodingSchemeMap();
      Vector display_name_vec = getSortedOntologies();
      StringBuffer buf = new StringBuffer();
      buf.append("|");
      for (int i = 0; i < display_name_vec.size(); i++) {
    OntologyInfo info = (OntologyInfo) display_name_vec.elementAt(i);
    if (info.getLabel().indexOf("NCI_Thesaurus") != -1 || info.getLabel().indexOf("NCI Thesaurus") != -1) {
        if (!isNull(info.getTag()) && info.getTag().compareToIgnoreCase(Constants.PRODUCTION) == 0) {
                  buf.append(info.getLabel() + "|");
	    }
    }
   }
   _defaultOntologiesToSearchOnStr = buf.toString();
   return _defaultOntologiesToSearchOnStr;
  }
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:18,代码来源:DataUtils.java

示例2: getValueSetHierarchyRoots

import gov.nih.nci.evs.browser.common.Constants; //导入依赖的package包/类
public static ResolvedConceptReferenceList getValueSetHierarchyRoots() {
       String scheme = "Terminology Value Set";
       String version = getVocabularyVersionByTag(scheme, Constants.PRODUCTION);
       LexBIGService lbSvc = RemoteServerUtil.createLexBIGService();
       TreeUtils treeUtils = new TreeUtils(lbSvc);
       ResolvedConceptReferenceList rcrl = treeUtils.getHierarchyRoots(scheme, version);

       if (rcrl == null) {
		scheme = "Terminology_Value_Set.owl";
		version = getVocabularyVersionByTag(scheme, Constants.PRODUCTION);
		rcrl = treeUtils.getHierarchyRoots(scheme, version);
	}


       return rcrl;
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:17,代码来源:DataUtils.java

示例3: sortOntologyInfo

import gov.nih.nci.evs.browser.common.Constants; //导入依赖的package包/类
public static Vector sortOntologyInfo(Vector v) {
	Vector u = new Vector();
       Collections.sort(v, new OntologyInfo.ComparatorImpl());
	for (int i = 0; i < v.size(); i++) {
		OntologyInfo info = (OntologyInfo) v.elementAt(i);
		if (!isNull(info.getTag()) && info.getTag().compareToIgnoreCase(Constants.PRODUCTION) == 0) {
			u.add(info);
		    if (info.getExpanded()) {
				Vector w = getNonProductionOntologies(v, info.getCodingScheme());
				for (int j=0; j<w.size(); j++) {
					OntologyInfo ontologyInfo = (OntologyInfo) w.elementAt(j);
					u.add(ontologyInfo);
				}
			}
		}
	}
	return u;
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:19,代码来源:DataUtils.java

示例4: getNCImCodes

import gov.nih.nci.evs.browser.common.Constants; //导入依赖的package包/类
public static Vector getNCImCodes(Entity node) {
if (node == null) return null;
      Vector w = new Vector();
Property[] props = node.getAllProperties();
for (int i = 0; i < props.length; i++) {
	Property prop = props[i];
	 PropertyQualifier[] qualifiers = prop.getPropertyQualifier();
	 for (int k=0; k<qualifiers.length; k++) {
		  PropertyQualifier qualifier = qualifiers[k];
	 }
	 Source[] sources = prop.getSource();
	 for (int k=0; k<sources.length; k++) {
		  Source source = sources[k];
	 }
	 if (Arrays.asList(Constants.NCIM_CODE_PROPERTYIES).contains(prop.getPropertyName())) {
		 if (!w.contains(prop.getValue().getContent())) {
			w.add(prop.getValue().getContent());
		 }
	 }
}
return w;
  }
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:23,代码来源:DataUtils.java

示例5: getNCImCodes

import gov.nih.nci.evs.browser.common.Constants; //导入依赖的package包/类
public Vector getNCImCodes(Entity node) {
if (node == null) return null;
      Vector w = new Vector();
Property[] props = node.getAllProperties();
for (int i = 0; i < props.length; i++) {
	 Property prop = props[i];
	 PropertyQualifier[] qualifiers = prop.getPropertyQualifier();
	 for (int k=0; k<qualifiers.length; k++) {
		  PropertyQualifier qualifier = qualifiers[k];
	 }
	 Source[] sources = prop.getSource();
	 for (int k=0; k<sources.length; k++) {
		  Source source = sources[k];
	 }
	 if (Arrays.asList(Constants.NCIM_CODE_PROPERTYIES).contains(prop.getPropertyName())) {
		 if (!w.contains(prop.getValue().getContent())) {
			w.add(prop.getValue().getContent());
		 }
	 }
}
return w;
  }
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:23,代码来源:ConceptDetails.java

示例6: getSemanticType

import gov.nih.nci.evs.browser.common.Constants; //导入依赖的package包/类
/**
 * Return Semantic Type of the concept code passed in
 *
 * @param conceptCode
 * @return
 */
public String getSemanticType(String conceptCode) {
	Vector<String> code_vec = new Vector<String>();
	code_vec.add(conceptCode);
	HashMap<?, ?> map = DataUtils.getPropertyValuesForCodes(
			Constants.CODING_SCHEME_NAME, null, code_vec, SEMANTIC_TYPE);
	return (String) map.get(conceptCode);
}
 
开发者ID:NCIP,项目名称:nci-metathesaurus-browser,代码行数:14,代码来源:SearchCart.java

示例7: testRelationshipUtils

import gov.nih.nci.evs.browser.common.Constants; //导入依赖的package包/类
@Test
   public void testRelationshipUtils() throws Exception {
	RandomVariateGenerator rvGenerator = new RandomVariateGenerator();
    int m = 0;
    csVec = codingSchemeDataUtils.getCodingSchemes(true); // excludeMappings
       for (int i = 0; i < csVec.size(); i++) {
           String t = (String) csVec.get(i);
           Vector u = gov.nih.nci.evs.browser.utils.StringUtils.parseData(t);
           String scheme = (String) u.elementAt(0);
           if (scheme != null && scheme.compareTo(gov.nih.nci.evs.browser.common.Constants.NCI_METATHESAURUS) != 0 &&
               !Arrays.asList(gov.nih.nci.evs.browser.common.Constants.TERMINOLOGY_VALUE_SET_NAMES).contains(scheme)) {
			String version = (String) u.elementAt(1);
			System.out.println("\n" + scheme + " (" + version + ")");
			ResolvedConceptReferenceList rcrl = testCaseGenerator.generateTestCases(scheme, version, ServiceTestCase.SAMPLE_SIZE,
																					TestCaseGenerator.TYPE_TERMINOLOGY);

			int sel_case = rvGenerator.uniform(0, rcrl.getResolvedConceptReferenceCount()-1);
			ResolvedConceptReference rcr = rcrl.getResolvedConceptReference(sel_case);
			String name = rcr.getEntityDescription().getContent();
			String code = rcr.getCode();
			System.out.println("\t" + name + " (" + code + ")");

			String ns = rcr.getCodeNamespace();
			boolean useNamespace = true;

			HashMap hmap = relationshipUtils.getRelationshipHashMap(scheme, version, code, ns, useNamespace);
			if (hmap == null) {
				m++;
			} else {
				dumpHashMap(hmap);
			}
		}
	}
	assertTrue(m == 0);
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:36,代码来源:TestRelationshipUtils.java

示例8: setTerminologyValueSetDescriptionHashMap

import gov.nih.nci.evs.browser.common.Constants; //导入依赖的package包/类
private static void setTerminologyValueSetDescriptionHashMap() {
	if (_terminologyValueSetDescriptionHashMap == null) {
		String prod_version = getVocabularyVersionByTag(Constants.TERMINOLOGY_VALUE_SET_NAME, Constants.PRODUCTION);
		_terminologyValueSetDescriptionHashMap = getPropertyValues(Constants.TERMINOLOGY_VALUE_SET_NAME, prod_version, "GENERIC", "Description");
	}
	/*
	if (_terminologyValueSetDescriptionHashMap == null) {
		_terminologyValueSetDescriptionHashMap = new HashMap();
	}
	*/
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:12,代码来源:DataUtils.java

示例9: getDefaultFormalName2VirtualIdMap

import gov.nih.nci.evs.browser.common.Constants; //导入依赖的package包/类
public static HashMap getDefaultFormalName2VirtualIdMap() {
	HashMap formalName2VirtualIdMap = new HashMap();
	formalName2VirtualIdMap.put("NCIT", Constants.NCIT_NCBO_ID);
	formalName2VirtualIdMap.put("NCIt", Constants.NCIT_NCBO_ID);
	formalName2VirtualIdMap.put("NCI_Thesaurus", Constants.NCIT_NCBO_ID);
	formalName2VirtualIdMap.put("NCI Thesaurus", Constants.NCIT_NCBO_ID);
    return formalName2VirtualIdMap;
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:9,代码来源:DataUtils.java

示例10: getSourceValueSetTreeItem

import gov.nih.nci.evs.browser.common.Constants; //导入依赖的package包/类
public static TreeItem getSourceValueSetTreeItem(String node_id) {
	String vsd_name = null;
	TreeItem ti = null;
	ValueSetDefinition vsd = findValueSetDefinitionByURI(node_id);
	if (vsd != null) {
		vsd_name = vsd.getValueSetDefinitionName();
		ti = (TreeItem) _sourceValueSetTreeKey2TreeItemMap.get(node_id + "$" + vsd_name);
	} else {
		Entity entity = getConceptByCode(Constants.TERMINOLOGY_VALUE_SET_NAME, null, node_id);
		if (entity == null) return null;
		vsd_name = entity.getEntityDescription().getContent();
		ti = (TreeItem) _sourceValueSetTreeKey2TreeItemMap.get(node_id + "$" + vsd_name);
	}
	return ti;
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:16,代码来源:DataUtils.java

示例11: getNonProductionOntologies

import gov.nih.nci.evs.browser.common.Constants; //导入依赖的package包/类
public static Vector getNonProductionOntologies(Vector v, String scheme) {
	Vector u = new Vector();
	for (int i = 0; i < v.size(); i++) {
		OntologyInfo info = (OntologyInfo) v.elementAt(i);
		if (scheme.compareTo(info.getCodingScheme()) == 0) {
			if (isNull(info.getTag()) || info.getTag().compareToIgnoreCase(Constants.PRODUCTION) != 0) {
				u.add(info);
			}
		}
	}
	if (u.size() > 0) {
		Collections.sort(u, new OntologyInfo.ComparatorImpl());
	}
	return u;
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:16,代码来源:DataUtils.java

示例12: isCaptchaOptionValid

import gov.nih.nci.evs.browser.common.Constants; //导入依赖的package包/类
public static boolean isCaptchaOptionValid(String value) {
if (isNullOrBlank(value)) return true;
//return Arrays.asList(VALID_CAPTCHA_OTPIONS).contains(value);

   if (value.compareToIgnoreCase(Constants.DEFAULT_CAPTCHA_OTPION) == 0) return true;
   if (value.compareToIgnoreCase(Constants.AUDIO_CAPTCHA_OTPION) == 0) return true;
   return false;

}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:10,代码来源:DataUtils.java

示例13: computeNCBOWidgetString

import gov.nih.nci.evs.browser.common.Constants; //导入依赖的package包/类
public static String computeNCBOWidgetString() {
	StringBuffer buf = new StringBuffer();
	HashMap map = NCItBrowserProperties.getBioportalAcronym2NameHashMap();

	if (map == null) {
		System.out.println("(*) getBioportalAcronym2NameHashMap returns null??? ");
		return null;
	}

       Set entrys = map.entrySet() ;
       Iterator iter = entrys.iterator() ;
       while(iter.hasNext()) {
           Map.Entry me = (Map.Entry)iter.next();
           String acronym = (String) me.getKey();
           //String name = (String) me.getValue();
           if (_localName2FormalNameHashMap.containsKey(acronym)) {
			System.out.println("(*) _localName2FormalNameHashMap containsKey " + acronym);
			String formalname = (String) _localName2FormalNameHashMap.get(acronym);
			String cs_name = (String) _uri2CodingSchemeNameHashMap.get(formalname);
			buf.append(cs_name + "|" + formalname + "|" + acronym + ";");
           }
       }
       String t = buf.toString();
       if (t.indexOf("NCI_Thesaurus") == -1) {
		t = t + Constants.DEFAULT_NCBO_WIDGET_INFO;//"NCI_Thesaurus|NCI_Thesaurus|NCIT;";
	}
       return t;
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:29,代码来源:DataUtils.java

示例14: isNCIT_OR_NCIM

import gov.nih.nci.evs.browser.common.Constants; //导入依赖的package包/类
public static boolean isNCIT_OR_NCIM(String display_name) {
	if (display_name == null) return false;
	for (int i=0; i<Constants.NCIT_OR_NCIM.length; i++) {
		String name = (String) Constants.NCIT_OR_NCIM[i];
		if (display_name.compareToIgnoreCase(name) == 0) return true;
	}
	return false;
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:9,代码来源:DataUtils.java

示例15: getHyperlink

import gov.nih.nci.evs.browser.common.Constants; //导入依赖的package包/类
public String getHyperlink(String codingScheme, String version, String name, String code, String ns) {
if (Arrays.asList(Constants.NON_CONCEPT_TO_CONCEPT_ASSOCIATION).contains(name)) return name;

StringBuffer buf = new StringBuffer();
if (gov.nih.nci.evs.browser.utils.StringUtils.isNullOrBlank(ns)) {
	buf.append("<a href=\"/ncitbrowser/ConceptReport.jsp?dictionary=" + codingScheme + "&version=" + version + "&code=" + code + "\">").append("\n");
} else {
	buf.append("<a href=\"/ncitbrowser/ConceptReport.jsp?dictionary=" + codingScheme + "&version=" + version + "&code=" + code + "&ns=" + ns + "\">").append("\n");
}
buf.append(name).append("\n");
buf.append("</a>").append("\n");
return buf.toString();
  }
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:14,代码来源:UIUtils.java


注:本文中的gov.nih.nci.evs.browser.common.Constants类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。