|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.northwestern.at.wordhoard.model.annotations.AuthoredTextAnnotation
public class AuthoredTextAnnotation
A text annotation.
Each text annotation has the following attributes in addition to
those defined for
annotations
in general.
Nested Class Summary | |
---|---|
protected class |
AuthoredTextAnnotation.Context
Text generation context. |
Field Summary | |
---|---|
protected java.lang.String |
body
The text body. |
protected AnnotationCategory |
category
The annotation category. |
protected java.util.Date |
creationTime
Original creation date/time. |
protected java.lang.String |
description
Description of annotation. |
protected java.lang.Long |
id
Unique persistence id (primary key). |
protected boolean |
isActive
True if annotation is active (available for use). |
protected boolean |
isPublic
True if public word set (can be seen by other users), false if private word set. |
protected java.util.Date |
modificationTime
Last modification date/time. |
protected java.lang.String |
owner
Owner of this annotation. |
protected java.lang.String |
query
The query - part of UserData interface which should probably be factored out |
(package private) static long |
serialVersionUID
|
protected TextRange |
target
The target of the annotation - the range of text to which it is attached. |
protected MemoryTextWrapper |
text
The text. |
protected java.lang.String |
title
The title of the annotation. |
protected java.lang.String |
webPageURL
Web page URL. |
protected WorkPart |
workPart
The work part to which this annotation is attached. |
Constructor Summary | |
---|---|
AuthoredTextAnnotation()
|
|
AuthoredTextAnnotation(java.lang.String owner,
WorkPart workPart,
TextRange target)
|
Method Summary | |
---|---|
void |
addReadPermission(UserGroup userGroup)
Add read permission for userGroup |
boolean |
addToDOMDocument(org.w3c.dom.Document document)
Add word set to DOM document. |
boolean |
equals(java.lang.Object obj)
Returns true if some other object is equal to this one. |
protected TextLine |
genText(java.lang.String str,
Text text,
TextLine line,
AuthoredTextAnnotation.Context context)
Generates a string of text. |
java.lang.String |
getAnnotates()
Gets the annotates. |
java.lang.String |
getAuthor()
Gets the author. |
java.lang.String |
getBody()
Gets the text body. |
AnnotationCategory |
getCategory()
Gets the annotation category. |
java.util.Date |
getCreationTime()
Gets the creation date. |
java.lang.String |
getDescription()
Gets the description. |
java.lang.Long |
getId()
Gets the unique id. |
boolean |
getIsActive()
Get the active flag. |
boolean |
getIsPublic()
Get the public flag. |
java.util.Date |
getModificationTime()
Gets the modification date. |
java.lang.String |
getOwner()
Get the owner. |
java.lang.String |
getQuery()
Get the query. |
java.lang.String |
getStatus()
Gets the status. |
TextRange |
getTarget()
Gets the target. |
TextWrapped |
getText()
Gets the text. |
java.lang.String |
getTextAsString()
Gets the text as a String. |
java.lang.String |
getTitle()
Gets the title. |
java.lang.String |
getType()
Gets the type. |
java.lang.String |
getWebPageURL()
Gets the web page URL. |
WorkPart |
getWorkPart()
Gets the work part. |
int |
hashCode()
Returns a hash code for the object. |
void |
readExternal(java.io.ObjectInput in)
Reads the annotation from an object input stream (deserializes the object). |
void |
resetText(java.lang.String textString)
Reset the Text from a String. |
void |
setAnnotates(java.lang.String annotates)
Sets the annotates. |
void |
setAuthor(java.lang.String author)
Sets the author. |
void |
setBody(java.lang.String body)
Sets the text body. |
void |
setCategory(AnnotationCategory category)
Sets the annotation category. |
void |
setCreationTime(java.util.Date creationTime)
Sets the creation time. |
void |
setDescription(java.lang.String description)
Sets the description. |
boolean |
setFromDOMDocumentNode(org.w3c.dom.Node wordSetNode)
Set values from DOM document node. |
void |
setIsActive(boolean isActive)
Set the active flag. |
void |
setIsPublic(boolean isPublic)
Set the public flag. |
void |
setModificationTime(java.util.Date modificationTime)
Sets the modification time. |
void |
setOwner(java.lang.String owner)
Set the owner. |
void |
setQuery(java.lang.String query)
Set the query. |
void |
setStatus(java.lang.String status)
Sets the status. |
void |
setTarget(TextRange target)
Sets the target. |
void |
setText(TextWrapped text)
Sets the text. |
void |
setTitle(java.lang.String title)
Sets the title. |
void |
setType(java.lang.String type)
Sets the type. |
void |
setWebPageURL(java.lang.String webPageURL)
Sets the web page URL. |
void |
setWorkPart(WorkPart workPart)
Sets the work part. |
java.lang.String |
toString()
Gets a string representation of the word set. |
void |
writeExternal(java.io.ObjectOutput out)
Writes the annotation to an object output stream (serializes the object). |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
static final long serialVersionUID
protected java.lang.Long id
protected AnnotationCategory category
protected java.lang.String body
protected MemoryTextWrapper text
protected WorkPart workPart
protected TextRange target
protected java.lang.String title
protected java.lang.String description
protected java.lang.String webPageURL
protected java.util.Date creationTime
protected java.util.Date modificationTime
protected java.lang.String owner
protected boolean isPublic
protected boolean isActive
protected java.lang.String query
Constructor Detail |
---|
public AuthoredTextAnnotation()
public AuthoredTextAnnotation(java.lang.String owner, WorkPart workPart, TextRange target)
Method Detail |
---|
public java.lang.Long getId()
getId
in interface Attachment
getId
in interface PersistentObject
getId
in interface UserDataObject
public java.lang.String getBody()
public TextWrapped getText()
getText
in interface Attachment
public AnnotationCategory getCategory()
getCategory
in interface Attachment
public WorkPart getWorkPart()
getWorkPart
in interface TextAttachment
public TextRange getTarget()
getTarget
in interface TextAttachment
public java.lang.String getTitle()
getTitle
in interface UserDataObject
public java.lang.String getDescription()
getDescription
in interface UserDataObject
public java.lang.String getWebPageURL()
getWebPageURL
in interface UserDataObject
public java.util.Date getCreationTime()
getCreationTime
in interface UserDataObject
public java.util.Date getModificationTime()
getModificationTime
in interface UserDataObject
public java.lang.String getAuthor()
public java.lang.String getAnnotates()
public java.lang.String getType()
public java.lang.String getStatus()
public java.lang.String getOwner()
getOwner
in interface UserDataObject
public boolean getIsPublic()
getIsPublic
in interface UserDataObject
public boolean getIsActive()
getIsActive
in interface UserDataObject
public java.lang.String getQuery()
getQuery
in interface UserDataObject
public void setTarget(TextRange target)
setTarget
in interface TextAttachment
target
- The target - the range of text to which this
annotation is attached. public void setTitle(java.lang.String title)
setTitle
in interface UserDataObject
title
- The title. public void setDescription(java.lang.String description)
setDescription
in interface UserDataObject
description
- The description. public void setWebPageURL(java.lang.String webPageURL)
setWebPageURL
in interface UserDataObject
webPageURL
- The web page URL. public void setCreationTime(java.util.Date creationTime)
setCreationTime
in interface UserDataObject
creationTime
- The creation time. public void setModificationTime(java.util.Date modificationTime)
setModificationTime
in interface UserDataObject
modificationTime
- The modification time. public void setOwner(java.lang.String owner)
owner
- The owner. public void setAuthor(java.lang.String author)
author
- The author. public void setBody(java.lang.String body)
body
- The text body. public void setText(TextWrapped text)
setText
in interface Attachment
text
- The text. public void resetText(java.lang.String textString)
textString
- The string. public java.lang.String getTextAsString()
protected TextLine genText(java.lang.String str, Text text, TextLine line, AuthoredTextAnnotation.Context context)
str
- String of text. public void setCategory(AnnotationCategory category)
setCategory
in interface Attachment
category
- The annotation category. public void setWorkPart(WorkPart workPart)
setWorkPart
in interface TextAttachment
workPart
- The work part. public void setAnnotates(java.lang.String annotates)
annotates
- The annotates. public void setType(java.lang.String type)
type
- The type. public void setStatus(java.lang.String status)
status
- The status. public void setIsPublic(boolean isPublic)
isPublic
- True if the word set is public, false if private. public void setIsActive(boolean isActive)
isActive
- True if the word set is active. public void setQuery(java.lang.String query)
query
- The query for generating this word set. public boolean setFromDOMDocumentNode(org.w3c.dom.Node wordSetNode)
setFromDOMDocumentNode
in interface UserDataObject
wordSetNode
- DOM document node with word set settings.
public boolean addToDOMDocument(org.w3c.dom.Document document)
addToDOMDocument
in interface UserDataObject
document
- DOM document to which to add word set.
Must not be null. In most cases,
this document should have a "wordhoard"
node as the root element.
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
The two objects are equal if their ids are equal.
equals
in interface Attachment
equals
in class java.lang.Object
obj
- The other object.
public int hashCode()
hashCode
in interface Attachment
hashCode
in class java.lang.Object
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
out
- Object output stream.
java.io.IOException
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
in
- Object input stream.
java.io.IOException
java.lang.ClassNotFoundException
public void addReadPermission(UserGroup userGroup)
userGroup
- UserGroup that we're extending read
privilege to.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |