本文整理汇总了Java中org.LexGrid.relations.AssociationPredicate类的典型用法代码示例。如果您正苦于以下问题:Java AssociationPredicate类的具体用法?Java AssociationPredicate怎么用?Java AssociationPredicate使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AssociationPredicate类属于org.LexGrid.relations包,在下文中一共展示了AssociationPredicate类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getSupportedRoleNames
import org.LexGrid.relations.AssociationPredicate; //导入依赖的package包/类
public List getSupportedRoleNames(LexBIGService lbSvc, String scheme,
String version) {
CodingSchemeVersionOrTag csvt = new CodingSchemeVersionOrTag();
if (version != null)
csvt.setVersion(version);
List list = new ArrayList();
try {
CodingScheme cs = lbSvc.resolveCodingScheme(scheme, csvt);
Relations[] relations = cs.getRelations();
for (int i = 0; i < relations.length; i++) {
Relations relation = relations[i];
_logger.debug("** getSupportedRoleNames containerName: "
+ relation.getContainerName());
if (relation.getContainerName().compareToIgnoreCase("roles") == 0
|| relation.getContainerName().compareToIgnoreCase(
"relations") == 0) {
//org.LexGrid.relations.Association[] asso_array =
org.LexGrid.relations.AssociationPredicate[] asso_array =
relation.getAssociationPredicate();
for (int j = 0; j < asso_array.length; j++) {
org.LexGrid.relations.AssociationPredicate association =
(org.LexGrid.relations.AssociationPredicate) asso_array[j];
// list.add(association.getAssociationName());
// KLO, 092209
//list.add(association.getForwardName());
list.add(association.getAssociationName());
}
}
}
} catch (Exception ex) {
}
return list;
}
示例2: getMappingAssociationNames
import org.LexGrid.relations.AssociationPredicate; //导入依赖的package包/类
public static NameAndValueList getMappingAssociationNames(String scheme, String version) {
CodingSchemeVersionOrTag csvt = new CodingSchemeVersionOrTag();
if (version != null)
csvt.setVersion(version);
NameAndValueList navList = new NameAndValueList();
try {
LexBIGService lbSvc = null;
lbSvc = new RemoteServerUtil().createLexBIGService();
CodingScheme cs = lbSvc.resolveCodingScheme(scheme, csvt);
Relations[] relations = cs.getRelations();
for (int i = 0; i < relations.length; i++) {
Relations relation = relations[i];
Boolean isMapping = relation.isIsMapping();
if (isMapping != null && isMapping.equals(Boolean.TRUE)) {
AssociationPredicate[] associationPredicates = relation.getAssociationPredicate();
for (int j=0; j<associationPredicates.length; j++) {
AssociationPredicate associationPredicate = associationPredicates[j];
String name = associationPredicate.getAssociationName();
NameAndValue vNameAndValue = new NameAndValue();
vNameAndValue.setName(name);
navList.addNameAndValue(vNameAndValue);
}
return navList;
} else {
return null;
}
}
} catch (Exception ex) {
ex.printStackTrace();
}
return null;
}
示例3: getMappingAssociationNames
import org.LexGrid.relations.AssociationPredicate; //导入依赖的package包/类
public NameAndValueList getMappingAssociationNames(String scheme, String version) {
CodingSchemeVersionOrTag csvt = new CodingSchemeVersionOrTag();
if (version != null) {
csvt.setVersion(version);
}
NameAndValueList navList = new NameAndValueList();
try {
CodingScheme cs = lbSvc.resolveCodingScheme(scheme, csvt);
Relations[] relations = cs.getRelations();
for (int i = 0; i < relations.length; i++) {
Relations relation = relations[i];
Boolean isMapping = relation.isIsMapping();
if (isMapping != null && isMapping.equals(Boolean.TRUE)) {
AssociationPredicate[] associationPredicates = relation.getAssociationPredicate();
for (int j=0; j<associationPredicates.length; j++) {
AssociationPredicate associationPredicate = associationPredicates[j];
String name = associationPredicate.getAssociationName();
NameAndValue vNameAndValue = new NameAndValue();
vNameAndValue.setName(name);
navList.addNameAndValue(vNameAndValue);
}
return navList;
} else {
return null;
}
}
} catch (Exception ex) {
ex.printStackTrace();
}
return null;
}
示例4: getMappingAssociationNames
import org.LexGrid.relations.AssociationPredicate; //导入依赖的package包/类
public NameAndValueList getMappingAssociationNames(String scheme, String version) {
CodingSchemeVersionOrTag csvt = new CodingSchemeVersionOrTag();
if (version != null)
csvt.setVersion(version);
NameAndValueList navList = new NameAndValueList();
try {
//LexBIGService lbSvc = null;
//lbSvc = new RemoteServerUtil().createLexBIGService();
CodingScheme cs = lbSvc.resolveCodingScheme(scheme, csvt);
Relations[] relations = cs.getRelations();
for (int i = 0; i < relations.length; i++) {
Relations relation = relations[i];
Boolean isMapping = relation.isIsMapping();
if (isMapping != null && isMapping.equals(Boolean.TRUE)) {
AssociationPredicate[] associationPredicates = relation.getAssociationPredicate();
for (int j=0; j<associationPredicates.length; j++) {
AssociationPredicate associationPredicate = associationPredicates[j];
String name = associationPredicate.getAssociationName();
NameAndValue vNameAndValue = new NameAndValue();
vNameAndValue.setName(name);
navList.addNameAndValue(vNameAndValue);
}
return navList;
} else {
return null;
}
}
} catch (Exception ex) {
ex.printStackTrace();
}
return null;
}
示例5: getMappingAssociationNames
import org.LexGrid.relations.AssociationPredicate; //导入依赖的package包/类
public NameAndValueList getMappingAssociationNames(String scheme, String version) {
CodingSchemeVersionOrTag csvt = new CodingSchemeVersionOrTag();
if (version != null)
csvt.setVersion(version);
NameAndValueList navList = new NameAndValueList();
try {
CodingScheme cs = lbSvc.resolveCodingScheme(scheme, csvt);
Relations[] relations = cs.getRelations();
for (int i = 0; i < relations.length; i++) {
Relations relation = relations[i];
Boolean isMapping = relation.isIsMapping();
if (isMapping != null && isMapping.equals(Boolean.TRUE)) {
AssociationPredicate[] associationPredicates = relation.getAssociationPredicate();
for (int j=0; j<associationPredicates.length; j++) {
AssociationPredicate associationPredicate = associationPredicates[j];
String name = associationPredicate.getAssociationName();
NameAndValue vNameAndValue = new NameAndValue();
vNameAndValue.setName(name);
navList.addNameAndValue(vNameAndValue);
}
return navList;
} else {
return null;
}
}
} catch (Exception ex) {
ex.printStackTrace();
}
return null;
}
示例6: getSupportedRoleNames
import org.LexGrid.relations.AssociationPredicate; //导入依赖的package包/类
public List getSupportedRoleNames(String scheme, String version) {
CodingSchemeVersionOrTag csvt = new CodingSchemeVersionOrTag();
if (version != null)
csvt.setVersion(version);
List list = new ArrayList();
try {
CodingScheme cs = lbSvc.resolveCodingScheme(scheme, csvt);
Relations[] relations = cs.getRelations();
for (int i = 0; i < relations.length; i++) {
Relations relation = relations[i];
//_logger.debug("** getSupportedRoleNames containerName: "
// + relation.getContainerName());
if (relation.getContainerName().compareToIgnoreCase("roles") == 0
|| relation.getContainerName().compareToIgnoreCase("relations") == 0) {
//org.LexGrid.relations.Association[] asso_array =
org.LexGrid.relations.AssociationPredicate[] asso_array =
relation.getAssociationPredicate();
for (int j = 0; j < asso_array.length; j++) {
org.LexGrid.relations.AssociationPredicate association =
(org.LexGrid.relations.AssociationPredicate) asso_array[j];
// list.add(association.getAssociationName());
// KLO, 092209
//list.add(association.getForwardName());
list.add(association.getAssociationName());
}
}
}
} catch (Exception ex) {
}
return list;
}
示例7: getMappingAssociationNames
import org.LexGrid.relations.AssociationPredicate; //导入依赖的package包/类
public static NameAndValueList getMappingAssociationNames(String scheme, String version) {
CodingSchemeVersionOrTag csvt = new CodingSchemeVersionOrTag();
if (version != null)
csvt.setVersion(version);
NameAndValueList navList = new NameAndValueList();
try {
LexBIGService lbSvc = null;
lbSvc = new RemoteServerUtil().createLexBIGService();
CodingScheme cs = lbSvc.resolveCodingScheme(scheme, csvt);
Relations[] relations = cs.getRelations();
for (int i = 0; i < relations.length; i++) {
Relations relation = relations[i];
System.out.println(relation.getContainerName());
Boolean isMapping = relation.isIsMapping();
if (isMapping != null && isMapping.equals(Boolean.TRUE)) {
AssociationPredicate[] associationPredicates = relation.getAssociationPredicate();
for (int j=0; j<associationPredicates.length; j++) {
AssociationPredicate associationPredicate = associationPredicates[j];
String name = associationPredicate.getAssociationName();
NameAndValue vNameAndValue = new NameAndValue();
vNameAndValue.setName(name);
navList.addNameAndValue(vNameAndValue);
System.out.println("getMappingAssociationNames " + name);
}
return navList;
} else {
return null;
}
}
} catch (Exception ex) {
ex.printStackTrace();
}
return null;
}
示例8: getSupportedMappingAssociationNamesAndIDs
import org.LexGrid.relations.AssociationPredicate; //导入依赖的package包/类
public static Vector getSupportedMappingAssociationNamesAndIDs(String codingSchemeName, String version) {
if (codingSchemeName == null) return null;
Vector association_name_vec = new Vector();
CodingSchemeVersionOrTag csvt = new CodingSchemeVersionOrTag();
if (version != null)
csvt.setVersion(version);
//List list = new ArrayList();
try {
LexBIGService lbSvc = new RemoteServerUtil().createLexBIGService();
CodingScheme cs = lbSvc.resolveCodingScheme(codingSchemeName, csvt);
Relations[] relations = cs.getRelations();
if (relations.length == 0) {
return association_name_vec;
}
for (int i = 0; i < relations.length; i++) {
Relations relation = relations[i];
Boolean bool_obj = relation.isIsMapping();
if (bool_obj == null || bool_obj.equals(Boolean.FALSE)) {
return association_name_vec;
} else {
AssociationPredicate[] asso_array = relation.getAssociationPredicate();
for (int j=0; j<asso_array.length; j++) {
AssociationPredicate asso = asso_array[j];
association_name_vec.add(asso.getAssociationName() + "|" + asso.getAssociationName());
}
}
}
} catch (Exception ex) {
ex.printStackTrace();
}
return association_name_vec;
}
示例9: getSupportedMappingAssociationNamesAndIDs
import org.LexGrid.relations.AssociationPredicate; //导入依赖的package包/类
public static Vector getSupportedMappingAssociationNamesAndIDs(String codingSchemeName, String version) {
if (codingSchemeName == null) return null;
Vector association_name_vec = new Vector();
CodingSchemeVersionOrTag csvt = new CodingSchemeVersionOrTag();
if (version != null) {
csvt.setVersion(version);
}
try {
LexBIGService lbSvc = RemoteServerUtil.createLexBIGService();
CodingScheme cs = lbSvc.resolveCodingScheme(codingSchemeName, csvt);
if (cs == null) {
System.out.println("Coding scheme " + codingSchemeName + " not found.");
return null;
}
Relations[] relations = cs.getRelations();
if (relations.length == 0) {
return association_name_vec;
}
for (int i = 0; i < relations.length; i++) {
Relations relation = relations[i];
/*
Boolean bool_obj = relation.isIsMapping();
System.out.println("is mapping: " + bool_obj);
if (bool_obj == null || bool_obj.equals(Boolean.FALSE)) {
return association_name_vec;
} else {
AssociationPredicate[] asso_array = relation.getAssociationPredicate();
for (int j=0; j<asso_array.length; j++) {
AssociationPredicate asso = asso_array[j];
association_name_vec.add(asso.getAssociationName() + "|" + asso.getAssociationName());
}
}
*/
AssociationPredicate[] asso_array = relation.getAssociationPredicate();
for (int j=0; j<asso_array.length; j++) {
AssociationPredicate asso = asso_array[j];
association_name_vec.add(asso.getAssociationName() + "|" + asso.getAssociationName());
}
}
} catch (Exception ex) {
ex.printStackTrace();
}
return association_name_vec;
}