| 
    ARLO Adapt
    
   | 
 


Classes | |
| enum | MediaFileType | 
Public Member Functions | |
| String | toString () | 
| NesterAudioFile () | |
| Default Constructor.  More... | |
| NesterAudioFile (AudioFile audioFile, String username, int userID, int libraryID) | |
| Construct a New NesterAudioFile from an AudioFile.  More... | |
| String | GetMetaData (String name, Connection connection) | 
| String | GetMetaData (String name, Connection connection, boolean AllowNullValue) | 
| String | GetAbsoluteFilePath () | 
| Get the absoluteFilePath of a NesterAudioFile.  More... | |
| Boolean | saveMD5 (Connection connection) | 
| Save the MD5 Hash of a file back to the database.  More... | |
Static Public Member Functions | |
| static NesterAudioFile | getAudioFile (int audioFileID, Connection connection, HashMap< String, Boolean > fieldNames) | 
| Get a NeterAudioFile from the database, along with the associated MetaData.  More... | |
| static Vector< NesterAudioFile > | getNesterProjectAudioFiles (int projectID, boolean activeOnly, HashMap< String, Boolean > fieldNames, Connection connection) | 
| Get a list of all MediaFile objects in a Project.  More... | |
| static String | GetMetaData (int mediaFileID, String name, Connection connection) | 
| static String | GetMetaData (int mediaFileID, String name, Connection connection, boolean AllowNullValue) | 
| static Boolean | SaveMetaData (int mediaFileID, String name, String value, Boolean userEditable, Connection connection) | 
| static int | getAudioFileID (int userID, String relativeFilePath, Connection connection) | 
| static Boolean | AddFilesToProject (Vector< NesterAudioFile > nesterAudioFiles, int projectId, Connection connection) | 
| Adds the files to the indicated Project in the DB.  More... | |
| static Boolean | DeleteMetaDataFromDB (Vector< NesterAudioFile > nesterAudioFiles, Connection connection) | 
| Deletes any existing MetaData from the DB from the associated files.  More... | |
| static Boolean | SaveMetaDataToDb (Vector< NesterAudioFile > nesterAudioFiles, Connection connection) | 
| Saves all MetaData from the files in the list.  More... | |
| static Boolean | saveNewAudioFilesToDb (Vector< NesterAudioFile > nesterAudioFiles, int projectId, Connection connection) | 
| Saves a list of audioFiles.  More... | |
| static Boolean | importAudioFile (String username, int userID, int projectID, int libraryID, String relativeFilePath, Connection connection) | 
| Import an individual audio file.  More... | |
| static Boolean | importAudioFile (String username, int userID, int projectID, int libraryID, String relativeFilePath, String alias, Connection connection) | 
| Import an individual audio file.  More... | |
| static String | ComputeFileMD5Digest (String filepath) | 
| Compute the MD5 Hash of a File.  More... | |
| static Vector< Integer > | getAllMediaFileIds (Connection connection) | 
| Get a list of all MediaFile IDs in the Database.  More... | |
Public Attributes | |
| int | id | 
| database id; if -1, indicates a new object, not in db  More... | |
| int | user_id | 
| boolean | active | 
| String | alias | 
| Timestamp | uploadDate | 
| String | relativeFilePath | 
| int | library_id | 
| Timestamp | realStartTime | 
| NesterWavFileMetaData | wavFileMetaData | 
| NesterStaticUserMetaData | staticUserMetaData | 
| String | md5 | 
| MediaFileType | mediaFileType = null | 
Static Private Attributes | |
| static final long | serialVersionUID = -5787612004200650730L | 
| arlo.NesterAudioFile.NesterAudioFile | ( | ) | 
Default Constructor.
| arlo.NesterAudioFile.NesterAudioFile | ( | AudioFile | audioFile, | 
| String | username, | ||
| int | userID, | ||
| int | libraryID | ||
| ) | 
Construct a New NesterAudioFile from an AudioFile.
Initializes a new NesterAudioFile with default settings/MetaData. Does not save the data to the Database itself, this just initializes it into memory.
| audioFile | An initialize AudioFile with WAV data | 
| username | The username who owns this file, used for generating the paths | 
| userID | The database ID of the user who owns this file | 
| libraryID | The database ID of the Library in which this will be stored. | 
      
  | 
  static | 
