Class SourceBook

java.lang.Object
megamek.common.SourceBook

public class SourceBook extends Object
This class is used to store information about an individual sourcebook such as TRO: 3039.

Unknown fields in a sourcebook file are ignored, so a field added to the data files later cannot stop an older client from loading the book.

  • Constructor Details

    • SourceBook

      public SourceBook()
  • Method Details

    • getTitle

      public String getTitle()
      Returns:
      The full title of the book, such as "Technical Readout: 3039"
    • setTitle

      public void setTitle(String title)
    • getId

      public int getId()
      Returns:
      The mul id of the book.
    • setId

      public void setId(int id)
    • getSku

      public String getSku()
      Returns:
      The product code of the book, such as "CAT35121c"
    • setSku

      public void setSku(String sku)
    • getAbbrev

      public String getAbbrev()
      Returns:
      The abbreviation of the book, such as "TR: 3039"
    • setAbbrev

      public void setAbbrev(String abbrev)
    • getImage

      public String getImage()
    • setImage

      public void setImage(String image)
    • getUrl

      public String getUrl()
    • setUrl

      public void setUrl(String url)
    • getIspublished

      public boolean getIspublished()
    • setIspublished

      public void setIspublished(boolean ispublished)
    • isCanon

      public boolean isCanon()
      Returns:
      true if this sourcebook is canon
    • setCanon

      public void setCanon(boolean canon)
    • getPublished

      @Nullable public String getPublished()
      Returns:
      The date this book was first published, as precise as is known: "2016", "2016-02" or "2016-02-10". A reprint keeps the date of its first printing. null if unknown.
    • setPublished

      public void setPublished(String published)
    • getLinkUrl

      @Nullable public String getLinkUrl()
      Returns:
      The link to show for this book: the shop page if there is one, else the Master Unit List page. null if the book has neither.
    • getDescription

      public String getDescription()
      Returns:
      A description of the book with HTML tags.
    • setDescription

      public void setDescription(String description)
    • getMul_url

      public String getMul_url()
      Returns:
      A complete Master Unit List URL for this book
    • setMul_url

      public void setMul_url(String mul_url)