lib/associationmanager.js
function AssociationManager(options) {
  var self = this;

  self.associationsRootUrl = options.associationsRootUrl ||
                             SNIFFYPEDIA_ROOT_URL;
  var datafolder = options.persistentDataFolder || DEFAULT_DATA_FOLDER;
  var filename = ASSOCIATION_DB;
  if(options.persistentDataFolder !== '') {
    filename = datafolder.concat('/' + filename);
  }

  self.db = new nedb({ filename: filename, autoload: true });
  self.db.insert(TEST_TRANSMITTER);
  self.db.insert(TEST_RECEIVER_0);
  self.db.insert(TEST_RECEIVER_1);
  self.db.insert(TEST_RECEIVER_2);
  self.db.insert(TEST_RECEIVER_3);
}
function AssociationManager(options) {
  var self = this;

  self.associationsRootUrl = options.associationsRootUrl ||
                             SNIFFYPEDIA_ROOT_URL;
  var datafolder = options.persistentDataFolder || DEFAULT_DATA_FOLDER;
  var filename = ASSOCIATION_DB;
  if(options.persistentDataFolder !== '') {
    filename = datafolder.concat('/' + filename);
  }

  self.db = new nedb({ filename: filename, autoload: true });
  self.db.insert(TEST_TRANSMITTER);
  self.db.insert(TEST_RECEIVER_0);
  self.db.insert(TEST_RECEIVER_1);
  self.db.insert(TEST_RECEIVER_2);
  self.db.insert(TEST_RECEIVER_3);
}
function AssociationManager ( options ) { var self = this ; self . associationsRootUrl = options . associationsRootUrl || SNIFFYPEDIA_ROOT_URL ; var datafolder = options . persistentDataFolder || DEFAULT_DATA_FOLDER ; var filename = ASSOCIATION_DB ; if ( options . persistentDataFolder !== '' ) { filename = datafolder . concat ( '/' + filename ) ; } self . db = new nedb ( { filename : filename , autoload : true } ) ; self . db . insert ( TEST_TRANSMITTER ) ; self . db . insert ( TEST_RECEIVER_0 ) ; self . db . insert ( TEST_RECEIVER_1 ) ; self . db . insert ( TEST_RECEIVER_2 ) ; self . db . insert ( TEST_RECEIVER_3 ) ; }
AssociationManager Class
Manages the association of identifiers with URLs
@param {Object} options The options as a JSON object.
@constructor
AssociationManager Class Manages the association of identifiers with URLs