Class AbstractFile

All Implemented Interfaces:
IPersistence, AbstractDataObject, ICBLBeanNGroup, ICBLContainer, IFieldContainer, ISMBean, ISMDataType
Direct Known Subclasses:
AbstractSequentialFile, RelativeFile

public abstract class AbstractFile extends AbstractBasePersistence implements IPersistence
  • Field Details

    • openMode

      protected int openMode
  • Constructor Details

    • AbstractFile

      public AbstractFile()
    • AbstractFile

      public AbstractFile(BaseService owner)
      default Constructor
      Parameters:
      owner -
  • Method Details

    • retrieveFullFileName

      public String retrieveFullFileName()
      if running in a web-environment (WEB-INF somewhere in the path) The method needs "softwaremining.properties" file somewhere it its path.
      Returns:
      if WEB-INF is somewher in the path then it absolote path for "WEB-INF/out" if WEB-INF is not anywhere in the path - then it returns "";
    • retrieveDataDirectory

      public static final String retrieveDataDirectory()
      Set-up the Input/Output directory for creation of sequential files. if running in a web-environment (WEB-INF somewhere in the path) The method needs "softwaremining.properties" file somewhere it its path.
      Returns:
      if WEB-INF is somewhere in the path then it absolute path for "WEB-INF/out" if WEB-INF is not anywhere in the path - then it returns "";
    • retrieveOpenMode

      public final int retrieveOpenMode()
      Open modes are :
      IPersistence.OPEN_MODE_INPUT ( read )
      IPersistence.OPEN_MODE_OUTPUT (Write)
      IPersistence.OPEN_MODE_I_O (read-write)
      IPersistence.OPEN_MODE_EXTEND: (read-write)
      Specified by:
      retrieveOpenMode in class AbstractBasePersistence
    • resetDataDirectory

      public static void resetDataDirectory()
      resets the data-directory variable, enforcing it to be set again (Useful if/when COnfig.dataDirectory as changed)