Interface Card<K>

All Known Subinterfaces:
Answer, CheckedBy<T>, Company, CompanyGroup, Dataset, Metric, Region, Relationship, ResearchGroup, Source, Topic
All Known Implementing Classes:
AnswerImpl, CardImpl, CheckedByImpl, CompanyGroupImpl, CompanyImpl, DatasetImpl, MetricImpl, RegionImpl, RelationshipImpl, ResearchGroupImpl, SourceImpl, SourceReferenceImpl, TopicImpl

public interface Card<K>
Cards are the building blocks of all decko sites. WikiRate is an extension project of decko and every element is a card. Entities like Companies, Metrics, Answers, Company Groups etc. are essentially cards with additional features. Every card consists of a unique identifier and a unique name, a code name, and it can or cannot have content. The content of a certain card can be a specific type.
Author:
Vasiliki Gkatziaki
  • Method Details

    • getId

      Long getId()
      Returns:
      the card's unique identifier
    • getName

      String getName()
      Returns:
      the card's unique name
    • getContent

      Object getContent(Class<?> classType)
      Parameters:
      classType -
      Returns:
      the card's content given the type as input
    • getContent

      K getContent()
      Returns:
      the card's content
    • getURL

      String getURL()
      Returns:
      the card's URL
    • getHtmlURL

      String getHtmlURL()
      Returns:
      the card's html url
    • getCodename

      String getCodename()
      Returns:
      the card's codename
    • getCreatedAt

      Date getCreatedAt()
      Returns:
      the creation date of the card
    • getUpdatedAt

      Date getUpdatedAt()
      Returns:
      the date the card was last updated
    • getRequestedAt

      Date getRequestedAt()
      Returns:
      the request date
    • raw_json

      org.json.JSONObject raw_json()
      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

      org.json.JSONObject toJson()
      Returns:
      the object as json