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


Java CodingSchemeSummary.getLocalName方法代码示例

本文整理汇总了Java中org.LexGrid.LexBIG.DataModel.Core.CodingSchemeSummary.getLocalName方法的典型用法代码示例。如果您正苦于以下问题:Java CodingSchemeSummary.getLocalName方法的具体用法?Java CodingSchemeSummary.getLocalName怎么用?Java CodingSchemeSummary.getLocalName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.LexGrid.LexBIG.DataModel.Core.CodingSchemeSummary的用法示例。


在下文中一共展示了CodingSchemeSummary.getLocalName方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: queryReturnsData

import org.LexGrid.LexBIG.DataModel.Core.CodingSchemeSummary; //导入方法依赖的package包/类
public static <T extends ResourceQuery> boolean queryReturnsData(
		CodingSchemeRenderingList lexCodingSchemeRenderingList,
		QueryData<T> queryData){
	boolean found = false;
	String lexRenderingFormalName, lexRenderingVersion;
	CodingSchemeSummary lexRenderingSummary;
	
	int renderingCount = lexCodingSchemeRenderingList.getCodingSchemeRenderingCount();
	
	for(int index=0; index < renderingCount; index++){
		lexRenderingSummary = lexCodingSchemeRenderingList.getCodingSchemeRendering(index).getCodingSchemeSummary();
		lexRenderingFormalName = lexRenderingSummary.getFormalName() != null ? lexRenderingSummary.getFormalName() : lexRenderingSummary.getLocalName();
		lexRenderingVersion = lexRenderingSummary.getRepresentsVersion();

		if(lexRenderingFormalName.equals(queryData.getLexSchemeName()) && 
			lexRenderingVersion.equals(queryData.getLexVersionOrTag().getVersion())){
			found = true;
		}
	}		
		
	return found;
}
 
开发者ID:NCIP,项目名称:lexevs-service,代码行数:23,代码来源:CommonSearchFilterUtils.java

示例2: buildCaches

import org.LexGrid.LexBIG.DataModel.Core.CodingSchemeSummary; //导入方法依赖的package包/类
protected void buildCaches() {
	synchronized(this.mutex){
		try {
			for (CodingSchemeRendering csr : this.lexBigService
					.getSupportedCodingSchemes().getCodingSchemeRendering()) {
				CodingSchemeSummary summary = csr.getCodingSchemeSummary();
				
				NameVersionPair nameVersionPair = 
					new NameVersionPair(
						summary.getLocalName(),
						summary.getRepresentsVersion());
				
				String codeSystemVersionUri = 
					this.uriHandler.getCodeSystemVersionUri(summary);
				
				this.uriToNameVersionPair.put(codeSystemVersionUri, nameVersionPair);
			}
		} catch (LBInvocationException e) {
			this.log.warn(e);
		}
	}
}
 
开发者ID:NCIP,项目名称:lexevs-service,代码行数:23,代码来源:CodeSystemVersionUriResolver.java

示例3: transformSummaryDescription

import org.LexGrid.LexBIG.DataModel.Core.CodingSchemeSummary; //导入方法依赖的package包/类
@Override
public MapVersionDirectoryEntry transformSummaryDescription(CodingSchemeRendering codingSchemeRendering){
	MapVersionDirectoryEntry summary = new MapVersionDirectoryEntry();
	
	CodingSchemeSummary codingSchemeSummary = codingSchemeRendering.getCodingSchemeSummary();
	
	String name = this.getName(codingSchemeRendering);
	
	summary.setMapVersionName(name);
	summary.setDocumentURI(codingSchemeSummary.getCodingSchemeURI());
	summary.setAbout(codingSchemeSummary.getCodingSchemeURI());
	
	summary.setFormalName(codingSchemeSummary.getFormalName());
	
	if (codingSchemeRendering.getCodingSchemeSummary().getCodingSchemeDescription() != null && 
			codingSchemeRendering.getCodingSchemeSummary().getCodingSchemeDescription().getContent() != null) {
		EntryDescription description = new EntryDescription();
		description.setValue(ModelUtils.toTsAnyType(
				codingSchemeRendering.getCodingSchemeSummary().getCodingSchemeDescription().getContent()));
		summary.setResourceSynopsis(description);			
	}
	
	String mapName = codingSchemeSummary.getLocalName();
	MapReference mapReference = new MapReference();
	mapReference.setContent(mapName);
	mapReference.setUri(codingSchemeSummary.getCodingSchemeURI());
	mapReference.setHref(this.getUrlConstructor().createMapUrl(mapName));
	summary.setVersionOf(mapReference);
	
	summary.setHref(
		this.getUrlConstructor().
			createMapVersionUrl(
				mapName, name));
	
	return summary;
}
 
