Interface Resource
-
- All Superinterfaces:
AmetysObject
,DublinCoreAwareAmetysObject
- All Known Subinterfaces:
CommentableResource
,ModifiableResource
- All Known Implementing Classes:
CMISResource
,JCRResource
public interface Resource extends DublinCoreAwareAmetysObject
Common interface for a resource file of a resources explorer node.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Date
getCreationDate()
Retrieves the creation date.UserIdentity
getCreator()
Returns the last contributor of this resource.InputStream
getInputStream()
Returns the data stream.String[]
getKeywords()
Returns the keywords of this resource, as a String array.String
getKeywordsAsString()
Returns the keywords of this resource, as a comme-separated String.UserIdentity
getLastContributor()
Retrieves the login of the last contributor.Date
getLastModified()
Returns the last modification date.long
getLength()
Returns the length of the data stream.String
getMimeType()
Returns the data mime-type.String
getResourcePath()
Returns the path of this resource in its hierarchy (which is a subset of the whole repository).-
Methods inherited from interface org.ametys.plugins.repository.AmetysObject
equals, getId, getName, getParent, getParentPath, getPath, hashCode
-
Methods inherited from interface org.ametys.plugins.repository.dublincore.DublinCoreAwareAmetysObject
getDCContributor, getDCCoverage, getDCCreator, getDCDate, getDCDescription, getDCFormat, getDCIdentifier, getDCLanguage, getDCPublisher, getDCRelation, getDCRights, getDCSource, getDCSubject, getDCTitle, getDCType
-
-
-
-
Method Detail
-
getInputStream
InputStream getInputStream() throws AmetysRepositoryException
Returns the data stream.- Returns:
- the data stream.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getCreationDate
Date getCreationDate() throws UnknownMetadataException, AmetysRepositoryException
Retrieves the creation date.- Returns:
- the creation date.
- Throws:
UnknownMetadataException
- if this property does not exist.AmetysRepositoryException
- if an error occurs.
-
getLastModified
Date getLastModified() throws AmetysRepositoryException
Returns the last modification date.- Returns:
- the last modification date.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getLength
long getLength() throws AmetysRepositoryException
Returns the length of the data stream.- Returns:
- the length of the data stream.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getCreator
UserIdentity getCreator() throws AmetysRepositoryException
Returns the last contributor of this resource.- Returns:
- the last contributor of this resource.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getLastContributor
UserIdentity getLastContributor() throws UnknownMetadataException, AmetysRepositoryException
Retrieves the login of the last contributor.- Returns:
- the login of the last contributor.
- Throws:
UnknownMetadataException
- if this property does not exist.AmetysRepositoryException
- if an error occurs.
-
getKeywords
String[] getKeywords() throws AmetysRepositoryException
Returns the keywords of this resource, as a String array.- Returns:
- the keywords of this resource.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getKeywordsAsString
String getKeywordsAsString() throws AmetysRepositoryException
Returns the keywords of this resource, as a comme-separated String.- Returns:
- the keywords of this resource.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getMimeType
String getMimeType() throws AmetysRepositoryException
Returns the data mime-type.- Returns:
- the data mime-type.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getResourcePath
String getResourcePath() throws AmetysRepositoryException
Returns the path of this resource in its hierarchy (which is a subset of the whole repository).- Returns:
- the path of this resource in its hierarchy.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
-