org.gcube.application.framework.contentmanagement.content.impl
Class DigitalObject
java.lang.Object
org.gcube.application.framework.contentmanagement.content.impl.DigitalObject
- All Implemented Interfaces:
- DigitalObjectInfoI
public class DigitalObject
- extends Object
- implements DigitalObjectInfoI
|
Constructor Summary |
DigitalObject(org.gcube.application.framework.core.session.ASLSession session,
String uri,
boolean isUri)
|
DigitalObject(org.gcube.application.framework.core.session.ASLSession session,
String oid,
String colID)
|
|
Method Summary |
static DigitalObject |
createNewDigitalObject(String collectionID,
InputStream content,
String fileName,
org.gcube.application.framework.core.session.ASLSession session,
String mimeType)
|
static String |
FindObjectByName(String name,
String collectionID,
org.gcube.application.framework.core.session.ASLSession ses)
|
List<String> |
getAvailableSchemata()
|
List<SchemataInfos> |
getAvailableSchemataInfos()
|
String |
getCollectionID()
|
String |
getCollectionName()
|
String |
getDocumentURI()
|
String |
getElementType()
|
String |
getHTMLrepresentation()
|
long |
getLength()
|
String |
getMetadata(String schema)
|
String |
getMetadata(String schemaName,
String language)
|
String |
getMetadataCollectionIdFromSchema(String schemaName,
String schemaLanguage)
|
String |
getMetadataFromMetadataID(String mid)
|
String |
getMetadataID()
|
String |
getMetaRecord()
|
String |
getMimeType()
|
String |
getName()
|
InputStream |
getObject(String elementType)
|
InputStream |
getObjectByName(String name,
String collectionName)
|
String |
getObjectId()
|
String |
getRank()
|
String |
getSchema()
|
Vector<String> |
getSchemaLanguages(String schema)
Return the languages for a given schema. |
byte[] |
getThumbnail(int width,
int height,
String options)
|
String |
getTitle()
|
void |
setCollectionID(String colID)
|
void |
setCollectionName(String collectionName)
|
void |
setDocumentURI(String dURI)
|
void |
setElementType(String elementType)
|
void |
setHTMLrepresentation(String html)
|
void |
setMetadataID(String metadataId)
|
void |
setMetaRecord(String mr)
|
void |
setObjectId(String oid)
|
void |
setRank(String rank)
|
void |
setSchema(String schema)
|
void |
setTitle(String title)
|
void |
updateContent(org.gcube.application.framework.core.session.ASLSession session,
byte[] rawContent)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DigitalObject
public DigitalObject(org.gcube.application.framework.core.session.ASLSession session,
String oid,
String colID)
- Parameters:
session - the ASL session to be used for retrieving information neededoid - the object identifiercolID - the collection identifier
DigitalObject
public DigitalObject(org.gcube.application.framework.core.session.ASLSession session,
String uri,
boolean isUri)
getObjectId
public String getObjectId()
- Returns:
setObjectId
public void setObjectId(String oid)
- Parameters:
oid -
getCollectionID
public String getCollectionID()
- Returns:
setCollectionID
public void setCollectionID(String colID)
- Parameters:
colID -
setMetadataID
public void setMetadataID(String metadataId)
getMetadataID
public String getMetadataID()
getMetaRecord
public String getMetaRecord()
- Specified by:
getMetaRecord in interface DigitalObjectInfoI
- Returns:
setMetaRecord
public void setMetaRecord(String mr)
- Specified by:
setMetaRecord in interface DigitalObjectInfoI
- Parameters:
mr - the metadata content of the metadata record
getRank
public String getRank()
- Returns:
setRank
public void setRank(String rank)
- Parameters:
rank -
setCollectionName
public void setCollectionName(String collectionName)
- Specified by:
setCollectionName in interface DigitalObjectInfoI
getCollectionName
public String getCollectionName()
- Specified by:
getCollectionName in interface DigitalObjectInfoI
- Returns:
getTitle
public String getTitle()
- Returns:
setTitle
public void setTitle(String title)
- Parameters:
title -
getSchema
public String getSchema()
- Returns:
setSchema
public void setSchema(String schema)
- Parameters:
schema -
getDocumentURI
public String getDocumentURI()
- Specified by:
getDocumentURI in interface DigitalObjectInfoI
setDocumentURI
public void setDocumentURI(String dURI)
- Specified by:
setDocumentURI in interface DigitalObjectInfoI
getAvailableSchemata
public List<String> getAvailableSchemata()
-
- Specified by:
getAvailableSchemata in interface DigitalObjectInfoI
- Returns:
- the available metadata schemata of the corresponding object
getAvailableSchemataInfos
public List<SchemataInfos> getAvailableSchemataInfos()
getLength
public long getLength()
- Specified by:
getLength in interface DigitalObjectInfoI
- Returns:
- the object's length
getMetadata
public String getMetadata(String schema)
-
- Specified by:
getMetadata in interface DigitalObjectInfoI
- Returns:
- the metadata
getMetadata
public String getMetadata(String schemaName,
String language)
-
getMetadataCollectionIdFromSchema
public String getMetadataCollectionIdFromSchema(String schemaName,
String schemaLanguage)
getMetadataFromMetadataID
public String getMetadataFromMetadataID(String mid)
getSchemaLanguages
public Vector<String> getSchemaLanguages(String schema)
- Return the languages for a given schema.
- Parameters:
schema - the schema.
- Returns:
- the languages of the given schema.
getMimeType
public String getMimeType()
- Specified by:
getMimeType in interface DigitalObjectInfoI
- Returns:
- the object's Mime type
getObject
public InputStream getObject(String elementType)
- Specified by:
getObject in interface DigitalObjectInfoI
- Returns:
- a Stream containing the object
updateContent
public void updateContent(org.gcube.application.framework.core.session.ASLSession session,
byte[] rawContent)
- Specified by:
updateContent in interface DigitalObjectInfoI
FindObjectByName
public static String FindObjectByName(String name,
String collectionID,
org.gcube.application.framework.core.session.ASLSession ses)
getObjectByName
public InputStream getObjectByName(String name,
String collectionName)
-
- Specified by:
getObjectByName in interface DigitalObjectInfoI
- Parameters:
name - the name of the ObjectcollectionName - the name of the collection
- Returns:
- a Stream containing the object
getThumbnail
public byte[] getThumbnail(int width,
int height,
String options)
- Specified by:
getThumbnail in interface DigitalObjectInfoI
- Parameters:
width - the width of the thumbnailhight - height of the thumbnail
- Returns:
- the object's id
getName
public String getName()
- Specified by:
getName in interface DigitalObjectInfoI
- Returns:
- the object's name
getHTMLrepresentation
public String getHTMLrepresentation()
-
- Specified by:
getHTMLrepresentation in interface DigitalObjectInfoI
- Returns:
setHTMLrepresentation
public void setHTMLrepresentation(String html)
-
- Specified by:
setHTMLrepresentation in interface DigitalObjectInfoI
createNewDigitalObject
public static DigitalObject createNewDigitalObject(String collectionID,
InputStream content,
String fileName,
org.gcube.application.framework.core.session.ASLSession session,
String mimeType)
- Parameters:
collectionID - content - fileName - session - mimeType -
- Returns:
getElementType
public String getElementType()
setElementType
public void setElementType(String elementType)
Copyright © 2013. All Rights Reserved.