|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.northwestern.at.wordhoard.model.userdata.WHQuery
public class WHQuery
A WordHoard query.
A query contains a WordHoard Corpus Query Language specification. At present, WordHoard allows for two types of saved queries: word-based queries for constructing word sets and phrase sets, and bibliographic-based queries for constructing work sets.
Each query object contains the following fields.
| Field Summary | |
|---|---|
protected java.util.Date |
creationTime
Original creation date/time. |
protected java.lang.String |
description
Description of query. |
protected java.lang.Long |
id
Unique persistence id (primary key). |
protected boolean |
isActive
True if work set is active (available for use). |
protected boolean |
isPublic
true if public query (can be seen by other users), false if private query. |
protected java.util.Date |
modificationTime
Last modification date/time. |
protected java.lang.String |
owner
Owner of this query. |
protected java.lang.String |
queryText
Query text in WordHoard Corpus Query Language format. |
protected int |
queryType
Type of query. |
protected static long |
serialVersionUID
Serial version UID. |
protected java.lang.String |
title
The title of the query. |
protected java.lang.String |
webPageURL
Web page URL. |
static int |
WORDQUERY
Word query. |
static int |
WORKPARTQUERY
Work/Work part query. |
| Constructor Summary | |
|---|---|
WHQuery()
Create an empty query. |
|
WHQuery(org.w3c.dom.Node queryNode,
java.lang.String owner)
Create a query from a DOM document node. |
|
WHQuery(java.lang.String title,
java.lang.String description,
java.lang.String webPageURL,
java.lang.String owner,
boolean isPublic,
int queryType,
java.lang.String queryText)
Create a query with a specified name. |
|
| Method Summary | |
|---|---|
boolean |
addToDOMDocument(org.w3c.dom.Document document)
Add query to DOM document. |
boolean |
equals(java.lang.Object obj)
Returns true if some other object is equal to this one. |
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()
Return the query text. |
java.lang.String |
getQueryText()
Get the query text. |
int |
getQueryType()
Get the query type. |
java.lang.String |
getTitle()
Gets the title. |
java.lang.String |
getWebPageURL()
Gets the web page URL. |
int |
hashCode()
Returns a hash code for the object. |
void |
readExternal(java.io.ObjectInput in)
Reads the query from an object input stream (deserializes the object). |
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 queryNode)
Set query settings from a 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 |
setQueryText(java.lang.String queryText)
Set the query text. |
void |
setQueryType(int queryType)
Set the query type. |
void |
setTitle(java.lang.String title)
Sets the title. |
void |
setWebPageURL(java.lang.String webPageURL)
Sets the web page URL. |
java.lang.String |
toString()
Gets a string representation of the query. |
java.lang.String |
toStringDetailed()
Gets a detailed string representation of the query. |
void |
writeExternal(java.io.ObjectOutput out)
Writes the query 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 |
|---|
protected static final long serialVersionUID
public static final int WORDQUERY
public static final int WORKPARTQUERY
protected java.lang.Long id
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 int queryType
protected java.lang.String queryText
| Constructor Detail |
|---|
public WHQuery()
public WHQuery(java.lang.String title,
java.lang.String description,
java.lang.String webPageURL,
java.lang.String owner,
boolean isPublic,
int queryType,
java.lang.String queryText)
title - The query's title.description - The query's description.webPageURL - The query's web page URL.owner - The query's owner.isPublic - True if the query is public.queryType - The query type.queryText - The query text.
public WHQuery(org.w3c.dom.Node queryNode,
java.lang.String owner)
queryNode - The root node for the query.owner - The work set's owner. | Method Detail |
|---|
public java.lang.Long getId()
getId in interface PersistentObjectgetId in interface UserDataObjectpublic java.lang.String getTitle()
getTitle in interface UserDataObjectpublic java.lang.String getDescription()
getDescription in interface UserDataObjectpublic java.lang.String getWebPageURL()
getWebPageURL in interface UserDataObjectpublic java.util.Date getCreationTime()
getCreationTime in interface UserDataObjectpublic java.util.Date getModificationTime()
getModificationTime in interface UserDataObjectpublic java.lang.String getOwner()
getOwner in interface UserDataObjectpublic boolean getIsPublic()
getIsPublic in interface UserDataObjectpublic boolean getIsActive()
getIsActive in interface UserDataObjectpublic int getQueryType()
public java.lang.String getQueryText()
public java.lang.String getQuery()
getQuery in interface UserDataObjectFor UserDataObject interface.
public void setTitle(java.lang.String title)
setTitle in interface UserDataObjecttitle - The title. public void setDescription(java.lang.String description)
setDescription in interface UserDataObjectdescription - The description. public void setWebPageURL(java.lang.String webPageURL)
setWebPageURL in interface UserDataObjectwebPageURL - The web page URL. public void setCreationTime(java.util.Date creationTime)
setCreationTime in interface UserDataObjectcreationTime - The creation time. public void setModificationTime(java.util.Date modificationTime)
setModificationTime in interface UserDataObjectmodificationTime - The modification time. public void setOwner(java.lang.String owner)
owner - The owner. public void setIsPublic(boolean isPublic)
isPublic - True if the query is public, false if private. public void setIsActive(boolean isActive)
isActive - True if the query is active. public void setQueryType(int queryType)
queryType - The query type. public void setQueryText(java.lang.String queryText)
queryText - The query text. public boolean addToDOMDocument(org.w3c.dom.Document document)
addToDOMDocument in interface UserDataObjectdocument - DOM document to which to add query.
Must not be null. In most cases,
this document should have a "wordhoard"
node as the root element.
public boolean setFromDOMDocumentNode(org.w3c.dom.Node queryNode)
setFromDOMDocumentNode in interface UserDataObjectqueryNode - The DOM node which is the root of the
query to get.
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toStringDetailed()
public boolean equals(java.lang.Object obj)
The two objects are equal if their ids are equal.
equals in class java.lang.Objectobj - The other object.
public int hashCode()
hashCode in class java.lang.Object
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.Externalizableout - 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.Externalizablein - Object input stream.
java.io.IOException
java.lang.ClassNotFoundException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||