edu.northwestern.at.monk.model
Class AuthorCriterion

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.AuthorCriterion

public class AuthorCriterion
extends CoreObjectCriterion

An author search criterion.

See Also:
MONK Datastore Overview, Licensing Agreement

Constructor Summary
AuthorCriterion(Author... authors)
          Creates a new author search criterion.
AuthorCriterion(java.util.Collection<?> values)
          Creates a new author search criterion.
AuthorCriterion(java.lang.String... tags)
          Creates a new author search criterion.
 
Method Summary
 Author getAuthor()
          Gets the author.
 java.util.Collection<Author> getAuthors()
          Gets the authors.
 java.lang.String getTag()
          Gets the tag.
 java.util.Collection<java.lang.String> getTags()
          Gets the tags.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthorCriterion

public AuthorCriterion(java.lang.String... tags)
                throws ModelException
Creates a new author search criterion.

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

AuthorCriterion

public AuthorCriterion(Author... authors)
                throws ModelException
Creates a new author search criterion.

Parameters:
authors - Authors.
Throws:
ModelException -
Should never be thrown.

AuthorCriterion

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

Parameters:
values - Collection of tags and/or authors.
Throws:
ModelException -
No such author tag: tag
Collection element neither String nor Author.
Method Detail

getAuthors

public java.util.Collection<Author> getAuthors()
Gets the authors.

Returns:
Collection of authors, or null if none.

getAuthor

public Author getAuthor()
Gets the author.

Returns:
Author, 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.