edu.northwestern.at.monk.model
Class WorkCriterion

java.lang.Object
  extended by edu.northwestern.at.monk.model.SearchCriterion
      extended by edu.northwestern.at.monk.model.CoreObjectCriterion
          extended by edu.northwestern.at.monk.model.WorkCriterion

public class WorkCriterion
extends CoreObjectCriterion

A work search criterion.

See Also:
MONK Datastore Overview, Licensing Agreement

Constructor Summary
WorkCriterion(java.util.Collection<?> values)
          Creates a new work search criterion.
WorkCriterion(java.lang.String... tags)
          Creates a new work search criterion.
WorkCriterion(Work... works)
          Creates a new work search criterion.
 
Method Summary
 java.lang.String getTag()
          Gets the tag.
 java.util.Collection<java.lang.String> getTags()
          Gets the tags.
 Work getWork()
          Gets the work.
 java.util.Collection<Work> getWorks()
          Gets the works.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkCriterion

public WorkCriterion(java.lang.String... tags)
              throws ModelException
Creates a new work search criterion.

Parameters:
tags - Tags.
Throws:
ModelException -
No such work tag: tag

WorkCriterion

public WorkCriterion(Work... works)
              throws ModelException
Creates a new work search criterion.

Parameters:
works - Works.
Throws:
ModelException -
Should never be thrown.

WorkCriterion

public WorkCriterion(java.util.Collection<?> values)
              throws ModelException
Creates a new work search criterion.

Parameters:
values - Collection of tags and/or works.
Throws:
ModelException -
No such work tag: tag
Collection element neither String nor Work.
Method Detail

getWorks

public java.util.Collection<Work> getWorks()
Gets the works.

Returns:
Collection of works, or null if none.

getWork

public Work getWork()
Gets the work.

Returns:
Work, or null if none or more than one.

getTags

public java.util.Collection<java.lang.String> getTags()
Gets the tags.

Returns:
The tags, or null if none.

getTag

public java.lang.String getTag()
Gets the tag.

Returns:
Tag, or null if none or more than one.