Class CacheQuestion


  • public class CacheQuestion
    extends java.lang.Object
    This class contains all the input parameters for a cache request
    Since:
    15.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private Collection collection
      Collection to get the cached document from
      private java.lang.String doc
      Relative path of the document in the collection storage to access the document.
      private @Pattern(regexp="[\\w-_]+") java.lang.String form
      Form (template) to use to render the cached copy
      private int len
      Length of the document in the WARC file
      private long off
      Offset of the document in the WARC file
      private @Pattern(regexp="[\\w-_]+") java.lang.String profile
      Profile where to lookup the cached copies template to use
      private java.lang.String url
      URL of the document to retrieve the cached copy of
    • Constructor Summary

      Constructors 
      Constructor Description
      CacheQuestion()  
      CacheQuestion​(Collection collection, java.lang.String profile, java.lang.String form, java.lang.String url, java.lang.String doc, long off, int len)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Collection getCollection()
      Collection to get the cached document from
      java.lang.String getDoc()
      Relative path of the document in the collection storage to access the document.
      java.lang.String getForm()
      Form (template) to use to render the cached copy
      int getLen()
      Length of the document in the WARC file
      long getOff()
      Offset of the document in the WARC file
      java.lang.String getProfile()
      Profile where to lookup the cached copies template to use
      java.lang.String getUrl()
      URL of the document to retrieve the cached copy of
      void setCollection​(Collection collection)
      Collection to get the cached document from
      void setDoc​(java.lang.String doc)
      Relative path of the document in the collection storage to access the document.
      void setForm​(java.lang.String form)
      Form (template) to use to render the cached copy
      void setLen​(int len)
      Length of the document in the WARC file
      void setOff​(long off)
      Offset of the document in the WARC file
      void setProfile​(java.lang.String profile)
      Profile where to lookup the cached copies template to use
      void setUrl​(java.lang.String url)
      URL of the document to retrieve the cached copy of
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • profile

        @NonNull
        @Pattern(regexp="[\\w-_]+")
        private @Pattern(regexp="[\\w-_]+") java.lang.String profile
        Profile where to lookup the cached copies template to use
      • form

        @NonNull
        @Pattern(regexp="[\\w-_]+")
        private @Pattern(regexp="[\\w-_]+") java.lang.String form

        Form (template) to use to render the cached copy

        The template is expected to be prefixed with cache. and have the extension .ftl

      • url

        private java.lang.String url
        URL of the document to retrieve the cached copy of
      • doc

        private java.lang.String doc

        Relative path of the document in the collection storage to access the document.

        This is used as a fallback method if the document cannot be found via its URL, for example if the URL has been rewritten

      • off

        private long off
        Offset of the document in the WARC file
      • len

        private int len
        Length of the document in the WARC file
    • Constructor Detail

      • CacheQuestion

        public CacheQuestion​(@NonNull
                             Collection collection,
                             @NonNull
                             java.lang.String profile,
                             @NonNull
                             java.lang.String form,
                             java.lang.String url,
                             java.lang.String doc,
                             long off,
                             int len)
      • CacheQuestion

        public CacheQuestion()
    • Method Detail

      • getCollection

        @NonNull
        public Collection getCollection()
        Collection to get the cached document from
      • setCollection

        public void setCollection​(@NonNull
                                  Collection collection)
        Collection to get the cached document from
      • getProfile

        @NonNull
        public java.lang.String getProfile()
        Profile where to lookup the cached copies template to use
      • setProfile

        public void setProfile​(@NonNull
                               java.lang.String profile)
        Profile where to lookup the cached copies template to use
      • getForm

        @NonNull
        public java.lang.String getForm()

        Form (template) to use to render the cached copy

        The template is expected to be prefixed with cache. and have the extension .ftl

      • setForm

        public void setForm​(@NonNull
                            java.lang.String form)

        Form (template) to use to render the cached copy

        The template is expected to be prefixed with cache. and have the extension .ftl

      • getUrl

        public java.lang.String getUrl()
        URL of the document to retrieve the cached copy of
      • setUrl

        public void setUrl​(java.lang.String url)
        URL of the document to retrieve the cached copy of
      • getDoc

        public java.lang.String getDoc()

        Relative path of the document in the collection storage to access the document.

        This is used as a fallback method if the document cannot be found via its URL, for example if the URL has been rewritten

      • setDoc

        public void setDoc​(java.lang.String doc)

        Relative path of the document in the collection storage to access the document.

        This is used as a fallback method if the document cannot be found via its URL, for example if the URL has been rewritten

      • getOff

        public long getOff()
        Offset of the document in the WARC file
      • setOff

        public void setOff​(long off)
        Offset of the document in the WARC file
      • getLen

        public int getLen()
        Length of the document in the WARC file
      • setLen

        public void setLen​(int len)
        Length of the document in the WARC file