@Override public String getIdentifier() { return mappingType != null ? mappingType.getName() : null; }
public String getMappingContextDescription() { if (mappingContextDescription == null) { StringBuilder sb = new StringBuilder("mapping "); if (mappingType.getName() != null) { sb.append("'").append(mappingType.getName()).append("' "); } sb.append("in "); sb.append(contextDescription); mappingContextDescription = sb.toString(); } return mappingContextDescription; }
@Override public String toHumanReadableDescription() { StringBuilder sb = new StringBuilder(); sb.append("mapping "); if (mappingType != null && mappingType.getName() != null) { sb.append("'").append(mappingType.getName()).append("'"); } else { sb.append(getMappingDisplayName()); } if (originObject != null) { sb.append(" in "); sb.append(originObject); } return sb.toString(); }
@Override public String toString() { if (mappingType != null && mappingType.getName() != null) { return "M(" + mappingType.getName()+ ": "+ getMappingDisplayName() + " = " + outputTriple + toStringStrength() + ")"; } else { return "M(" + getMappingDisplayName() + " = " + outputTriple + toStringStrength() + ")"; } }
private void appendTraceHeader(StringBuilder sb) { sb.append("---[ MAPPING "); if (mappingType.getName() != null) { sb.append("'").append(mappingType.getName()).append("' "); } sb.append(" in "); sb.append(contextDescription); sb.append("]---------------------------"); MappingStrengthType strength = getStrength(); if (strength != null) { sb.append("\nStregth: ").append(strength); } for (Source<?,?> source: sources) { sb.append("\n"); source.mediumDump(sb); } sb.append("\nTarget: ").append(MiscUtil.toString(outputDefinition)); sb.append("\nExpression: "); if (expression == null) { sb.append("null"); } else { sb.append(expression.shortDebugDump()); } }
private void assertFocusMappings(EvaluatedAssignmentImpl<? extends FocusType> evaluatedAssignment, Collection<String> expectedItems) { assertUnsortedListsEquals("Wrong focus mappings", expectedItems, evaluatedAssignment.getFocusMappings(), m -> m.getMappingType().getName()); // TODO look at the content of the mappings (e.g. zero, plus, minus sets) }