Class FileDataTypeManager

    • Method Detail

      • createFileArchive

        public static FileDataTypeManager createFileArchive​(java.io.File packedDbfile)
                                                     throws java.io.IOException
        Create a new data-type file archive
        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
        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
        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:
        outputFilename - filename for output
        databaseId - new databaseId
        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:
        outputFilename - filename for output
        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