Interface AssetContent
- All Superinterfaces:
Browsable, Extensible, Identifiable, 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 Summary
Modifier and TypeMethodDescriptiongetAsset()Gets theAssetcorresponding to this content.getAssetContentRecord(Type assetContentContentRecordType) Gets the asset content record corresponding to the givenAssetContentrecordType.Gets theAsset Idcorresponding to this content.getData()Gets the asset content data.longGets the length of the data represented by this content in bytes.getURL()Gets the URL associated with this content for web-based retrieval.booleanTests if a data length is available.booleanhasURL()Tests if a URL is associated with this content.Methods inherited from interface Browsable
getProperties, getPropertiesByRecordTypeModifier and TypeMethodDescriptionGets a list of properties.getPropertiesByRecordType(Type recordType) Gets a list of properties corresponding to the specified record type.Methods inherited from interface Extensible
getRecordTypes, hasRecordTypeModifier and TypeMethodDescriptionGets the record types available in this object.booleanhasRecordType(Type recordType) Tests if this object supports the given recordType.Methods inherited from interface Identifiable
getId, isCurrentMethods inherited from interface OsidObject
getDescription, getDisplayName, getGenusType, isOfGenusTypeModifier and TypeMethodDescriptionGets the description associated with this instance of this OSID object.Gets the preferred display name associated with this instance of this OSID object appropriate for display to the user.Gets the genus type of this object.booleanisOfGenusType(Type genusType) Tests if this object is of the given genusType.
-
Method Details
-
getAssetId
Id getAssetId()Gets theAsset Idcorresponding to this content.- Returns:
- the asset
Id - Compliance:
mandatory- This method must be implemented.
-
getAsset
Asset getAsset()Gets theAssetcorresponding to this content.- Returns:
- the asset
- Compliance:
mandatory- This method must be implemented.
-
hasDataLength
boolean hasDataLength()Tests if a data length is available.- Returns:
trueif a length is available for this content,falseotherwise.- 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()isfalse- 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:
trueif a URL is available,falseotherwise- 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()isfalse- Compliance:
mandatory- This method must be implemented.
-
getAssetContentRecord
AssetContentRecord getAssetContentRecord(Type assetContentContentRecordType) throws OperationFailedException Gets the asset content record corresponding to the givenAssetContentrecordType. This method is used to retrieve an object implementing the requested record. TheassetRecordTypemay be theTypereturned ingetRecordTypes()or any of its parents in aTypehierarchy wherehasRecordType(assetRecordType)istrue.- Parameters:
assetContentContentRecordType- the type of the record to retrieve- Returns:
- the asset content record
- Throws:
NullArgumentException-assetContentRecordTypeisnullOperationFailedException- unable to complete requestUnsupportedException-hasRecordType(assetContentRecordType)isfalse- Compliance:
mandatory- This method must be implemented.
-