本文整理汇总了Java中org.LexGrid.LexBIG.DataModel.Core.ConceptReference.setConceptCode方法的典型用法代码示例。如果您正苦于以下问题:Java ConceptReference.setConceptCode方法的具体用法?Java ConceptReference.setConceptCode怎么用?Java ConceptReference.setConceptCode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.LexGrid.LexBIG.DataModel.Core.ConceptReference
的用法示例。
在下文中一共展示了ConceptReference.setConceptCode方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createConceptReferenceList
import org.LexGrid.LexBIG.DataModel.Core.ConceptReference; //导入方法依赖的package包/类
public ConceptReferenceList createConceptReferenceList(
String[] codes, String codingSchemeName, String ns) {
if (codes == null) {
return null;
}
ConceptReferenceList list = new ConceptReferenceList();
for (int i = 0; i < codes.length; i++) {
ConceptReference cr = new ConceptReference();
cr.setCodingSchemeName(codingSchemeName);
cr.setConceptCode(codes[i]);
if (ns != null) {
cr.setCodeNamespace(ns);
}
list.addConceptReference(cr);
}
return list;
}
示例2: createConceptReferenceList
import org.LexGrid.LexBIG.DataModel.Core.ConceptReference; //导入方法依赖的package包/类
public static ConceptReferenceList createConceptReferenceList(String[] codes, String codingSchemeName)
{
if (codes == null)
{
return null;
}
ConceptReferenceList list = new ConceptReferenceList();
for (int i = 0; i < codes.length; i++)
{
ConceptReference cr = new ConceptReference();
cr.setCodingScheme(codingSchemeName);
cr.setConceptCode(codes[i]);
list.addConceptReference(cr);
}
return list;
}
示例3: createConceptReferenceList
import org.LexGrid.LexBIG.DataModel.Core.ConceptReference; //导入方法依赖的package包/类
public static ConceptReferenceList createConceptReferenceList(String[] codes, String codingSchemeName)
{
if (codes == null)
{
return null;
}
ConceptReferenceList list = new ConceptReferenceList();
for (int i = 0; i < codes.length; i++)
{
ConceptReference cr = new ConceptReference();
cr.setCodingSchemeName(codingSchemeName);
cr.setConceptCode(codes[i]);
list.addConceptReference(cr);
}
return list;
}
示例4: createConceptReferenceList
import org.LexGrid.LexBIG.DataModel.Core.ConceptReference; //导入方法依赖的package包/类
/**
* @param codes
* @param codingSchemeName
* @return
*/
private ConceptReferenceList createConceptReferenceList(String[] codes,
String codingSchemeName) {
if (codes == null)
return null;
ConceptReferenceList list = new ConceptReferenceList();
for (int i = 0; i < codes.length; i++) {
ConceptReference cr = new ConceptReference();
cr.setCodingSchemeName(codingSchemeName);
cr.setConceptCode(codes[i]);
list.addConceptReference(cr);
}
return list;
}
示例5: createConceptReferenceList
import org.LexGrid.LexBIG.DataModel.Core.ConceptReference; //导入方法依赖的package包/类
public static ConceptReferenceList createConceptReferenceList(
Vector codes, String codingSchemeName) {
if (codes == null) {
return null;
}
ConceptReferenceList list = new ConceptReferenceList();
for (int i = 0; i < codes.size(); i++) {
String code = (String) codes.elementAt(i);
ConceptReference cr = new ConceptReference();
if (codingSchemeName != null) cr.setCodingSchemeName(codingSchemeName);
cr.setConceptCode(code);
list.addConceptReference(cr);
}
return list;
}
示例6: createConceptReferenceList
import org.LexGrid.LexBIG.DataModel.Core.ConceptReference; //导入方法依赖的package包/类
public ConceptReferenceList createConceptReferenceList(
String[] codes, String codingSchemeName) {
if (codes == null) {
return null;
}
ConceptReferenceList list = new ConceptReferenceList();
for (int i = 0; i < codes.length; i++) {
ConceptReference cr = new ConceptReference();
cr.setCodingSchemeName(codingSchemeName);
cr.setConceptCode(codes[i]);
list.addConceptReference(cr);
}
return list;
}
示例7: isCodeInValueSet
import org.LexGrid.LexBIG.DataModel.Core.ConceptReference; //导入方法依赖的package包/类
public static Boolean isCodeInValueSet(String code, String codingScheme, String vsd_uri) {
try {
String URL = "http://ncias-q541-v.nci.nih.gov:29080/lexevsapi60";
URL = "http://localhost:19280/lexevsapi60";
LexEVSDistributed distributed =
(LexEVSDistributed)
ApplicationServiceProvider.getApplicationServiceFromUrl(URL, "EvsServiceInfo");
LexEVSValueSetDefinitionServices vds = distributed.getLexEVSValueSetDefinitionServices();
java.lang.String valueSetDefinitionRevisionId = null;
AbsoluteCodingSchemeVersionReferenceList csVersionList = getEntireAbsoluteCodingSchemeVersionReferenceList();
java.lang.String csVersionTag = null;
ResolvedValueSetCodedNodeSet rvs_cns = vds.getCodedNodeSetForValueSetDefinition(
new URI(vsd_uri),
valueSetDefinitionRevisionId,
csVersionList,
csVersionTag);
if (rvs_cns == null) return false;
CodedNodeSet cns = rvs_cns.getCodedNodeSet();
ConceptReference conceptReference = new ConceptReference();
conceptReference.setConceptCode(code);
if (codingScheme != null) {
conceptReference.setCodingSchemeName(codingScheme);
}
java.lang.Boolean bool_obj = cns.isCodeInSet(conceptReference);
return bool_obj;
} catch (Exception ex) {
ex.printStackTrace();
}
Boolean retval = null;
return retval;
}
示例8: codes2CodedNodeSet
import org.LexGrid.LexBIG.DataModel.Core.ConceptReference; //导入方法依赖的package包/类
public CodedNodeSet codes2CodedNodeSet() {
if (_codes == null) return null;
CodedNodeSet cns = null;
CodingSchemeVersionOrTag csvt = new CodingSchemeVersionOrTag();
if (this._version != null)
csvt.setVersion(this._version);
try {
LexBIGService lbSvc = null;
lbSvc = new RemoteServerUtil().createLexBIGService();
LocalNameList entityTypes = new LocalNameList();
entityTypes.addEntry("concept");
cns = lbSvc.getNodeSet(this._vocabulary, csvt, entityTypes);
//ResolvedConceptReferencesIterator iterator = toIterator();
ConceptReferenceList codeList = new ConceptReferenceList();
String codes = _codes;
codes = codes.trim();
if (codes.compareTo("") == 0) {
return null;
}
String lines[] = codes.split("\\n");
for(int i = 0; i < lines.length; i++) {
String t = lines[i];
ConceptReference cr = new ConceptReference();
cr.setConceptCode(t);
codeList.addConceptReference(cr);
}
cns.restrictToCodes(codeList);
} catch (Exception ex) {
}
return cns;
}
示例9: reverseAssoc
import org.LexGrid.LexBIG.DataModel.Core.ConceptReference; //导入方法依赖的package包/类
/**
* Recursive call to reverse order of the given association list, adding
* results to the given list. In context of this program we use this
* technique to determine the path from root, starting from the path to root
* provided by the standard convenience method.
*/
protected AssociationList reverseAssoc(LexBIGService lbsvc, LexBIGServiceConvenienceMethods lbscm, String scheme,
CodingSchemeVersionOrTag csvt, Association assoc, AssociationList addTo,
Map<String, EntityDescription> codeToEntityDescriptionMap) throws LBException {
ConceptReference acRef = assoc.getAssociationReference();
AssociatedConcept acFromRef = new AssociatedConcept();
acFromRef.setCodingScheme(acRef.getCodingScheme());
acFromRef.setConceptCode(acRef.getConceptCode());
AssociationList acSources = new AssociationList();
acFromRef.setIsNavigable(Boolean.TRUE);
acFromRef.setSourceOf(acSources);
// Use cached description if available (should be cached
// for all but original root) ...
if (codeToEntityDescriptionMap.containsKey(acRef.getConceptCode()))
acFromRef.setEntityDescription(codeToEntityDescriptionMap.get(acRef.getConceptCode()));
// Otherwise retrieve on demand ...
else
acFromRef.setEntityDescription(Constructors.createEntityDescription(getCodeDescription(lbsvc, scheme, csvt,
acRef.getConceptCode())));
AssociatedConceptList acl = assoc.getAssociatedConcepts();
for (AssociatedConcept ac : acl.getAssociatedConcept()) {
// Create reverse association (same non-directional name)
Association rAssoc = new Association();
rAssoc.setAssociationName(assoc.getAssociationName());
// On reverse, old associated concept is new reference point.
ConceptReference ref = new ConceptReference();
ref.setCodingScheme(ac.getCodingScheme());
ref.setConceptCode(ac.getConceptCode());
rAssoc.setAssociationReference(ref);
// And old reference is new associated concept.
AssociatedConceptList rAcl = new AssociatedConceptList();
rAcl.addAssociatedConcept(acFromRef);
rAssoc.setAssociatedConcepts(rAcl);
// Set reverse directional name, if available.
String dirName = assoc.getDirectionalName();
if (dirName != null)
try {
rAssoc.setDirectionalName(lbscm.isForwardName(scheme, csvt, dirName) ? lbscm
.getAssociationReverseName(assoc.getAssociationName(), scheme, csvt) : lbscm
.getAssociationReverseName(assoc.getAssociationName(), scheme, csvt));
} catch (LBException e) {
}
// Save code desc for future reference when setting up
// concept references in recursive calls ...
codeToEntityDescriptionMap.put(ac.getConceptCode(), ac.getEntityDescription());
AssociationList sourceOf = ac.getSourceOf();
if (sourceOf != null)
for (Association sourceAssoc : sourceOf.getAssociation()) {
AssociationList pos = reverseAssoc(lbsvc, lbscm, scheme, csvt, sourceAssoc, addTo,
codeToEntityDescriptionMap);
pos.addAssociation(rAssoc);
}
else
addTo.addAssociation(rAssoc);
}
return acSources;
}