Class AbstractOsidQuery
java.lang.Object
net.okapia.osid.jamocha.spi.AbstractOsidQuery
- All Implemented Interfaces:
OsidQuery, Suppliable
- Direct Known Subclasses:
AbstractOsidContainableQuery, AbstractOsidExtensibleQuery, AbstractOsidIdentifiableQuery, AbstractOsidOperableQuery, AbstractOsidSourceableQuery, AbstractOsidTemporalQuery
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddStringMatchType(Type stringMatchType) Adds a string match type.voidClears the match any terms.voidClears all keyword terms.Gets the string matching types supported.voidmatchAny(boolean match) Matches any object.voidmatchKeyword(String keyword, Type stringMatchType, boolean match) Adds a keyword to match.booleansupportsStringMatchType(Type stringMatchType) Tests if the given string matching type is supported.
-
Constructor Details
-
AbstractOsidQuery
public AbstractOsidQuery()Constructs a newAbstractOsidQuery.
-
-
Method Details
-
getStringMatchTypes
Gets the string matching types supported. A string match type specifies the syntax of the string query, such as matching a word or including a wildcard or regular expression.- Specified by:
getStringMatchTypesin interfaceOsidQuery- Returns:
- a list containing the supported string match types
-
supportsStringMatchType
Tests if the given string matching type is supported.- Specified by:
supportsStringMatchTypein interfaceOsidQuery- Parameters:
stringMatchType- aTypeindicating a string match type- Returns:
trueif the given Type is supported,falseotherwise- Throws:
NullArgumentException-stringMatchTypeisnull
-
addStringMatchType
Adds a string match type.- Parameters:
stringMatchType- a string matching type- Throws:
NullArgumentException-stringMatchTypeisnull
-
matchKeyword
Adds a keyword to match. Multiple keywords can be added to perform a booleanORamong them. A keyword may be applied to any of the elements defined in this object such as the display name, description or any method defined in an interface implemented by this object.- Specified by:
matchKeywordin interfaceOsidQuery- Parameters:
keyword- keyword to matchstringMatchType- the string match typematch-truefor a positive match,falsefor a negative match- Throws:
NullArgumentException-keywordorstringMatchTypeisnullUnsupportedException-supportsStringMatchType(stringMatchType)isfalse
-
clearKeywordTerms
Clears all keyword terms.- Specified by:
clearKeywordTermsin interfaceOsidQuery
-
matchAny
-
clearAnyTerms
Clears the match any terms.- Specified by:
clearAnyTermsin interfaceOsidQuery
-