/*This code was generated using the UMPLE modeling language! Date of generation: 2008/07/30 10:29:32*/ /*This class drives: */ package library.core; import java.sql.Date; import library.*; import library.json.*; public class EditionOfBook extends EditionOrIssue { //Class datatypes private String isbn; private String libOfCongress; //Class association variables //Registry of our system. LibraryRegistry registry = LibraryRegistry.getInstance(); //Constructor public EditionOfBook(String aIssueNumber, String aPublishedDate, Publisher aPublisher, Publication aPublication, String aIsbn, String aLibOfCongress) { super(aIssueNumber, aPublishedDate, aPublisher, aPublication); isbn = aIsbn; libOfCongress = aLibOfCongress; } public boolean setIsbn(String aIsbn) { isbn = aIsbn; return true; } public boolean setLibOfCongress(String aLibOfCongress) { libOfCongress = aLibOfCongress; return true; } public String getIsbn() { return isbn; } public String getLibOfCongress() { return libOfCongress; } public void delete() { } public boolean areManyEndsNull() { return true; } /*********************************** * Returns the attribute list along with the * class ID in JSON format. ***********************************/ public JSONObject getAttributes() throws JSONException { JSONObject obj = new JSONObject(); obj.put("CLASS_ID", registry.getKey(this)); obj.put("isbn", getIsbn()); obj.put("libOfCongress", getLibOfCongress()); return obj; } }