|
Dekoh platform API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdekoh.portal.fwk.persistence.DigitalObject
public class DigitalObject
DigitalObject holds the metadata of the content being managed by Dekoh application. Content
applications are expected to extend this Class to define the Digital object they intend deal with.
Song class by
extending this class.
Instead of extending DigitalObject one may add String name-value pairs to every instance.
Instances of DigitalObjects are made manageable entities by calling DIOEntityManager.persist(Object). DIOEntityManager can also be used to query for stored
DigitalObjects.
DIOEntityManager| Field Summary | |
|---|---|
protected Timestamp |
addTime
|
protected Timestamp |
contentCreationTime
|
protected String |
description
|
protected int |
id
|
protected int |
isProtected
|
protected Timestamp |
lastUpdated
|
protected String |
name
|
protected LocalUser |
owner
|
protected String |
type
|
| Constructor Summary | |
|---|---|
protected |
DigitalObject()
|
|
DigitalObject(String applicationId)
|
|
DigitalObject(String name,
String applicationId)
|
|
DigitalObject(String name,
String applicationId,
LocalUser owner)
|
| Method Summary | |
|---|---|
DIOProperty |
_getDioProperty(String name)
Gets a property given a its names. |
Tag |
addTag(String tag,
DIOEntityManager em)
|
Tag |
addTag(String tag,
DIOEntityManager em,
String applicationId)
|
void |
addTags(String[] strings,
DIOEntityManager em)
|
void |
addTags(Tag[] tags)
|
boolean |
equals(Object o)
|
Timestamp |
getAddTime()
|
int |
getCollectionCount(DIOEntityManager em)
Gets number of collections in which this Digital Object is a member. |
List |
getCollectionIds(DIOEntityManager em)
Gets list of collection ids in which this Digital Object is a member. |
Timestamp |
getContentCreationTime()
|
String |
getDescription()
|
Set |
getDioCollections()
|
Set |
getDioProperties()
Deprecated. intended to be called by JPA implementations only. Use method DigitalObject._getDioProperty(String) to get
a property by its name. Use method DigitalObject.setOrAddDioProperty(java.lang.String, java.lang.String) to create a new Property on this
DigitalObject. |
String |
getDioProperty(String name)
|
DioCollection |
getFirstCollection(DIOEntityManager em)
Gets the first collection in which this Digital Object is a member. |
int |
getId()
|
DioCollection |
getLastCollection(DIOEntityManager em)
Gets the last collection in which this Digital Object is a member. |
Timestamp |
getLastUpdated()
|
String |
getName()
|
LocalUser |
getOwner()
Owner of this digitalObject. |
Rating |
getRating()
|
String[] |
getTagNames()
|
Set |
getTags()
|
String |
getType()
|
int |
hashCode()
|
int |
isProtected()
A DigitalObject marked protected cannot be accessed by users other than the owner, even if its part of a Share |
void |
remove(DIOEntityManager dioEntityManager)
|
void |
remove(DIOEntityManager dioEntityManager,
boolean modifyParentsPreview)
|
void |
removeTag(String tagToRemove,
DIOEntityManager em,
String applicationId)
|
void |
removeTag(Tag tagToRemove)
|
void |
removeTags(String tagsToRemove)
|
void |
setAddTime(Timestamp addTime)
|
void |
setContentCreationTime(Timestamp contentCreationTime)
|
void |
setDescription(String desc)
|
void |
setDioProperties(Set dioProperties)
Deprecated. intended to be called by JPA implementations only. Use method DigitalObject.setOrAddDioProperty(java.lang.String, java.lang.String) to create
a new Property on this DigitalObject. |
void |
setLastUpdated(Timestamp lastUpdated)
|
void |
setName(String name)
|
DigitalObject |
setOrAddDioProperty(String name,
String value)
Utility method to set or create a DIOProperty on this DigitalObject. |
void |
setOwner(LocalUser owner)
|
void |
setProtected(int isProtected)
|
void |
setRating(Rating rating)
|
void |
setTags(Set tags)
|
void |
setType(String type)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int id
protected String type
protected String name
protected String description
protected LocalUser owner
protected Timestamp addTime
protected Timestamp lastUpdated
protected Timestamp contentCreationTime
protected int isProtected
| Constructor Detail |
|---|
protected DigitalObject()
public DigitalObject(String applicationId)
public DigitalObject(String name,
String applicationId)
public DigitalObject(String name,
String applicationId,
LocalUser owner)
| Method Detail |
|---|
public void setType(String type)
public void setName(String name)
public void setDescription(String desc)
public void setOwner(LocalUser owner)
public void setTags(Set tags)
public int getId()
public String getType()
public String getName()
public String getDescription()
public LocalUser getOwner()
public Timestamp getAddTime()
public Timestamp getLastUpdated()
public Timestamp getContentCreationTime()
public void setContentCreationTime(Timestamp contentCreationTime)
public void setAddTime(Timestamp addTime)
public void setLastUpdated(Timestamp lastUpdated)
public Rating getRating()
public void setRating(Rating rating)
public int isProtected()
Share
public void setProtected(int isProtected)
public DigitalObject setOrAddDioProperty(String name,
String value)
DIOProperty on this DigitalObject. If this DigitalObject already has a
property by the given name calling this method will change the value to the new value. If no proeprty by given
name exists a new DioProperty is created.
name - name of the propertyvalue - value of the property
public String getDioProperty(String name)
name -
public DIOProperty _getDioProperty(String name)
name -
public Set getDioProperties()
DigitalObject._getDioProperty(String) to get
a property by its name. Use method DigitalObject.setOrAddDioProperty(java.lang.String, java.lang.String) to create a new Property on this
DigitalObject.
public void setDioProperties(Set dioProperties)
DigitalObject.setOrAddDioProperty(java.lang.String, java.lang.String) to create
a new Property on this DigitalObject.
public Set getDioCollections()
public Set getTags()
public String[] getTagNames()
public void addTags(Tag[] tags)
public void addTags(String[] strings,
DIOEntityManager em)
public Tag addTag(String tag,
DIOEntityManager em)
tag - - tagnameem - - DIOEntityManager
public Tag addTag(String tag,
DIOEntityManager em,
String applicationId)
public void removeTag(String tagToRemove,
DIOEntityManager em,
String applicationId)
public void removeTag(Tag tagToRemove)
public void removeTags(String tagsToRemove)
public void remove(DIOEntityManager dioEntityManager)
public void remove(DIOEntityManager dioEntityManager,
boolean modifyParentsPreview)
public String toString()
toString in class Objectpublic boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic int getCollectionCount(DIOEntityManager em)
em -
public List getCollectionIds(DIOEntityManager em)
em -
public DioCollection getFirstCollection(DIOEntityManager em)
em -
public DioCollection getLastCollection(DIOEntityManager em)
em -
|
Dekoh platform API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
© 2009 Pramati Technologies - Dekoh - Portal for Developers