Class Corpus

java.lang.Object
nzilbb.labbcat.model.Corpus

public class Corpus extends Object
Corpus record.
Author:
Robert Fromont robert@fromont.net.nz
  • Constructor Details

    • Corpus

      public Corpus()
      Default constructor.
    • Corpus

      public Corpus(javax.json.JsonObject json)
      Constructor from JSON.
      Parameters:
      json - A JSON-encoded version of the corpus.
  • Method Details

    • getCorpusId

      public int getCorpusId()
      Getter for corpusId: Database key value.
      Returns:
      Database key value.
    • setCorpusId

      public Corpus setCorpusId(int newCorpusId)
      Setter for corpusId: Database key value.
      Parameters:
      newCorpusId - Database key value.
      Returns:
      A reference to this object, so that setters can be chained.
    • getName

      public String getName()
      Getter for name: Corpus name.
      Returns:
      Corpus name.
    • setName

      public Corpus setName(String newName)
      Setter for name: Corpus name.
      Parameters:
      newName - Corpus name.
      Returns:
      A reference to this object, so that setters can be chained.
    • getLanguage

      public String getLanguage()
      Getter for language: The ISO 639-1 code for the default language.
      Returns:
      The ISO 639-1 code for the default language.
    • setLanguage

      public Corpus setLanguage(String newLanguage)
      Setter for language: The ISO 639-1 code for the default language.
      Parameters:
      newLanguage - The ISO 639-1 code for the default language.
      Returns:
      A reference to this object, so that setters can be chained.
    • getDescription

      public String getDescription()
      Getter for description: Description of corpus.
      Returns:
      Description of corpus.
    • setDescription

      public Corpus setDescription(String newDescription)
      Setter for description: Description of corpus.
      Parameters:
      newDescription - Description of corpus.
      Returns:
      A reference to this object, so that setters can be chained.
    • toJson

      public javax.json.JsonObject toJson()
      Serializes the object to JSON.
      Returns:
      A JSON serialization of the object.