当前位置: 首页>>代码示例>>Java>>正文


Java AssociationPredicate类代码示例

本文整理汇总了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;
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:38,代码来源:DataUtils.java

示例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;
  }
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:34,代码来源:DataUtils.java

示例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;
  }
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:32,代码来源:MappingUtils.java

示例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;
  }
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:34,代码来源:SimpleDataUtils.java

示例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;
  }
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:32,代码来源:RelationshipUtils.java

示例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;
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:36,代码来源:RelationshipUtils.java

示例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;
  }
 
开发者ID:NCIP,项目名称:nci-value-set-editor,代码行数:38,代码来源:DataUtils.java

示例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;
}
 
开发者ID:NCIP,项目名称:nci-mapping-tool,代码行数:36,代码来源:OntologyBean.java

示例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;
}
 
开发者ID:NCIP,项目名称:nci-term-browser,代码行数:48,代码来源:OntologyBean.java


注:本文中的org.LexGrid.relations.AssociationPredicate类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。