Class SourceReferenceImpl

java.lang.Object
org.wikirate4j.entitities.SourceReferenceImpl
All Implemented Interfaces:
Card, SourceReference

public class SourceReferenceImpl extends Object implements Card, SourceReference
  • Constructor Details

    • SourceReferenceImpl

      public SourceReferenceImpl(String reference)
  • Method Details

    • asReference

      public String asReference()
      Specified by:
      asReference in interface SourceReference
    • getId

      public Long getId()
      Specified by:
      getId in interface Card
      Returns:
      the card's unique identifier
    • getName

      public String getName()
      Specified by:
      getName in interface Card
      Returns:
      the card's unique name
    • getContent

      public Object getContent()
      Specified by:
      getContent in interface Card
      Returns:
      the card's content
    • getURL

      public String getURL()
      Specified by:
      getURL in interface Card
      Returns:
      the card's URL
    • getHtmlURL

      public String getHtmlURL()
      Specified by:
      getHtmlURL in interface Card
      Returns:
      the card's html url
    • getCodename

      public String getCodename()
      Specified by:
      getCodename in interface Card
      Returns:
      the card's codename
    • getCreatedAt

      public Date getCreatedAt()
      Specified by:
      getCreatedAt in interface Card
      Returns:
      the creation date of the card
    • getUpdatedAt

      public Date getUpdatedAt()
      Specified by:
      getUpdatedAt in interface Card
      Returns:
      the date the card was last updated
    • getRequestedAt

      public Date getRequestedAt()
      Specified by:
      getRequestedAt in interface Card
      Returns:
      the request date
    • raw_json

      public org.json.JSONObject raw_json()
      Specified by:
      raw_json in interface Card
      Returns:
      the raw json of the card as returned by the request (if it was retrieved by a request, otherwise it is null) Note: the raw_json is usually more verbose
    • toJson

      public org.json.JSONObject toJson()
      Specified by:
      toJson in interface Card
      Returns:
      the object as json
    • getContent

      public Object getContent(Class classType)
      Specified by:
      getContent in interface Card
      Parameters:
      classType -
      Returns:
      the card's content given the type as input
    • toString

      public String toString()
      Overrides:
      toString in class Object