/** * Checks if the chain has a member with an activity label. * @return the activity status found */ public Activity checkActivityLabel() { boolean active = false; boolean inactive = false; for (PhysicalEntity pe : pes) { for (Object o : PE2TERM.getValueFromBean(pe)) { String s = (String) o; if (s.contains("inactiv")) inactive = true; else if (s.contains("activ")) active = true; } for (String s : pe.getName()) { if (s.contains("inactiv")) inactive = true; else if (s.contains("activ")) active = true; } } if (active) if (inactive) return Activity.BOTH; else return Activity.ACTIVE; else if (inactive) return Activity.INACTIVE; else return Activity.NONE; }
public void check(final Validation validation, PhysicalEntity thing) { // Capture PEs that is both a participant of a conversion and a component of a complex if(!thing.getParticipantOf().isEmpty() && !thing.getComponentOf().isEmpty()) { HashSet<EntityFeature> efs = new HashSet<EntityFeature>(); efs.addAll(thing.getFeature()); efs.addAll(thing.getNotFeature()); // Do we have any information about the binding properties? If so, it's OK. for(EntityFeature ef: efs) { if(ef instanceof BindingFeature) { return; } } // TODO: Call Emek's feature resolver function explicitly if the PE is to be fixed error(validation, thing, "ambiguous.feature", false, thing.getName()); } }
@Override public void check(PhysicalEntity thing, boolean fix) { // Capture PEs that is both a participant of a conversion and a component of a complex if(!thing.getParticipantOf().isEmpty() && !thing.getComponentOf().isEmpty()) { HashSet<EntityFeature> efs = new HashSet<EntityFeature>(); efs.addAll(thing.getFeature()); efs.addAll(thing.getNotFeature()); // Do we have any information about the binding properties? If so, it's OK. for(EntityFeature ef: efs) { if(ef instanceof BindingFeature) { return; } } // TODO: Call Emek's feature resolver function explicitly if the PE is to be fixed error(thing, "ambiguous.feature", false, thing.getName()); } }
for (String name : physicalEntityBP.getName()) { physicalEntity.setXref(new org.opencb.bionetdb.core.models.Xref(REACTOME_FEAT + "biopax", "", name, ""));