java.lang.Object
ch.colabproject.colab.api.model.document.AbstractResource
ch.colabproject.colab.api.model.document.Resource
All Implemented Interfaces:
ColabEntity, StickyNoteSourceable, WithDeletionStatus, WithPermission, WithTrackingData, WithWebsocketChannels, ch.colabproject.colab.generator.model.interfaces.WithId, ch.colabproject.colab.generator.model.interfaces.WithJsonDiscriminator, Serializable

@Entity public class Resource extends AbstractResource
A resource is a document provided to help the users to fulfill their goals.
Author:
sandra
See Also:
  • Constructor Details

    • Resource

      public Resource()
  • Method Details

    • getTitle

      public String getTitle()
      Returns:
      The title
    • setTitle

      public void setTitle(String title)
      Parameters:
      title - The title
    • isPublished

      public boolean isPublished()
      Returns:
      if it is at the disposal of the inheritors
    • setPublished

      public void setPublished(boolean published)
      Parameters:
      published - if it is at the disposal of the inheritors
    • isRequestingForGlory

      public boolean isRequestingForGlory()
      Returns:
      if it asks upper level(s) to integrate the resource
    • setRequestingForGlory

      public void setRequestingForGlory(boolean requestingForGlory)
      Parameters:
      requestingForGlory - if it asks upper level(s) to integrate the resource
    • isDeprecated

      public boolean isDeprecated()
      Returns:
      if it should not be used anymore
    • setDeprecated

      public void setDeprecated(boolean deprecated)
      Parameters:
      deprecated - if it should not be used anymore
    • getLexicalConversion

      public ConversionStatus getLexicalConversion()
      Returns:
      the conversion status : conversion status of documents for lexical
    • setLexicalConversion

      public void setLexicalConversion(ConversionStatus lexicalConversion)
      Parameters:
      lexicalConversion - the new conversion status : conversion status of documents for lexical
    • getTeaser

      public TextDataBlock getTeaser()
      Returns:
      the teaser / abstract
    • setTeaser

      public void setTeaser(TextDataBlock teaser)
      Parameters:
      teaser - the teaser / abstract
    • getTeaserId

      public Long getTeaserId()
      get the id of the teaser. To be sent to client.
      Returns:
      the id of the teaser
    • setTeaserId

      public void setTeaserId(Long teaserId)
      set the id of the teaser. For serialization only.
      Parameters:
      teaserId - the id of the teaser
    • getDocuments

      public List<Document> getDocuments()
      Returns:
      the content of the resource
    • setDocuments

      public void setDocuments(List<Document> documents)
      Parameters:
      documents - the content of the resource
    • resolve

      public Resource resolve()
      Description copied from class: AbstractResource
      Resolve to concrete Resource
      Specified by:
      resolve in class AbstractResource
      Returns:
      the effective resource
    • expand

      public List<AbstractResource> expand()
      Description copied from class: AbstractResource
      Resolve to concrete resource and return all transitive references too.
      Specified by:
      expand in class AbstractResource
      Returns:
      concrete resource and transitive references
    • mergeToUpdate

      public void mergeToUpdate(ColabEntity other) throws ColabMergeException
      Description copied from interface: ColabEntity
      Update this object according to values provided by other.

      This is used when an object is prepared to be updated in database.

      Specified by:
      mergeToUpdate in interface ColabEntity
      Overrides:
      mergeToUpdate in class AbstractResource
      Parameters:
      other - object to take new values from
      Throws:
      ColabMergeException - if merging is not possible
    • mergeToDuplicate

      public void mergeToDuplicate(ColabEntity other) throws ColabMergeException
      Description copied from interface: ColabEntity
      Update this object according to values provided by other.

      This is used when an object is prepared to be duplicated.

      Specified by:
      mergeToDuplicate in interface ColabEntity
      Overrides:
      mergeToDuplicate in class AbstractResource
      Parameters:
      other - object to take new values from
      Throws:
      ColabMergeException - if merging is not possible
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class AbstractResource
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class AbstractResource
    • toString

      public String toString()
      Overrides:
      toString in class Object