OSID Logo
OSID Specifications
osid package
Version 3.1.0
Interfaceosid.OsidObjectQuery
Implementsosid.OsidIdentifiableQuery
osid.OsidExtensibleQuery
osid.OsidBrowsableQuery
Implemented Byosid.course.CourseQuery
osid.course.ActivityUnitQuery
osid.course.TermQuery
osid.assessment.authoring.AssessmentPartQuery
osid.ordering.OrderQuery
osid.ordering.ProductQuery
osid.ordering.PriceScheduleQuery
osid.topology.NodeQuery
osid.inventory.shipment.ShipmentQuery
osid.inventory.shipment.EntryQuery
osid.authentication.keys.KeyQuery
osid.financials.AccountQuery
osid.financials.ActivityQuery
osid.financials.FiscalPeriodQuery
osid.workflow.event.WorkflowEventQuery
osid.authentication.AgentQuery
osid.contact.AddressQuery
osid.provisioning.ProvisionReturnQuery
osid.hold.BlockQuery
osid.filing.DirectoryEntryQuery
osid.forum.PostQuery
osid.forum.ReplyQuery
osid.authorization.QualifierQuery
osid.OsidRelationshipQuery
osid.OsidCatalogQuery
osid.OsidRequestQuery
osid.OsidRuleQuery
osid.OsidGovernatorQuery
osid.OsidCompendiumQuery
osid.lexicon.TextQuery
osid.lexicon.IdiomQuery
osid.lexicon.ParameterQuery
osid.inventory.ItemQuery
osid.inventory.StockQuery
osid.inventory.ModelQuery
osid.inventory.InventoryQuery
osid.calendaring.cycle.CyclicEventQuery
osid.calendaring.cycle.CyclicTimePeriodQuery
osid.learning.ObjectiveQuery
osid.learning.ActivityQuery
osid.installation.InstallationPackageQuery
osid.installation.InstallationContentQuery
osid.installation.InstallationQuery
osid.installation.SiteQuery
osid.messaging.MessageQuery
osid.messaging.ReceiptQuery
osid.room.construction.RenovationQuery
osid.room.construction.ProjectQuery
osid.recognition.AwardQuery
osid.grading.GradeQuery
osid.grading.GradeSystemQuery
osid.grading.GradebookColumnQuery
osid.grading.GradebookColumnSummaryQuery
osid.resourcing.WorkQuery
osid.resourcing.CompetencyQuery
osid.repository.AssetQuery
osid.repository.AssetContentQuery
osid.repository.CompositionQuery
osid.profile.ProfileItemQuery
osid.recipe.RecipeQuery
osid.recipe.DirectionQuery
osid.recipe.IngredientQuery
osid.recipe.ProcedureQuery
osid.course.registration.RegistrationTargetQuery
osid.tracking.LogEntryQuery
osid.mapping.route.RouteSegmentQuery
osid.journaling.JournalEntryQuery
osid.journaling.BranchQuery
osid.offering.CanonicalUnitQuery
osid.offering.ResultQuery
osid.mapping.LocationQuery
osid.assessment.QuestionQuery
osid.assessment.AnswerQuery
osid.assessment.ItemQuery
osid.assessment.AssessmentQuery
osid.assessment.AssessmentOfferedQuery
osid.assessment.AssessmentTakenQuery
osid.blogging.EntryQuery
osid.calendaring.EventQuery
osid.calendaring.ScheduleQuery
osid.calendaring.ScheduleSlotQuery
osid.calendaring.TimePeriodQuery
osid.metering.MeterQuery
osid.dictionary.EntryQuery
osid.configuration.ValueQuery
osid.resource.ResourceQuery
osid.logging.LogEntryQuery
osid.personnel.PersonQuery
osid.personnel.OrganizationQuery
osid.personnel.PositionQuery
osid.course.program.ProgramQuery
osid.course.program.CredentialQuery
osid.process.StateQuery
osid.checklist.TodoQuery
osid.sequencing.ChainQuery
osid.billing.CustomerQuery
osid.billing.ItemQuery
osid.billing.CategoryQuery
osid.billing.PeriodQuery
osid.workflow.WorkQuery
osid.billing.payment.PayerQuery
osid.billing.payment.PaymentQuery
osid.room.RoomQuery
osid.room.FloorQuery
osid.room.BuildingQuery
osid.mapping.path.PathQuery
osid.mapping.path.IntersectionQuery
osid.mapping.path.ObstacleQuery
osid.course.syllabus.SyllabusQuery
osid.course.syllabus.ModuleQuery
osid.financials.posting.PostQuery
osid.financials.posting.PostEntryQuery
osid.course.registration.request.RegistrationRequestItemQuery
osid.ontology.SubjectQuery
osid.control.DeviceQuery
osid.control.ControllerQuery
osid.control.SettingQuery
osid.control.SceneQuery
osid.control.ActionGroupQuery
Description

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);
                
