Interface AssetContent

All Superinterfaces:
Browsable, Extensible, Identifiable, OsidObject, Subjugateable

public interface AssetContent extends OsidObject, Subjugateable

AssetContent represents a version of content represented by an Asset. Although AssetContent is a separate OsidObject with its own Id to distuinguish it from other content inside an Asset, AssetContent can only be accessed through an Asset.

Once an Asset is selected, multiple contents should be negotiated using the size, fidelity requirements, or application evnironment.

  • Method Details

    • getAssetId

      Id getAssetId()
      Gets the Asset Id corresponding to this content.
      Returns:
      the asset Id
      Compliance:
      mandatory - This method must be implemented.
    • getAsset

      Asset getAsset()
      Gets the Asset corresponding to this content.
      Returns:
      the asset
      Compliance:
      mandatory - This method must be implemented.
    • hasDataLength

      boolean hasDataLength()
      Tests if a data length is available.
      Returns:
      true if a length is available for this content, false otherwise.
      Compliance:
      mandatory - This method must be implemented.
    • getDataLength

      long getDataLength()
      Gets the length of the data represented by this content in bytes.
      Returns:
      the length of the data stream
      Throws:
      IllegalStateException - hasDataLength() is false
      Compliance:
      mandatory - This method must be implemented.
    • getData

      Gets the asset content data.
      Returns:
      the length of the content data
      Throws:
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • hasURL

      boolean hasURL()
      Tests if a URL is associated with this content.
      Returns:
      true if a URL is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getURL

      String getURL()
      Gets the URL associated with this content for web-based retrieval.
      Returns:
      the url for this data
      Throws:
      IllegalStateException - hasURL() is false
      Compliance:
      mandatory - This method must be implemented.
    • getAssetContentRecord

      AssetContentRecord getAssetContentRecord(Type assetContentContentRecordType) throws OperationFailedException
      Gets the asset content record corresponding to the given AssetContent record Type. This method is used to retrieve an object implementing the requested record. The assetRecordType may be the Type returned in getRecordTypes() or any of its parents in a Type hierarchy where hasRecordType(assetRecordType) is true.
      Parameters:
      assetContentContentRecordType - the type of the record to retrieve
      Returns:
      the asset content record
      Throws:
      NullArgumentException - assetContentRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(assetContentRecordType) is false
      Compliance:
      mandatory - This method must be implemented.