开发者ID:NCIP,项目名称:lexevs-service,代码行数:37,代码来源:CodingSchemeToMapVersionTransform.java

示例4: getVocabularyVersionByTag

import org.LexGrid.LexBIG.DataModel.Core.CodingSchemeSummary; //导入方法依赖的package包/类
public String getVocabularyVersionByTag(String codingSchemeName, String ltag) {
if (codingSchemeName == null) return null;
      String version = null;
      int knt = 0;
      try {
          CodingSchemeRenderingList lcsrl = lbSvc.getSupportedCodingSchemes();
          CodingSchemeRendering[] csra = lcsrl.getCodingSchemeRendering();
          for (int i = 0; i < csra.length; i++) {
              CodingSchemeRendering csr = csra[i];
              CodingSchemeSummary css = csr.getCodingSchemeSummary();
              if ((css.getFormalName() != null && css.getFormalName().compareTo(codingSchemeName) == 0)
                  || (css.getLocalName() != null && css.getLocalName().compareTo(codingSchemeName) == 0)
                  || (css.getCodingSchemeURI() != null && css.getCodingSchemeURI().compareTo(codingSchemeName) == 0)) {
			version = css.getRepresentsVersion();
                  knt++;

                  if (ltag == null)
                      return version;
                  RenderingDetail rd = csr.getRenderingDetail();
                  CodingSchemeTagList cstl = rd.getVersionTags();
                  java.lang.String[] tags = cstl.getTag();
                  if (tags == null)
                      return version;

			if (tags.length > 0) {
                      for (int j = 0; j < tags.length; j++) {
                          String version_tag = (String) tags[j];
                          if (version_tag != null && version_tag.compareToIgnoreCase(ltag) == 0) {
                              return version;
                          }
                      }
                  }
              }
          }
      } catch (Exception e) {
          e.printStackTrace();
      }
      if (ltag != null && ltag.compareToIgnoreCase("PRODUCTION") == 0 & knt == 1) {
          return version;
      }
      return null;
  }
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:43,代码来源:EntityExporter.java

示例5: getVocabularyVersionByTag

import org.LexGrid.LexBIG.DataModel.Core.CodingSchemeSummary; //导入方法依赖的package包/类
public String getVocabularyVersionByTag(String codingSchemeName, String ltag) {
if (codingSchemeName == null) return null;
      String version = null;
      int knt = 0;
      try {
          CodingSchemeRenderingList lcsrl = lbSvc.getSupportedCodingSchemes();
          CodingSchemeRendering[] csra = lcsrl.getCodingSchemeRendering();
          for (int i = 0; i < csra.length; i++) {
              CodingSchemeRendering csr = csra[i];
              CodingSchemeSummary css = csr.getCodingSchemeSummary();
              if ((css.getFormalName() != null && css.getFormalName().compareTo(codingSchemeName) == 0)
                  || (css.getLocalName() != null && css.getLocalName().compareTo(codingSchemeName) == 0)
                  || (css.getCodingSchemeURI() != null && css.getCodingSchemeURI().compareTo(codingSchemeName) == 0)) {
			version = css.getRepresentsVersion();
                  knt++;

                  if (ltag == null)
                      return version;
                  RenderingDetail rd = csr.getRenderingDetail();
                  CodingSchemeTagList cstl = rd.getVersionTags();
                  java.lang.String[] tags = cstl.getTag();
                  if (tags == null)
                      return version;

			if (tags.length > 0) {
                      for (int j = 0; j < tags.length; j++) {
                          String version_tag = (String) tags[j];
                          if (version_tag != null && version_tag.compareToIgnoreCase(ltag) == 0) {
                              return version;
                          }
                      }
                  }
              }
          }
      } catch (Exception e) {
          e.printStackTrace();
      }
      if (ltag != null && ltag.compareToIgnoreCase(PRODUCTION) == 0 & knt == 1) {
          return version;
      }
      return null;
  }
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:43,代码来源:CodingSchemeDataUtils.java

示例6: getVocabularyVersionTag

