Package megamek.common
Class SourceBook
java.lang.Object
megamek.common.SourceBook
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetId()getImage()booleangetSku()getTitle()getUrl()booleanisCanon()voidvoidsetCanon(boolean canon) voidsetDescription(String description) voidsetId(int id) voidvoidsetIspublished(boolean ispublished) voidsetMul_url(String mul_url) voidsetPublished(String published) voidvoidvoid
-
Constructor Details
-
SourceBook
public SourceBook()
-
-
Method Details
-
getTitle
- Returns:
- The full title of the book, such as "Technical Readout: 3039"
-
setTitle
-
getId
public int getId()- Returns:
- The mul id of the book.
-
setId
public void setId(int id) -
getSku
- Returns:
- The product code of the book, such as "CAT35121c"
-
setSku
-
getAbbrev
- Returns:
- The abbreviation of the book, such as "TR: 3039"
-
setAbbrev
-
getImage
-
setImage
-
getUrl
-
setUrl
-
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
- 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.
nullif unknown.
-
setPublished
-
getLinkUrl
- Returns:
- The link to show for this book: the shop page if there is one, else the Master Unit List page.
nullif the book has neither.
-
getDescription
- Returns:
- A description of the book with HTML tags.
-
setDescription
-
getMul_url
- Returns:
- A complete Master Unit List URL for this book
-
setMul_url
-