Class MavenCentralResponseExtractor

java.lang.Object
org.apache.maven.search.backend.remoterepository.extractor.ResponseExtractorSupport
org.apache.maven.search.backend.remoterepository.extractor.MavenCentralResponseExtractor
All Implemented Interfaces:
ResponseExtractor

public class MavenCentralResponseExtractor extends ResponseExtractorSupport
Extractor for Maven Central.
  • Constructor Details

    • MavenCentralResponseExtractor

      public MavenCentralResponseExtractor()
  • Method Details

    • nameInHref

      protected String nameInHref(org.jsoup.nodes.Element element)
      Extracts the "name" from href attribute. In case of Maven Central, the href attribute contains name in relative form as "name/" (followed by slash), if name denotes a directory. The trailing slash is removed by this method, if any.
    • populateG

      public int populateG(Context context, org.jsoup.nodes.Document document, RecordFactory recordFactory, List<org.apache.maven.search.api.Record> page)
      Description copied from interface: ResponseExtractor
      Method parsing document out of HTML page like this one: https://repo.maven.apache.org/maven2/org/apache/maven/indexer/

      Note: this method is "best effort" and may enlist non-existent As (think nested Gs).

    • populateGAV

      public int populateGAV(Context context, org.jsoup.nodes.Document document, RecordFactory recordFactory, List<org.apache.maven.search.api.Record> page)
      Description copied from interface: ResponseExtractor
      Method parsing document out of HTML page like this one: https://repo.maven.apache.org/maven2/org/apache/maven/indexer/search-api/7.0.3/

      Note: this method is "best effort" and may enlist fake artifacts.