MethodmatchDisplayName
Description

Adds a display name to match. Multiple display name matches can be added to perform a boolean OR among them.

ParametersstringdisplayName display name to match
osid.type.TypestringMatchType the string match type
booleanmatch true for a positive match, false for a negative match
ErrorsINVALID_ARGUMENT displayName is not of stringMatchType
NULL_ARGUMENT displayName or stringMatchType is null
UNSUPPORTED supportsStringMatchType(stringMatchType) is false
Compliancemandatory This method must be implemented.
MethodmatchAnyDisplayName
Description

Matches any object with a display name.

Parametersbooleanmatch true to match any display name, false to match objects with no display name
Compliancemandatory This method must be implemented.
MethodclearDisplayNameTerms
Description

Clears all display name terms.

Compliancemandatory This method must be implemented.
MethodmatchDescription
Description

Adds a description name to match. Multiple description matches can be added to perform a boolean OR among them.

Parametersstringdescription description to match
osid.type.TypestringMatchType the string match type
booleanmatch true for a positive match, false for a negative match
ErrorsINVALID_ARGUMENT description is not of stringMatchType
NULL_ARGUMENT description or stringMatchType is null
UNSUPPORTED supportsStringMatchType(stringMatchType) is false
Compliancemandatory This method must be implemented.
MethodmatchAnyDescription
Description

Matches a description that has any value.

Parametersbooleanmatch true to match any description, false to match descriptions with no values
Compliancemandatory This method must be implemented.
MethodclearDescriptionTerms
Description

Clears all description terms.

Compliancemandatory This method must be implemented.
MethodmatchGenusType
Description

Sets a 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.

Parametersosid.type.TypegenusType the object genus type
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT genusType is null
Compliancemandatory This method must be implemented.
MethodmatchAnyGenusType
Description

Matches an object that has any genus type.

Parametersbooleanmatch true to match any genus type, false to match objects with no genus type
Compliancemandatory This method must be implemented.
MethodclearGenusTypeTerms
Description

Clears all genus type terms.

Compliancemandatory This method must be implemented.
MethodmatchParentGenusType
Description

Sets a 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.

Parametersosid.type.TypegenusType the object genus type
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT genusType is null
Compliancemandatory This method must be implemented.
MethodclearParentGenusTypeTerms
Description

Clears all genus type terms.

Compliancemandatory This method must be implemented.
MethodmatchSubjectId
Description

Matches an object with a relationship to the given subject.

Parametersosid.id.IdsubjectId a subject Id
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT subjectId is null
Compliancemandatory This method must be implemented.
MethodclearSubjectIdTerms
Description

Clears all subject Id terms.

Compliancemandatory This method must be implemented.
MethodsupportsSubjectQuery
Description

Tests if a SubjectQuery is available.

Returnboolean true if a subject query is available, false otherwise
Compliancemandatory This method must be implemented.
MethodgetSubjectQuery
Description

Gets the query for a subject. Multiple retrievals produce a nested OR term.

Returnosid.ontology.SubjectQuery the subject query
ErrorsUNIMPLEMENTED supportsSubjectQuery() is false
Complianceoptional This method must be implemented if supportsSubjectQuery() is true.
MethodmatchAnySubject
Description

