Class FileDataTypeManager

    • Method Detail

      • createFileArchive

        public static FileDataTypeManager createFileArchive​(java.io.File packedDbfile)
                                                     throws java.io.IOException
        Create a new data-type file archive using the default data organization
        Parameters:
        packedDbfile - archive file (filename must end with DataTypeFileManager.SUFFIX)
        Returns:
        data-type manager backed by specified packedDbFile
        Throws:
        java.io.IOException
      • openFileArchive

        public static FileDataTypeManager openFileArchive​(java.io.File packedDbfile,
                                                          boolean openForUpdate)
                                                   throws java.io.IOException
        Open an existing data-type file archive using the default data organization
        Parameters:
        packedDbfile - archive file (filename must end with DataTypeFileManager.SUFFIX)
        openForUpdate - if true archive will be open for update
        Returns:
        data-type manager backed by specified packedDbFile
        Throws:
        java.io.IOException
      • openFileArchive

        public static FileDataTypeManager openFileArchive​(ResourceFile packedDbfile,
                                                          boolean openForUpdate)
                                                   throws java.io.IOException
        Open an existing data-type file archive using the default data organization
        Parameters:
        packedDbfile - archive file (filename must end with DataTypeFileManager.SUFFIX)
        openForUpdate - if true archive will be open for update
        Returns:
        data-type manager backed by specified packedDbFile
        Throws:
        java.io.IOException
      • saveAs

        public void saveAs​(java.io.File saveFile,
                           UniversalID newUniversalId)
                    throws DuplicateFileException,
                           java.io.IOException
        Saves the data type manager to the given file with a specific databaseId. NOTE: This method is intended for use in transforming one archive database to match another existing archive database.
        Parameters:
        saveFile - the file to save
        newUniversalId - the new id to use
        Throws:
        DuplicateFileException
        java.io.IOException
      • saveAs

        public void saveAs​(java.io.File saveFile)
                    throws DuplicateFileException,
                           java.io.IOException
        Saves the data type manager to the given file
        Parameters:
        saveFile - the file to save
        Throws:
        DuplicateFileException
        java.io.IOException
      • save

        public void save()
                  throws java.io.IOException
        Save the category to source file.
        Throws:
        java.io.IOException
      • getFilename

        public java.lang.String getFilename()
        Get the filename for the current file.
        Returns:
        String filename, or null if there is no current file.
      • convertFilename

        public static java.io.File convertFilename​(java.io.File file)
        Convert the filename for the given file to have the packed database file extension.
        Parameters:
        file - file whose name is to be converted
        Returns:
        file if the filename already ends in the packed database file extension, or a new File object that has the packed database file extension
      • delete

        public void delete()
                    throws java.io.IOException
        Throws:
        java.io.IOException
      • isClosed

        public boolean isClosed()
      • delete

        public static void delete​(java.io.File packedDbfile)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object