Class ReferenceMappingVisitor<T extends Visitable>

  • Type Parameters:
    T - The type to copy. Only visitables of this type should be visited.
    All Implemented Interfaces:
    Visitor
    Direct Known Subclasses:
    IdReferenceMappingVisitor

    public class ReferenceMappingVisitor<T extends Visitable>
    extends CopyingVisitor<T>
    Copy the value of each element within a Resource/Element to a new element with the same values, replacing Reference.reference values with a new value
    • Constructor Detail

      • ReferenceMappingVisitor

        public ReferenceMappingVisitor​(java.util.Map<java.lang.String,​java.lang.String> localRefMap,
                                       java.lang.String localIdentifier)
        Parameters:
        localRefMap - a mapping from the current Reference values to the desired ones
        localIdentifier - a bundle entry fullUrl value - potentially used with relative references
    • Method Detail

      • visit

        public boolean visit​(java.lang.String elementName,
                             int elementIndex,
                             Reference reference)
        Description copied from class: DefaultVisitor
        Delegates to #visit(elementName, elementIndex, Element)
        Specified by:
        visit in interface Visitor
        Overrides:
        visit in class DefaultVisitor
        Returns:
        true if the children of this reference should be visited; otherwise false