Matches an object that has any relationship to a Subject.

Parametersbooleanmatch true to match any subject, false to match objects with no subjects
Compliancemandatory This method must be implemented.
MethodclearSubjectTerms
Description

Clears all subject terms.

Compliancemandatory This method must be implemented.
MethodsupportsSubjectRelevancyQuery
Description

Tests if a RelevancyQuery is available to provide queries about the relationships to Subjects.

Returnboolean true if a relevancy entry query is available, false otherwise
Compliancemandatory This method must be implemented.
MethodgetSubjectRelevancyQuery
Description

Gets the query for a subject relevancy. Multiple retrievals produce a nested OR term.

Returnosid.ontology.RelevancyQuery the relevancy query
ErrorsUNIMPLEMENTED supportsSubjectRelevancyQuery() is false
Complianceoptional This method must be implemented if supportsSubjectRelevancyQuery() is true.
MethodclearSubjectRelevancyTerms
Description

Clears all subject relevancy terms.

Compliancemandatory This method must be implemented.
MethodmatchStateId
Description

Matches an object mapped to the given state.

Parametersosid.id.IdstateId a state Id
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT stateId is null
Compliancemandatory This method must be implemented.
MethodclearStateIdTerms
Description

Clears all state Id terms.

Compliancemandatory This method must be implemented.
MethodsupportsStateQuery
Description

Tests if a StateQuery is available to provide queries of processed objects.

Returnboolean true if a state query is available, false otherwise
Compliancemandatory This method must be implemented.
MethodgetStateQuery
Description

Gets the query for a state. Multiple retrievals produce a nested OR term.

Returnosid.process.StateQuery the journal entry query
ErrorsUNIMPLEMENTED supportsStateQuery() is false
Complianceoptional This method must be implemented if supportsStateQuery() is true.
MethodmatchAnyState
Description

Matches an object that has any mapping to a State in the given Process.

Parametersbooleanmatch true to match any state, false to match objects with no states
Compliancemandatory This method must be implemented.
MethodclearStateTerms
Description

Clears all state terms.

Compliancemandatory This method must be implemented.
MethodmatchCommentId
Description

Matches an object that has the given comment.

Parametersosid.id.IdcommentId a comment Id
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT commentId is null
Compliancemandatory This method must be implemented.
MethodclearCommentIdTerms
Description

Clears all comment Id terms.

Compliancemandatory This method must be implemented.
MethodsupportsCommentQuery
Description

Tests if a CommentQuery is available.

Returnboolean true if a comment query is available, false otherwise
Compliancemandatory This method must be implemented.
MethodgetCommentQuery
Description

Gets the query for a comment. Multiple retrievals produce a nested OR term.

Returnosid.commenting.CommentQuery the comment query
ErrorsUNIMPLEMENTED supportsCommentQuery() is false
Complianceoptional This method must be implemented if supportsCommentQuery() is true.
MethodmatchAnyComment
Description

Matches an object that has any Comment in the given Book.

Parametersbooleanmatch true to match any comment, false to match objects with no comments
Compliancemandatory This method must be implemented.
MethodclearCommentTerms
Description

Clears all comment terms.

Compliancemandatory This method must be implemented.
MethodmatchJournalEntryId
Description

Matches an object that has the given journal entry.

Parametersosid.id.IdjournalEntryId a journal entry Id
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT journalEntryId is null
Compliancemandatory This method must be implemented.
MethodclearJournalEntryIdTerms
Description

Clears all journal entry Id terms.

Compliancemandatory This method must be implemented.
MethodsupportsJournalEntryQuery
Description

Tests if a JournalEntry is available to provide queries of journaled OsidObjects.

Returnboolean true if a journal entry query is available, false otherwise
Compliancemandatory This method must be implemented.
MethodgetJournalEntryQuery
Description

Gets the query for a journal entry. Multiple retrievals produce a nested OR term.

