Class Autosaves

java.lang.Object
ca.phon.app.autosave.Autosaves

public class Autosaves extends Object
Extension for Projects which manages auto-save files for a project. This extension is automatically attacthed to project files when available in the classpath.
  • Constructor Details

    • Autosaves

      public Autosaves(Project project)
  • Method Details

    • getAutosavePath

      public String getAutosavePath(Session session)
    • getAutosavePath

      public String getAutosavePath(String corpus, String session)
      Get the autosave path for the given session.
      Parameters:
      corpus -
      session -
      Returns:
      autosave path
    • hasAutosave

      public boolean hasAutosave(Session session)
    • hasAutosave

      public boolean hasAutosave(String corpus, String session)
      Does the project have an autosave for the given session.
      Parameters:
      corpus -
      session -
    • createAutosave

      public void createAutosave(Session session) throws IOException
      Throws:
      IOException
    • createAutosave

      public void createAutosave(Session session, String corpus, String sessionName) throws IOException
      Create an autosave for the givn sesion.
      Parameters:
      session -
      Throws:
      IOException
    • getAutosaveDateTime

      public LocalDateTime getAutosaveDateTime(Session session)
    • getAutosaveDateTime

      public LocalDateTime getAutosaveDateTime(String corpus, String session)
      Get the creation date of the autosave file for a session.
      Parameters:
      corpus -
      session -
      Returns:
      session modification date, null if autosave does not exist
    • openAutosave

      public Session openAutosave(Session session) throws IOException
      Throws:
      IOException
    • openAutosave

      public Session openAutosave(String corpus, String session) throws IOException
      Open session from autosave file.
      Parameters:
      corpus -
      session -
      Returns:
      session
      Throws:
      IOException
    • getProject

      public Project getProject()
      Get the project refernce.
      Returns:
      project