|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectokapi.coreobjects.OkapiObject
okapi.coreobjects.OkapiContent
public class OkapiContent
A Content is a reusable unit of prepared material, from a single image to a complex learning object. It is composed of ContentAtom objects which are the basic elements (e.g. an HTML file or an image), combined with basic information about the Content as a whole, and a number of Metadata objects describing the content. A Content may have structure, containing other Contents or multple ContentAtoms. The contained Contents may in turn have structure. But a Content may also contain a single ContentAtom. Contents are associated with paths or path segments; ContentAtoms are associated with paths. e.g.: "index.html" : "index.html" -> ContentAtom "LN2.pdf" : "LN2.pdf" -> ContentAtom "LN3/index.html" : "LN3" -> Content for LN3 within that, "index.html" -> ContentAtom "LN4/index.html" : "LN4/index.html" -> ContentAtom (ln4 has only one html file. This is construct is allowed technically but should probably be avoided to avoid confusion.)
Field Summary | |
---|---|
static int |
CONTENT
|
static int |
ERROR
|
static int |
STORE
type of content. |
static int |
URI
|
Fields inherited from class okapi.coreobjects.OkapiObject |
---|
createdBy, createdDate, description, lastModifiedBy, lastModifiedDate, longName, name, objectID, status |
Constructor Summary | |
---|---|
OkapiContent()
Creates an empty Content. |
|
OkapiContent(int contentCode)
Instantiate the Content object for this contentCode |
Method Summary | |
---|---|
void |
addAtom(java.lang.String filePath,
okapi.coreobjects.OkapiContentAtom atom)
Add content of type ContentAtom and add it to the end of the ordering. |
void |
addAtom(java.lang.String filePath,
OkapiStore store)
Create Content Atom and add it, also adding it to the end of the ordering. |
void |
addAtom(java.lang.String link,
java.lang.String uri)
Create URI Content Atom and add it. |
void |
addAtomUnordered(java.lang.String filePath,
okapi.coreobjects.OkapiContentAtom atom)
Deprecated. not used |
void |
addAtomUnordered(java.lang.String filePath,
OkapiStore store)
Deprecated. not used |
void |
addAtomUnordered(java.lang.String link,
java.lang.String uri)
Deprecated. not used |
void |
addContent(java.lang.String filePath,
OkapiContent content)
Add content of type Content and add it to the end of the ordering. |
void |
addContentUnordered(java.lang.String filePath,
OkapiContent content)
Deprecated. not used |
void |
addMetadata(java.lang.String key,
OkapiMetadata metadata)
Deprecated. not used |
void |
addMetadataKeyValue(java.lang.String key,
java.lang.Object value)
Add metadata key/value pairs about the Arc. |
void |
addMetadataKeyValue(java.lang.String key,
java.lang.String value)
Add metadata key/value pairs about the Arc. |
void |
atomOrderAdd(java.lang.String path)
Put atomChild which is at path putPath at end of ordering in the atom child ordering. |
void |
atomOrderAddAfter(java.lang.String putPath,
java.lang.String afterThisPath)
Deprecated. not used |
void |
atomOrderAddBefore(java.lang.String putPath,
java.lang.String beforeThisPath)
Deprecated. not used |
void |
atomOrderAlphabetical()
Deprecated. not used |
int |
atomOrderMove(java.lang.String path,
int n)
Move atomChild by n positions up or down in the atom child ordering. |
void |
atomOrderRemove(java.lang.String path)
Remove all occurances of path from order |
void |
contentOrderAdd(java.lang.String putPath)
Put contentChild which is at path putPath at end of ordering in the content child ordering. |
void |
contentOrderAddAfter(java.lang.String putPath,
java.lang.String afterThisPath)
Deprecated. not used |
void |
contentOrderAddBefore(java.lang.String putPath,
java.lang.String beforeThisPath)
Deprecated. not used |
void |
contentOrderAlphabetical()
Deprecated. not used |
int |
contentOrderMove(java.lang.String path,
int n)
Move contentChild by n positions up or down in the content child ordering. |
void |
contentOrderRemove(java.lang.String path)
Remove all occurances of path from order |
boolean |
equals(java.lang.Object o)
override Object equals method to compare two contents |
java.lang.String |
getAsXml(java.util.Map options,
java.lang.String tag,
int indent)
Overrides the method in OkapiObject to add Content specific information. |
java.lang.String |
getAtomAsXml(java.lang.String key,
java.util.Map options)
Method getAtomAsXml |
java.lang.String |
getAtomAsXml(java.lang.String key,
java.util.Map options,
int indent)
Method getAtomAsXml |
java.lang.String |
getAtomAsXml(java.lang.String key,
java.util.Map options,
java.lang.String tag)
Method getAtomAsXml |
java.lang.String |
getAtomAsXml(java.lang.String key,
java.util.Map options,
java.lang.String tag,
int indent)
Returns an xml representation of this object, with the options defined by the options map, an element of type tag surrounding the xml, and the first line indented indent times, or null if there is no atom at key. |
java.util.Map |
getAtomChildren()
Return vector of all children of type ContentAtom. |
java.util.List |
getAtomOrder()
Return order of atom children |
java.util.Map |
getChildren()
Return vector of all children of any type. |
OkapiContent |
getContent(java.util.List filePathVector)
Return a OkapiContent for the specified path, or null. |
OkapiContent |
getContent(java.util.List filePathVector,
OkapiUser user)
Return a OkapiContent for the specified path, or null, or throw a okapi.util.OkapiPermissionDenied exception. |
OkapiContent |
getContent(java.lang.String filePath)
Return a OkapiContent for the specified path, or null. |
java.util.Map |
getContentChildren()
Return vector of all children of type Content. |
int |
getContentCode()
Return contentCode of this Content |
java.util.List |
getContentOrder()
Return order of content children |
java.util.Date |
getCreatedDate()
Method getCreatedDate |
java.lang.String |
getDescription()
Method getDescription |
java.lang.String |
getLastModifiedBy()
Method getLastModifiedBy |
java.util.Date |
getLastModifiedDate()
Method getLastModifiedDate |
java.lang.String |
getLongName()
Method getLongName |
java.util.Map |
getMetadata()
Deprecated. not used |
java.lang.Object |
getMetadataKeyValue(java.lang.String key)
Get Content metadata value by key. |
java.lang.String |
getName()
Method getName |
OkapiStore |
getStore(java.util.List filePathVector)
Return a OkapiStore for the specified path, or null. |
OkapiStore |
getStore(java.util.List filePathVector,
OkapiUser user)
Return a OkapiStore for the specified path, or null, or throw a okapi.util.OkapiPermissionDenied exception. |
OkapiStore |
getStore(java.lang.String filePath)
Return a OkapiStore for the specified path, or null. |
int |
getType(java.lang.String key)
Return a type of Atom for the specified path, or 0. |
java.lang.String |
getURI(java.lang.String link)
Return a URI for the specified path, or null. |
int |
hashCode()
override hashCode to use the database table sequence number |
void |
refreshFromDB()
Refresh this object with the data currently stored in the DB. |
static void |
releaseAccordingToReleaseDate()
|
void |
removeAtom(java.lang.String filePath)
Remove atom. |
void |
removeContent(java.lang.String filePath)
Remove a Content. |
void |
removeMetadata(java.lang.String key)
Deprecated. not used |
void |
removeMetadataKeyValue(java.lang.Object key)
Remove for labeled with this key from metadata key/value pairs about the Arc. |
void |
setDataSource(javax.sql.DataSource dataSource)
Set the dataSource to be used for data access. |
void |
setDescription(java.lang.String newDescription)
Method setDescription |
protected void |
setLastModifiedBy(OkapiUser newLastModifiedBy)
|
protected void |
setLastModifiedBy(java.lang.String newLastModifiedBy)
|
protected void |
setLastModifiedDate(java.util.Date newLastModifiedDate)
|
void |
setLongName(java.lang.String newLongName)
Method setLongName |
void |
setName(java.lang.String newName)
Method setName |
void |
updateDB()
Update the database record for this object. |
Methods inherited from class okapi.coreobjects.OkapiObject |
---|
checkAuthorization, currentDateTimeOracle, getAsXml, getAsXml, getAsXml, getCreatedBy, getObjectID, getStatus, isEncryptionRequired, setAuthorization, setCreatedBy, setCreatedDate, setStatus |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int STORE
public static int URI
public static int CONTENT
public static int ERROR
Constructor Detail |
---|
public OkapiContent()
public OkapiContent(int contentCode)
Method Detail |
---|
public java.util.List getAtomOrder()
public java.util.List getContentOrder()
public void atomOrderAlphabetical()
public int atomOrderMove(java.lang.String path, int n)
public void atomOrderAddAfter(java.lang.String putPath, java.lang.String afterThisPath)
public void atomOrderAddBefore(java.lang.String putPath, java.lang.String beforeThisPath)
public void atomOrderRemove(java.lang.String path)
public void atomOrderAdd(java.lang.String path)
public void contentOrderAlphabetical()
public int contentOrderMove(java.lang.String path, int n)
public void contentOrderAddAfter(java.lang.String putPath, java.lang.String afterThisPath)
public void contentOrderAddBefore(java.lang.String putPath, java.lang.String beforeThisPath)
public void contentOrderRemove(java.lang.String path)
public void contentOrderAdd(java.lang.String putPath)
public int getContentCode()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public void addAtomUnordered(java.lang.String filePath, OkapiStore store)
public void addAtomUnordered(java.lang.String filePath, okapi.coreobjects.OkapiContentAtom atom)
public void addAtomUnordered(java.lang.String link, java.lang.String uri)
public void addAtom(java.lang.String filePath, OkapiStore store)
public void addAtom(java.lang.String filePath, okapi.coreobjects.OkapiContentAtom atom)
public void addAtom(java.lang.String link, java.lang.String uri)
public void removeAtom(java.lang.String filePath)
public void addContentUnordered(java.lang.String filePath, OkapiContent content)
public void addContent(java.lang.String filePath, OkapiContent content)
public void removeContent(java.lang.String filePath)
public void addMetadata(java.lang.String key, OkapiMetadata metadata)
public void removeMetadata(java.lang.String key)
public java.util.Map getMetadata()
public void addMetadataKeyValue(java.lang.String key, java.lang.String value)
public void addMetadataKeyValue(java.lang.String key, java.lang.Object value)
public java.lang.Object getMetadataKeyValue(java.lang.String key)
public void removeMetadataKeyValue(java.lang.Object key)
public java.util.Map getAtomChildren()
public java.util.Map getContentChildren()
public java.util.Map getChildren()
public int getType(java.lang.String key)
public java.lang.String getURI(java.lang.String link)
public OkapiStore getStore(java.lang.String filePath)
public OkapiStore getStore(java.util.List filePathVector)
public OkapiStore getStore(java.util.List filePathVector, OkapiUser user) throws OkapiPermissionDeniedException
OkapiPermissionDeniedException
public OkapiContent getContent(java.lang.String filePath)
public OkapiContent getContent(java.util.List filePathVector)
public OkapiContent getContent(java.util.List filePathVector, OkapiUser user) throws OkapiPermissionDeniedException
OkapiPermissionDeniedException
public void updateDB()
updateDB
in class OkapiObject
public void refreshFromDB()
refreshFromDB
in class OkapiObject
public void setName(java.lang.String newName)
setName
in class OkapiObject
newName
- public java.lang.String getName()
getName
in class OkapiObject
public void setLongName(java.lang.String newLongName)
setLongName
in class OkapiObject
newLongName
- public java.lang.String getLongName()
getLongName
in class OkapiObject
public void setDescription(java.lang.String newDescription)
setDescription
in class OkapiObject
newDescription
- public java.lang.String getDescription()
getDescription
in class OkapiObject
protected void setLastModifiedDate(java.util.Date newLastModifiedDate)
setLastModifiedDate
in class OkapiObject
public java.util.Date getLastModifiedDate()
getLastModifiedDate
in class OkapiObject
protected void setLastModifiedBy(OkapiUser newLastModifiedBy)
setLastModifiedBy
in class OkapiObject
protected void setLastModifiedBy(java.lang.String newLastModifiedBy)
setLastModifiedBy
in class OkapiObject
public java.lang.String getLastModifiedBy()
getLastModifiedBy
in class OkapiObject
public java.util.Date getCreatedDate()
getCreatedDate
in class OkapiObject
public java.lang.String getAsXml(java.util.Map options, java.lang.String tag, int indent)
getAsXml
in class OkapiObject
public java.lang.String getAtomAsXml(java.lang.String key, java.util.Map options, java.lang.String tag, int indent)
public java.lang.String getAtomAsXml(java.lang.String key, java.util.Map options)
key
- options
-
public java.lang.String getAtomAsXml(java.lang.String key, java.util.Map options, int indent)
key
- options
- indent
-
public java.lang.String getAtomAsXml(java.lang.String key, java.util.Map options, java.lang.String tag)
key
- options
- tag
-
public static void releaseAccordingToReleaseDate()
public void setDataSource(javax.sql.DataSource dataSource)
dataSource
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |