/** * Checks if the direction can be treated as reversible. * @param direction1 direction to check * @return true if direction is REVERSIBLE or null, false otherwise */ private boolean isReversible(ConversionDirectionType direction1) { return direction1 == null || direction1.equals(ConversionDirectionType.REVERSIBLE); }
cnv.getConversionDirection().equals(direction) || cnv.getConversionDirection().equals(ConversionDirectionType.REVERSIBLE); process.setId(convertID(cnv.getUri()) + "_" + direction.name().replaceAll("_","")); glyphMap.put(process.getId(), process); Set<PhysicalEntity> input = direction.equals(ConversionDirectionType.RIGHT_TO_LEFT) ? cnv.getRight() : cnv.getLeft(); Set<PhysicalEntity> output = direction.equals(ConversionDirectionType.RIGHT_TO_LEFT) ? cnv.getLeft() : cnv.getRight();
public void check(Degradation thing, boolean fix) { if(thing.getConversionDirection() != null && thing.getConversionDirection() != ConversionDirectionType.LEFT_TO_RIGHT) { error(thing, "range.violated", fix, "conversionDirection", thing.getConversionDirection().name(), "", ConversionDirectionType.LEFT_TO_RIGHT.name() + " (or empty)"); if(fix) { thing.setConversionDirection(ConversionDirectionType.LEFT_TO_RIGHT); } } }
switch (conversionBP.getConversionDirection().toString()) { case "REVERSIBLE": reaction.setReversible(true);
public void check(final Validation validation, Degradation thing) { if(thing.getConversionDirection() != null && thing.getConversionDirection() != ConversionDirectionType.LEFT_TO_RIGHT) { error(validation, thing, "range.violated", validation.isFix(), "conversionDirection", thing.getConversionDirection().name(), "", ConversionDirectionType.LEFT_TO_RIGHT.name() + " (or empty)"); if(validation.isFix()) { thing.setConversionDirection(ConversionDirectionType.LEFT_TO_RIGHT); } } }
consensus = direction1; } else { consensus = direction1.equals(direction2) ? direction1 : null;
Conversion conv = (Conversion) interaction; if (conv.getConversionDirection() == null || conv.getConversionDirection().equals(ConversionDirectionType.LEFT_TO_RIGHT) || (conv.getConversionDirection().equals(ConversionDirectionType.REVERSIBLE) && useTwoGlyphsForReversibleConversion)) { createProcessAndConnections(conv, ConversionDirectionType.LEFT_TO_RIGHT); } else if (conv.getConversionDirection() != null && (conv.getConversionDirection().equals(ConversionDirectionType.RIGHT_TO_LEFT) || (conv.getConversionDirection().equals(ConversionDirectionType.REVERSIBLE)) && useTwoGlyphsForReversibleConversion)) { createProcessAndConnections(conv, ConversionDirectionType.RIGHT_TO_LEFT); } else if (conv.getConversionDirection() != null && conv.getConversionDirection().equals(ConversionDirectionType.REVERSIBLE) && !useTwoGlyphsForReversibleConversion) { createProcessAndConnections(conv, ConversionDirectionType.REVERSIBLE);