Class ContentItemImpl

java.lang.Object
ddf.catalog.content.data.impl.ContentItemImpl
All Implemented Interfaces:
ddf.catalog.content.data.ContentItem

public class ContentItemImpl extends Object implements ddf.catalog.content.data.ContentItem
  • Field Details

    • uri

      protected URI uri
    • qualifier

      protected String qualifier
  • Constructor Details

    • ContentItemImpl

      public ContentItemImpl(String id, com.google.common.io.ByteSource byteSource, String mimeTypeRawData, ddf.catalog.data.Metacard metacard)
      An incoming content item where the item's GUID should be known.
      Parameters:
      id - the ContentItem's GUID - can be null
      byteSource - the ContentItem's input stream containing its actual data
      mimeTypeRawData - the ContentItem's mime type
      metacard - the ContentItem's associated metacard
    • ContentItemImpl

      public ContentItemImpl(String id, String qualifier, com.google.common.io.ByteSource byteSource, String mimeTypeRawData, ddf.catalog.data.Metacard metacard)
      An incoming content item where the item's GUID and size should be known.
      Parameters:
      id - the ContentItem's GUID - can be null
      qualifier - the ContentItem's qualifier - can be null; blank qualifiers are treated as null
      byteSource - the ContentItem's input stream containing its actual data
      mimeTypeRawData - the ContentItem's mime type
      metacard - the ContentItem's associated metacard
    • ContentItemImpl

      public ContentItemImpl(String id, com.google.common.io.ByteSource byteSource, String mimeTypeRawData, String filename, long size, ddf.catalog.data.Metacard metacard)
      An incoming content item where the item's GUID and size should be known.
      Parameters:
      id - the ContentItem's GUID - can be null
      byteSource - the ContentItem's input stream containing its actual data
      mimeTypeRawData - the ContentItem's mime type
      filename - the ContentItem's file name - can be null
      size - the ContentItem's file size
      metacard - the ContentItem's associated metacard
    • ContentItemImpl

      public ContentItemImpl(String id, String qualifier, com.google.common.io.ByteSource byteSource, String mimeTypeRawData, String filename, long size, ddf.catalog.data.Metacard metacard)
      An incoming content item where the item's GUID and size should be known.
      Parameters:
      id - the ContentItem's GUID - can be null
      qualifier - the ContentItem's qualifier - can be null; blank qualifiers are treated as null
      byteSource - the ContentItem's input stream containing its actual data
      mimeTypeRawData - the ContentItem's mime type
      filename - the ContentItem's file name - can be null
      size - the ContentItem's file size
      metacard - the ContentItem's associated metacard
  • Method Details

    • getId

      public String getId()
      Specified by:
      getId in interface ddf.catalog.content.data.ContentItem
    • getUri

      public String getUri()
      Specified by:
      getUri in interface ddf.catalog.content.data.ContentItem
    • getQualifier

      public String getQualifier()
      Specified by:
      getQualifier in interface ddf.catalog.content.data.ContentItem
    • getFilename

      public String getFilename()
      Specified by:
      getFilename in interface ddf.catalog.content.data.ContentItem
    • getMimeType

      public javax.activation.MimeType getMimeType()
      Specified by:
      getMimeType in interface ddf.catalog.content.data.ContentItem
    • getMimeTypeRawData

      public String getMimeTypeRawData()
      Specified by:
      getMimeTypeRawData in interface ddf.catalog.content.data.ContentItem
    • getInputStream

      public InputStream getInputStream() throws IOException
      Specified by:
      getInputStream in interface ddf.catalog.content.data.ContentItem
      Throws:
      IOException
    • getSize

      public long getSize() throws IOException
      Specified by:
      getSize in interface ddf.catalog.content.data.ContentItem
      Throws:
      IOException
    • getMetacard

      public ddf.catalog.data.Metacard getMetacard()
      Specified by:
      getMetacard in interface ddf.catalog.content.data.ContentItem
    • toString

      public String toString()
      Overrides:
      toString in class Object