[Mydm-cvs] MyDM/src/java/org/mydm/core EDocument.java,1.5,1.6
Status: Pre-Alpha
Brought to you by:
vkdasari
|
From: <vkd...@us...> - 2004-03-04 22:10:50
|
Update of /cvsroot/mydm/MyDM/src/java/org/mydm/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24151/src/java/org/mydm/core Modified Files: EDocument.java Log Message: Refactoring for the Change in Genres model Genres are identified with ID's rather than names Index: EDocument.java =================================================================== RCS file: /cvsroot/mydm/MyDM/src/java/org/mydm/core/EDocument.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** EDocument.java 3 Mar 2004 18:58:27 -0000 1.5 --- EDocument.java 4 Mar 2004 21:49:20 -0000 1.6 *************** *** 61,65 **** private HashMap MDHASH = new HashMap(); private static HashMap MDTODBELE; ! private String genre = null; // Collection ID --- 61,65 ---- private HashMap MDHASH = new HashMap(); private static HashMap MDTODBELE; ! private String genrename; // Collection ID *************** *** 69,74 **** private int id; ! // Instance of the MD ! private static final MetaData md = MetaData.getInstance(); // Array of Author Objects --- 69,74 ---- private int id; ! // Genre ID ! private int genid; // Array of Author Objects *************** *** 104,108 **** */ private void init() { ! MDTODBELE = md.getAllEleHash(); Iterator i = MDTODBELE.entrySet().iterator(); while(i.hasNext()){ --- 104,108 ---- */ private void init() { ! MDTODBELE = MetaData.getAllEleHash(); Iterator i = MDTODBELE.entrySet().iterator(); while(i.hasNext()){ *************** *** 119,123 **** */ public String getGenreName() { ! return genre; } --- 119,123 ---- */ public String getGenreName() { ! return genrename; } *************** *** 128,132 **** */ public void setGenreName(String gen){ ! genre = gen; } --- 128,132 ---- */ public void setGenreName(String gen){ ! genrename = gen; } *************** *** 176,180 **** elevalue = MDHASH.get(ele).toString(); }catch(Exception e){ ! log.warning(ele); } return elevalue; --- 176,181 ---- elevalue = MDHASH.get(ele).toString(); }catch(Exception e){ ! // TODO -- Check this with the elements which are not there ! //log.warning(ele); } return elevalue; *************** *** 418,420 **** --- 419,436 ---- } + /** + * Gets the Genre ID + * @return Returns the genid. + */ + public int getGenid() { + return genid; + } + + /** + * Sets the Genre ID + * @param genid The genid to set. + */ + public void setGenid(int genid) { + this.genid = genid; + } } \ No newline at end of file |