Class Markers


  • public final class Markers
    extends java.lang.Object
    A class to register and resolve markers.
    • Field Detail

      • firstQualifyingIsFirst

        private java.util.Map<java.lang.String,​Marker> firstQualifyingIsFirst
      • firstQualifyingIsAny

        private java.util.Map<java.lang.String,​Marker> firstQualifyingIsAny
      • lastQualifyingIsFirst

        private java.util.Map<java.lang.String,​Marker> lastQualifyingIsFirst
      • lastQualifyingIsLast

        private java.util.Map<java.lang.String,​Marker> lastQualifyingIsLast
      • lastQualifyingIsAny

        private java.util.Map<java.lang.String,​Marker> lastQualifyingIsAny
      • log

        private static org.apache.commons.logging.Log log
    • Constructor Detail

      • Markers

        public Markers()
    • Method Detail

      • register

        public void register​(java.util.Map<java.lang.String,​Marker> marks,
                             boolean starting,
                             boolean isfirst,
                             boolean islast)
        Registers a marker with the position traits set. Only the required markers are kept. For "first-starting-within-page" it adds the markers that are starting only if the marker class name is not already added. For "first-including-carryover" it adds any starting marker if the marker class name is not already added. For "last-starting-within-page" it adds all marks that are starting, replacing earlier markers. For "last-ending-within-page" it adds all markers that are ending, replacing earlier markers.
        Parameters:
        marks - a map of markers to register
        starting - whether the registration happens at the start (true) or end (false) the the area
        isfirst - whether it is the first area of the parent LM
        islast - whether it is the last area of the parent LM
      • resolve

        public Marker resolve​(AbstractRetrieveMarker arm)
        Retrieves the best candidate marker for the given position.
        Returns:
        a Marker instance
      • dump

        public void dump()
        Dumps the current marker data to the logger.