Class CaseInfo


  • public class CaseInfo
    extends java.lang.Object
    Represents some information which can be determined about a Nuix case directory without having yet opened the case through the API. This includes case store count and information parsed from the case's FBI2 file.
    • Constructor Summary

      Constructors 
      Constructor Description
      CaseInfo​(java.io.File caseDirectory)
      Creates a new instance associated to the specified case directory.
      CaseInfo​(java.lang.String caseDirectoryPath)
      Creates a new instance associated to the specified case directory.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean caseExists()
      Whether a case was determined to exist in the directory specified, as determined by presence of FBI2 file in directory.
      protected void determineStoreCount()
      Determines case store count by counting store directories in case directory.
      boolean equals​(java.lang.Object obj)  
      static java.util.List<CaseInfo> fromCaseDirectories​(java.util.List<java.io.File> directories)
      Given a list of case paths (specified as File objects) creates a series of CaseInfo objects.
      static java.util.List<CaseInfo> fromCasePaths​(java.util.List<java.lang.String> paths)
      Given a list of case paths (specified as Strings) creates a series of CaseInfo objects.
      org.joda.time.DateTime getAccessedDateTime()
      The case last accessed date time.
      java.lang.String getAccessedDateTimeString()
      The case last accessed date time as a String.
      java.io.File getCaseDirectory()
      Gets case directory associated with this instance.
      java.lang.String getCaseDirectoryPath()
      Gets case directory associated with this instance.
      int getChildCaseCount()
      Count of child cases if this is a compound case.
      java.util.List<CaseInfo> getChildCases()
      A list of CaseInfo objects representing child cases if this is a compound case.
      org.joda.time.DateTime getCreationDateTime()
      The case creation date time.
      java.lang.String getCreationDateTimeString()
      The case creation date time as a String.
      java.io.File getFbi2File()
      Gets file path of FBI2 file associated with this instance.
      java.lang.String getFbi2FilePath()
      Gets file path of FBI2 file associated with this instance.
      java.lang.String getGuid()
      The case GUID of this case.
      java.lang.String getInvestigator()
      The investigator value.
      CaseLockInfo getLockProperties()
      If case is determined to be locked, gets information about who is currently locking the case.
      java.lang.String getName()
      The name of this case.
      java.lang.String getSavedByName()
      The saved by name.
      java.lang.String getSavedByVersion()
      The saved by version.
      int getStoreCount()
      Store count of this case.
      int hashCode()  
      boolean hasSameGuidAs​(nuix.Case nuixCase)
      Determines whether a Nuix case object shares the same GUID as this CaseInfo object.
      boolean isCompound()
      Whether this case has been determined to be a compound case
      boolean isLocked()
      Whether this case was determined to be locked, as determined by the presence of a case.lock file in the specified case directory.
      protected void parseFbi2File()
      Parses information from FBI2 file
      java.lang.String toString()
      Creates a user friendly String "dump" of information contained in this CaseInfo instance.
      void withCase​(boolean allowMigration, java.util.function.Consumer<nuix.Case> caseConsumer)
      Opens case and passes it to specified callback.
      void withCase​(java.util.function.Consumer<nuix.Case> caseConsumer)
      Opens case and passes it to specified callback.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • CaseInfo

        public CaseInfo​(java.io.File caseDirectory)
        Creates a new instance associated to the specified case directory.
        Parameters:
        caseDirectory - Case directory to collect information on.
      • CaseInfo

        public CaseInfo​(java.lang.String caseDirectoryPath)
        Creates a new instance associated to the specified case directory.
        Parameters:
        caseDirectoryPath - Case directory to collect information on.
    • Method Detail

      • parseFbi2File

        protected void parseFbi2File()
        Parses information from FBI2 file
      • determineStoreCount

        protected void determineStoreCount()
        Determines case store count by counting store directories in case directory.
      • getCaseDirectory

        public java.io.File getCaseDirectory()
        Gets case directory associated with this instance.
        Returns:
        The case directory associated with this instance as File object.
      • getCaseDirectoryPath

        public java.lang.String getCaseDirectoryPath()
        Gets case directory associated with this instance.
        Returns:
        The case directory associated with this instance as a String.
      • getFbi2File

        public java.io.File getFbi2File()
        Gets file path of FBI2 file associated with this instance.
        Returns:
        The file path of the FBI2 file associated with this instance as File object.
      • getFbi2FilePath

        public java.lang.String getFbi2FilePath()
        Gets file path of FBI2 file associated with this instance.
        Returns:
        The file path of the FBI2 file associated with this instance as a String.
      • isCompound

        public boolean isCompound()
        Whether this case has been determined to be a compound case
        Returns:
        True if this case has been determined to be compound.
      • getStoreCount

        public int getStoreCount()
        Store count of this case.
        Returns:
        Determined store count of this case.
      • getName

        public java.lang.String getName()
        The name of this case.
        Returns:
        The name of this case.
      • getGuid

        public java.lang.String getGuid()
        The case GUID of this case.
        Returns:
        The case GUID.
      • getCreationDateTime

        public org.joda.time.DateTime getCreationDateTime()
        The case creation date time.
        Returns:
        The case creation date time.
      • getCreationDateTimeString

        public java.lang.String getCreationDateTimeString()
        The case creation date time as a String.
        Returns:
        The case creation date time as a String.
      • getAccessedDateTime

        public org.joda.time.DateTime getAccessedDateTime()
        The case last accessed date time.
        Returns:
        The case last accessed date time.
      • getAccessedDateTimeString

        public java.lang.String getAccessedDateTimeString()
        The case last accessed date time as a String.
        Returns:
        The case last accessed date time as a String.
      • getInvestigator

        public java.lang.String getInvestigator()
        The investigator value.
        Returns:
        The investigator value.
      • getSavedByName

        public java.lang.String getSavedByName()
        The saved by name.
        Returns:
        The saved by name.
      • getSavedByVersion

        public java.lang.String getSavedByVersion()
        The saved by version.
        Returns:
        The saved by version.
      • getChildCases

        public java.util.List<CaseInfo> getChildCases()
        A list of CaseInfo objects representing child cases if this is a compound case.
        Returns:
        A list of CaseInfo objects representing child cases if this is a compound case.
      • getChildCaseCount

        public int getChildCaseCount()
        Count of child cases if this is a compound case.
        Returns:
        Count of child cases if this is a compound case.
      • caseExists

        public boolean caseExists()
        Whether a case was determined to exist in the directory specified, as determined by presence of FBI2 file in directory.
        Returns:
        True if case was determined to exist in the directory specified when this instance was created.
      • isLocked

        public boolean isLocked()
        Whether this case was determined to be locked, as determined by the presence of a case.lock file in the specified case directory.
        Returns:
        True is case has been determined to be locked.
      • getLockProperties

        public CaseLockInfo getLockProperties()
        If case is determined to be locked, gets information about who is currently locking the case.
        Returns:
        A CaseLockInfo object with information about who is locking the case, if the case is locked.
      • withCase

        public void withCase​(boolean allowMigration,
                             java.util.function.Consumer<nuix.Case> caseConsumer)
                      throws java.lang.Exception
        Opens case and passes it to specified callback.
        Parameters:
        allowMigration - Whether to allow Nuix to migrate this case while opening it.
        caseConsumer - Callback which will be provided the case if it opens without error.
        Throws:
        java.lang.Exception - Thrown if there is an error.
      • withCase

        public void withCase​(java.util.function.Consumer<nuix.Case> caseConsumer)
                      throws java.lang.Exception
        Opens case and passes it to specified callback. This differs from withCase(boolean, Consumer) in that this version implictly does not allow Nuix to migrate the case.
        Parameters:
        caseConsumer - Callback which will be provided the case if it opens without error.
        Throws:
        java.lang.Exception - Thrown if there is an error.
      • hasSameGuidAs

        public boolean hasSameGuidAs​(nuix.Case nuixCase)
        Determines whether a Nuix case object shares the same GUID as this CaseInfo object.
        Parameters:
        nuixCase - A Nuix case obtained from the Nuix API.
        Returns:
        True if this CaseInfo and the provided Case object are found to have the same GUID.
      • fromCasePaths

        public static java.util.List<CaseInfo> fromCasePaths​(java.util.List<java.lang.String> paths)
        Given a list of case paths (specified as Strings) creates a series of CaseInfo objects.
        Parameters:
        paths - String paths to case directories.
        Returns:
        List of CaseInfo objects for the list of case directories.
      • fromCaseDirectories

        public static java.util.List<CaseInfo> fromCaseDirectories​(java.util.List<java.io.File> directories)
        Given a list of case paths (specified as File objects) creates a series of CaseInfo objects.
        Parameters:
        directories - File paths to case directories.
        Returns:
        List of CaseInfo objects for the list of case directories.
      • toString

        public java.lang.String toString()
        Creates a user friendly String "dump" of information contained in this CaseInfo instance.
        Overrides:
        toString in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object