Adds the files to the indicated Project in the DB.
| nesterAudioFiles | The list of NesterAudioFile objects from which to save the metadata | 
| projectId | The DB id of the Project for which to add these files | 
| connection | The database connection, already opened and active | 
      
  | 
  static | 
Compute the MD5 Hash of a File.
| filepath | Path to the file to hash. | 
      
  | 
  static | 
Deletes any existing MetaData from the DB from the associated files.
Existing data is removed so that we can run straight inserts rather that insert / updates when importing new files.
| nesterAudioFiles | The list of NesterAudioFile objects from which to save the metadata | 
| connection | The database connection, already opened and active | 
| String arlo.NesterAudioFile.GetAbsoluteFilePath | ( | ) | 
Get the absoluteFilePath of a NesterAudioFile.
      
  | 
  static | 
Get a list of all MediaFile IDs in the Database.
| connection | Opened Database Connection | 
      
  | 
  static | 
Get a NeterAudioFile from the database, along with the associated MetaData.
| audioFileID | The NesterAudioFile to retrieve. | 
| connection | The initialized connection to the database. | 
| fieldNames | A list of various fields (MetaData) to retrieve. | 
      
  | 
  static | 
| String arlo.NesterAudioFile.GetMetaData | ( | String | name, | 
| Connection | connection | ||
| ) | 
| String arlo.NesterAudioFile.GetMetaData | ( | String | name, | 
| Connection | connection, | ||
| boolean | AllowNullValue | ||
| ) | 
      
  | 
  static | 
      
  | 
  static | 
      
  | 
  static | 
Get a list of all MediaFile objects in a Project.
This is an optimized version of the original NesterProject.getNesterProjectAudioFiles. This version reduces the number of database calls by requesting all files from the database at once.
| projectId | The database ID of the Project. | 
| activeOnly | Only return files set as 'active' | 
| fieldNames | |
| connection | Opened Database Connection | 
      
  | 
  static | 
Import an individual audio file.
Other versions delete and recreate the 'import' Project, whereas this one includes the Project as an argument.
| username | |
| userID | |
| projectId | |
| relativeFilePath | |
| connection | 
      
  | 
  static | 
Import an individual audio file.
Other versions delete and recreate the 'import' Project, whereas this one includes the Project as an argument.
| username | |
| userID | |
| projectID | |
| libraryID | Database ID of the Library in which to store this file. | 
| relativeFilePath | |
| alias | If not null, stores this value as the 'alias' for the mediaFile, else uses the file name. | 
| connection | 
| Boolean arlo.NesterAudioFile.saveMD5 | ( | Connection | connection | ) | 
Save the MD5 Hash of a file back to the database.
| connection | The database connection, already opened and active | 
      
  | 
  static | 
      
  | 
  static | 
Saves all MetaData from the files in the list.
Batches up all MetaData from the provided nesterAudioFiles, and saves them to the Db at once.
| nesterAudioFiles | The list of NesterAudioFile objects from which to save the metadata | 
| connection | The database connection, already opened and active | 
      
  | 
  static | 
Saves a list of audioFiles.
Save a batch of NesterAudioFiles and associated MetaData at once to the database to optimize time accessing the DB. Uses default/empty values for unknown MetaData/values.
| nesterAudioFiles | The list of NesterAudioFile objects to save | 
| projectId | The DB id of the project for which to add these files | 
| connection | The database connection, already opened and active | 
| String arlo.NesterAudioFile.toString | ( | ) | 
| boolean arlo.NesterAudioFile.active | 
| String arlo.NesterAudioFile.alias | 
| int arlo.NesterAudioFile.id | 
database id; if -1, indicates a new object, not in db
| int arlo.NesterAudioFile.library_id | 
| String arlo.NesterAudioFile.md5 | 
| MediaFileType arlo.NesterAudioFile.mediaFileType = null | 
| Timestamp arlo.NesterAudioFile.realStartTime | 
| String arlo.NesterAudioFile.relativeFilePath | 
      
  | 
  staticprivate | 
| NesterStaticUserMetaData arlo.NesterAudioFile.staticUserMetaData | 
| Timestamp arlo.NesterAudioFile.uploadDate | 
| int arlo.NesterAudioFile.user_id | 
| NesterWavFileMetaData arlo.NesterAudioFile.wavFileMetaData | 
 1.8.10