/*This code was generated using the UMPLE modeling language! Date of generation: 2008/07/30 10:29:33*/ /*This class drives: */ package library.core; import library.*; import library.json.*; public class Periodical extends Publication { //Class datatypes private String issn; private String frequency; //Class association variables //Registry of our system. LibraryRegistry registry = LibraryRegistry.getInstance(); //Constructor public Periodical(String aName, String aIssn, String aFrequency) { super(aName); issn = aIssn; frequency = aFrequency; } public boolean setIssn(String aIssn) { issn = aIssn; return true; } public boolean setFrequency(String aFrequency) { frequency = aFrequency; return true; } public String getIssn() { return issn; } public String getFrequency() { return frequency; } 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("issn", getIssn()); obj.put("frequency", getFrequency()); return obj; } }