本文整理汇总了Java中org.lexgrid.valuesets.dto.ResolvedValueSetDefinition类的典型用法代码示例。如果您正苦于以下问题:Java ResolvedValueSetDefinition类的具体用法?Java ResolvedValueSetDefinition怎么用?Java ResolvedValueSetDefinition使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ResolvedValueSetDefinition类属于org.lexgrid.valuesets.dto包,在下文中一共展示了ResolvedValueSetDefinition类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: resolveValueSetDefinition
import org.lexgrid.valuesets.dto.ResolvedValueSetDefinition; //导入依赖的package包/类
public static ResolvedValueSetDefinition resolveValueSetDefinition(ValueSetDefinition vsDef,
AbsoluteCodingSchemeVersionReferenceList csVersionList,
String versionTag,
HashMap<String, ValueSetDefinition> referencedVSDs,
SortOptionList sortOptionList) throws LBException {
try {
String URL = "http://ncias-q541-v.nci.nih.gov:29080/lexevsapi60";
URL = "http://localhost:8080/lexevsapi60";
LexEVSDistributed distributed =
(LexEVSDistributed)
ApplicationServiceProvider.getApplicationServiceFromUrl(URL, "EvsServiceInfo");
LexEVSValueSetDefinitionServices vds = distributed.getLexEVSValueSetDefinitionServices();
return vds.resolveValueSetDefinition(vsDef,csVersionList,versionTag,referencedVSDs,sortOptionList);
} catch (Exception ex) {
ex.printStackTrace();
}
return null;
}
示例2: run2
import org.lexgrid.valuesets.dto.ResolvedValueSetDefinition; //导入依赖的package包/类
public static void run2() {
try {
String URL = "http://ncias-q541-v.nci.nih.gov:29080/lexevsapi60";
LexEVSDistributed distributed =
(LexEVSDistributed)
ApplicationServiceProvider.getApplicationServiceFromUrl(URL, "EvsServiceInfo");
LexEVSValueSetDefinitionServices vds = distributed.getLexEVSValueSetDefinitionServices();
ValueSetDefinition def = new ValueSetDefinition();
def.setDefaultCodingScheme("NCI_Thesaurus");
def.setValueSetDefinitionName("testName");
def.setValueSetDefinitionURI("testUri");
EntityReference ref1 = new EntityReference();
ref1.setEntityCode("C12727");
ref1.setTransitiveClosure(false);
ref1.setLeafOnly(false);
ref1.setTargetToSource(true);
EntityReference ref2 = new EntityReference();
ref2.setEntityCode("C82547");
ref2.setTransitiveClosure(true);
ref2.setReferenceAssociation("subClassOf");
ref2.setLeafOnly(false);
ref2.setTargetToSource(false);
DefinitionEntry entry = new DefinitionEntry();
entry.setOperator(DefinitionOperator.OR);
entry.setEntityReference(ref1);
entry.setEntityReference(ref2);
def.addDefinitionEntry(entry);
AbsoluteCodingSchemeVersionReferenceList csvList = new AbsoluteCodingSchemeVersionReferenceList();
csvList.addAbsoluteCodingSchemeVersionReference(Constructors.createAbsoluteCodingSchemeVersionReference("http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#", "10.08e"));
ResolvedValueSetDefinition rvsd = vds.resolveValueSetDefinition(def, csvList, null, null);
ResolvedConceptReferencesIterator itr = rvsd.getResolvedConceptReferenceIterator();
while(itr.hasNext()){
PrintUtility.print(itr.next());
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
示例3: runMultipleTypes
import org.lexgrid.valuesets.dto.ResolvedValueSetDefinition; //导入依赖的package包/类
public static void runMultipleTypes() {
try {
String URL = "http://ncias-q541-v.nci.nih.gov:29080/lexevsapi60";
LexEVSDistributed distributed =
(LexEVSDistributed)
ApplicationServiceProvider.getApplicationServiceFromUrl(URL, "EvsServiceInfo");
LexEVSValueSetDefinitionServices vds = distributed.getLexEVSValueSetDefinitionServices();
ValueSetDefinition def = new ValueSetDefinition();
def.setDefaultCodingScheme("NCI_Thesaurus");
def.setValueSetDefinitionName("testName");
def.setValueSetDefinitionURI("testUri");
DefinitionEntry entry = new DefinitionEntry();
PropertyReference pr = new PropertyReference();
PropertyMatchValue pmv = new PropertyMatchValue();
pmv.setMatchAlgorithm("exactMatch");
pmv.setContent("blood");
pr.setPropertyMatchValue(pmv);
entry.setPropertyReference(pr);
EntityReference ref1 = new EntityReference();
ref1.setEntityCode("C12727");
ref1.setTransitiveClosure(false);
ref1.setLeafOnly(false);
ref1.setTargetToSource(true);
//entry = new DefinitionEntry();
entry.setOperator(DefinitionOperator.OR);
entry.setEntityReference(ref1);
def.addDefinitionEntry(entry);
AbsoluteCodingSchemeVersionReferenceList csvList = new AbsoluteCodingSchemeVersionReferenceList();
csvList.addAbsoluteCodingSchemeVersionReference(Constructors.createAbsoluteCodingSchemeVersionReference("http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#", "10.08e"));
ResolvedValueSetDefinition rvsd = vds.resolveValueSetDefinition(def, csvList, null, null);
ResolvedConceptReferencesIterator itr = rvsd.getResolvedConceptReferenceIterator();
while(itr.hasNext()){
PrintUtility.print(itr.next());
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
示例4: testResolveValueSetDefinition
import org.lexgrid.valuesets.dto.ResolvedValueSetDefinition; //导入依赖的package包/类
public static void testResolveValueSetDefinition() {
try {
String versionTag = "PRODUCTION";
HashMap<String, ValueSetDefinition> referencedVSDs = new HashMap();
AbsoluteCodingSchemeVersionReferenceList csvList = new AbsoluteCodingSchemeVersionReferenceList();
csvList.addAbsoluteCodingSchemeVersionReference(Constructors.createAbsoluteCodingSchemeVersionReference("Automobiles", "1.0"));
SortOptionList sortOptionList = null;
ValueSetDefinition def = new ValueSetDefinition();
def.setDefaultCodingScheme("Automobiles");
def.setValueSetDefinitionName("testName");
def.setValueSetDefinitionURI("testUri");
DefinitionEntry entry = new DefinitionEntry();
PropertyReference pr = new PropertyReference();
pr.setCodingScheme("Automobiles");
PropertyMatchValue pmv = new PropertyMatchValue();
pmv.setMatchAlgorithm("exactMatch");
pmv.setContent("Ford");
pr.setPropertyMatchValue(pmv);
entry.setPropertyReference(pr);
entry.setOperator(DefinitionOperator.OR);
def.addDefinitionEntry(entry);
DefinitionEntry entry_2 = new DefinitionEntry();
ValueSetDefinition ref_valueSetDefinition = new ValueSetDefinition();
ref_valueSetDefinition.setDefaultCodingScheme("Automobiles");
ref_valueSetDefinition.setValueSetDefinitionName("ref_testName");
ref_valueSetDefinition.setValueSetDefinitionURI("ref_testUri");
DefinitionEntry def_entry = new DefinitionEntry();
PropertyReference pr2 = new PropertyReference();
pr2.setCodingScheme("Automobiles");
PropertyMatchValue pmv2 = new PropertyMatchValue();
pmv2.setMatchAlgorithm("exactMatch");
pmv2.setContent("GM");
pr2.setPropertyMatchValue(pmv2);
def_entry.setPropertyReference(pr2);
def_entry.setOperator(DefinitionOperator.OR);
ref_valueSetDefinition.addDefinitionEntry(def_entry);
ValueSetDefinitionReference valueSetDefinitionReference = new ValueSetDefinitionReference();
valueSetDefinitionReference.setValueSetDefinitionURI("ref_testUri");
entry_2.setValueSetDefinitionReference(valueSetDefinitionReference);
entry_2.setOperator(DefinitionOperator.OR);
referencedVSDs.put("ref_testUri", ref_valueSetDefinition);
def.addDefinitionEntry(entry_2);
ResolvedValueSetDefinition rvsd = resolveValueSetDefinition(def,csvList,versionTag,referencedVSDs,sortOptionList);
if (rvsd == null) {
System.out.println("resolveValueSetDefinition returns ResolvedValueSetDefinition == NULL???");
} else {
System.out.println("resolveValueSetDefinition returns ResolvedValueSetDefinition != NULL.");
ResolvedConceptReferencesIterator itr = rvsd.getResolvedConceptReferenceIterator();
if (itr == null) {
System.out.println("resolveValueSetDefinition returns ResolvedConceptReferencesIterator == NULL???");
} else {
while(itr.hasNext()){
PrintUtility.print(itr.next());
}
}
}
} catch (Exception ex) {
ex.printStackTrace();
}
}