public JenaIOHandler(BioPAXLevel level) { this(level.getDefaultFactory(), level); }
/** * Excises a model to the given elements. * @param result elements to excise to * @return excised model */ private static Model excise(Set<BioPAXElement> result) { Completer c = new Completer(EM); result = c.complete(result); Cloner cln = new Cloner(EM, BioPAXLevel.L3.getDefaultFactory()); return cln.clone(result); }
model = (new OneTwoThree()).filter(model); if (model != null) { io.setFactory(model.getLevel().getDefaultFactory()); io.convertToOWL(model, os); toReturn = os.toString();
private Set<PhysicalEntity> getPEsRecursively(Set<PhysicalEntity> pes, Fetcher fetcher) { Model m = BioPAXLevel.L3.getDefaultFactory().createModel(); for(PhysicalEntity pe : pes) { if(pe instanceof Complex) fetcher.fetch(pe,m); else if(!m.containsID(pe.getUri())) m.add(pe); } return m.getObjects(PhysicalEntity.class); }
private Set<PhysicalEntity> getPEsRecursively(Set<PhysicalEntity> pes, Fetcher fetcher) { Model m = BioPAXLevel.L3.getDefaultFactory().createModel(); for(PhysicalEntity pe : pes) { if(pe instanceof Complex) fetcher.fetch(pe,m); else if(!m.containsID(pe.getRDFId())) m.add(pe); } return m.getObjects(PhysicalEntity.class); }
if(!added.contains(uri)) { added.add(uri); UnificationXref ux = BioPAXLevel.L3.getDefaultFactory() .create(UnificationXref.class, uri); ux.setDb(db);
final Model model = BioPAXLevel.L3.getDefaultFactory().createModel(); model.setXmlBase(xmlBase);
UnificationXref ux = BioPAXLevel.L3.getDefaultFactory() .create(UnificationXref.class, rdfid); ux.setDb(db);
Entity entity = bpModel.getLevel().getDefaultFactory().create(entityClass, entityUri);
Evidence participantEvidence = bpModel.getLevel().getDefaultFactory() .create(Evidence.class, genUri(Evidence.class, "p",participant.getId()));