public class CMISResource extends Object implements Resource
Resource
, backed by a server CMIS.Modifier and Type | Field and Description |
---|---|
private Document |
_cmisDocument |
private AmetysObject |
_parent |
private CMISRootResourcesCollection |
_root |
Constructor and Description |
---|
CMISResource(Document document,
CMISRootResourcesCollection root,
AmetysObject parent)
Creates a
CMISResource |
Modifier and Type | Method and Description |
---|---|
Document |
getCmisDocument()
Retrieves the
Folder |
CMISRootResourcesCollection |
getCmisRoot()
Retrieves the
CMISRootResourcesCollection |
Date |
getCreationDate()
Retrieves the creation date.
|
UserIdentity |
getCreator()
Returns the last contributor of this resource.
|
String |
getDCContributor()
Get the Dublin Core contributor.
|
String |
getDCCoverage()
Get the Dublin Core coverage.
|
String |
getDCCreator()
Get the Dublin Core creator.
|
Date |
getDCDate()
Get the Dublin Core date.
|
String |
getDCDescription()
Get the Dublin Core description.
|
String |
getDCFormat()
Get the Dublin Core format.
|
String |
getDCIdentifier()
Get the Dublin Core identifier.
|
String |
getDCLanguage()
Get the Dublin Core language.
|
String |
getDCPublisher()
Get the Dublin Core publisher.
|
String |
getDCRelation()
Get the Dublin Core relation.
|
String |
getDCRights()
Get the Dublin Core rights.
|
String |
getDCSource()
Get the Dublin Core source.
|
String[] |
getDCSubject()
Get the Dublin Core subject.
|
String |
getDCTitle()
Get the Dublin Core title.
|
String |
getDCType()
Get the Dublin Core type.
|
String |
getId()
Retrieves the unique identifier of this AmetysObject.
It must be unique in the whole repository and must never be null. It must conform to the URI syntax: <protocol>://<protocol-specific-part> |
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 |
getName()
Retrieves the name of the current object.
|
AmetysObject |
getParent()
Returns the parent object in the Ametys hierarchy.
|
String |
getParentPath()
Returns the path of the parent object in the Ametys hierarchy.
|
String |
getPath()
Retrieves the path of the current object.
|
String |
getResourcePath()
Returns the path of this resource in its hierarchy (which is a subset of the whole repository).
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals, hashCode
private final Document _cmisDocument
private final CMISRootResourcesCollection _root
private AmetysObject _parent
public CMISResource(Document document, CMISRootResourcesCollection root, AmetysObject parent)
CMISResource
document
- The CMIS documentroot
- The root of the virtual treeparent
- the parent AmetysObject
if knownpublic CMISRootResourcesCollection getCmisRoot()
CMISRootResourcesCollection
CMISRootResourcesCollection
public Document getCmisDocument()
Folder
Folder
public String getId() throws AmetysRepositoryException
AmetysObject
<protocol>://<protocol-specific-part>
getId
in interface AmetysObject
AmetysRepositoryException
- if an error occurs.public String getName()
AmetysObject
getName
in interface AmetysObject
public AmetysObject getParent() throws AmetysRepositoryException
AmetysObject
getParent
in interface AmetysObject
null
if current object
is the root.AmetysRepositoryException
- if an error occurs.public String getParentPath() throws AmetysRepositoryException
AmetysObject
getParentPath
in interface AmetysObject
AmetysRepositoryException
- if an error occurs.public String getPath() throws AmetysRepositoryException
AmetysObject
getPath
in interface AmetysObject
AmetysRepositoryException
- if an error occurs.public UserIdentity getCreator()
Resource
getCreator
in interface Resource
public InputStream getInputStream() throws AmetysRepositoryException
Resource
getInputStream
in interface Resource
AmetysRepositoryException
- if an error occurs.public Date getLastModified()
Resource
getLastModified
in interface Resource
public long getLength()
Resource
public String getMimeType() throws AmetysRepositoryException
Resource
getMimeType
in interface Resource
AmetysRepositoryException
- if an error occurs.public String[] getKeywords() throws AmetysRepositoryException
Resource
getKeywords
in interface Resource
AmetysRepositoryException
- if an error occurs.public String getKeywordsAsString() throws AmetysRepositoryException
Resource
getKeywordsAsString
in interface Resource
AmetysRepositoryException
- if an error occurs.public String getResourcePath() throws AmetysRepositoryException
Resource
getResourcePath
in interface Resource
AmetysRepositoryException
- if an error occurs.public String getDCTitle() throws AmetysRepositoryException
DublinCoreAwareAmetysObject
getDCTitle
in interface DublinCoreAwareAmetysObject
AmetysRepositoryException
- if an error occurs.public String getDCCreator() throws AmetysRepositoryException
DublinCoreAwareAmetysObject
getDCCreator
in interface DublinCoreAwareAmetysObject
AmetysRepositoryException
- if an error occurs.public String[] getDCSubject() throws AmetysRepositoryException
DublinCoreAwareAmetysObject
getDCSubject
in interface DublinCoreAwareAmetysObject
AmetysRepositoryException
- if an error occurs.public String getDCDescription() throws AmetysRepositoryException
DublinCoreAwareAmetysObject
getDCDescription
in interface DublinCoreAwareAmetysObject
AmetysRepositoryException
- if an error occurs.public String getDCPublisher() throws AmetysRepositoryException
DublinCoreAwareAmetysObject
getDCPublisher
in interface DublinCoreAwareAmetysObject
AmetysRepositoryException
- if an error occurs.public String getDCContributor() throws AmetysRepositoryException
DublinCoreAwareAmetysObject
getDCContributor
in interface DublinCoreAwareAmetysObject
AmetysRepositoryException
- if an error occurs.public Date getDCDate() throws AmetysRepositoryException
DublinCoreAwareAmetysObject
getDCDate
in interface DublinCoreAwareAmetysObject
AmetysRepositoryException
- if an error occurs.public String getDCType() throws AmetysRepositoryException
DublinCoreAwareAmetysObject
getDCType
in interface DublinCoreAwareAmetysObject
AmetysRepositoryException
- if an error occurs.public String getDCFormat() throws AmetysRepositoryException
DublinCoreAwareAmetysObject
getDCFormat
in interface DublinCoreAwareAmetysObject
AmetysRepositoryException
- if an error occurs.public String getDCIdentifier() throws AmetysRepositoryException
DublinCoreAwareAmetysObject
getDCIdentifier
in interface DublinCoreAwareAmetysObject
AmetysRepositoryException
- if an error occurs.public String getDCSource() throws AmetysRepositoryException
DublinCoreAwareAmetysObject
getDCSource
in interface DublinCoreAwareAmetysObject
AmetysRepositoryException
- if an error occurs.public String getDCLanguage() throws AmetysRepositoryException
DublinCoreAwareAmetysObject
getDCLanguage
in interface DublinCoreAwareAmetysObject
AmetysRepositoryException
- if an error occurs.public String getDCRelation() throws AmetysRepositoryException
DublinCoreAwareAmetysObject
getDCRelation
in interface DublinCoreAwareAmetysObject
AmetysRepositoryException
- if an error occurs.public String getDCCoverage() throws AmetysRepositoryException
DublinCoreAwareAmetysObject
getDCCoverage
in interface DublinCoreAwareAmetysObject
AmetysRepositoryException
- if an error occurs.public String getDCRights() throws AmetysRepositoryException
DublinCoreAwareAmetysObject
getDCRights
in interface DublinCoreAwareAmetysObject
AmetysRepositoryException
- if an error occurs.public Date getCreationDate() throws UnknownMetadataException, AmetysRepositoryException
Resource
getCreationDate
in interface Resource
UnknownMetadataException
- if this property does not exist.AmetysRepositoryException
- if an error occurs.public UserIdentity getLastContributor() throws UnknownMetadataException, AmetysRepositoryException
Resource
getLastContributor
in interface Resource
UnknownMetadataException
- if this property does not exist.AmetysRepositoryException
- if an error occurs.