本文整理汇总了Java中org.LexGrid.commonTypes.Source类的典型用法代码示例。如果您正苦于以下问题:Java Source类的具体用法?Java Source怎么用?Java Source使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Source类属于org.LexGrid.commonTypes包,在下文中一共展示了Source类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getNCImCodes
import org.LexGrid.commonTypes.Source; //导入依赖的package包/类
public Vector getNCImCodes(Entity node) {
if (node == null) return null;
Vector w = new Vector();
Property[] props = node.getAllProperties();
for (int i = 0; i < props.length; i++) {
Property prop = props[i];
PropertyQualifier[] qualifiers = prop.getPropertyQualifier();
for (int k=0; k<qualifiers.length; k++) {
PropertyQualifier qualifier = qualifiers[k];
}
Source[] sources = prop.getSource();
for (int k=0; k<sources.length; k++) {
Source source = sources[k];
}
if (Arrays.asList(NCIM_CODE_PROPERTYIES).contains(prop.getPropertyName())) {
if (!w.contains(prop.getValue().getContent())) {
w.add(prop.getValue().getContent());
}
}
}
return w;
}
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:23,代码来源:TestConceptDetails.java
示例2: getNCImCodes
import org.LexGrid.commonTypes.Source; //导入依赖的package包/类
public static Vector getNCImCodes(Entity node) {
if (node == null) return null;
Vector w = new Vector();
Property[] props = node.getAllProperties();
for (int i = 0; i < props.length; i++) {
Property prop = props[i];
PropertyQualifier[] qualifiers = prop.getPropertyQualifier();
for (int k=0; k<qualifiers.length; k++) {
PropertyQualifier qualifier = qualifiers[k];
}
Source[] sources = prop.getSource();
for (int k=0; k<sources.length; k++) {
Source source = sources[k];
}
if (Arrays.asList(Constants.NCIM_CODE_PROPERTYIES).contains(prop.getPropertyName())) {
if (!w.contains(prop.getValue().getContent())) {
w.add(prop.getValue().getContent());
}
}
}
return w;
}
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:23,代码来源:DataUtils.java
示例3: 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;
}
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:26,代码来源:ValueSetHierarchy.java
示例4: 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;
}
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:22,代码来源:ValueSetHierarchy.java
示例5: getNCImCodes
import org.LexGrid.commonTypes.Source; //导入依赖的package包/类
public Vector getNCImCodes(Entity node) {
if (node == null) return null;
Vector w = new Vector();
Property[] props = node.getAllProperties();
for (int i = 0; i < props.length; i++) {
Property prop = props[i];
PropertyQualifier[] qualifiers = prop.getPropertyQualifier();
for (int k=0; k<qualifiers.length; k++) {
PropertyQualifier qualifier = qualifiers[k];
}
Source[] sources = prop.getSource();
for (int k=0; k<sources.length; k++) {
Source source = sources[k];
}
if (Arrays.asList(Constants.NCIM_CODE_PROPERTYIES).contains(prop.getPropertyName())) {
if (!w.contains(prop.getValue().getContent())) {
w.add(prop.getValue().getContent());
}
}
}
return w;
}
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:23,代码来源:ConceptDetails.java
示例6: toProperty
import org.LexGrid.commonTypes.Source; //导入依赖的package包/类
/**
* Create a property qualifier from a lexevs org.LexGrid.commonTypes.Source
* @param source
* @return Property
*/
private Property toProperty(org.LexGrid.commonTypes.Source source) {
Property cts2Prop = new Property();
String predicateUri = EntityConstants.ENTITY_PREDICATE_BASE_URI +
EntityConstants.ENTITY_PREDICATE_URI_PROPERTY_SOURCE;
PredicateReference ref = new PredicateReference();
ref.setName(EntityConstants.ENTITY_PREDICATE_URI_PROPERTY_SOURCE);
ref.setNamespace(EntityConstants.ENTITY_NAME_SPACE);
ref.setUri(predicateUri);
cts2Prop.setPredicate(ref);
StatementTarget target = new StatementTarget();
target.setLiteral(
ModelUtils.createOpaqueData(source.getContent()));
cts2Prop.addValue(target);
return cts2Prop;
}
开发者ID:NCIP,项目名称:lexevs-service,代码行数:27,代码来源:EntityTransform.java
示例7: 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;
}
开发者ID:NCIP,项目名称:nci-mapping-tool,代码行数:20,代码来源:ValueSetHierarchy.java
示例8: 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;
}
开发者ID:NCIP,项目名称:nci-mapping-tool,代码行数:25,代码来源:DataUtils.java
示例9: getSynonyms
import org.LexGrid.commonTypes.Source; //导入依赖的package包/类
public static Vector getSynonyms(Entity concept) {
if (concept == null)
return null;
Vector v = new Vector();
Presentation[] properties = concept.getPresentation();
int n = 0;
for (int i = 0; i < properties.length; i++) {
Presentation p = properties[i];
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;
}
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:39,代码来源:DataUtils.java
示例10: 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;
}
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:29,代码来源:DataUtils.java
示例11: 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);
}
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:29,代码来源:DataUtils.java
示例12: dumpProperty
import org.LexGrid.commonTypes.Source; //导入依赖的package包/类
public void dumpProperty(Property property) {
System.out.println("\n" + property.getPropertyType());
System.out.println(property.getPropertyName() + ": " + property.getValue().getContent());
PropertyQualifier[] qualifiers = property.getPropertyQualifier();
if (qualifiers != null) {
System.out.println("Property Qualifiers: " );
for (int i=0; i<qualifiers.length; i++) {
PropertyQualifier qualifier = qualifiers[i];
System.out.println("\t" + qualifier.getPropertyQualifierName() + ": " + qualifier.getValue().getContent());
}
}
Source[] sources = property.getSource();
if (sources != null) {
System.out.println("Sources: " );
for (int i=0; i<sources.length; i++) {
Source source = sources[i];
System.out.println("\t" + source.getContent());
}
}
if (property instanceof Presentation) {
Presentation presentation = (Presentation) property;
if (presentation.getRepresentationalForm() != null) {
System.out.println("RepresentationalForm: " + presentation.getRepresentationalForm());
}
}
}
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:29,代码来源:EntityExporter.java
示例13: 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;
}
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:15,代码来源:ValueSetHierarchy.java
示例14: 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;
}
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:39,代码来源:ValueSetHierarchy.java
示例15: isNCIDefinition
import org.LexGrid.commonTypes.Source; //导入依赖的package包/类
private boolean isNCIDefinition(Definition definition) {
Source[] sources = definition.getSource();
if (sources != null && sources.length > 0) {
for (Source defSource: sources) {
if (defSource.getContent().equalsIgnoreCase("NCI")) {
return true;
}
}
}
return false;
}
开发者ID:NCIP,项目名称:cadsr-semantic-tools,代码行数:13,代码来源:EVSImpl.java
示例16: 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 = null;//vsd_service.listValueSetDefinitionURIs();
try {
list = vsd_service.listValueSetDefinitionURIs();
} catch (Exception ex) {
ex.printStackTrace();
return v;
}
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;
}
开发者ID:NCIP,项目名称:nci-mapping-tool,代码行数:36,代码来源:ValueSetHierarchy.java
示例17: 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;
}
开发者ID:NCIP,项目名称:nci-mapping-tool,代码行数:30,代码来源:ValueSetHierarchy.java
示例18: 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;
}
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:47,代码来源:TestConceptDetails.java
示例19: 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;
}
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:47,代码来源:DataUtils.java
示例20: 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;
}
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:43,代码来源:ValueSetBean.java
注:本文中的org.LexGrid.commonTypes.Source类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论