Returnosid.journaling.JournalEntryQuery the journal entry query
ErrorsUNIMPLEMENTED supportsJournalEntryQuery() is false
Complianceoptional This method must be implemented if supportsJournalEntryQuery() is true.
MethodmatchAnyJournalEntry
Description

Matches an object that has any JournalEntry in the given Journal.

Parametersbooleanmatch true to match any journal entry, false to match objects with no journal entries
Compliancemandatory This method must be implemented.
MethodclearJournalEntryTerms
Description

Clears all journal entry terms.

Compliancemandatory This method must be implemented.
MethodsupportsStatisticQuery
Description

Tests if a StatisticQuery is available to provide statistical queries.

Returnboolean true if a statistic query is available, false otherwise
Compliancemandatory This method must be implemented.
MethodgetStatisticQuery
Description

Gets the query for a statistic. Multiple retrievals produce a nested OR term.

Returnosid.metering.StatisticQuery the statistic query
ErrorsUNIMPLEMENTED supportsStatisticQuery() is false
Complianceoptional This method must be implemented if supportsStatisticQuery() is true.
MethodmatchAnyStatistic
Description

Matches an object that has any Statistic.

Parametersbooleanmatch true to match any statistic, false to match objects with no statistics
Compliancemandatory This method must be implemented.
MethodclearStatisticTerms
Description

Clears all statistic terms.

Compliancemandatory This method must be implemented.
MethodmatchCreditId
Description

Matches an object that has the given credit.

Parametersosid.id.IdcreditId a credit Id
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT creditId is null
Compliancemandatory This method must be implemented.
MethodclearCreditIdTerms
Description

Clears all credit Id terms.

Compliancemandatory This method must be implemented.
MethodsupportsCreditQuery
Description

Tests if a CreditQuery is available to provide queries of related acknowledgements.

Returnboolean true if a credit query is available, false otherwise
Compliancemandatory This method must be implemented.
MethodgetCreditQuery
Description

Gets the query for an ackowledgement credit. Multiple retrievals produce a nested OR term.

Returnosid.acknowledgement.CreditQuery the credit query
ErrorsUNIMPLEMENTED supportsCreditQuery() is false
Complianceoptional This method must be implemented if supportsCreditQuery() is true.
MethodmatchAnyCredit
Description

Matches an object that has any Credit.

Parametersbooleanmatch true to match any credit, false to match objects with no credits
Compliancemandatory This method must be implemented.
MethodclearCreditTerms
Description

Clears all credit terms.

Compliancemandatory This method must be implemented.
MethodmatchRelationshipId
Description

Matches an object that has the given relationship.

Parametersosid.id.IdrelationshipId a relationship Id
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT relationshipId is null
Compliancemandatory This method must be implemented.
MethodclearRelationshipIdTerms
Description

Clears all relationship Id terms.

Compliancemandatory This method must be implemented.
MethodsupportsRelationshipQuery
Description

Tests if a RelationshipQuery is available.

Returnboolean true if a relationship query is available, false otherwise
Compliancemandatory This method must be implemented.
MethodgetRelationshipQuery
Description

Gets the query for relationship. Multiple retrievals produce a nested OR term.

Returnosid.relationship.RelationshipQuery the relationship query
ErrorsUNIMPLEMENTED supportsRelationshipQuery() is false
Complianceoptional This method must be implemented if supportsRelationshipQuery() is true.
MethodmatchAnyRelationship
Description

Matches an object that has any Relationship.

Parametersbooleanmatch true to match any relationship, false to match objects with no relationships
Compliancemandatory This method must be implemented.
MethodclearRelationshipTerms
Description

Clears all relationship terms.

Compliancemandatory This method must be implemented.
MethodmatchRelationshipPeerId
Description

Matches an object that has a relationship to the given peer Id.

Parametersosid.id.IdpeerId a relationship peer Id
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT peerId is null
Compliancemandatory This method must be implemented.
MethodclearRelationshipPeerIdTerms
Description

Clears all relationship Id terms.

Compliancemandatory This method must be implemented.