Class AnchorReferencePolicy

    • Method Detail

      • getReferenceText

        public String getReferenceText​(@NonNull
                                       com.vladsch.flexmark.ast.InlineLinkNode link)
        Description copied from interface: ICustomReferencePolicy
        Retrieve the reference text from the reference object.
        Parameters:
        link - the reference object
        Returns:
        the reference text or null if there is no text
      • setReferenceText

        public void setReferenceText​(@NonNull
                                     com.vladsch.flexmark.ast.InlineLinkNode link,
                                     @NonNull
                                     String newValue)
        Description copied from interface: ICustomReferencePolicy
        Update the reference text used in the reference object.
        Parameters:
        link - the reference object
        newValue - the reference text replacement
      • handleUnselected

        protected void handleUnselected​(@NonNull
                                        gov.nist.secauto.metaschema.model.common.metapath.item.IRequiredValueModelNodeItem contextItem,
                                        @NonNull
                                        com.vladsch.flexmark.ast.InlineLinkNode link,
                                        @NonNull
                                        IEntityItem item,
                                        @NonNull
                                        ReferenceCountingVisitor.Context visitorContext)
        Description copied from class: AbstractCustomReferencePolicy
        Handle an index hit against an item related to an unselected control.

        Subclasses can override this method to perform extra processing.

        Overrides:
        handleUnselected in class AbstractCustomReferencePolicy<com.vladsch.flexmark.ast.InlineLinkNode>
        Parameters:
        contextItem - the node containing the identifier reference
        link - the identifier reference object generating the hit
        item - the referenced item
        visitorContext - the reference visitor, which can be used for further processing
      • handleIndexMiss

        protected boolean handleIndexMiss​(@NonNull
                                          gov.nist.secauto.metaschema.model.common.metapath.item.IRequiredValueModelNodeItem contextItem,
                                          @NonNull
                                          com.vladsch.flexmark.ast.InlineLinkNode reference,
                                          @NonNull
                                          List<IEntityItem.ItemType> itemTypes,
                                          @NonNull
                                          String identifier,
                                          @NonNull
                                          ReferenceCountingVisitor.Context visitorContext)
        Description copied from class: AbstractCustomReferencePolicy
        Handle an index miss for a reference. This occurs when the referenced item was not found in the index.

        Subclasses can override this method to perform extra processing.

        Overrides:
        handleIndexMiss in class AbstractCustomReferencePolicy<com.vladsch.flexmark.ast.InlineLinkNode>
        Parameters:
        contextItem - the node containing the identifier reference
        reference - the identifier reference object generating the hit
        itemTypes - the possible item types for this reference
        identifier - the parsed identifier
        visitorContext - the reference visitor state, which can be used for further processing
        Returns:
        true if the reference is handled by this method or false otherwise
      • handleIdentifierNonMatch

        protected boolean handleIdentifierNonMatch​(@NonNull
                                                   gov.nist.secauto.metaschema.model.common.metapath.item.IRequiredValueModelNodeItem contextItem,
                                                   @NonNull
                                                   com.vladsch.flexmark.ast.InlineLinkNode reference,
                                                   @NonNull
                                                   ReferenceCountingVisitor.Context visitorContext)
        Description copied from class: AbstractCustomReferencePolicy
        Handle the case where the identifier was not a syntax match for an expected identifier. This can occur when the reference is malformed, using an unrecognized syntax.

        Subclasses can override this method to perform extra processing.

        Overrides:
        handleIdentifierNonMatch in class AbstractCustomReferencePolicy<com.vladsch.flexmark.ast.InlineLinkNode>
        Parameters:
        contextItem - the node containing the identifier reference
        reference - the identifier reference object generating the hit
        visitorContext - the reference visitor state, which can be used for further processing
        Returns:
        true if the reference is handled by this method or false otherwise