Class AbstractLinkExtractor

    • Constructor Detail

      • AbstractLinkExtractor

        public AbstractLinkExtractor()
    • Method Detail

      • addRestriction

        public void addRestriction​(PropertyMatcher... restrictions)
        Adds one or more restrictions this extractor should be restricted to.
        Parameters:
        restrictions - the restrictions
      • addRestrictions

        public void addRestrictions​(List<PropertyMatcher> restrictions)
        Adds restrictions this extractor should be restricted to.
        Parameters:
        restrictions - the restrictions
      • setRestrictions

        public void setRestrictions​(List<PropertyMatcher> restrictions)
        Sets restrictions this extractor should be restricted to.
        Parameters:
        restrictions - the restrictions
      • removeRestriction

        public int removeRestriction​(String field)
        Removes all restrictions on a given field.
        Parameters:
        field - the field to remove restrictions on
        Returns:
        how many elements were removed
      • removeRestriction

        public boolean removeRestriction​(PropertyMatcher restriction)
        Removes a restriction.
        Parameters:
        restriction - the restriction to remove
        Returns:
        true if this extractor contained the restriction
      • clearRestrictions

        public void clearRestrictions()
        Clears all restrictions.
      • getRestrictions

        public PropertyMatchers getRestrictions()
        Gets all restrictions
        Returns:
        the restrictions
      • loadLinkExtractorFromXML

        protected abstract void loadLinkExtractorFromXML​(XML xml)
        Loads configuration settings specific to the implementing class.
        Parameters:
        xml - XML configuration
      • saveLinkExtractorToXML

        protected abstract void saveLinkExtractorToXML​(XML xml)
        Saves configuration settings specific to the implementing class.
        Parameters:
        xml - the XML
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object