Class SearchArticle

  • All Implemented Interfaces:
    java.io.Serializable


    public class SearchArticle
    extends java.lang.Object
    implements java.io.Serializable
    This class will wrap a Article.

    This wrapper class will add Category and Section information to an Article.

    This class is not intended to be used directly in serialisation and deserialisation so it uses the m prefix for fields.

    See Also:
    Serialized Form
    • Constructor Detail

      • SearchArticle

        public SearchArticle(Article article,
                             Section section,
                             Category category)
        Wraps an Article and also includes information of the location structure of the Article.
        Parameters:
        article - The original article that we are going to wrap
        section - The section that this article belongs to
        category - The category that this article belongs to
    • Method Detail

      • getArticle

        public Article getArticle()
        Gets the wrapped Article object.
        Returns:
        the original Article object
      • getSection

        public Section getSection()
        Gets the section that this article belongs in.
        Returns:
        The section that the article belongs in or null if there was an issue in determining this.
      • getCategory

        public Category getCategory()
        Gets the category that this article belongs in.
        Returns:
        The category that this article belongs in or null if there was an issue in determining this.