Class IdReferenceMappingVisitor

  • All Implemented Interfaces:
    Visitor

    public class IdReferenceMappingVisitor
    extends ReferenceMappingVisitor<Resource>
    An extension of the ReferenceMappingVisitor which also updates the "id" of the resource because it is being changed from a POST to a PUT, and therefore the id must align with the identity of the resource according to the corresponding fullUrl in the Bundle
    • Constructor Detail

      • IdReferenceMappingVisitor

        public IdReferenceMappingVisitor​(java.util.Map<java.lang.String,​java.lang.String> localRefMap,
                                         java.lang.String localIdentifier,
                                         java.lang.String newId)
        Public constructor
        Parameters:
        localRefMap -
        localIdentifier -
        newId -
    • Method Detail

      • visit

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

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