import org.LexGrid.LexBIG.DataModel.Core.CodingSchemeSummary; //导入方法依赖的package包/类
public String getVocabularyVersionTag(String codingSchemeName, String version) {
    if (codingSchemeName == null)
        return null;
    try {
        CodingSchemeRenderingList lcsrl = lbSvc.getSupportedCodingSchemes();
        CodingSchemeRendering[] csra = lcsrl.getCodingSchemeRendering();
        for (int i = 0; i < csra.length; i++) {
            CodingSchemeRendering csr = csra[i];
            CodingSchemeSummary css = csr.getCodingSchemeSummary();

            if ((css.getFormalName() != null && css.getFormalName().compareTo(codingSchemeName) == 0)
                || (css.getLocalName() != null && css.getLocalName().compareTo(codingSchemeName) == 0)
                || (css.getCodingSchemeURI() != null && css.getCodingSchemeURI().compareTo(codingSchemeName) == 0)) {

	if (version == null) return Constants.PRODUCTION;

	String representsVersion = css.getRepresentsVersion();
                if (representsVersion.compareTo(version) == 0) {
		RenderingDetail rd = csr.getRenderingDetail();
		CodingSchemeTagList cstl = rd.getVersionTags();
		String tag_str = "";
		java.lang.String[] tags = cstl.getTag();
		if (tags == null)
			return "NOT ASSIGNED";
		if (tags.length > 0) {
			tag_str = "";
			for (int j = 0; j < tags.length; j++) {
				String version_tag = (String) tags[j];
				if (j == 0) {
					tag_str = version_tag;
				} else if (j == tags.length-1) {
					tag_str = tag_str + version_tag;
				} else {
					tag_str = tag_str + version_tag + "|";
				}
			}
		} else {
			return "<NOT ASSIGNED>";
		}
		return tag_str;
	}
            }
        }
    } catch (Exception e) {
        e.printStackTrace();
    }
    return "<NOT AVAILABLE>";
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:49,代码来源:CodingSchemeDataUtils.java

示例7: displayCodingSchemes

import org.LexGrid.LexBIG.DataModel.Core.CodingSchemeSummary; //导入方法依赖的package包/类
/**
 * Displays a list of available coding schemes.
 * @return The ordered list of coding scheme summaries as displayed.
 * @throws LBException If an error occurs displaying the list.
 */
protected List<CodingSchemeSummary> displayCodingSchemes() throws LBException {
	List<CodingSchemeSummary> choices = new ArrayList<CodingSchemeSummary>();

	LexBIGService lbs = AppService.getLBSvc();
	CodingSchemeRenderingList schemes = lbs.getSupportedCodingSchemes();

	if (schemes.getCodingSchemeRenderingCount() == 0)
		Util.displayMessage("No coding schemes found.");
	else {

		Formatter f = new Formatter();

		String format = "%-5.5s|%-30.30s|%-25.25s|%-15.15s\n";
		Object[] hSep = new Object[] { Dash5, Dash30, Dash25, Dash15 };
		f.format(format, hSep);
		f.format(format, new Object[] { "#", "Local Name", "Version", "Tag" });
		f.format(format, hSep);
		CodingSchemeRendering[] csr = schemes.getCodingSchemeRendering();
		for (int i = 1; i <= csr.length; i++) {
			String nu = String.valueOf(i);

			CodingSchemeSummary css = csr[i-1].getCodingSchemeSummary();
			choices.add(css);

			// Evaluate local name
			String localName = css.getLocalName();
			if (localName != null && localName.length() > 30)
				localName = localName.substring(0, 28) + ">>";

			// Evaluate version
			String version = css.getRepresentsVersion();
			if (version != null && version.length() > 25)
				version = version.substring(0, 23) + ">>";

			// Evaluate tag(s)
			String[] tags = csr[i-1].getRenderingDetail().getVersionTags().getTag();
			String tag = tags.length > 0 ? tags[0] : "";
			if (tag != null && tag.length() > 15)
				tag = tag.substring(0, 13) + ">>";

			// Output the first line
			f.format(format, new Object[] { nu, localName, version, tag });

			// Output additional tags
			for (int j = 1; j < tags.length; j++) {
				tag = tags[j];
				if (tag != null && tag.length() > 10)
					tag = tag.substring(0, 8) + ">>";
				f.format(format, "", "", "", tag);
			}

			// Output separator
			f.format(format, hSep);
		}
		Util.displayMessage(f.out().toString());
		Util.displayMessage("");
		Util.displayMessage("NOTE: >> indicates column value exceeds the available width.");
	}
	return choices;

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


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