public boolean canCheck(Object thing) { return thing instanceof PathwayStep /* can be null, e.g., when the check is called * during a new PathwayStep is added to the model * but not yet assigned to any Pathway! * This is ignored. */ && ((PathwayStep)thing).getPathwayOrderOf() != null; }
public boolean canCheck(Object thing) { return thing instanceof PathwayStep /* can be null, e.g., when the check is called * during a new PathwayStep is added to the model * but not yet assigned to any Pathway! * This is ignored. */ && ((PathwayStep)thing).getPathwayOrderOf() != null; }
/** * Gets the direction of the Control chain the the Interaction. * @param conv controlled conversion * @param pathway the container pathway * @return the direction of the conversion related to the catalysis */ protected ConversionDirectionType getDirection(Conversion conv, Pathway pathway) { Set<StepDirection> dirs = new HashSet<StepDirection>(); // find the direction in the pathway step for (PathwayStep step : conv.getStepProcessOf()) { if (step.getPathwayOrderOf().equals(pathway) && step instanceof BiochemicalPathwayStep) { StepDirection dir = ((BiochemicalPathwayStep) step).getStepDirection(); if (dir != null) dirs.add(dir); } } if (dirs.size() > 1) return ConversionDirectionType.REVERSIBLE; else if (!dirs.isEmpty()) return convertStepDirection(dirs.iterator().next()); return getDirection(conv); }
public void check(PathwayStep step, boolean fix) { Pathway pathway = step.getPathwayOrderOf(); /* can be null, e.g., when the check is called * during a new PathwayStep is added to the model * but not yet assigned to any Pathway! This case is ignored. */ if (pathway != null) { Set<Process> pathwayComponents = pathway.getPathwayComponent(); for (Process stepProcess : step.getStepProcess()) { if (!pathwayComponents.contains(stepProcess)) { error(step, "component.not.found", false, stepProcess, pathway); } } } }
public void check(final Validation validation, PathwayStep step) { Pathway pathway = step.getPathwayOrderOf(); /* can be null, e.g., when the check is called * during a new PathwayStep is added to the model * but not yet assigned to any Pathway! This case is ignored. */ if (pathway != null) { Set<Process> pathwayComponents = pathway.getPathwayComponent(); for (Process stepProcess : step.getStepProcess()) { if (!pathwayComponents.contains(stepProcess)) { error(validation, step, "component.not.found", false, stepProcess, pathway); } } } }
/** * Gets the direction of the Control chain the the Interaction. * @param conv controlled conversion * @param pathway the container pathway * @param cont top control * @return the direction of the conversion related to the catalysis */ protected ConversionDirectionType getDirection(Conversion conv, Pathway pathway, Control cont) { for (Control ctrl : getControlChain(cont, conv)) { ConversionDirectionType dir = getCatalysisDirection(ctrl); if (dir != null) return dir; } Set<StepDirection> dirs = new HashSet<StepDirection>(); Set<PathwayStep> convSteps = conv.getStepProcessOf(); // maybe the direction is embedded in a pathway step for (PathwayStep step : cont.getStepProcessOf()) { if (pathway != null && !step.getPathwayOrderOf().equals(pathway)) continue; if (step instanceof BiochemicalPathwayStep && convSteps.contains(step)) { StepDirection dir = ((BiochemicalPathwayStep) step).getStepDirection(); if (dir != null) dirs.add(dir); } } if (dirs.size() > 1) return ConversionDirectionType.REVERSIBLE; else if (!dirs.isEmpty()) return convertStepDirection(dirs.iterator().next()); return getDirection(conv); }
interaction.getProcessOfPathway().add(pathwayStep.getPathwayOrderOf().getRDFId().split("#")[1]);