Direct Known Subclasses:
ApplicationFileResource, AudioFileResource, ImageFileResource, LinkedDataFileResource, TextFileResource, VideoFileResource

public class FileResource extends Identifiable
A FileResource (source) describes any file, regardless of its physical location, used storage technology or required display means (aka "Viewer"). A FileResource can e.g. include an image, a video file, an XML document, or a JSON file.
  • Field Details

  • Constructor Details

    • FileResource

      public FileResource()
  • Method Details

    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Identifiable
    • getFileResourceType

      public FileResourceType getFileResourceType()
    • getFilename

      public String getFilename()
    • getFilenameExtension

      public String getFilenameExtension()
    • getHttpBaseUrl

      public URL getHttpBaseUrl()
      Returns:
      a base HTTP url for getting the file resource. Supposed to be extended by additional URL params.
    • getLicense

      public License getLicense()
    • getMimeType

      public MimeType getMimeType()
    • getSizeInBytes

      public long getSizeInBytes()
    • getUri

      public URI getUri()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Identifiable
    • init

      protected void init()
      Description copied from class: UniqueObject
      Use to initialize member variables, used by default constructor and builder
      Overrides:
      init in class Identifiable
    • isReadonly

      public boolean isReadonly()
    • setFileResourceType

      public void setFileResourceType(FileResourceType fileResourceType)
    • setFilename

      public void setFilename(String filename)
    • setHttpBaseUrl

      public void setHttpBaseUrl(URL httpBaseUrl)
    • setLicense

      public void setLicense(License license)
    • setMimeType

      public void setMimeType(MimeType mimeType)
    • setReadonly

      public void setReadonly(boolean readonly)
    • setSizeInBytes

      public void setSizeInBytes(long sizeInBytes)
    • setUri

      public void setUri(URI uri)
    • toString

      public String toString()
      Overrides:
      toString in class Object