diff --git a/chrome/chromeFiles/content/scholar/data_access.js b/chrome/chromeFiles/content/scholar/data_access.js index 7d6694461..63647cf15 100644 --- a/chrome/chromeFiles/content/scholar/data_access.js +++ b/chrome/chromeFiles/content/scholar/data_access.js @@ -30,6 +30,12 @@ Scholar.Object.prototype._init = function(){ } +////////////////////////////////////////////////////////////////////////////// +// +// Public Scholar.Object methods +// +////////////////////////////////////////////////////////////////////////////// + /* * Check if the specified field is a primary field from the objects table */ @@ -107,6 +113,11 @@ Scholar.Object.prototype.getType = function(){ } +Scholar.Object.prototype.getParent = function(){ + return this._data['folderID'] ? this._data['folderID'] : false; +} + + /* * Set or change the object's type */ @@ -650,6 +661,17 @@ Scholar.Object.prototype.toString = function(){ } +Scholar.Object.prototype.isFolder = function(){ + return false; +} + + +////////////////////////////////////////////////////////////////////////////// +// +// Private Scholar.Object methods +// +////////////////////////////////////////////////////////////////////////////// + /* * Load in the creators from the database */ @@ -713,6 +735,7 @@ Scholar.Object.prototype._loadObjectData = function(){ + /* * Primary interface for accessing Scholar objects */ @@ -903,6 +926,8 @@ Scholar.Objects = new function(){ + + /* * Constructor for Folder object * @@ -947,6 +972,13 @@ Scholar.Folder.prototype.getLevel = function(){ return this._level; } +Scholar.Folder.prototype.isFolder = function(){ + return true; +} + +Scholar.Folder.prototype.getParent = function(){ + return this._parent; +} /* @@ -987,6 +1019,9 @@ Scholar.Folders = new function(){ } + + + Scholar.Creators = new function(){ var _creators = new Array; // indexed by first%%%last%%%creatorTypeID hash var _creatorsByID = new Array; // indexed by creatorID @@ -1119,6 +1154,10 @@ Scholar.Creators = new function(){ } + + + + Scholar.ObjectFields = new function(){ // Private members var _fields = new Array();