public interface OsidObjectQuery extends OsidIdentifiableQuery, OsidExtensibleQuery, OsidBrowsableQuery
The OsidObjectQuery is used to assemble search queries.
An OsidObjectQuery is available from an OsidSession
and defines methods to query for an OsidObject that
includes setting a display name and a description. Once the desired
parameters are set, the OsidQuery is given to the
designated search method. The same OsidQuery returned from
the session must be used in the search as the provider may utilize
implementation-specific data wiithin the object.
If multiple data elements are set in this interface, the results matching all the given data (eg: AND) are returned.
Any match method inside an OsidObjectQuery may be
invoked multiple times. In the case of a match method, each invocation
adds an element to an OR expression. Any of these terms may
also be negated through the match flag.
OsidObjectQuery { OsidQuery.matchDisplayName AND (OsidQuery.matchDescription OR OsidObjectQuery.matchDescription)}
OsidObjects allow for the definition of an additonal
records and the OsidQuery parallels this mechanism. An
interface type of an OsidObject record must also define the
corresponding OsidQuery record which is available through
query interfaces. Multiple requests of these typed interfaces may return
the same underlying object and thus it is only useful to request once.
String searches are described using a string search Type
that indicates the type of regular expression or wildcarding
encoding. Compatibility with a strings search Type can be
tested within this interface.
As with all aspects of OSIDs, nulls cannot be used. Separate tests are available for querying for unset values except for required fields.
An example to find all objects whose name starts with "Fred" or whose
name starts with "Barney", but the word "dinosaur" does not appear in the
description and not the color is not purple. ColorQuery is
a record of the object that defines a color.
ObjectObjectQuery query;
query = session.getObjectQuery();
query.matchDisplayName("Fred*", wildcardStringMatchType, true);
query.matchDisplayName("Barney*", wildcardStringMatchType, true);
query.matchDescriptionMatch("dinosaur", wordStringMatchType, false);
ColorQuery recordQuery;
recordQuery = query.getObjectRecord(colorRecordType);
recordQuery.matchColor("purple", false);
ObjectList list = session.getObjectsByQuery(query);
| Modifier and Type | Method and Description |
|---|---|
void |
clearCommentIdTerms()
Clears all comment
Id terms. |
void |
clearCommentTerms()
Clears all comment terms.
|
void |
clearCreditIdTerms()
Clears all credit
Id terms. |
void |
clearCreditTerms()
Clears all credit terms.
|
void |
clearDescriptionTerms()
Clears all description terms.
|
void |
clearDisplayNameTerms()
Clears all display name terms.
|
void |
clearGenusTypeTerms()
Clears all genus type terms.
|
void |
clearJournalEntryIdTerms()
Clears all journal entry
Id terms. |
void |
clearJournalEntryTerms()
Clears all journal entry terms.
|
void |
clearParentGenusTypeTerms()
Clears all genus type terms.
|
void |
clearRelationshipIdTerms()
Clears all relationship
Id terms. |
void |
clearRelationshipPeerIdTerms()
Clears all relationship
Id terms. |
void |
clearRelationshipTerms()
Clears all relationship terms.
|
void |
clearStateIdTerms()
Clears all state
Id terms. |
void |
clearStateTerms()
Clears all state terms.
|
void |
clearStatisticTerms()
Clears all statistic terms.
|
void |
clearSubjectIdTerms()
Clears all subject
Id terms. |
void |
clearSubjectRelevancyTerms()
Clears all subject relevancy terms.
|
void |
clearSubjectTerms()
Clears all subject terms.
|
CommentQuery |
getCommentQuery()
Gets the query for a comment.
|
CreditQuery |
getCreditQuery()
Gets the query for an ackowledgement credit.
|
JournalEntryQuery |
getJournalEntryQuery()
Gets the query for a journal entry.
|
RelationshipQuery |
getRelationshipQuery()
Gets the query for relationship.
|
StateQuery |
getStateQuery()
Gets the query for a state.
|
StatisticQuery |
getStatisticQuery()
Gets the query for a statistic.
|
SubjectQuery |
getSubjectQuery()
Gets the query for a subject.
|
RelevancyQuery |
getSubjectRelevancyQuery()
Gets the query for a subject relevancy.
|
void |
matchAnyComment(boolean match)
Matches an object that has any
Comment in the given
Book. |
void |
matchAnyCredit(boolean match)
Matches an object that has any
Credit. |
void |
matchAnyDescription(boolean match)
Matches a description that has any value.
|
void |
matchAnyDisplayName(boolean match)
Matches any object with a display name.
|
void |
matchAnyGenusType(boolean match)
Matches an object that has any genus type.
|
void |
matchAnyJournalEntry(boolean match)
Matches an object that has any
JournalEntry in the
given Journal. |
void |
matchAnyRelationship(boolean match)
Matches an object that has any
Relationship. |
void |
matchAnyState(boolean match)
Matches an object that has any mapping to a
State in
the given Process. |
void |
matchAnyStatistic(boolean match)
Matches an object that has any
Statistic . |
void |
matchAnySubject(boolean match)
Matches an object that has any relationship to a
Subject. |
void |
matchCommentId(Id commentId,
boolean match)
Matches an object that has the given comment.
|
void |
matchCreditId(Id creditId,
boolean match)
Matches an object that has the given credit.
|
void |
matchDescription(java.lang.String description,
Type stringMatchType,
boolean match)
Adds a description name to match.
|
void |
matchDisplayName(java.lang.String displayName,
Type stringMatchType,
boolean match)
Adds a display name to match.
|
void |
matchGenusType(Type genusType,
boolean match)
Sets a
Type for querying objects of a given genus. |
void |
matchJournalEntryId(Id journalEntryId,
boolean match)
Matches an object that has the given journal entry.
|
void |
matchParentGenusType(Type genusType,
boolean match)
Sets a
Type for querying objects of a given genus. |
void |
matchRelationshipId(Id relationshipId,
boolean match)
Matches an object that has the given relationship.
|
void |
matchRelationshipPeerId(Id peerId,
boolean match)
Matches an object that has a relationship to the given peer
Id. |
void |
matchStateId(Id stateId,
boolean match)
Matches an object mapped to the given state.
|
void |
matchSubjectId(Id subjectId,
boolean match)
Matches an object with a relationship to the given subject.
|
boolean |
supportsCommentQuery()
Tests if a
CommentQuery is available. |
boolean |
supportsCreditQuery()
Tests if a
CreditQuery is available to provide queries
of related acknowledgements. |
boolean |
supportsJournalEntryQuery()
Tests if a
JournalEntry is available to provide queries
of journaled OsidObjects. |
boolean |
supportsRelationshipQuery()
Tests if a
RelationshipQuery is available. |
boolean |
supportsStateQuery()
Tests if a
StateQuery is available to provide queries
of processed objects. |
boolean |
supportsStatisticQuery()
Tests if a
StatisticQuery is available to provide
statistical queries. |
boolean |
supportsSubjectQuery()
Tests if a
SubjectQuery is available. |
boolean |
supportsSubjectRelevancyQuery()
Tests if a
RelevancyQuery is available to provide
queries about the relationships to Subjects. |
clearIdTerms, matchIdclearRecordTerms, matchAnyRecord, matchRecordTypegetRecordTypes, hasRecordTypeclearAnyTerms, clearKeywordTerms, getStringMatchTypes, matchAny, matchKeyword, supportsStringMatchTypevoid matchDisplayName(java.lang.String displayName,
Type stringMatchType,
boolean match)
OR among them.displayName - display name to matchstringMatchType - the string match typematch - true for a positive match, false
for a negative matchInvalidArgumentException - displayName
is not of stringMatchType NullArgumentException - displayName or
stringMatchType is null UnsupportedException -
supportsStringMatchType(stringMatchType) is
false mandatory - This method must be implemented. void matchAnyDisplayName(boolean match)
match - true to match any display name,
false to match objects with no display namemandatory - This method must be implemented. void clearDisplayNameTerms()
mandatory - This method must be implemented. void matchDescription(java.lang.String description,
Type stringMatchType,
boolean match)
OR among them.description - description to matchstringMatchType - the string match typematch - true for a positive match, false
for a negative matchInvalidArgumentException - description
is not of stringMatchType NullArgumentException - description or
stringMatchType is null UnsupportedException -
supportsStringMatchType(stringMatchType) is
false mandatory - This method must be implemented. void matchAnyDescription(boolean match)
match - true to match any description,
false to match descriptions with no valuesmandatory - This method must be implemented. void clearDescriptionTerms()
mandatory - This method must be implemented. void matchGenusType(Type genusType, boolean match)
Type for querying objects of a given genus. A
genus type matches if the specified type is the same genus as the
object genus type.genusType - the object genus typematch - true for a positive match, false
for a negative matchNullArgumentException - genusType is
null mandatory - This method must be implemented. void matchAnyGenusType(boolean match)
match - true to match any genus type,
false to match objects with no genus typemandatory - This method must be implemented. void clearGenusTypeTerms()
mandatory - This method must be implemented. void matchParentGenusType(Type genusType, boolean match)
Type for querying objects of a given genus. A
genus type matches if the specified type is the same genus as the
object or if the specified type is an ancestor of the object genus in
a type hierarchy.genusType - the object genus typematch - true for a positive match, false
for a negative matchNullArgumentException - genusType is
null mandatory - This method must be implemented. void clearParentGenusTypeTerms()
mandatory - This method must be implemented. void matchSubjectId(Id subjectId, boolean match)
subjectId - a subject Id match - true for a positive match, false
for a negative matchNullArgumentException - subjectId is
null mandatory - This method must be implemented. void clearSubjectIdTerms()
Id terms.mandatory - This method must be implemented. boolean supportsSubjectQuery()
SubjectQuery is available. true if a subject query is available,
false otherwisemandatory - This method must be implemented. SubjectQuery getSubjectQuery()
OR term.UnimplementedException - supportsSubjectQuery()
is false optional - This method must be implemented if
supportsSubjectQuery() is true. void matchAnySubject(boolean match)
Subject.
match - true to match any subject, false
to match objects with no subjectsmandatory - This method must be implemented. void clearSubjectTerms()
mandatory - This method must be implemented. boolean supportsSubjectRelevancyQuery()
RelevancyQuery is available to provide
queries about the relationships to Subjects. true if a relevancy entry query is available,
false otherwisemandatory - This method must be implemented. RelevancyQuery getSubjectRelevancyQuery()
OR term.UnimplementedException -
supportsSubjectRelevancyQuery() is false
optional - This method must be implemented if
supportsSubjectRelevancyQuery() is true.
void clearSubjectRelevancyTerms()
mandatory - This method must be implemented. void matchStateId(Id stateId, boolean match)
stateId - a state Id match - true for a positive match, false
for a negative matchNullArgumentException - stateId is
null mandatory - This method must be implemented. void clearStateIdTerms()
Id terms.mandatory - This method must be implemented. boolean supportsStateQuery()
StateQuery is available to provide queries
of processed objects. true if a state query is available,
false otherwisemandatory - This method must be implemented. StateQuery getStateQuery()
OR term.UnimplementedException - supportsStateQuery()
is false optional - This method must be implemented if
supportsStateQuery() is true. void matchAnyState(boolean match)
State in
the given Process. match - true to match any state, false
to match objects with no statesmandatory - This method must be implemented. void clearStateTerms()
mandatory - This method must be implemented. void matchCommentId(Id commentId, boolean match)
commentId - a comment Id match - true for a positive match, false
for a negative matchNullArgumentException - commentId is
null mandatory - This method must be implemented. void clearCommentIdTerms()
Id terms.mandatory - This method must be implemented. boolean supportsCommentQuery()
CommentQuery is available. true if a comment query is available,
false otherwisemandatory - This method must be implemented. CommentQuery getCommentQuery()
OR term.UnimplementedException - supportsCommentQuery()
is false optional - This method must be implemented if
supportsCommentQuery() is true. void matchAnyComment(boolean match)
Comment in the given
Book. match - true to match any comment, false
to match objects with no commentsmandatory - This method must be implemented. void clearCommentTerms()
mandatory - This method must be implemented. void matchJournalEntryId(Id journalEntryId, boolean match)
journalEntryId - a journal entry Id match - true for a positive match, false
for a negative matchNullArgumentException - journalEntryId
is null mandatory - This method must be implemented. void clearJournalEntryIdTerms()
Id terms.mandatory - This method must be implemented. boolean supportsJournalEntryQuery()
JournalEntry is available to provide queries
of journaled OsidObjects. true if a journal entry query is available,
false otherwisemandatory - This method must be implemented. JournalEntryQuery getJournalEntryQuery()
OR term.UnimplementedException -
supportsJournalEntryQuery() is false optional - This method must be implemented if
supportsJournalEntryQuery() is true.
void matchAnyJournalEntry(boolean match)
JournalEntry in the
given Journal. match - true to match any journal entry,
false to match objects with no journal entriesmandatory - This method must be implemented. void clearJournalEntryTerms()
mandatory - This method must be implemented. boolean supportsStatisticQuery()
StatisticQuery is available to provide
statistical queries. true if a statistic query is available,
false otherwisemandatory - This method must be implemented. StatisticQuery getStatisticQuery()
OR term.UnimplementedException -
supportsStatisticQuery() is false optional - This method must be implemented if
supportsStatisticQuery() is true. void matchAnyStatistic(boolean match)
Statistic .match - true to match any statistic, false
to match objects with no statisticsmandatory - This method must be implemented. void clearStatisticTerms()
mandatory - This method must be implemented. void matchCreditId(Id creditId, boolean match)
creditId - a credit Id match - true for a positive match, false
for a negative matchNullArgumentException - creditId is
null mandatory - This method must be implemented. void clearCreditIdTerms()
Id terms.mandatory - This method must be implemented. boolean supportsCreditQuery()
CreditQuery is available to provide queries
of related acknowledgements. true if a credit query is available,
false otherwisemandatory - This method must be implemented. CreditQuery getCreditQuery()
OR term.UnimplementedException - supportsCreditQuery()
is false optional - This method must be implemented if
supportsCreditQuery() is true. void matchAnyCredit(boolean match)
Credit. match - true to match any credit, false
to match objects with no creditsmandatory - This method must be implemented. void clearCreditTerms()
mandatory - This method must be implemented. void matchRelationshipId(Id relationshipId, boolean match)
relationshipId - a relationship Id match - true for a positive match, false
for a negative matchNullArgumentException - relationshipId
is null mandatory - This method must be implemented. void clearRelationshipIdTerms()
Id terms.mandatory - This method must be implemented. boolean supportsRelationshipQuery()
RelationshipQuery is available. true if a relationship query is available,
false otherwisemandatory - This method must be implemented. RelationshipQuery getRelationshipQuery()
OR term.UnimplementedException -
supportsRelationshipQuery() is false optional - This method must be implemented if
supportsRelationshipQuery() is true.
void matchAnyRelationship(boolean match)
Relationship. match - true to match any relationship,
false to match objects with no relationshipsmandatory - This method must be implemented. void clearRelationshipTerms()
mandatory - This method must be implemented. void matchRelationshipPeerId(Id peerId, boolean match)
Id.
peerId - a relationship peer Id match - true for a positive match, false
for a negative matchNullArgumentException - peerId is
null mandatory - This method must be implemented. void clearRelationshipPeerIdTerms()
Id terms.mandatory - This method must be implemented.