public boolean canCheck(Object thing) { return thing instanceof Model && ((Model)thing).getLevel() == BioPAXLevel.L3; } }
public JenaIOHandler(BioPAXLevel level) { this(level.getDefaultFactory(), level); }
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); }
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); }
public void check(Model model, boolean fix) { if(model.getObjects().isEmpty()) error(model, "empty.biopax.model", false, model.getLevel().toString()); }
private boolean notAllowed(BioPAXElement bp) { for (int i = 0; i < NOT_ALLOWED.length; i++) { if (bp.getModelInterface().equals(NOT_ALLOWED[i])) { return true; // found } } return false; }
/** * Constructor. * * @param model * @param forceInteractionToComplex - always generate Complex instead of MolecularInteraction */ public EntryMapper(Model model, boolean forceInteractionToComplex) { this.bpModel = model; this.xmlBase = (model.getXmlBase()==null) ? "" : model.getXmlBase(); this.counter = System.currentTimeMillis(); this.forceInteractionToComplex = forceInteractionToComplex; }
@Override public Set<String> fetchID(BioPAXElement ele) { return Collections.singleton(ele.getUri()); }
protected Class<? extends BioPAXElement> extractClass(Resource resource) { String localName = getJavaName(resource); return this.getLevel().getInterfaceForName(localName); }
public void check(final Validation validation, Model model) { if(model.getObjects().isEmpty()) error(validation, model, "empty.biopax.model", false, model.getLevel().toString()); }
public boolean canCheck(Object thing) { return thing instanceof Model && ((Model)thing).getLevel()==BioPAXLevel.L3; }
private boolean notAllowed(BioPAXElement bp) { for (int i = 0; i < NOT_ALLOWED.length; i++) { if (bp.getModelInterface().equals(NOT_ALLOWED[i])) { return true; // found } } return false; }
/** * Gets the local part of the BioPAX element ID. * * @param bpe * @return */ public static String getLocalId(BioPAXElement bpe) { String id = bpe.getRDFId(); return (id != null) ? id.replaceFirst("^.+#", "") : null; }
public boolean canCheck(Object thing) { return thing instanceof Model && ((Model)thing).getLevel() == BioPAXLevel.L3; }
private boolean notAllowed(Object o) { if (o instanceof BioPAXElement) { for (int i = 0; i < NOT_ADVISED.length; i++) { if (((BioPAXElement) o).getModelInterface().equals( NOT_ADVISED[i])) { return true; // found } } } return false; }
public boolean canCheck(Object thing) { return thing instanceof Model && ((Model)thing).getLevel() == BioPAXLevel.L3; }
private boolean notAllowed(Object o) { if (o instanceof BioPAXElement) { for (int i = 0; i < NOT_ADVISED.length; i++) { if (((BioPAXElement) o).getModelInterface().equals( NOT_ADVISED[i])) { return true; // found } } } return false; }
public boolean canCheck(Object thing) { return thing instanceof Model && ((Model)thing).getLevel() == BioPAXLevel.L3; }
public boolean canCheck(Object thing) { return thing instanceof Model && ((Model)thing).getLevel()==BioPAXLevel.L3; }