本文整理汇总了Java中org.LexGrid.LexBIG.DataModel.Collections.LocalNameList类的典型用法代码示例。如果您正苦于以下问题:Java LocalNameList类的具体用法?Java LocalNameList怎么用?Java LocalNameList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LocalNameList类属于org.LexGrid.LexBIG.DataModel.Collections包,在下文中一共展示了LocalNameList类的24个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: searchByPresentationProperty
点赞 3
import org.LexGrid.LexBIG.DataModel.Collections.LocalNameList; //导入依赖的package包/类
public ResolvedConceptReferencesIterator searchByPresentationProperty(String codingSchemeURN, String codingSchemeVersion,
String propertyName, String propertyValue, String[] sourceList, String algorithm) {
ResolvedConceptReferencesIterator iterator = null;
try {
CodedNodeSet cns = getEntitiesWithProperty(codingSchemeURN, codingSchemeVersion,
propertyName, propertyValue, sourceList, algorithm);
SortOptionList sortOptions = null;
LocalNameList filterOptions = null;
LocalNameList propertyNames = null;
CodedNodeSet.PropertyType[] propertyTypes = null;
boolean resolveObjects = false;
iterator = cns.resolve(sortOptions, filterOptions, propertyNames, propertyTypes, resolveObjects);
} catch (Exception ex) {
ex.printStackTrace();
}
return iterator;
}
开发者ID:NCIP,
项目名称:nci-metathesaurus-browser,
代码行数:19,
代码来源:MetathesaurusSearchUtils.java
示例2: getMatches
点赞 3
import org.LexGrid.LexBIG.DataModel.Collections.LocalNameList; //导入依赖的package包/类
protected ResolvedConceptReferenceList getMatches(
String code, String relation, boolean resolveForward)
throws LBException {
NameAndValue nv = new NameAndValue();
NameAndValueList nvList = new NameAndValueList();
nv.setName(relation);
nvList.addNameAndValue(nv);
boolean resolveBackward = ! resolveForward;
CodedNodeGraph cng = _lbSvc.getNodeGraph(_scheme, _csvt, null);
cng = cng.restrictToAssociations(nvList, null);
ResolvedConceptReferenceList matches =
cng.resolveAsList(
ConvenienceMethods.createConceptReference(code, _scheme),
resolveBackward, resolveForward, 1, 1,
new LocalNameList(), null, null, MAX_RETURN);
return matches;
}
开发者ID:NCIP,
项目名称:nci-term-browser,
代码行数:19,
代码来源:FindRelatedCodes2.java
示例3: restrictToSource
点赞 3
import org.LexGrid.LexBIG.DataModel.Collections.LocalNameList; //导入依赖的package包/类
public static CodedNodeSet restrictToSource(CodedNodeSet cns, String source) {
if (cns == null) return cns;
if (source == null || source.compareTo("*") == 0 || source.compareTo("") == 0 || source.compareTo("ALL") == 0) return cns;
LocalNameList contextList = null;
LocalNameList sourceLnL = null;
NameAndValueList qualifierList = null;
Vector<String> w2 = new Vector<String>();
w2.add(source);
sourceLnL = vector2LocalNameList(w2);
LocalNameList propertyLnL = null;
CodedNodeSet.PropertyType[] types = new CodedNodeSet.PropertyType[] {CodedNodeSet.PropertyType.PRESENTATION};
try {
cns = cns.restrictToProperties(propertyLnL, types, sourceLnL, contextList, qualifierList);
} catch (Exception ex) {
System.out.println("restrictToSource throws exceptions.");
return null;
}
return cns;
}
开发者ID:NCIP,
项目名称:cadsr-semantic-tools,
代码行数:22,
代码来源:LexEVSQueryServiceImpl.java
示例4: ResolvedConceptReferencesIteratorImpl
点赞 3
import org.LexGrid.LexBIG.DataModel.Collections.LocalNameList; //导入依赖的package包/类
public ResolvedConceptReferencesIteratorImpl(CodeHolder codes, LocalNameList restrictToProperties,
PropertyType[] restrictToPropertyTypes, Filter[] filters, boolean resolveEntities) {
try {
codesToReturn_ = codes.clone();
} catch (CloneNotSupportedException e) {
throw new RuntimeException(e);
}
filters_ = filters;
lastRead_ = System.currentTimeMillis();
restrictToProperties_ = restrictToProperties;
restrictToPropertyTypes_ = restrictToPropertyTypes;
resolveEntities_ = resolveEntities;
maxSizeSystemLimit =
LexEvsServiceLocator.getInstance().getSystemResourceService().
getSystemVariables().getMaxResultSize();
// launch a clean up thread to recover the memory from this object.
// this allows the JVM to exit while this thread is still active.
cuti_ = new CleanUpThread();
cut_ = new Thread(cuti_);
cut_.setDaemon(true);
cut_.start();
}
开发者ID:NCIP,
项目名称:cadsr-semantic-tools,
代码行数:25,
代码来源:ResolvedConceptReferencesIteratorImpl.java
示例5: buildResolvedConceptReference
点赞 3
import org.LexGrid.LexBIG.DataModel.Collections.LocalNameList; //导入依赖的package包/类
public ResolvedConceptReferenceList buildResolvedConceptReference(List<CodeToReturn> codesToReturn,
LocalNameList restrictToProperties, PropertyType[] restrictToPropertyTypes, Filter[] filters,
boolean resolve) throws LBInvocationException {
ResolvedConceptReferenceList returnList = new ResolvedConceptReferenceList();
for(CodeToReturn codeToReturn : codesToReturn){
returnList.addResolvedConceptReference(
doBuildResolvedConceptReference(
codeToReturn,
restrictToProperties,
restrictToPropertyTypes,
filters,
resolve));
}
if(resolve) {
return this.addEntities(returnList, codesToReturn, restrictToProperties, restrictToPropertyTypes);
} else {
return returnList;
}
}
开发者ID:NCIP,
项目名称:cadsr-semantic-tools,
代码行数:22,
代码来源:DefaultCodeToReturnResolver.java
示例6: addEntities
点赞 3
import org.LexGrid.LexBIG.DataModel.Collections.LocalNameList; //导入依赖的package包/类
private ResolvedConceptReferenceList addEntities(
ResolvedConceptReferenceList unresolvedList,
List<CodeToReturn> codesToReturn,
LocalNameList restrictToProperties, PropertyType[] restrictToPropertyTypes) throws LBInvocationException {
Map<String,Entity> entityMap = this.buildCodedEntry(
codesToReturn,
restrictToProperties,
restrictToPropertyTypes);
for(ResolvedConceptReference ref : unresolvedList.getResolvedConceptReference()) {
if(ref == null) {continue;}
String refKey = this.getKey(ref);
ref.setEntity(entityMap.get(refKey));
}
return unresolvedList;
}
开发者ID:NCIP,
项目名称:cadsr-semantic-tools,
代码行数:19,
代码来源:DefaultCodeToReturnResolver.java
示例7: buildCodedEntry
点赞 3
import org.LexGrid.LexBIG.DataModel.Collections.LocalNameList; //导入依赖的package包/类
private Entity buildCodedEntry(String codingSchemeUri, String codingSchemeVersion, String code, String namespace,
LocalNameList restrictToProperties, PropertyType[] restrictToPropertyTypes) throws LBInvocationException {
if(DaoUtility.containsNulls(codingSchemeUri, codingSchemeVersion,code,namespace)){
return null;
}
EntityService entityService =
LexEvsServiceLocator.getInstance().getDatabaseServiceManager().getEntityService();
return entityService.getEntity(
codingSchemeUri,
codingSchemeVersion,
code,
namespace,
DaoUtility.localNameListToString(restrictToProperties),
DaoUtility.propertyTypeArrayToString(restrictToPropertyTypes));
}
开发者ID:NCIP,
项目名称:cadsr-semantic-tools,
代码行数:18,
代码来源:DefaultCodeToReturnResolver.java
示例8: getLexCodedNodeSet
点赞 3
import org.LexGrid.LexBIG.DataModel.Collections.LocalNameList; //导入依赖的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;
}
开发者ID:NCIP,
项目名称:lexevs-service,
代码行数:25,
代码来源:CommonResourceUtils.java
示例9: createMockedGetNodeSetMethod
点赞 3
import org.LexGrid.LexBIG.DataModel.Collections.LocalNameList; //导入依赖的package包/类
public void createMockedGetNodeSetMethod(LexBIGService lexBigService) throws LBException{
EasyMock.expect(lexBigService.getNodeSet((String) EasyMock.anyObject(), (CodingSchemeVersionOrTag) EasyMock.anyObject(), (LocalNameList) EasyMock.anyObject())).andAnswer(
new IAnswer<CodedNodeSet>() {
@Override
public CodedNodeSet answer() throws Throwable {
FakeCodedNodeSetImpl codedNodeSet = new FakeCodedNodeSetImpl();
String codingScheme = (String) EasyMock.getCurrentArguments()[0];
CodingSchemeVersionOrTag version = (CodingSchemeVersionOrTag) EasyMock.getCurrentArguments()[1];
for(int i=0; i < fakeData.size(); i++){
if(fakeData.getScheme_DataField(i, DataField.ABOUT).toUpperCase().equals(codingScheme.toUpperCase()) &&
(fakeData.getScheme_DataField(i, DataField.RESOURCE_VERSION).toUpperCase().equals(version.getVersion().toUpperCase()))){
codedNodeSet.add(new FakeCodedNode(codingScheme, version.getVersion()));
}
}
return codedNodeSet;
}
}
).anyTimes();
}
开发者ID:NCIP,
项目名称:lexevs-service,
代码行数:22,
代码来源:FakeLexEvsSystem.java
示例10: getEntitiesWithProperty
点赞 2
import org.LexGrid.LexBIG.DataModel.Collections.LocalNameList; //导入依赖的package包/类
public CodedNodeSet getEntitiesWithProperty(String codingSchemeURN, String codingSchemeVersion, String type,
String propertyName, String propertyValue, String[] sourceList, String algorithm) {
CodedNodeSet cns = null;
try {
cns = getEntities(codingSchemeURN, codingSchemeVersion, type);
LocalNameList propertyNames = new LocalNameList();
propertyNames.addEntry(propertyName);
cns = cns.restrictToMatchingProperties(propertyNames, null, propertyValue, algorithm, null);
if (sourceList != null && sourceList.length > 0) {
for (int i=0; i<sourceList.length; i++) {
String source = sourceList[i];
LocalNameList sources = new LocalNameList();
sources.addEntry(source);
LocalNameList contextList = null;
NameAndValueList qualifierList = null;
CodedNodeSet.PropertyType[] propertyTypes = new CodedNodeSet.PropertyType[1];
propertyTypes[0] = CodedNodeSet.PropertyType.PRESENTATION;
cns = cns.restrictToProperties(null, propertyTypes, sources, contextList, qualifierList);
}
}
} catch (Exception ex) {
ex.printStackTrace();
}
return cns;
}
开发者ID:NCIP,
项目名称:nci-metathesaurus-browser,
代码行数:28,
代码来源:MetathesaurusSearchUtils.java
示例11: getEntities
点赞 2
import org.LexGrid.LexBIG.DataModel.Collections.LocalNameList; //导入依赖的package包/类
public CodedNodeSet getEntities(String codingSchemeURN, String codingSchemeVersion, String type) {
LocalNameList lnl = new LocalNameList();
lnl.addEntry(type);
CodedNodeSet cns = null;
try {
cns = lbSvc.getNodeSet(codingSchemeURN, Constructors.createCodingSchemeVersionOrTagFromVersion(codingSchemeVersion), lnl);
} catch (Exception ex) {
ex.printStackTrace();
}
return cns;
}
开发者ID:NCIP,
项目名称:nci-metathesaurus-browser,
代码行数:12,
代码来源:MetathesaurusSearchUtils.java
示例12: generateResolvedConceptReferences
点赞 2
import org.LexGrid.LexBIG.DataModel.Collections.LocalNameList; //导入依赖的package包/类
public ResolvedConceptReferenceList generateResolvedConceptReferences(String codingScheme, String version, int number) {
if (version == null) {
version = codingSchemeDataUtils.getVocabularyVersionByTag(codingScheme, gov.nih.nci.evs.browser.common.Constants.PRODUCTION);
}
CodingSchemeVersionOrTag csvt = new CodingSchemeVersionOrTag();
if (version != null) {
csvt.setVersion(version);
}
ResolvedConceptReferenceList rcrl = new ResolvedConceptReferenceList();
try {
LocalNameList entityTypes = new LocalNameList();
entityTypes.addEntry("concept");
CodedNodeSet cns = lbSvc.getNodeSet(codingScheme, csvt, entityTypes);
SortOptionList sortOptions = null;
LocalNameList filterOptions = null;
LocalNameList propertyNames = null;
CodedNodeSet.PropertyType[] propertyTypes = null;
boolean resolveObjects = false;
int maxToReturn = number;
ResolvedConceptReferenceList rvrlist = cns.resolveToList(sortOptions, filterOptions, propertyNames, propertyTypes, resolveObjects, maxToReturn);
for (int i=0; i<rvrlist.getResolvedConceptReferenceCount(); i++) {
ResolvedConceptReference rcr = rvrlist.getResolvedConceptReference(i);
rcrl.addResolvedConceptReference(rcr);
}
} catch (Exception ex) {
ex.printStackTrace();
}
return rcrl;
}
开发者ID:NCIP,
项目名称:nci-metathesaurus-browser,
代码行数:34,
代码来源:TestCaseGenerator.java
示例13: printFrom
点赞 2
import org.LexGrid.LexBIG.DataModel.Collections.LocalNameList; //导入依赖的package包/类
/**
* Display relations to the given code from other concepts.
*
* @param code
* @param lbSvc
* @param scheme
* @param csvt
* @throws LBException
*/
@SuppressWarnings("unchecked")
protected void printFrom(PrintWriter pw, String scheme, CodingSchemeVersionOrTag csvt, String code)
throws LBException {
pw.println("Pointed at by ...");
// Perform the query ...
ResolvedConceptReferenceList matches = lbSvc.getNodeGraph(scheme, csvt, null).resolveAsList(
ConvenienceMethods.createConceptReference(code, scheme), false, true, 1, 1, new LocalNameList(), null,
null, 1024);
// Analyze the result ...
if (matches.getResolvedConceptReferenceCount() > 0) {
Enumeration<? extends ResolvedConceptReference> refEnum = matches.enumerateResolvedConceptReference();
while (refEnum.hasMoreElements()) {
ResolvedConceptReference ref = refEnum.nextElement();
AssociationList targetof = ref.getTargetOf();
if (targetof != null) {
Association[] associations = targetof.getAssociation();
for (int i = 0; i < associations.length; i++) {
Association assoc = associations[i];
pw.println("\t" + assoc.getAssociationName());
AssociatedConcept[] acl = assoc.getAssociatedConcepts().getAssociatedConcept();
for (int j = 0; j < acl.length; j++) {
AssociatedConcept ac = acl[j];
String rela = replaceAssociationNameByRela(ac, assoc.getAssociationName());
EntityDescription ed = ac.getEntityDescription();
pw.println("\t\t" + ac.getConceptCode() + "/"
+ (ed == null ? "**No Description**" : ed.getContent()) + " --> (" + rela + ") --> " + code);
}
}
}
}
}
}
开发者ID:NCIP,
项目名称:nci-term-browser,
代码行数:49,
代码来源:EntityExporter.java
示例14: printTo
点赞 2
import org.LexGrid.LexBIG.DataModel.Collections.LocalNameList; //导入依赖的package包/类
/**
* Display relations from the given code to other concepts.
*
* @param code
* @param lbSvc
* @param scheme
* @param csvt
* @throws LBException
*/
@SuppressWarnings("unchecked")
protected void printTo(PrintWriter pw, String scheme, CodingSchemeVersionOrTag csvt, String code)
throws LBException {
pw.println("Points to ...");
// Perform the query ...
ResolvedConceptReferenceList matches = lbSvc.getNodeGraph(scheme, csvt, null).resolveAsList(
ConvenienceMethods.createConceptReference(code, scheme), true, false, 1, 1, new LocalNameList(), null,
null, 1024);
// Analyze the result ...
if (matches.getResolvedConceptReferenceCount() > 0) {
Enumeration<? extends ResolvedConceptReference> refEnum = matches.enumerateResolvedConceptReference();
while (refEnum.hasMoreElements()) {
ResolvedConceptReference ref = refEnum.nextElement();
AssociationList sourceof = ref.getSourceOf();
Association[] associations = sourceof.getAssociation();
for (int i = 0; i < associations.length; i++) {
Association assoc = associations[i];
pw.println("\t" + assoc.getAssociationName());
AssociatedConcept[] acl = assoc.getAssociatedConcepts().getAssociatedConcept();
for (int j = 0; j < acl.length; j++) {
AssociatedConcept ac = acl[j];
String rela = replaceAssociationNameByRela(ac, assoc.getAssociationName());
EntityDescription ed = ac.getEntityDescription();
pw.println("\t\t" + code + " --> (" + rela + ") --> " + ac.getConceptCode() + "/"
+ (ed == null ? "**No Description**" : ed.getContent()));
}
}
}
}
}
开发者ID:NCIP,
项目名称:nci-term-browser,
代码行数:46,
代码来源:EntityExporter.java
示例15: getCodedNodeSet
点赞 2
import org.LexGrid.LexBIG.DataModel.Collections.LocalNameList; //导入依赖的package包/类
public CodedNodeSet getCodedNodeSet(String scheme, CodingSchemeVersionOrTag csvt, String entityType) {
LocalNameList lnl = new LocalNameList();
lnl.addEntry(entityType);
CodedNodeSet cns = null;
try {
cns = lbSvc.getNodeSet(scheme, csvt, lnl);
} catch (Exception ex) {
ex.printStackTrace();
}
return cns;
}
开发者ID:NCIP,
项目名称:nci-term-browser,
代码行数:12,
代码来源:PropsAndAssocForCode.java
示例16: getConceptDomainNames
点赞 2
import org.LexGrid.LexBIG.DataModel.Collections.LocalNameList; //导入依赖的package包/类
public Vector getConceptDomainNames() {
String scheme = "conceptDomainCodingScheme";
String version = null;
CodingSchemeVersionOrTag csvt = new CodingSchemeVersionOrTag();
Vector conceptDomainName_vec = new Vector();
try {
LocalNameList entityTypes = new LocalNameList();
entityTypes.addEntry("conceptDomain");
CodedNodeSet cns = lbSvc.getNodeSet(scheme, csvt, entityTypes);
SortOptionList sortOptions = null;
LocalNameList filterOptions = null;
LocalNameList propertyNames = null;
CodedNodeSet.PropertyType[] propertyTypes = null;
boolean resolveObjects = true;
int maxToReturn = 1000;
ResolvedConceptReferenceList rcrl = cns.resolveToList(sortOptions, filterOptions, propertyNames, propertyTypes, resolveObjects, maxToReturn);
for (int i=0; i<rcrl.getResolvedConceptReferenceCount(); i++) {
ResolvedConceptReference rcr = rcrl.getResolvedConceptReference(i);
Entity entity = rcr.getReferencedEntry();
if (entity.getEntityDescription() != null) {
conceptDomainName_vec.add(entity.getEntityDescription().getContent());
} else {
conceptDomainName_vec.add("");
}
}
} catch (Exception ex) {
ex.printStackTrace();
}
conceptDomainName_vec = SortUtils.quickSort(conceptDomainName_vec);
return conceptDomainName_vec;
}
开发者ID:NCIP,
项目名称:nci-term-browser,
代码行数:35,
代码来源:CodingSchemeDataUtils.java
示例17: vector2LocalNameList
点赞 2
import org.LexGrid.LexBIG.DataModel.Collections.LocalNameList; //导入依赖的package包/类
public static LocalNameList vector2LocalNameList(Vector<String> v) {
if (v == null)
return null;
LocalNameList list = new LocalNameList();
for (int i = 0; i < v.size(); i++) {
String vEntry = (String) v.elementAt(i);
list.addEntry(vEntry);
}
return list;
}
开发者ID:NCIP,
项目名称:nci-term-browser,
代码行数:11,
代码来源:ConceptDetails.java
示例18: getPropertyValues
点赞 2
import org.LexGrid.LexBIG.DataModel.Collections.LocalNameList; //导入依赖的package包/类
public HashMap getPropertyValues(String scheme, String version, String propertyType, String propertyName) {
HashMap hmap = new HashMap();
CodingSchemeVersionOrTag versionOrTag = new CodingSchemeVersionOrTag();
if (version != null) versionOrTag.setVersion(version);
try {
CodedNodeSet cns = getNodeSet(scheme, versionOrTag);
SortOptionList sortOptions = null;
LocalNameList filterOptions = null;
LocalNameList propertyNames = Constructors.createLocalNameList(propertyName);
CodedNodeSet.PropertyType[] propertyTypes = null;
boolean resolveObjects = true;
ResolvedConceptReferencesIterator iterator = cns.resolve(sortOptions, filterOptions, propertyNames,
propertyTypes, resolveObjects);
while (iterator != null && iterator.hasNext()) {
ResolvedConceptReference rcr = iterator.next();
Entity concept = rcr.getEntity();
Vector v = getPropertyValues(concept, propertyType, propertyName);
if (v != null) {
if (v.size() > 0) {
String key = concept.getEntityCode();
String value = (String) v.elementAt(0);
hmap.put(key, value);
}
}
}
} catch (Exception ex) {
ex.printStackTrace();
}
return hmap;
}
开发者ID:NCIP,
项目名称:nci-term-browser,
代码行数:32,
代码来源:ConceptDetails.java
示例19: codedNodeGraph2CodedNodeSetIterator
点赞 2
import org.LexGrid.LexBIG.DataModel.Collections.LocalNameList; //导入依赖的package包/类
public ResolvedConceptReferencesIterator codedNodeGraph2CodedNodeSetIterator(
CodedNodeGraph cng, ConceptReference graphFocus,
boolean resolveForward, boolean resolveBackward,
int resolveAssociationDepth, int maxToReturn) {
CodedNodeSet cns = null;
try {
cns =
cng.toNodeList(graphFocus, resolveForward, resolveBackward,
resolveAssociationDepth, maxToReturn);
if (cns == null) {
_logger.warn("cng.toNodeList returns null???");
return null;
}
SortOptionList sortCriteria = null;
LocalNameList propertyNames = null;
CodedNodeSet.PropertyType[] propertyTypes = null;
ResolvedConceptReferencesIterator iterator = null;
try {
iterator =
cns.resolve(sortCriteria, propertyNames, propertyTypes);
} catch (Exception e) {
e.printStackTrace();
}
if (iterator == null) {
_logger.warn("cns.resolve returns null???");
}
return iterator;
} catch (Exception ex) {
ex.printStackTrace();
return null;
}
}
开发者ID:NCIP,
项目名称:nci-term-browser,
代码行数:36,
代码来源:ConceptDetails.java
示例20: vector2LocalNameList
点赞 2
import org.LexGrid.LexBIG.DataModel.Collections.LocalNameList; //导入依赖的package包/类
public static LocalNameList vector2LocalNameList(Vector<String> v)
{
if (v == null) return null;
LocalNameList list = new LocalNameList();
for (int i=0; i<v.size(); i++)
{
String vEntry = (String) v.elementAt(i);
list.addEntry(vEntry);
}
return list;
}
开发者ID:NCIP,
项目名称:nci-term-browser,
代码行数:12,
代码来源:SearchUtils.java
示例21: restrictToMatchingProperty
点赞 2
import org.LexGrid.LexBIG.DataModel.Collections.LocalNameList; //导入依赖的package包/类
public static ResolvedConceptReferencesIterator restrictToMatchingProperty(
String codingSchemeName,
String version,
Vector property_vec,
Vector source_vec,
Vector qualifier_name_vec,
Vector qualifier_value_vec,
java.lang.String matchText,
java.lang.String matchAlgorithm,
java.lang.String language)
{
LocalNameList propertyList = vector2LocalNameList(property_vec);
CodedNodeSet.PropertyType[] propertyTypes = null;
LocalNameList sourceList = vector2LocalNameList(source_vec);
NameAndValueList qualifierList = createNameAndValueList(qualifier_name_vec, qualifier_value_vec);
return restrictToMatchingProperty(codingSchemeName,
version,
propertyList,
propertyTypes,
sourceList,
qualifierList,
matchText,
matchAlgorithm,
language);
}
开发者ID:NCIP,
项目名称:nci-term-browser,
代码行数:31,
代码来源:SearchUtils.java
示例22: resolveNodeSet
点赞 2
import org.LexGrid.LexBIG.DataModel.Collections.LocalNameList; //导入依赖的package包/类
public ResolvedConceptReferencesIterator resolveNodeSet(CodedNodeSet cns, boolean includeRetiredConcepts) throws Exception {
if (!includeRetiredConcepts) {
cns.restrictToStatus(CodedNodeSet.ActiveOption.ACTIVE_ONLY, null);
}
CodedNodeSet.PropertyType propTypes[] = new CodedNodeSet.PropertyType[2];
propTypes[0] = CodedNodeSet.PropertyType.PRESENTATION;
propTypes[1] = CodedNodeSet.PropertyType.DEFINITION;
SortOptionList sortCriteria = Constructors.createSortOptionList(new String[]{"matchToQuery"});
ResolvedConceptReferencesIterator results = cns.resolve(sortCriteria, null,new LocalNameList(), propTypes, true);
return results;
}
开发者ID:NCIP,
项目名称:cadsr-semantic-tools,
代码行数:16,
代码来源:LexEVSQueryServiceImpl.java
示例23: vector2LocalNameList
点赞 2
import org.LexGrid.LexBIG.DataModel.Collections.LocalNameList; //导入依赖的package包/类
public static LocalNameList vector2LocalNameList(Vector<String> v) {
if (v == null)
return null;
LocalNameList list = new LocalNameList();
for (int i = 0; i < v.size(); i++) {
String vEntry = (String) v.elementAt(i);
list.addEntry(vEntry);
}
return list;
}
开发者ID:NCIP,
项目名称:cadsr-semantic-tools,
代码行数:11,
代码来源:LexEVSQueryServiceImpl.java
示例24: printTo
点赞 2
import org.LexGrid.LexBIG.DataModel.Collections.LocalNameList; //导入依赖的package包/类
protected static void printTo(String code, String relation, LexBIGService lbSvc, String scheme, CodingSchemeVersionOrTag csvt)
throws LBException
{
System.out.println("Points to ...");
// Perform the query ...
NameAndValue nv = new NameAndValue();
NameAndValueList nvList = new NameAndValueList();
nv.setName(relation);
nvList.addNameAndValue(nv);
ResolvedConceptReferenceList matches =
lbSvc.getNodeGraph(scheme, csvt, null)
.restrictToAssociations(nvList, null)
.resolveAsList(
ConvenienceMethods.createConceptReference(code, scheme),
true, false, 1, 1, new LocalNameList(), null, null, 1024);
// Analyze the result ...
if (matches.getResolvedConceptReferenceCount() > 0) {
ResolvedConceptReference ref =
(ResolvedConceptReference) matches.enumerateResolvedConceptReference().nextElement();
// Print the associations
AssociationList sourceof = ref.getSourceOf();
Association[] associations = sourceof.getAssociation();
for (int i = 0; i < associations.length; i++) {
Association assoc = associations[i];
AssociatedConcept[] acl = assoc.getAssociatedConcepts().getAssociatedConcept();
for (int j = 0; j < acl.length; j++) {
AssociatedConcept ac = acl[j];
EntityDescription ed = ac.getEntityDescription();
System.out.println(
"\t\t" + ac.getConceptCode() + "/"
+ (ed == null?
"**No Description**":ed.getContent()));
}
}
}
}
开发者ID:NCIP,
项目名称:camod,
代码行数:41,
代码来源:PrintUtility.java