本文整理汇总了Java中org.LexGrid.commonTypes.Source.getContent方法的典型用法代码示例。如果您正苦于以下问题:Java Source.getContent方法的具体用法?Java Source.getContent怎么用?Java Source.getContent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.LexGrid.commonTypes.Source
的用法示例。
在下文中一共展示了Source.getContent方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getValueSetDefinitionsBySource
import org.LexGrid.commonTypes.Source; //导入方法依赖的package包/类
public Vector getValueSetDefinitionsBySource(String source) {
if (_availableValueSetDefinitionSources != null) {
if (!_availableValueSetDefinitionSources.contains(source)) return null;
}
Vector v = new Vector();
List list = valueSetDefinitionURIList;
if (list == null) return null;
for (int i=0; i<list.size(); i++) {
String uri = (String) list.get(i);
ValueSetDefinition vsd = findValueSetDefinitionByURI(uri);
java.util.Enumeration<? extends Source> sourceEnum = vsd.enumerateSource();
boolean found = false;
while (sourceEnum.hasMoreElements()) {
Source src = (Source) sourceEnum.nextElement();
String src_str = src.getContent();
if (src_str.compareTo(source) == 0) {
v.add(vsd);
break;
}
}
}
return v;
}
示例2: findAvailableValueSetDefinitionSources
import org.LexGrid.commonTypes.Source; //导入方法依赖的package包/类
public Vector findAvailableValueSetDefinitionSources() {
Vector v = new Vector();
HashSet hset = new HashSet();
List list = valueSetDefinitionURIList;
if (list == null) return null;
for (int i=0; i<list.size(); i++) {
String uri = (String) list.get(i);
ValueSetDefinition vsd = findValueSetDefinitionByURI(uri);
java.util.Enumeration<? extends Source> sourceEnum = vsd.enumerateSource();
while (sourceEnum.hasMoreElements()) {
Source src = (Source) sourceEnum.nextElement();
String src_str = src.getContent();
if (!hset.contains(src_str)) {
hset.add(src_str);
v.add(src_str);
}
}
}
return v;
}
示例3: getValueSetDefinitionsBySource
import org.LexGrid.commonTypes.Source; //导入方法依赖的package包/类
public static Vector getValueSetDefinitionsBySource(String source) {
if (_availableValueSetDefinitionSources != null) {
if (!_availableValueSetDefinitionSources.contains(source)) return null;
}
Vector v = new Vector();
LexEVSValueSetDefinitionServices vsd_service = RemoteServerUtil.getLexEVSValueSetDefinitionServices();
List list = vsd_service.listValueSetDefinitionURIs();
if (list == null) return null;
for (int i=0; i<list.size(); i++) {
String uri = (String) list.get(i);
ValueSetDefinition vsd = findValueSetDefinitionByURI(uri);
java.util.Enumeration<? extends Source> sourceEnum = vsd.enumerateSource();
boolean found = false;
while (sourceEnum.hasMoreElements()) {
Source src = (Source) sourceEnum.nextElement();
String src_str = src.getContent();
if (src_str.compareTo(source) == 0) {
v.add(vsd);
break;
}
}
}
return v;
}
示例4: getValueSetDecriptionSources
import org.LexGrid.commonTypes.Source; //导入方法依赖的package包/类
public static Vector getValueSetDecriptionSources(String uri) {
/*
if (_valueSetDefinitionURI2VSD_map == null) {
_valueSetDefinitionURI2VSD_map = getValueSetDefinitionURI2VSD_map();
}
*/
Vector source_vec = new Vector();
ValueSetDefinition vsd = (ValueSetDefinition) _valueSetDefinitionURI2VSD_map.get(uri);
if (vsd == null) return null;
java.util.Enumeration<? extends Source> sourceEnum = vsd.enumerateSource();
while (sourceEnum.hasMoreElements()) {
Source source = (Source) sourceEnum.nextElement();
String src_str = source.getContent();
source_vec.add(src_str);
}
return source_vec;
}
示例5: getValueSetDefinitionsBySource
import org.LexGrid.commonTypes.Source; //导入方法依赖的package包/类
public static Vector getValueSetDefinitionsBySource(String source) {
if (_availableValueSetDefinitionSources != null) {
if (!_availableValueSetDefinitionSources.contains(source)) return null;
}
Vector v = new Vector();
LexEVSValueSetDefinitionServices vsd_service = RemoteServerUtil.getLexEVSValueSetDefinitionServices();
if (vsd_service == null) {
System.out.println("Unable to instantiate LexEVSValueSetDefinitionServices???");
return null;
}
List list = vsd_service.listValueSetDefinitionURIs();
if (list == null) return null;
for (int i=0; i<list.size(); i++) {
String uri = (String) list.get(i);
ValueSetDefinition vsd = findValueSetDefinitionByURI(uri);
java.util.Enumeration<? extends Source> sourceEnum = vsd.enumerateSource();
boolean found = false;
while (sourceEnum.hasMoreElements()) {
Source src = (Source) sourceEnum.nextElement();
String src_str = src.getContent();
if (src_str.compareTo(source) == 0) {
v.add(vsd);
break;
}
}
}
return v;
}
示例6: getAvailableValueSetDefinitionSources
import org.LexGrid.commonTypes.Source; //导入方法依赖的package包/类
public static Vector getAvailableValueSetDefinitionSources() {
if (_availableValueSetDefinitionSources != null) return _availableValueSetDefinitionSources;
Vector availableValueSetDefinitionSources = new Vector();
HashSet hset = new HashSet();
LexEVSValueSetDefinitionServices vsd_service = RemoteServerUtil.getLexEVSValueSetDefinitionServices();
if (vsd_service == null) {
System.out.println("Unable to instantiate LexEVSValueSetDefinitionServices???");
return null;
}
List list = vsd_service.listValueSetDefinitionURIs();
if (list == null) return null;
for (int i=0; i<list.size(); i++) {
String uri = (String) list.get(i);
ValueSetDefinition vsd = findValueSetDefinitionByURI(uri);
java.util.Enumeration<? extends Source> sourceEnum = vsd.enumerateSource();
while (sourceEnum.hasMoreElements()) {
Source src = (Source) sourceEnum.nextElement();
String src_str = src.getContent();
if (!hset.contains(src_str)) {
hset.add(src_str);
availableValueSetDefinitionSources.add(src_str);
}
}
}
return SortUtils.quickSort(availableValueSetDefinitionSources);
}
示例7: getValueSetDecriptionSources
import org.LexGrid.commonTypes.Source; //导入方法依赖的package包/类
public Vector getValueSetDecriptionSources(String uri) {
Vector source_vec = new Vector();
ValueSetDefinition vsd = (ValueSetDefinition) _valueSetDefinitionURI2VSD_map.get(uri);
if (vsd == null) return null;
java.util.Enumeration<? extends Source> sourceEnum = vsd.enumerateSource();
while (sourceEnum.hasMoreElements()) {
Source source = (Source) sourceEnum.nextElement();
String src_str = source.getContent();
source_vec.add(src_str);
}
return source_vec;
}
示例8: createVSDSource2VSDsMap
import org.LexGrid.commonTypes.Source; //导入方法依赖的package包/类
public HashMap createVSDSource2VSDsMap() {
HashMap vsd_source_to_vsds_map = new HashMap();
//LexEVSValueSetDefinitionServices vsd_service = RemoteServerUtil.getLexEVSValueSetDefinitionServices();
List list = valueSetDefinitionURIList;
for (int i=0; i<list.size(); i++) {
String uri = (String) list.get(i);
ValueSetDefinition vsd = findValueSetDefinitionByURI(uri);
String vsd_uri = vsd.getValueSetDefinitionURI();
java.util.Enumeration<? extends Source> sourceEnum = vsd.enumerateSource();
while (sourceEnum.hasMoreElements()) {
Source source = (Source) sourceEnum.nextElement();
String src_str = source.getContent();
Vector vsd_vec = new Vector();
if (vsd_source_to_vsds_map.containsKey(src_str)) {
vsd_vec = (Vector) vsd_source_to_vsds_map.get(src_str);
}
boolean found = false;
for (int j=0; j<vsd_vec.size(); j++) {
ValueSetDefinition next_vsd = (ValueSetDefinition) vsd_vec.elementAt(j);
if (next_vsd.getValueSetDefinitionURI().compareTo(vsd_uri) == 0) {
found = true;
break;
}
}
if (!found) {
vsd_vec.add(vsd);
}
vsd_source_to_vsds_map.put(src_str, vsd_vec);
}
}
return vsd_source_to_vsds_map;
}
示例9: findAvailableValueSetDefinitionSources
import org.LexGrid.commonTypes.Source; //导入方法依赖的package包/类
public static Vector findAvailableValueSetDefinitionSources() {
Vector v = new Vector();
HashSet hset = new HashSet();
LexEVSValueSetDefinitionServices vsd_service = RemoteServerUtil.getLexEVSValueSetDefinitionServices();
List list = null;//vsd_service.listValueSetDefinitionURIs();
try {
list = vsd_service.listValueSetDefinitionURIs();
} catch (Exception ex) {
ex.printStackTrace();
return new Vector();
}
if (list == null) return null;
for (int i=0; i<list.size(); i++) {
String uri = (String) list.get(i);
ValueSetDefinition vsd = findValueSetDefinitionByURI(uri);
java.util.Enumeration<? extends Source> sourceEnum = vsd.enumerateSource();
while (sourceEnum.hasMoreElements()) {
Source src = (Source) sourceEnum.nextElement();
String src_str = src.getContent();
if (!hset.contains(src_str)) {
hset.add(src_str);
v.add(src_str);
}
}
}
return v;
}
示例10: getPropertyValues
import org.LexGrid.commonTypes.Source; //导入方法依赖的package包/类
public Vector getPropertyValues(Entity concept,
String property_type, String property_name) {
if (concept == null || property_type == null || property_name == null) return null;
Vector v = new Vector();
org.LexGrid.commonTypes.Property[] properties = null;
boolean addQualifiers = false;
if (property_type.compareToIgnoreCase("GENERIC") == 0) {
properties = concept.getProperty();
addQualifiers = true;
} else if (property_type.compareToIgnoreCase("PRESENTATION") == 0) {
properties = concept.getPresentation();
} else if (property_type.compareToIgnoreCase("COMMENT") == 0) {
properties = concept.getComment();
addQualifiers = true;
} else if (property_type.compareToIgnoreCase("DEFINITION") == 0) {
properties = concept.getDefinition();
}
if (properties == null || properties.length == 0)
return v;
for (int i = 0; i < properties.length; i++) {
Property p = (Property) properties[i];
if (property_name.compareTo(p.getPropertyName()) == 0) {
String t = p.getValue().getContent();
// #27034
if (addQualifiers) {
String qualifiers = getPropertyQualfierValues(p);
if (qualifiers.compareTo("") != 0) {
t = t + " (" + getPropertyQualfierValues(p) + ")";
}
}
Source[] sources = p.getSource();
if (sources != null && sources.length > 0) {
Source src = sources[0];
t = t + "|" + src.getContent();
}
v.add(t);
}
}
return v;
}
示例11: getPropertyValues
import org.LexGrid.commonTypes.Source; //导入方法依赖的package包/类
public static Vector getPropertyValues(Entity concept,
String property_type, String property_name) {
if (concept == null || property_type == null || property_name == null) return null;
Vector v = new Vector();
org.LexGrid.commonTypes.Property[] properties = null;
boolean addQualifiers = false;
if (property_type.compareToIgnoreCase("GENERIC") == 0) {
properties = concept.getProperty();
addQualifiers = true;
} else if (property_type.compareToIgnoreCase("PRESENTATION") == 0) {
properties = concept.getPresentation();
} else if (property_type.compareToIgnoreCase("COMMENT") == 0) {
properties = concept.getComment();
addQualifiers = true;
} else if (property_type.compareToIgnoreCase("DEFINITION") == 0) {
properties = concept.getDefinition();
}
if (properties == null || properties.length == 0)
return v;
for (int i = 0; i < properties.length; i++) {
Property p = (Property) properties[i];
if (property_name.compareTo(p.getPropertyName()) == 0) {
String t = p.getValue().getContent();
// #27034
if (addQualifiers) {
String qualifiers = getPropertyQualfierValues(p);
if (qualifiers.compareTo("") != 0) {
t = t + " (" + getPropertyQualfierValues(p) + ")";
}
}
Source[] sources = p.getSource();
if (sources != null && sources.length > 0) {
Source src = sources[0];
t = t + "|" + src.getContent();
}
v.add(t);
}
}
return v;
}
示例12: getPropertyValues
import org.LexGrid.commonTypes.Source; //导入方法依赖的package包/类
public static Vector getPropertyValues(Entity concept,
String property_type, String property_name) {
Vector v = new Vector();
org.LexGrid.commonTypes.Property[] properties = null;
boolean addQualifiers = false;
if (property_type.compareToIgnoreCase("GENERIC") == 0) {
properties = concept.getProperty();
addQualifiers = true;
} else if (property_type.compareToIgnoreCase("PRESENTATION") == 0) {
properties = concept.getPresentation();
} else if (property_type.compareToIgnoreCase("COMMENT") == 0) {
properties = concept.getComment();
addQualifiers = true;
} else if (property_type.compareToIgnoreCase("DEFINITION") == 0) {
properties = concept.getDefinition();
} else {
System.out.println("WARNING: property_type not found -- "
+ property_type);
}
if (properties == null || properties.length == 0)
return v;
for (int i = 0; i < properties.length; i++) {
Property p = (Property) properties[i];
if (property_name.compareTo(p.getPropertyName()) == 0) {
String t = p.getValue().getContent();
// #27034
if (addQualifiers) {
String qualifiers = getPropertyQualfierValues(p);
if (qualifiers.compareTo("") != 0) {
t = t + " (" + getPropertyQualfierValues(p) + ")";
}
}
Source[] sources = p.getSource();
if (sources != null && sources.length > 0) {
Source src = sources[0];
t = t + "|" + src.getContent();
}
v.add(t);
}
}
return v;
}
示例13: getSynonyms
import org.LexGrid.commonTypes.Source; //导入方法依赖的package包/类
public static Vector getSynonyms(String scheme, Entity concept) {
if (concept == null)
return null;
Vector v = new Vector();
Presentation[] properties = concept.getPresentation();
int n = 0;
boolean inclusion = true;
for (int i = 0; i < properties.length; i++) {
Presentation p = properties[i];
// for NCI Thesaurus or Pre-NCI Thesaurus, show FULL_SYNs only
if (scheme != null && scheme.indexOf(CODING_SCHEME_NAME) != -1) {
inclusion = false;
if (p.getPropertyName().compareTo("FULL_SYN") == 0) {
inclusion = true;
}
}
if (inclusion) {
String term_name = p.getValue().getContent();
String term_type = "null";
String term_source = "null";
String term_source_code = "null";
PropertyQualifier[] qualifiers = p.getPropertyQualifier();
if (qualifiers != null) {
for (int j = 0; j < qualifiers.length; j++) {
PropertyQualifier q = qualifiers[j];
String qualifier_name = q.getPropertyQualifierName();
String qualifier_value = q.getValue().getContent();
if (qualifier_name.compareTo("source-code") == 0) {
term_source_code = qualifier_value;
break;
}
}
}
term_type = p.getRepresentationalForm();
Source[] sources = p.getSource();
if (sources != null && sources.length > 0) {
Source src = sources[0];
term_source = src.getContent();
}
v.add(term_name + "|" + term_type + "|" + term_source + "|"
+ term_source_code);
}
}
SortUtils.quickSort(v);
return v;
}
示例14: getNCIDefinition
import org.LexGrid.commonTypes.Source; //导入方法依赖的package包/类
public String getNCIDefinition(ResolvedConceptReference ref) {
if (ref == null) return null;
Entity concept = ref.getReferencedEntry();
if (concept == null) return null;
Definition[] definitions = concept.getDefinition();
Vector v = new Vector();
if (definitions == null) return null;
for (int i=0; i<definitions.length; i++) {
Definition definition = definitions[i];
Source[] sources = definition.getSource();
for (int j=0; j<sources.length; j++)
{
Source src = sources[j];
String src_name = src.getContent();
if (src_name.compareTo("NCI") == 0) {
v.add(definition.getValue().getContent());
}
}
PropertyQualifier[] qualifiers = definition.getPropertyQualifier();
for (int j=0; j<qualifiers.length; j++)
{
String qualifier_value = qualifiers[j].getValue().getContent();
if (qualifier_value.compareTo("NCI") == 0) {
v.add(definition.getValue().getContent());
}
}
}
if (v.size() == 0) return null;
if (v.size() == 1) return (String) v.elementAt(0);
String def_str = "";
for (int i=0; i<v.size(); i++) {
String def = (String) v.elementAt(i);
if (i == 0) {
def_str = def;
} else {
def_str = def_str + "|" + def;
}
}
return def_str;
}
示例15: getSubValueSets
import org.LexGrid.commonTypes.Source; //导入方法依赖的package包/类
public HashMap getSubValueSets(String vsd_uri) {
//HashMap source_hier = getValueSetSourceHierarchy();
//createVSDSource2VSDsMap();
Vector sub_src_vec = new Vector();
HashSet hset = new HashSet();
ValueSetDefinition root_vsd = findValueSetDefinitionByURI(vsd_uri);
TreeItem root = new TreeItem(root_vsd.getValueSetDefinitionURI(), root_vsd.getValueSetDefinitionName());
java.util.Enumeration<? extends Source> sourceEnum = root_vsd.enumerateSource();
while (sourceEnum.hasMoreElements()) {
Source source = (Source) sourceEnum.nextElement();
String src = source.getContent();
if (_source_subconcept_map.containsKey(src)) {
Vector sub_vec = (Vector) _source_subconcept_map.get(src);
for (int j=0; j<sub_vec.size(); j++) {
String sub_src = (String) sub_vec.elementAt(j);
if (!hset.contains(sub_src)) {
hset.add(sub_src);
sub_src_vec.add(sub_src);
}
}
}
}
List<TreeItem> children = new ArrayList();
HashSet sub_vsd_uri_hset = new HashSet();
for (int i=0; i<sub_src_vec.size(); i++) {
String sub_str = (String) sub_src_vec.elementAt(i);
if (_vsd_source_to_vsds_map.containsKey(sub_str)) {
Vector sub_vsd_vec = (Vector) _vsd_source_to_vsds_map.get(sub_str);
for (int k=0; k<sub_vsd_vec.size(); k++) {
ValueSetDefinition sub_vsd = (ValueSetDefinition) sub_vsd_vec.elementAt(k);
if (!sub_vsd_uri_hset.contains(sub_vsd.getValueSetDefinitionURI())) {
sub_vsd_uri_hset.add(sub_vsd.getValueSetDefinitionURI());
//create child node
TreeItem childnode = new TreeItem(sub_vsd.getValueSetDefinitionURI(), sub_vsd.getValueSetDefinitionName());
children.add(childnode);
}
}
}
}
if (sub_vsd_uri_hset.size() > 0) {
root._expandable = true;
}
SortUtils.quickSort(children);
root.addAll(INVERSE_IS_A, children);
HashMap hmap = new HashMap();
hmap.put("<Root>", root);
return hmap;
}