本文整理汇总了Java中org.LexGrid.LexBIG.DataModel.Collections.CodingSchemeRenderingList类的典型用法代码示例。如果您正苦于以下问题:Java CodingSchemeRenderingList类的具体用法?Java CodingSchemeRenderingList怎么用?Java CodingSchemeRenderingList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CodingSchemeRenderingList类属于org.LexGrid.LexBIG.DataModel.Collections包,在下文中一共展示了CodingSchemeRenderingList类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getSchemeVersions
import org.LexGrid.LexBIG.DataModel.Collections.CodingSchemeRenderingList; //导入依赖的package包/类
/**
* Returns list of all versions associated with a scheme
* @param uri
* @return
* @throws Exception
*/
public ArrayList<String> getSchemeVersions(String uri) throws Exception {
ArrayList<String> list = new ArrayList<String>();
LexBIGService lbSvc = RemoteServerUtil.createLexBIGService();
CodingSchemeRenderingList csrl = lbSvc.getSupportedCodingSchemes();
CodingSchemeRendering[] csrs = csrl.getCodingSchemeRendering();
for (int i = 0; i < csrs.length; i++) {
CodingSchemeRendering csr = csrs[i];
String status = csr.getRenderingDetail().getVersionStatus().value();
CodingSchemeSummary css = csr.getCodingSchemeSummary();
if (status.equals("active")) {
if (css.getCodingSchemeURI().equals(uri))
list.add(css.getRepresentsVersion());
}
}
return list;
}
示例2: getVersionListData
import org.LexGrid.LexBIG.DataModel.Collections.CodingSchemeRenderingList; //导入依赖的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;
}
示例3: getLexCodingSchemeRenderings
import org.LexGrid.LexBIG.DataModel.Collections.CodingSchemeRenderingList; //导入依赖的package包/类
public static <T extends ResourceQuery> CodingSchemeRendering[] getLexCodingSchemeRenderings(
LexBIGService lexBigService,
VersionNameConverter nameConverter,
QueryData<T> queryData,
MappingExtension lexMappingExtension,
SortCriteria cts2SortCriteria){
CodingSchemeRenderingList lexRenderingList = null;
String cts2SystemName = queryData.getCts2SystemName();
Set<ResolvedFilter> cts2Filters = queryData.getCts2Filters();
try {
lexRenderingList = lexBigService.getSupportedCodingSchemes();
} catch (LBInvocationException e) {
throw new RuntimeException(e);
}
lexRenderingList = CommonSearchFilterUtils.filterLexCodingSchemeRenderingList(lexRenderingList, cts2SystemName, lexMappingExtension);
lexRenderingList = CommonSearchFilterUtils.filterLexCodingSchemeRenderingList(lexRenderingList, cts2Filters, nameConverter);
if(queryData.getReadContext() != null){
lexRenderingList = CommonSearchFilterUtils.filterLexCodingSchemeRenderingList(lexRenderingList, queryData.getReadContext());
}
return lexRenderingList.getCodingSchemeRendering();
}
示例4: getLexCodedNodeSet
import org.LexGrid.LexBIG.DataModel.Collections.CodingSchemeRenderingList; //导入依赖的package包/类
public static <T extends ResourceQuery> CodedNodeSet getLexCodedNodeSet(
LexBIGService lexBigService,
QueryData<T> queryData,
SortCriteria cts2SortCriteria){
CodedNodeSet lexCodedNodeSet = null;
if(queryData.hasNameAndVersion()){
try {
LocalNameList lexLocalNameList = new LocalNameList();
CodingSchemeRenderingList lexCodingSchemeRenderingList = lexBigService.getSupportedCodingSchemes();
boolean dataExists = CommonSearchFilterUtils.queryReturnsData(lexCodingSchemeRenderingList, queryData);
if(dataExists){
// Get Code Node Set from LexBIG service for given coding scheme
lexCodedNodeSet = lexBigService.getNodeSet(queryData.getLexSchemeName(), queryData.getLexVersionOrTag() , lexLocalNameList);
lexCodedNodeSet = CommonSearchFilterUtils.filterLexCodedNodeSet(lexCodedNodeSet, queryData);
}
} catch (LBException e) {
throw new RuntimeException(e);
}
}
return lexCodedNodeSet;
}
示例5: queryReturnsData
import org.LexGrid.LexBIG.DataModel.Collections.CodingSchemeRenderingList; //导入依赖的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;
}
示例6: filterLexCodingSchemeRenderingList
import org.LexGrid.LexBIG.DataModel.Collections.CodingSchemeRenderingList; //导入依赖的package包/类
public static CodingSchemeRenderingList filterLexCodingSchemeRenderingList(
CodingSchemeRenderingList lexRenderingList,
Set<ResolvedFilter> cts2Filters,
VersionNameConverter nameConverter) {
if(lexRenderingList == null || cts2Filters == null){
return lexRenderingList;
}
CodingSchemeRenderingList lexFilteredRenderingList = new CodingSchemeRenderingList();
CodingSchemeRendering[] lexCodingSchemeRenderings = lexRenderingList.getCodingSchemeRendering();
for (CodingSchemeRendering lexCodingSchemeRendering : lexCodingSchemeRenderings) {
if(CommonSearchFilterUtils.applyFiltersToRendering(lexCodingSchemeRendering, cts2Filters, nameConverter)){
lexFilteredRenderingList.addCodingSchemeRendering(lexCodingSchemeRendering);
}
}
return lexFilteredRenderingList;
}
示例7: createFakeCodingSchemeRenderingList
import org.LexGrid.LexBIG.DataModel.Collections.CodingSchemeRenderingList; //导入依赖的package包/类
public CodingSchemeRenderingList createFakeCodingSchemeRenderingList(Service service, boolean withData){
CodingSchemeRenderingList list = new CodingSchemeRenderingList();
for (int schemeIndex = 0; schemeIndex < fakeData.size(); schemeIndex++) {
CodingSchemeRendering render = new CodingSchemeRendering();
CodingSchemeSummary codingSchemeSummary = new CodingSchemeSummary();
if (withData) {
for (ComponentReference property : service
.getSupportedSearchReferences()) {
fakeData.setProperty(codingSchemeSummary, schemeIndex,
property);
}
}
render.setCodingSchemeSummary(codingSchemeSummary);
list.addCodingSchemeRendering(schemeIndex, render);
}
return list;
}
示例8: getVocabularyVersionByTag
import org.LexGrid.LexBIG.DataModel.Collections.CodingSchemeRenderingList; //导入依赖的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;
}
示例9: getVersionListData
import org.LexGrid.LexBIG.DataModel.Collections.CodingSchemeRenderingList; //导入依赖的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;
}
示例10: getSupportedCodingSchemes
import org.LexGrid.LexBIG.DataModel.Collections.CodingSchemeRenderingList; //导入依赖的package包/类
public String getSupportedCodingSchemes(String codingSchemeName) throws Exception {
CodingSchemeRenderingList csrl = appService.getSupportedCodingSchemes();
for(int i = 0; i < csrl.getCodingSchemeRenderingCount(); i++)
{
//get a version of the NCI Thesaurus on the server
if(csrl.getCodingSchemeRendering(i).getCodingSchemeSummary().getFormalName().equals(codingSchemeName) ){
if(csrl.getCodingSchemeRendering(i).getRenderingDetail().getVersionTags().getTagCount() > 0)
{return csrl.getCodingSchemeRendering(i).getCodingSchemeSummary().getRepresentsVersion();}
}
}
throw new IllegalStateException("No versions of coding scheme not found: "+codingSchemeName);
}
示例11: getVocabularyVersionByTag
import org.LexGrid.LexBIG.DataModel.Collections.CodingSchemeRenderingList; //导入依赖的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;
}
示例12: getVocabularyVersionByTag
import org.LexGrid.LexBIG.DataModel.Collections.CodingSchemeRenderingList; //导入依赖的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;
}
示例13: getVocabularyVersionTag
import org.LexGrid.LexBIG.DataModel.Collections.CodingSchemeRenderingList; //导入依赖的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>";
}
示例14: getVocabularyVersionByTag
import org.LexGrid.LexBIG.DataModel.Collections.CodingSchemeRenderingList; //导入依赖的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;
}
示例15: displayCodingSchemes
import org.LexGrid.LexBIG.DataModel.Collections.CodingSchemeRenderingList; //导入依赖的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;
}