本文整理汇总了Java中org.LexGrid.LexBIG.LexBIGService.LexBIGService类的典型用法代码示例。如果您正苦于以下问题:Java LexBIGService类的具体用法?Java LexBIGService怎么用?Java LexBIGService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LexBIGService类属于org.LexGrid.LexBIG.LexBIGService包,在下文中一共展示了LexBIGService类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getLexBIGService
import org.LexGrid.LexBIG.LexBIGService.LexBIGService; //导入依赖的package包/类
public static LexBIGService getLexBIGService(String serviceUrl) {
SimpleRemoteServerUtil lexEVSSvr = null;
try {
if (serviceUrl == null || serviceUrl.compareTo("") == 0 || serviceUrl.compareToIgnoreCase("null") == 0) {
LexBIGService lbSvc = LexBIGServiceImpl.defaultInstance();
return lbSvc;
}
String meddra_token = ServiceTestCase.MEDDRA_TOKEN;
lexEVSSvr = new SimpleRemoteServerUtil(serviceUrl);
if (meddra_token != null && ServiceTestCase.MEDDRA_NAMES.length > 0) {
Vector names = new Vector();
Vector values = new Vector();
for (int i=0; i<ServiceTestCase.MEDDRA_NAMES.length; i++) {
String meddra_name = ServiceTestCase.MEDDRA_NAMES[i];
names.add(meddra_name);
values.add(meddra_token);
}
lexEVSSvr.setSecurityTokens(names, values);
}
} catch (Exception ex) {
ex.printStackTrace();
}
return lexEVSSvr.getLexBIGService(serviceUrl);
}
开发者ID:NCIP,项目名称:nci-metathesaurus-browser,代码行数:27,代码来源:LexEVSServiceUtil.java
示例2: testExactMatch
import org.LexGrid.LexBIG.LexBIGService.LexBIGService; //导入依赖的package包/类
public void testExactMatch(String scheme, String version, String searchText, String algorithm) throws Exception {
System.out.println("\nscheme: " + scheme);
System.out.println("searchText: " + searchText);
System.out.println("algorithm: " + algorithm);
CodingSchemeVersionOrTag versionOrTag = new CodingSchemeVersionOrTag();
versionOrTag.setVersion(version);
LexBIGService lbs = RemoteServerUtil.createLexBIGService();
CodedNodeSet cns = lbs.getCodingSchemeConcepts(scheme, versionOrTag);
cns = cns.restrictToMatchingDesignations(searchText, SearchDesignationOption.ALL, algorithm, null);
ResolvedConceptReference[] list = null;
int knt = 0;
try {
list = cns.resolveToList(null, null, null, 500).getResolvedConceptReference();
for(ResolvedConceptReference ref : list){
displayRef(ref);
knt++;
}
} catch (Exception ex) {
System.out.println("Exception thrown #2");
}
if (knt == 0) System.out.println("No match.");
}
开发者ID:NCIP,项目名称:nci-mapping-tool,代码行数:27,代码来源:MappingUtils.java
示例3: getAssociationNames
import org.LexGrid.LexBIG.LexBIGService.LexBIGService; //导入依赖的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
示例4: createService
import org.LexGrid.LexBIG.LexBIGService.LexBIGService; //导入依赖的package包/类
@SuppressWarnings({ "unchecked", "rawtypes"})
public LexEvsMapEntryQueryService createService(
FakeLexEvsSystem<MapEntry, MapEntryDirectoryEntry, MapEntryQuery, LexEvsMapEntryQueryService> fakeLexEvs,
boolean withData) throws Exception{
LexEvsMapEntryQueryService service = new LexEvsMapEntryQueryService();
// Mock LexBIGService, overwrite return value for getSupportedCodingSchemes
LexBIGService lexBigService = fakeLexEvs.createMockedLexBIGServiceWithFakeLexEvsData(service, withData);
service.setLexBigService(lexBigService);
MappingToMapEntryTransform transform = EasyMock.createNiceMock(MappingToMapEntryTransform.class);
EasyMock.replay(transform);
// Overwrite objects in service object
service.setMapEntryTransformer(transform);
service.setCodeSystemVersionNameConverter(new VersionNameConverter());
service.setMappingExtension(new MappingExtensionImpl(fakeLexEvs));
return service;
}
开发者ID:NCIP,项目名称:lexevs-service,代码行数:22,代码来源:LexEvsMapEntryQueryServiceTest.java
示例5: getPathsFromRoot
import org.LexGrid.LexBIG.LexBIGService.LexBIGService; //导入依赖的package包/类
/**
* Resolves one or more paths from the hierarchy root to the given code
* through a list of connected associations defined by the hierarchy.
*/
protected AssociationList getPathsFromRoot(LexBIGService lbsvc, LexBIGServiceConvenienceMethods lbscm,
String scheme, CodingSchemeVersionOrTag csvt, String hierarchyID, String focusCode,
Map<String, EntityDescription> codesToDescriptions) throws LBException {
// Get paths from the focus code to the root from the
// convenience method. All paths are resolved. If only
// one path is required, it would be possible to use
// HierarchyPathResolveOption.ONE to reduce processing
// and improve overall performance.
AssociationList pathToRoot = lbscm.getHierarchyPathToRoot(scheme, csvt, null, focusCode, false,
HierarchyPathResolveOption.ALL, null);
// But for purposes of this example we need to display info
// in order coming from root direction. Process the paths to root
// recursively to reverse the order for processing ...
AssociationList pathFromRoot = new AssociationList();
for (int i = pathToRoot.getAssociationCount() - 1; i >= 0; i--)
reverseAssoc(lbsvc, lbscm, scheme, csvt, pathToRoot.getAssociation(i), pathFromRoot, codesToDescriptions);
return pathFromRoot;
}
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:26,代码来源:BuildTreeForCode.java
示例6: main
import org.LexGrid.LexBIG.LexBIGService.LexBIGService; //导入依赖的package包/类
public static void main(String[] args) throws Exception {
args = parse(args);
LexBIGService lbs = RemoteServerUtil.createLexBIGService();
CodedNodeSet cns =
lbs.getCodingSchemeConcepts("NCI MetaThesaurus", null);
cns =
cns.restrictToMatchingDesignations("single dose",
SearchDesignationOption.ALL, "LuceneQuery", null);
CodedNodeGraph cng = lbs.getNodeGraph("NCI MetaThesaurus", null, null);
cng = cng.restrictToTargetCodes(cns);
ResolvedConceptReferenceList list =
cng.resolveAsList(null, true, false, 0, 0, null, null, null, null,
500);
for (ResolvedConceptReference ref : list.getResolvedConceptReference()) {
System.out.println("Code: " + ref.getCode());
System.out.println(" Entity Description"
+ ref.getEntityDescription().getContent());
}
}
开发者ID:NCIP,项目名称:nci-metathesaurus-browser,代码行数:23,代码来源:KevinTest.java
示例7: getLexBIGService
import org.LexGrid.LexBIG.LexBIGService.LexBIGService; //导入依赖的package包/类
public static LexBIGService getLexBIGService(String serviceUrl) {
if (serviceUrl == null || serviceUrl.compareTo("") == 0 || serviceUrl.compareToIgnoreCase("null") == 0) {
LexBIGService lbSvc = LexBIGServiceImpl.defaultInstance();
return lbSvc;
}
String meddra_token = ServiceTestCase.MEDDRA_TOKEN;
SimpleRemoteServerUtil lexEVSSvr = new SimpleRemoteServerUtil(serviceUrl);
if (meddra_token != null && ServiceTestCase.MEDDRA_NAMES.length > 0) {
Vector names = new Vector();
Vector values = new Vector();
for (int i=0; i<ServiceTestCase.MEDDRA_NAMES.length; i++) {
String meddra_name = ServiceTestCase.MEDDRA_NAMES[i];
names.add(meddra_name);
values.add(meddra_token);
}
lexEVSSvr.setSecurityTokens(names, values);
}
return lexEVSSvr.getLexBIGService(serviceUrl);
}
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:21,代码来源:LexEVSServiceUtil.java
示例8: ValueSetHierarchy
import org.LexGrid.LexBIG.LexBIGService.LexBIGService; //导入依赖的package包/类
public ValueSetHierarchy(LexBIGService lbSvc,
LexEVSValueSetDefinitionServices vsd_service,
HashMap localName2FormalNameHashMap,
HashMap codingSchemeName2URIHashMap) {
this.lbSvc = lbSvc;
this.vsd_service = vsd_service;
codingSchemeDataUtils = new CodingSchemeDataUtils(lbSvc);
treeUtils = new TreeUtils(lbSvc);
try {
valueSetDefinitionURIList = vsd_service.listValueSetDefinitionURIs();
} catch (Exception ex) {
System.out.println("ERROR: vsd_service.listValueSetDefinitionURIs() failed.");
}
this.localName2FormalNameHashMap = localName2FormalNameHashMap;
if (localName2FormalNameHashMap != null) {
this.vocabularyNameSet = localName2FormalNameHashMap.keySet();
}
this.codingSchemeName2URIHashMap = codingSchemeName2URIHashMap;
initialize();
}
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:24,代码来源:ValueSetHierarchy.java
示例9: getMetadataValues
import org.LexGrid.LexBIG.LexBIGService.LexBIGService; //导入依赖的package包/类
public static Vector getMetadataValues(String scheme, String propertyName) {
if (_formalName2MetadataHashMap == null) {
setCodingSchemeMap();
}
String formalName = getFormalName(scheme);
if (!_formalName2MetadataHashMap.containsKey(formalName)) {
return null;
}
Vector metadata = (Vector) _formalName2MetadataHashMap.get(formalName);
if (metadata == null || metadata.size() == 0) {
return null;
}
LexBIGService lbSvc = RemoteServerUtil.createLexBIGService();
Vector v = new MetadataUtils(lbSvc).getMetadataValues(metadata, propertyName);
return v;
}
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:18,代码来源:DataUtils.java
示例10: getPage
import org.LexGrid.LexBIG.LexBIGService.LexBIGService; //导入依赖的package包/类
public static <T extends ResourceQuery> ResolvedConceptReferenceResults getPage(
LexBIGService lexBigService,
QueryData<T> queryData,
SortCriteria cts2SortCriteria,
Page page){
ResolvedConceptReferenceResults lexResolvedConceptResults = null;
ResolvedConceptReferencesIterator lexResolvedConceptIterator;
CodedNodeSet lexCodedNodeSet;
lexCodedNodeSet = CommonResourceUtils.getLexCodedNodeSet(lexBigService, queryData, cts2SortCriteria);
if(lexCodedNodeSet != null){
lexResolvedConceptIterator = CommonUtils.getLexResolvedConceptIterator(lexCodedNodeSet, cts2SortCriteria);
lexResolvedConceptResults = CommonPageUtils.getPage(lexResolvedConceptIterator, page);
}
return lexResolvedConceptResults;
}
开发者ID:NCIP,项目名称:lexevs-service,代码行数:19,代码来源:CommonPageUtils.java
示例11: getDistinctNamespacesOfCode
import org.LexGrid.LexBIG.LexBIGService.LexBIGService; //导入依赖的package包/类
public static List<String> getDistinctNamespacesOfCode(
String codingScheme,
String version,
String code) {
try {
LexBIGService lbSvc = RemoteServerUtil.createLexBIGService();
LexBIGServiceConvenienceMethods lbscm =
(LexBIGServiceConvenienceMethods) lbSvc
.getGenericExtension("LexBIGServiceConvenienceMethods");
lbscm.setLexBIGService(lbSvc);
CodingSchemeVersionOrTag csvt = new CodingSchemeVersionOrTag();
csvt.setVersion(version);
return lbscm.getDistinctNamespacesOfCode(codingScheme, csvt, code);
} catch (Exception ex) {
ex.printStackTrace();
}
return null;
}
开发者ID:NCIP,项目名称:nci-mapping-tool,代码行数:22,代码来源:DataUtils.java
示例12: getCodingScheme
import org.LexGrid.LexBIG.LexBIGService.LexBIGService; //导入依赖的package包/类
public static CodingScheme getCodingScheme(String codingScheme,
CodingSchemeVersionOrTag versionOrTag) throws LBException {
CodingScheme cs = null;
try {
LexBIGService lbSvc = RemoteServerUtil.createLexBIGService();
cs = lbSvc.resolveCodingScheme(codingScheme, versionOrTag);
} catch (Exception ex) {
//ex.printStackTrace();
if (versionOrTag.getVersion() != null) {
System.out.println("Unable to resolve coding scheme: " + codingScheme + " version: " + versionOrTag.getVersion());
} else {
System.out.println("Unable to resolve coding scheme: " + codingScheme);
}
}
return cs;
}
开发者ID:NCIP,项目名称:nci-value-set-editor,代码行数:18,代码来源:DataUtils.java
示例13: getMappingCodingSchemesEntityParticipatesIn
import org.LexGrid.LexBIG.LexBIGService.LexBIGService; //导入依赖的package包/类
public static Vector getMappingCodingSchemesEntityParticipatesIn(String code, String namespace) {
Vector v = new Vector();
try {
LexBIGService distributed = RemoteServerUtil.createLexBIGService();
MappingExtension mappingExtension =
(MappingExtension)distributed.getGenericExtension("MappingExtension");
AbsoluteCodingSchemeVersionReferenceList mappingSchemes =
mappingExtension.getMappingCodingSchemesEntityParticipatesIn(code, namespace);
//output is all of the mapping ontologies that this code participates in.
for(AbsoluteCodingSchemeVersionReference ref : mappingSchemes.getAbsoluteCodingSchemeVersionReference()){
v.add(ref.getCodingSchemeURN() + "|" + ref.getCodingSchemeVersion());
}
} catch (Exception ex) {
ex.printStackTrace();
}
return v;
}
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:22,代码来源:DataUtils.java
示例14: getConceptByCode
import org.LexGrid.LexBIG.LexBIGService.LexBIGService; //导入依赖的package包/类
/**
* Get concept Entity by code
* @param codingScheme
* @param code
* @return
*/
public ResolvedConceptReference getConceptByCode(String codingScheme, String version,
String code) {
CodedNodeSet cns = null;
ResolvedConceptReferencesIterator iterator = null;
try {
LexBIGService lbSvc = RemoteServerUtil.createLexBIGService();
CodingSchemeVersionOrTag csvt = new CodingSchemeVersionOrTag();
if (version != null) csvt.setVersion(version);
cns = lbSvc.getCodingSchemeConcepts(codingScheme, csvt);
ConceptReferenceList crefs =
createConceptReferenceList(new String[] { code }, codingScheme);
cns.restrictToCodes(crefs);
iterator = cns.resolve(null, null, null);
if (iterator.numberRemaining() > 0) {
ResolvedConceptReference ref = (ResolvedConceptReference) iterator.next();
return ref;
}
} catch (LBException e) {
_logger.info("Error: " + e.getMessage());
}
return null;
}
开发者ID:NCIP,项目名称:nci-mapping-tool,代码行数:32,代码来源:SearchCart.java
示例15: getDistinctNamespacesOfCode
import org.LexGrid.LexBIG.LexBIGService.LexBIGService; //导入依赖的package包/类
public static List<String> getDistinctNamespacesOfCode(
String codingScheme,
String version,
String code) {
try {
LexBIGService lbSvc = RemoteServerUtil.createLexBIGService();
LexBIGServiceConvenienceMethods lbscm =
(LexBIGServiceConvenienceMethods) lbSvc
.getGenericExtension("LexBIGServiceConvenienceMethods");
lbscm.setLexBIGService(lbSvc);
CodingSchemeVersionOrTag csvt = new CodingSchemeVersionOrTag();
csvt.setVersion(version);
List<String> list = lbscm.getDistinctNamespacesOfCode(codingScheme, csvt, code);
return list;
} catch (Exception ex) {
ex.printStackTrace();
}
return null;
}
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:23,代码来源:DataUtils.java
示例16: getLexCodingSchemeList
import org.LexGrid.LexBIG.LexBIGService.LexBIGService; //导入依赖的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: isExtension
import org.LexGrid.LexBIG.LexBIGService.LexBIGService; //导入依赖的package包/类
public static boolean isExtension(String codingScheme, String version) {
CodingSchemeVersionOrTag tagOrVersion = new CodingSchemeVersionOrTag();
if (version != null) tagOrVersion.setVersion(version);
try {
LexBIGService lbSvc = RemoteServerUtil.createLexBIGService();
SupplementExtension supplementExtension =
(SupplementExtension) lbSvc.getGenericExtension("SupplementExtension");
return supplementExtension.isSupplement(codingScheme, tagOrVersion);
//return ServiceUtility.isSupplement(codingScheme, tagOrVersion);
} catch (Exception ex) {
//ex.printStackTrace();
_logger.warn("WARNING: DataUtils SupplementExtension.isSupplement throws exeption???");
}
return false;
}
开发者ID:NCIP,项目名称:nci-value-set-editor,代码行数:17,代码来源:DataUtils.java
示例18: getSchemeVersions
import org.LexGrid.LexBIG.LexBIGService.LexBIGService; //导入依赖的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;
}
开发者ID:NCIP,项目名称:nci-mapping-tool,代码行数:27,代码来源:SearchCart.java
示例19: resolveConcepts
import org.LexGrid.LexBIG.LexBIGService.LexBIGService; //导入依赖的package包/类
/**
* Resolves matching concepts for any word in the given term.
* @param css The code system to search.
* @param matchWords The term to match.
* @return The list of matching references.
* @throws LBException
*/
protected ResolvedConceptReferencesIterator resolveConcepts(CodingSchemeSummary css, String query) throws LBException {
// Define a code set over the target terminology and
// restrict to concepts with matching text based on
// the provided term.
LexBIGService lbs = LexBIGServiceImpl.defaultInstance();
CodingSchemeVersionOrTag csvt = new CodingSchemeVersionOrTag();
csvt.setVersion(css.getRepresentsVersion());
CodedNodeSet cns = lbs.getCodingSchemeConcepts(css.getLocalName(), csvt);
// Restrict the code set.
cns.restrictToMatchingDesignations(
query, SearchDesignationOption.ALL, MatchAlgorithms.LuceneQuery.name(), null);
// Resolve the concepts and assigned text.
ResolvedConceptReferencesIterator matches = cns.resolve(
ConvenienceMethods.createSortOptionList(new String[] {SortableProperties.code.name()}),
null, new PropertyType[] {PropertyType.PRESENTATION});
return matches;
}
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:27,代码来源:ScoreTerm.java
示例20: isExtension
import org.LexGrid.LexBIG.LexBIGService.LexBIGService; //导入依赖的package包/类
public static boolean isExtension(String codingScheme, String version) {
CodingSchemeVersionOrTag tagOrVersion = new CodingSchemeVersionOrTag();
if (version != null) tagOrVersion.setVersion(version);
try {
LexBIGService lbSvc = RemoteServerUtil.createLexBIGService();
SupplementExtension supplementExtension =
(SupplementExtension) lbSvc.getGenericExtension("SupplementExtension");
return supplementExtension.isSupplement(codingScheme, tagOrVersion);
//return ServiceUtility.isSupplement(codingScheme, tagOrVersion);
} catch (Exception ex) {
ex.printStackTrace();
System.out.println("DataUtils SupplementExtension.isSupplement throws exeption???");
}
return false;
}
开发者ID:NCIP,项目名称:nci-mapping-tool,代码行数:17,代码来源:DataUtils.java
注:本文中的org.LexGrid.LexBIG.LexBIGService.LexBIGService类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论