本文整理汇总了Java中org.LexGrid.LexBIG.DataModel.Core.CodingSchemeSummary.getRepresentsVersion方法的典型用法代码示例。如果您正苦于以下问题:Java CodingSchemeSummary.getRepresentsVersion方法的具体用法?Java CodingSchemeSummary.getRepresentsVersion怎么用?Java CodingSchemeSummary.getRepresentsVersion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.LexGrid.LexBIG.DataModel.Core.CodingSchemeSummary
的用法示例。
在下文中一共展示了CodingSchemeSummary.getRepresentsVersion方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getVersionListData
import org.LexGrid.LexBIG.DataModel.Core.CodingSchemeSummary; //导入方法依赖的package包/类
public Vector<String> getVersionListData(String codingSchemeName) {
Vector<String> v = new Vector();
try {
CodingSchemeRenderingList csrl = lbSvc.getSupportedCodingSchemes();
if (csrl == null) {
return v;
}
CodingSchemeRendering[] csrs = csrl.getCodingSchemeRendering();
for (int i = 0; i < csrs.length; i++) {
CodingSchemeRendering csr = csrs[i];
Boolean isActive =
csr.getRenderingDetail().getVersionStatus().equals(
CodingSchemeVersionStatus.ACTIVE);
CodingSchemeSummary css = csr.getCodingSchemeSummary();
String formalname = css.getFormalName();
if (formalname.compareTo(codingSchemeName) == 0 || css.getCodingSchemeURI().compareTo(codingSchemeName) == 0
|| css.getLocalName().compareTo(codingSchemeName) == 0) {
String representsVersion = css.getRepresentsVersion();
v.add(representsVersion);
}
}
} catch (Exception ex) {
ex.printStackTrace();
}
return v;
}
示例2: 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;
}
示例3: 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);
}
}
}
示例4: getVocabularyVersionByTag
import org.LexGrid.LexBIG.DataModel.Core.CodingSchemeSummary; //导入方法依赖的package包/类
public static String getVocabularyVersionByTag(String codingSchemeName, String ltag)
{
if (codingSchemeName == null) return null;
try {
//EVSApplicationService lbSvc = new RemoteServerUtil().createLexBIGService();
LexBIGService lbSvc = RemoteServerUtil.createLexBIGService();
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().compareTo(codingSchemeName) == 0 || css.getLocalName().compareTo(codingSchemeName) == 0)
{
if (ltag == null) return css.getRepresentsVersion();
RenderingDetail rd = csr.getRenderingDetail();
CodingSchemeTagList cstl = rd.getVersionTags();
java.lang.String[] tags = cstl.getTag();
for (int j=0; j<tags.length; j++)
{
String version_tag = (String) tags[j];
if (version_tag.compareToIgnoreCase(ltag) == 0)
{
return css.getRepresentsVersion();
}
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
_logger.debug("Version corresponding to tag " + ltag + " is not found " + " in " + codingSchemeName);
return null;
}
示例5: getVersionListData
import org.LexGrid.LexBIG.DataModel.Core.CodingSchemeSummary; //导入方法依赖的package包/类
public static Vector<String> getVersionListData(String codingSchemeName) {
Vector<String> v = new Vector();
try {
RemoteServerUtil rsu = new RemoteServerUtil();
//EVSApplicationService lbSvc = rsu.createLexBIGService();
LexBIGService lbSvc = RemoteServerUtil.createLexBIGService();
CodingSchemeRenderingList csrl = lbSvc.getSupportedCodingSchemes();
if(csrl == null) _logger.debug("csrl is NULL");
CodingSchemeRendering[] csrs = csrl.getCodingSchemeRendering();
for (int i=0; i<csrs.length; i++)
{
CodingSchemeRendering csr = csrs[i];
Boolean isActive = csr.getRenderingDetail().getVersionStatus().equals(CodingSchemeVersionStatus.ACTIVE);
if (isActive != null && isActive.equals(Boolean.TRUE))
{
CodingSchemeSummary css = csr.getCodingSchemeSummary();
String formalname = css.getFormalName();
if (formalname.compareTo(codingSchemeName) == 0)
{
String representsVersion = css.getRepresentsVersion();
v.add(representsVersion);
}
}
}
} catch (Exception ex) {
}
return v;
}
示例6: 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;
}
示例7: 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;
}
示例8: 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>";
}
示例9: getVocabularyVersionByTag
import org.LexGrid.LexBIG.DataModel.Core.CodingSchemeSummary; //导入方法依赖的package包/类
public String getVocabularyVersionByTag(String codingSchemeName,
String ltag) {
if (codingSchemeName == null) {
codingSchemeName = "NCI Thesaurus";
}
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().compareTo(codingSchemeName) == 0
|| css.getLocalName().compareTo(codingSchemeName) == 0
|| 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(Constants.PRODUCTION) == 0
& knt == 1) {
return version;
}
return null;
}
示例10: 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;
}
示例11: filterLexCodingSchemeRenderingList
import org.LexGrid.LexBIG.DataModel.Core.CodingSchemeSummary; //导入方法依赖的package包/类
public static CodingSchemeRenderingList filterLexCodingSchemeRenderingList(
CodingSchemeRenderingList lexRenderingList,
String cts2SystemName,
MappingExtension lexMappingExtension) {
if(lexRenderingList == null || (cts2SystemName == null && lexMappingExtension == null)){
return lexRenderingList;
}
boolean restrictToBOTH = (cts2SystemName != null && lexMappingExtension != null);
boolean restrictToNAME = (!restrictToBOTH && cts2SystemName != null);
boolean restrictToMAP = (!restrictToBOTH && lexMappingExtension != null);
CodingSchemeRenderingList lexFilteredRenderingList = new CodingSchemeRenderingList();
CodingSchemeRendering[] lexRenderings = lexRenderingList.getCodingSchemeRendering();
for(CodingSchemeRendering lexRendering : lexRenderings) {
CodingSchemeSummary lexCodingSchemeSummary = lexRendering.getCodingSchemeSummary();
String lexCodingSchemeURI = lexCodingSchemeSummary.getCodingSchemeURI();
String lexCodingSchemeVersion = lexCodingSchemeSummary.getRepresentsVersion();
boolean localNameMatches = lexCodingSchemeSummary.getLocalName().equals(cts2SystemName);
if(restrictToBOTH){
if(localNameMatches) {
// Add if valid Mapping Coding Scheme
if (CommonMapUtils.validateMappingCodingScheme(lexCodingSchemeURI, lexCodingSchemeVersion, lexMappingExtension)) {
lexFilteredRenderingList.addCodingSchemeRendering(lexRendering);
}
}
}
else if(restrictToNAME){
if(localNameMatches) {
lexFilteredRenderingList.addCodingSchemeRendering(lexRendering);
}
}
else if(restrictToMAP){
if(CommonMapUtils.validateMappingCodingScheme(lexCodingSchemeURI, lexCodingSchemeVersion, lexMappingExtension)) {
lexFilteredRenderingList.addCodingSchemeRendering(lexRendering);
}
}
else{
lexFilteredRenderingList.addCodingSchemeRendering(lexRendering);
}
}
return lexFilteredRenderingList;
}