Class CardImpl<K>

java.lang.Object
org.wikirate4j.entitities.CardImpl<K>
All Implemented Interfaces:
Card<K>
Direct Known Subclasses:
AnswerImpl, CheckedByImpl, CompanyGroupImpl, CompanyImpl, DatasetImpl, MetricImpl, RegionImpl, RelationshipImpl, ResearchGroupImpl, SourceImpl, TopicImpl

public class CardImpl<K> extends Object implements Card<K>
Author:
Vasiliki Gkatziaki
  • Method Details

    • getId

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

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

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

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

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

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

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

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

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

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

      public org.json.JSONObject raw_json()
      Specified by:
      raw_json in interface Card<K>
      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<K>
      Returns:
      the object as json