本文整理汇总了Java中org.LexGrid.codingSchemes.CodingScheme类的典型用法代码示例。如果您正苦于以下问题:Java CodingScheme类的具体用法?Java CodingScheme怎么用?Java CodingScheme使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CodingScheme类属于org.LexGrid.codingSchemes包,在下文中一共展示了CodingScheme类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getAssociationNames
import org.LexGrid.codingSchemes.CodingScheme; //导入依赖的package包/类
/**
* Return a list of Association names
*
* @param scheme
* @param version
* @return
*/
public Vector<String> getAssociationNames(String scheme, String version) {
Vector<String> association_vec = new Vector<String>();
try {
LexBIGService lbSvc = RemoteServerUtil.createLexBIGService();
CodingSchemeVersionOrTag versionOrTag = new CodingSchemeVersionOrTag();
if (version != null) {
versionOrTag.setVersion(version);
}
CodingScheme cs = lbSvc.resolveCodingScheme(scheme, versionOrTag);
SupportedHierarchy[] hierarchies = cs.getMappings().getSupportedHierarchy();
String[] ids = hierarchies[0].getAssociationNames();
for (int i = 0; i < ids.length; i++) {
if (!association_vec.contains(ids[i])) {
association_vec.add(ids[i]);
_logger.debug("AssociationName: " + ids[i]);
}
}
} catch (Exception ex) {
_logger.warn(ex.getMessage());
}
return association_vec;
}
开发者ID:NCIP,项目名称:nci-metathesaurus-browser,代码行数:31,代码来源:SearchCart.java
示例2: getAssociationNames
import org.LexGrid.codingSchemes.CodingScheme; //导入依赖的package包/类
/**
* Return a list of Association names
*
* @param scheme
* @param version
* @return
*/
public Vector<String> getAssociationNames(String scheme, String version) {
Vector<String> association_vec = new Vector<String>();
try {
LexBIGService lbSvc = RemoteServerUtil.createLexBIGService();
CodingSchemeVersionOrTag versionOrTag = new CodingSchemeVersionOrTag();
versionOrTag.setVersion(version);
CodingScheme cs = lbSvc.resolveCodingScheme(scheme, versionOrTag);
SupportedHierarchy[] hierarchies = cs.getMappings().getSupportedHierarchy();
String[] ids = hierarchies[0].getAssociationNames();
for (int i = 0; i < ids.length; i++) {
if (!association_vec.contains(ids[i])) {
association_vec.add(ids[i]);
_logger.debug("AssociationName: " + ids[i]);
}
}
} catch (Exception ex) {
_logger.warn(ex.getMessage());
}
return association_vec;
}
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:29,代码来源:CartActionBean.java
示例3: getResovedValueSetVersions
import org.LexGrid.codingSchemes.CodingScheme; //导入依赖的package包/类
public Vector getResovedValueSetVersions(String selected_vocabulary) {
Vector v = new Vector();
try {
List<CodingScheme> schemes = lrvs.listAllResolvedValueSets();
for (int i = 0; i < schemes.size(); i++) {
CodingScheme cs = schemes.get(i);
int j = i+1;
String key = cs.getCodingSchemeURI();
String cs_name = cs.getCodingSchemeName();
String name = cs.getFormalName();
String value = cs.getRepresentsVersion();
if (key.compareTo(selected_vocabulary) == 0 || cs_name.compareTo(selected_vocabulary) == 0 || name.compareTo(selected_vocabulary) == 0) {
v.add(value);
}
}
} catch (Exception ex) {
ex.printStackTrace();
}
return v;
}
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:23,代码来源:ValueSetSearchUtils.java
示例4: getRVSCSName2VersionHashMap
import org.LexGrid.codingSchemes.CodingScheme; //导入依赖的package包/类
public HashMap getRVSCSName2VersionHashMap() {
HashMap hmap = new HashMap();
try {
List<CodingScheme> schemes = lrvs.listAllResolvedValueSets();
for (int i = 0; i < schemes.size(); i++) {
CodingScheme cs = schemes.get(i);
String uri = cs.getCodingSchemeURI();
String name = cs.getCodingSchemeName();
hmap.put(uri, cs.getRepresentsVersion());
hmap.put(name, cs.getRepresentsVersion());
}
} catch (Exception ex) {
ex.printStackTrace();
}
return hmap;
}
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:17,代码来源:ValueSetSearchUtils.java
示例5: getSupportedPropertyNames
import org.LexGrid.codingSchemes.CodingScheme; //导入依赖的package包/类
public Vector<String> getSupportedPropertyNames(CodingScheme cs) {
Vector w = getSupportedProperties(cs);
if (w == null) return null;
Vector<String> v = new Vector<String>();
for (int i=0; i<w.size(); i++)
{
SupportedProperty sp = (SupportedProperty) w.elementAt(i);
if (sp.getUri() != null && isAnnotationPropertyPCode(sp.getLocalId())) {
if (!sp.getUri().endsWith(sp.getLocalId())) {
v.add(sp.getLocalId());
}
} else {
v.add(sp.getLocalId());
}
}
return SortUtils.quickSort(v);
}
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:18,代码来源:CodingSchemeDataUtils.java
示例6: getResolvedValueSetCodingSchemes
import org.LexGrid.codingSchemes.CodingScheme; //导入依赖的package包/类
public Vector getResolvedValueSetCodingSchemes() {
Vector w = new Vector();
try {
//List<CodingScheme> choices = new ArrayList<CodingScheme>();
LexEVSResolvedValueSetService lrvs = new LexEVSResolvedValueSetServiceImpl(lbSvc);
if (lrvs == null) {
System.out.println("WARNING: lrvs == null???");
return null;
}
List<CodingScheme> schemes = lrvs.listAllResolvedValueSets();
if (schemes == null) {
System.out.println("WARNING: lrvs.listAllResolvedValueSets() returns null.");
return null;
}
for (int i = 0; i < schemes.size(); i++) {
CodingScheme cs = schemes.get(i);
w.add(cs.getCodingSchemeName() + "|" + cs.getRepresentsVersion() + "|" + cs.getFormalName() + "|" + cs.getCodingSchemeURI());
}
} catch (Exception ex) {
ex.printStackTrace();
}
return w;
}
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:25,代码来源:CodingSchemeDataUtils.java
示例7: getResolvedValueSetHashMap
import org.LexGrid.codingSchemes.CodingScheme; //导入依赖的package包/类
public HashMap getResolvedValueSetHashMap() {
if (resovedValueSetHashMap != null) return resovedValueSetHashMap;
HashMap hmap = new HashMap();
try {
//List<CodingScheme> choices = new ArrayList<CodingScheme>();
LexEVSResolvedValueSetService lrvs = new LexEVSResolvedValueSetServiceImpl(lbSvc);
List<CodingScheme> schemes = lrvs.listAllResolvedValueSets();
for (int i = 0; i < schemes.size(); i++) {
CodingScheme cs = schemes.get(i);
int j = i+1;
String key = cs.getCodingSchemeURI();
String name = cs.getCodingSchemeName();
String value = cs.getRepresentsVersion();
Vector v = new Vector();
if (hmap.containsKey(key)) {
v = (Vector) hmap.get(key);
}
v.add(value);
hmap.put(key, v);
}
} catch (Exception ex) {
ex.printStackTrace();
}
return hmap;
}
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:26,代码来源:CodingSchemeDataUtils.java
示例8: getSupportedHierarchies
import org.LexGrid.codingSchemes.CodingScheme; //导入依赖的package包/类
protected SupportedHierarchy[] getSupportedHierarchies(
String codingScheme, CodingSchemeVersionOrTag versionOrTag)
throws LBException {
CodingScheme cs = null;
try {
cs = getCodingScheme(codingScheme, versionOrTag);
} catch (Exception ex) {
}
if (cs == null) {
throw new LBResourceUnavailableException(
"Coding scheme not found -- " + codingScheme);
}
Mappings mappings = cs.getMappings();
return mappings.getSupportedHierarchy();
}
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:18,代码来源:CodingSchemeDataUtils.java
示例9: getFromToCodingSchemes
import org.LexGrid.codingSchemes.CodingScheme; //导入依赖的package包/类
protected Tuple<CodeSystemVersionReference> getFromToCodingSchemes(CodingScheme codingScheme){
Assert.isTrue(
codingScheme.getRelationsCount() == 1,
"Only ONE Relations container is allowed in a Mapping Coding Scheme.");
Relations relations = codingScheme.getRelations(0);
String source = relations.getSourceCodingScheme();
String sourceVersion = relations.getSourceCodingSchemeVersion();
String target = relations.getTargetCodingScheme();
String targetVersion = relations.getTargetCodingSchemeVersion();
//TODO
return new Tuple<CodeSystemVersionReference>(
this.getTransformUtils().toCodeSystemVersionReference(source, sourceVersion, null),
this.getTransformUtils().toCodeSystemVersionReference(target, targetVersion, null)
);
}
开发者ID:NCIP,项目名称:lexevs-service,代码行数:18,代码来源:CodingSchemeToMapVersionTransform.java
示例10: getPropertyQualifierListData
import org.LexGrid.codingSchemes.CodingScheme; //导入依赖的package包/类
public Vector<String> getPropertyQualifierListData(
String codingSchemeName, String version) {
CodingSchemeVersionOrTag vt = new CodingSchemeVersionOrTag();
if (version != null) {
vt.setVersion(version);
}
CodingScheme scheme = null;
try {
scheme = lbSvc.resolveCodingScheme(codingSchemeName, vt);
if (scheme == null)
return null;
Vector<String> propertyQualifierListData = new Vector<String>();
SupportedPropertyQualifier[] qualifiers =
scheme.getMappings().getSupportedPropertyQualifier();
for (int i = 0; i < qualifiers.length; i++) {
SupportedPropertyQualifier qualifier = qualifiers[i];
propertyQualifierListData.add(qualifier.getLocalId());
}
return propertyQualifierListData;
} catch (Exception ex) {
ex.printStackTrace();
}
return null;
}
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:26,代码来源:CodingSchemeDataUtils.java
示例11: getRepresentationalFormListData
import org.LexGrid.codingSchemes.CodingScheme; //导入依赖的package包/类
public Vector<String> getRepresentationalFormListData(
String codingSchemeName, String version) {
CodingSchemeVersionOrTag vt = new CodingSchemeVersionOrTag();
if (version != null) {
vt.setVersion(version);
}
CodingScheme scheme = null;
try {
scheme = lbSvc.resolveCodingScheme(codingSchemeName, vt);
if (scheme == null)
return null;
Vector<String> propertyNameListData = new Vector<String>();
SupportedRepresentationalForm[] forms =
scheme.getMappings().getSupportedRepresentationalForm();
if (forms != null) {
for (int i = 0; i < forms.length; i++) {
SupportedRepresentationalForm form = forms[i];
propertyNameListData.add(form.getLocalId());
}
}
return propertyNameListData;
} catch (Exception ex) {
ex.printStackTrace();
}
return null;
}
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:27,代码来源:CodingSchemeDataUtils.java
示例12: getByVersionIdOrTag
import org.LexGrid.codingSchemes.CodingScheme; //导入依赖的package包/类
/**
* Gets the code system by version id or tag.
*
* @param codeSystem the code system
* @param versionIdOrTag the version id or tag
* @return the code system by version id or tag
*/
protected T getByVersionIdOrTag(
NameVersionPair namePair){
if(namePair == null){
return null;
}
CodingScheme codingScheme = this.resolve(namePair.getName(),
Constructors.createCodingSchemeVersionOrTagFromVersion(namePair.getVersion()));
if(codingScheme != null && this.isValidCodingScheme(codingScheme)){
return this.transform(codingScheme);
} else {
return null;
}
}
开发者ID:NCIP,项目名称:lexevs-service,代码行数:23,代码来源:AbstractLexEvsCodeSystemService.java
示例13: getHierarchyAssociationId
import org.LexGrid.codingSchemes.CodingScheme; //导入依赖的package包/类
public Vector getHierarchyAssociationId(String scheme, String version) {
Vector association_vec = new Vector();
try {
LexBIGService lbSvc = RemoteServerUtil.createLexBIGService();
// Will handle secured ontologies later.
CodingSchemeVersionOrTag versionOrTag = new CodingSchemeVersionOrTag();
versionOrTag.setVersion(version);
CodingScheme cs = lbSvc.resolveCodingScheme(scheme, versionOrTag);
Mappings mappings = cs.getMappings();
SupportedHierarchy[] hierarchies = mappings.getSupportedHierarchy();
java.lang.String[] ids = hierarchies[0].getAssociationIds();
for (int i=0; i<ids.length; i++)
{
if (!association_vec.contains(ids[i])) {
association_vec.add(ids[i]);
}
}
} catch (Exception ex) {
ex.printStackTrace();
}
return association_vec;
}
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:27,代码来源:SearchUtils.java
示例14: getCodingScheme
import org.LexGrid.codingSchemes.CodingScheme; //导入依赖的package包/类
/**
* @param codingScheme
* @param version
* @return
*/
@SuppressWarnings("unused")
private static CodingScheme getCodingScheme(String codingScheme,
String version) {
CodingSchemeVersionOrTag versionOrTag = new CodingSchemeVersionOrTag();
if (version != null)
versionOrTag.setVersion(version);
CodingScheme cs = null;
LexBIGService lbSvc =null;
try {
lbSvc = RemoteServerUtil.createLexBIGService();
cs = lbSvc.resolveCodingScheme(codingScheme, versionOrTag);
} catch (Exception e) {
_logger.error(e.getStackTrace());
return null;
}
return cs;
}
开发者ID:NCIP,项目名称:nci-value-set-editor,代码行数:23,代码来源:ValueSetSearchUtil.java
示例15: createDirectoryResultWithEntryFullVersionDescriptions
import org.LexGrid.codingSchemes.CodingScheme; //导入依赖的package包/类
public static <T> DirectoryResult<T> createDirectoryResultWithEntryFullVersionDescriptions(
LexBIGService lexBigService,
LexEvsToCTS2Transformer<T,CodingScheme,?,?> transformer,
CodingSchemeRendering[] lexCodeSchemeRenderings,
boolean atEnd2){
List<T> cts2EntryList = new ArrayList<T>();
boolean atEnd = true;
DirectoryResult<T> cts2DirectoryResult = new DirectoryResult<T>(cts2EntryList, atEnd);
if(lexCodeSchemeRenderings != null){
for (CodingSchemeRendering lexCodingSchemeRendering : lexCodeSchemeRenderings) {
String lexCodingSchemeName = lexCodingSchemeRendering.getCodingSchemeSummary().getCodingSchemeURI();
String lexCodingSchemeVersion = lexCodingSchemeRendering.getCodingSchemeSummary().getRepresentsVersion();
CodingSchemeVersionOrTag lexTagOrVersion = Constructors.createCodingSchemeVersionOrTagFromVersion(lexCodingSchemeVersion);
try {
CodingScheme lexCodingScheme = lexBigService.resolveCodingScheme(lexCodingSchemeName, lexTagOrVersion);
cts2EntryList.add(transformer.transformFullDescription(lexCodingScheme));
} catch (LBException e) {
throw new RuntimeException(e);
}
}
cts2DirectoryResult = new DirectoryResult<T>(cts2EntryList, atEnd);
}
return cts2DirectoryResult;
}
开发者ID:NCIP,项目名称:lexevs-service,代码行数:27,代码来源:CommonResourceUtils.java
示例16: getLexCodingSchemeList
import org.LexGrid.codingSchemes.CodingScheme; //导入依赖的package包/类
public static <T extends ResourceQuery> List<CodingScheme> getLexCodingSchemeList(
LexBIGService lexBigService,
VersionNameConverter nameConverter,
MappingExtension lexMappingExtension,
QueryData<T> queryData,
SortCriteria cts2SortCriteria) {
List<CodingScheme> lexCodingSchemeList = new ArrayList<CodingScheme>();
CodingSchemeRendering[] lexCodingSchemeRendering;
lexCodingSchemeRendering = CommonResourceUtils.getLexCodingSchemeRenderings(lexBigService, nameConverter, queryData, lexMappingExtension, cts2SortCriteria);
if(lexCodingSchemeRendering != null){
CodeSystemRestriction cts2CodeSystemRestriction = queryData.getCts2CodeSystemRestriction();
lexCodingSchemeList = CommonResourceUtils.getLexCodingSchemeList(lexBigService, lexCodingSchemeRendering, cts2CodeSystemRestriction);
}
return lexCodingSchemeList;
}
开发者ID:NCIP,项目名称:lexevs-service,代码行数:20,代码来源:CommonResourceUtils.java
示例17: getLexCodingScheme
import org.LexGrid.codingSchemes.CodingScheme; //导入依赖的package包/类
public static CodingScheme getLexCodingScheme(
LexBIGService lexBigService,
CodingSchemeRendering lexCodingSchemeRendering) {
CodingScheme lexCodingScheme = null;
String lexCodingSchemeName = null;
String lexVersion = null;
CodingSchemeVersionOrTag lexTagOrVersion = null;
try {
if(lexCodingSchemeRendering != null){
lexCodingSchemeName = lexCodingSchemeRendering.getCodingSchemeSummary().getCodingSchemeURI();
lexVersion = lexCodingSchemeRendering.getCodingSchemeSummary().getRepresentsVersion();
lexTagOrVersion = Constructors.createCodingSchemeVersionOrTagFromVersion(lexVersion);
}
lexCodingScheme = lexBigService.resolveCodingScheme(lexCodingSchemeName, lexTagOrVersion);
} catch (LBException e) {
throw new RuntimeException(e);
}
return lexCodingScheme;
}
开发者ID:NCIP,项目名称:lexevs-service,代码行数:23,代码来源:CommonResourceUtils.java
示例18: determineSourceValue
import org.LexGrid.codingSchemes.CodingScheme; //导入依赖的package包/类
public static String determineSourceValue(String cts2SearchAttribute, CodingScheme lexCodingScheme, VersionNameConverter nameConverter){
String sourceValue = null;
if(lexCodingScheme == null){
return sourceValue;
}
if (cts2SearchAttribute.equals(Constants.ATTRIBUTE_NAME_ABOUT)) {
sourceValue = lexCodingScheme.getCodingSchemeURI();
} else if (cts2SearchAttribute.equals(Constants.ATTRIBUTE_NAME_RESOURCE_SYNOPSIS)) {
sourceValue = lexCodingScheme.getEntityDescription().getContent();
} else if (cts2SearchAttribute.equals(Constants.ATTRIBUTE_NAME_RESOURCE_NAME)) {
sourceValue =
nameConverter.toCts2VersionName(
lexCodingScheme.getCodingSchemeName(),
lexCodingScheme.getRepresentsVersion());
}
return sourceValue;
}
开发者ID:NCIP,项目名称:lexevs-service,代码行数:19,代码来源:CommonSearchFilterUtils.java
示例19: filterLexCodingSchemeList
import org.LexGrid.codingSchemes.CodingScheme; //导入依赖的package包/类
public static List<CodingScheme> filterLexCodingSchemeList(
List<CodingScheme> lexCodingSchemeList,
Set<ResolvedFilter> cts2Filters,
VersionNameConverter nameConverter) {
List<CodingScheme> lexFilteredCodingSchemeList = lexCodingSchemeList;
if(lexCodingSchemeList != null && cts2Filters != null){
Iterator<ResolvedFilter> cts2FilterIterator = cts2Filters.iterator();
while (cts2FilterIterator.hasNext() && (lexCodingSchemeList.size() > 0)) {
ResolvedFilter cts2ResolvedFilter = cts2FilterIterator.next();
lexFilteredCodingSchemeList = filterLexCodingSchemeList(lexCodingSchemeList,
cts2ResolvedFilter,
nameConverter);
}
}
return lexFilteredCodingSchemeList;
}
开发者ID:NCIP,项目名称:lexevs-service,代码行数:20,代码来源:CommonSearchFilterUtils.java
示例20: restrictByQuery
import org.LexGrid.codingSchemes.CodingScheme; //导入依赖的package包/类
public List<CodingScheme> restrictByQuery(
List<CodingScheme> lexCodingSchemes, ResolvedValueSetQuery query)
throws LBException {
List<CodingScheme> temp = new ArrayList<CodingScheme>();
List<AbsoluteCodingSchemeVersionReference> inCodingSchemes = new ArrayList<AbsoluteCodingSchemeVersionReference>();
if (query == null
|| query.getResolvedValueSetQueryServiceRestrictions() == null) {
return lexCodingSchemes;
}
ResolvedValueSetQueryServiceRestrictions restrictions = query
.getResolvedValueSetQueryServiceRestrictions();
inCodingSchemes
.addAll(getAbsoluteCodingSchemeVersionReferenceList(restrictions
.getCodeSystemVersions()));
inCodingSchemes
.addAll(getAbsoluteCodingSchemeVersionReferenceList(restrictions
.getCodeSystems()));
temp= filterOnCodingSchemes(lexCodingSchemes, inCodingSchemes);
temp= filterOnDefinitions(temp, restrictions.getValueSetDefinitions());
temp= filterOnEntities(temp, restrictions.getEntities());
return temp;
}
开发者ID:NCIP,项目名称:lexevs-service,代码行数:24,代码来源:CommonResolvedValueSetUtils.java
注:本文中的org.LexGrid.codingSchemes.CodingScheme类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论