private static String getValue(Set<BioPAXElement> elements, PathAccessor pa) { Set<String> set = new HashSet<String>(); for (Object o : pa.getValueFromBeans(elements)) { if(o instanceof RelationshipXref) { RelationshipXref rx = (RelationshipXref) o; if(rx.getRelationshipType() != null && rx.getRelationshipType().toString().toLowerCase().contains("identity")) { set.add(rx.toString()); } } else { set.add(o.toString()); } } List<String> list = new ArrayList<String>(set); Collections.sort(list); return concat(list); }
x.setDb(db); x.setId(id); if (refType != null) //use the standard CV term and accession x.setRelationshipType(rtv);
baseUri += encode(x.getDb() + "_" + x.getId()); if(x.getRelationshipType()!=null) baseUri += "_" + encode(x.getRelationshipType().getTerm().iterator().next()); entityUri = baseUri + "_" + String.valueOf(counter++); } else { //when no xrefs present, use a number ending (always increment);
id = x.getId(); if(x instanceof RelationshipXref) { RelationshipTypeVocabulary v = ((RelationshipXref)x).getRelationshipType(); if(v != null) relType = v.getTerm().toString();
RelationshipTypeVocabulary v = ((RelationshipXref)x).getRelationshipType(); if(v != null) relType = v.getTerm().toString();
RelationshipTypeVocabulary v = ((RelationshipXref)x).getRelationshipType(); if(v != null) relType = v.getTerm().toString();