OSID Logo
OSID Specifications
osid package
Version 3.0.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.PackageQuery
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.

ParametersstringdisplayNamedisplay name to match
osid.type.TypestringMatchTypethe string match type
booleanmatchtrue for a positive match, false for a negative match
ErrorsINVALID_ARGUMENTdisplayName is not of stringMatchType
NULL_ARGUMENTdisplayName or stringMatchType is null
UNSUPPORTEDsupportsStringMatchType(stringMatchType) is false
CompliancemandatoryThis method must be implemented.
MethodmatchAnyDisplayName
Description

Matches any object with a display name.

Parametersbooleanmatchtrue to match any display name, false to match objects with no display name
CompliancemandatoryThis method must be implemented.
MethodclearDisplayNameTerms
Description

Clears all display name terms.

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

Parametersstringdescriptiondescription to match
osid.type.TypestringMatchTypethe string match type
booleanmatchtrue for a positive match, false for a negative match
ErrorsINVALID_ARGUMENTdescription is not of stringMatchType
NULL_ARGUMENTdescription or stringMatchType is null
UNSUPPORTEDsupportsStringMatchType(stringMatchType) is false
CompliancemandatoryThis method must be implemented.
MethodmatchAnyDescription
Description

Matches a description that has any value.

Parametersbooleanmatchtrue to match any description, false to match descriptions with no values
CompliancemandatoryThis method must be implemented.
MethodclearDescriptionTerms
Description

Clears all description terms.

CompliancemandatoryThis 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.TypegenusTypethe object genus type
booleanmatchtrue for a positive match, false for a negative match
ErrorsNULL_ARGUMENTgenusType is null
CompliancemandatoryThis method must be implemented.
MethodmatchAnyGenusType
Description

Matches an object that has any genus type.

Parametersbooleanmatchtrue to match any genus type, false to match objects with no genus type
CompliancemandatoryThis method must be implemented.
MethodclearGenusTypeTerms
Description

Clears all genus type terms.

CompliancemandatoryThis 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.TypegenusTypethe object genus type
booleanmatchtrue for a positive match, false for a negative match
ErrorsNULL_ARGUMENTgenusType is null
CompliancemandatoryThis method must be implemented.
MethodclearParentGenusTypeTerms
Description

Clears all genus type terms.

CompliancemandatoryThis method must be implemented.
MethodmatchSubjectId
Description

Matches an object with a relationship to the given subject.

Parametersosid.id.IdsubjectIda subject Id
booleanmatchtrue for a positive match, false for a negative match
ErrorsNULL_ARGUMENTsubjectId is null
CompliancemandatoryThis method must be implemented.
MethodclearSubjectIdTerms
Description

Clears all subject Id terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsSubjectQuery
Description

Tests if a SubjectQuery is available.

Returnbooleantrue if a subject query is available, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetSubjectQuery
Description

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

Returnosid.ontology.SubjectQuerythe subject query
ErrorsUNIMPLEMENTEDsupportsSubjectQuery() is false
ComplianceoptionalThis method must be implemented if supportsSubjectQuery() is true .
MethodmatchAnySubject
Description

Matches an object that has any relationship to a Subject .

Parametersbooleanmatchtrue to match any subject, false to match objects with no subjects
CompliancemandatoryThis method must be implemented.
MethodclearSubjectTerms
Description

Clears all subject terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsSubjectRelevancyQuery
Description

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

Returnbooleantrue if a relevancy entry query is available, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetSubjectRelevancyQuery
Description

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

Returnosid.ontology.RelevancyQuerythe relevancy query
ErrorsUNIMPLEMENTEDsupportsSubjectRelevancyQuery() is false
ComplianceoptionalThis method must be implemented if supportsSubjectRelevancyQuery() is true .
MethodclearSubjectRelevancyTerms
Description

Clears all subject relevancy terms.

CompliancemandatoryThis method must be implemented.
MethodmatchStateId
Description

Matches an object mapped to the given state.

Parametersosid.id.IdstateIda state Id
booleanmatchtrue for a positive match, false for a negative match
ErrorsNULL_ARGUMENTstateId is null
CompliancemandatoryThis method must be implemented.
MethodclearStateIdTerms
Description

Clears all state Id terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsStateQuery
Description

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

Returnbooleantrue if a state query is available, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetStateQuery
Description

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

Returnosid.process.StateQuerythe journal entry query
ErrorsUNIMPLEMENTEDsupportsStateQuery() is false
ComplianceoptionalThis method must be implemented if supportsStateQuery() is true .
MethodmatchAnyState
Description

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

Parametersbooleanmatchtrue to match any state, false to match objects with no states
CompliancemandatoryThis method must be implemented.
MethodclearStateTerms
Description

Clears all state terms.

CompliancemandatoryThis method must be implemented.
MethodmatchCommentId
Description

Matches an object that has the given comment.

Parametersosid.id.IdcommentIda comment Id
booleanmatchtrue for a positive match, false for a negative match
ErrorsNULL_ARGUMENTcommentId is null
CompliancemandatoryThis method must be implemented.
MethodclearCommentIdTerms
Description

Clears all comment Id terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsCommentQuery
Description

Tests if a CommentQuery is available.

Returnbooleantrue if a comment query is available, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetCommentQuery
Description

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

Returnosid.commenting.CommentQuerythe comment query
ErrorsUNIMPLEMENTEDsupportsCommentQuery() is false
ComplianceoptionalThis method must be implemented if supportsCommentQuery() is true .
MethodmatchAnyComment
Description

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

Parametersbooleanmatchtrue to match any comment, false to match objects with no comments
CompliancemandatoryThis method must be implemented.
MethodclearCommentTerms
Description

Clears all comment terms.

CompliancemandatoryThis method must be implemented.
MethodmatchJournalEntryId
Description

Matches an object that has the given journal entry.

Parametersosid.id.IdjournalEntryIda journal entry Id
booleanmatchtrue for a positive match, false for a negative match
ErrorsNULL_ARGUMENTjournalEntryId is null
CompliancemandatoryThis method must be implemented.
MethodclearJournalEntryIdTerms
Description

Clears all journal entry Id terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsJournalEntryQuery
Description

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

Returnbooleantrue if a journal entry query is available, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetJournalEntryQuery
Description

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

Returnosid.journaling.JournalEntryQuerythe journal entry query
ErrorsUNIMPLEMENTEDsupportsJournalEntryQuery() is false
ComplianceoptionalThis method must be implemented if supportsJournalEntryQuery() is true .
MethodmatchAnyJournalEntry
Description

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

Parametersbooleanmatchtrue to match any journal entry, false to match objects with no journal entries
CompliancemandatoryThis method must be implemented.
MethodclearJournalEntryTerms
Description

Clears all journal entry terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsStatisticQuery
Description

Tests if a StatisticQuery is available to provide statistical queries.

Returnbooleantrue if a statistic query is available, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetStatisticQuery
Description

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

Returnosid.metering.StatisticQuerythe statistic query
ErrorsUNIMPLEMENTEDsupportsStatisticQuery() is false
ComplianceoptionalThis method must be implemented if supportsStatisticQuery() is true .
MethodmatchAnyStatistic
Description

Matches an object that has any Statistic .

Parametersbooleanmatchtrue to match any statistic, false to match objects with no statistics
CompliancemandatoryThis method must be implemented.
MethodclearStatisticTerms
Description

Clears all statistic terms.

CompliancemandatoryThis method must be implemented.
MethodmatchCreditId
Description

Matches an object that has the given credit.

Parametersosid.id.IdcreditIda credit Id
booleanmatchtrue for a positive match, false for a negative match
ErrorsNULL_ARGUMENTcreditId is null
CompliancemandatoryThis method must be implemented.
MethodclearCreditIdTerms
Description

Clears all credit Id terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsCreditQuery
Description

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

Returnbooleantrue if a credit query is available, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetCreditQuery
Description

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

Returnosid.acknowledgement.CreditQuerythe credit query
ErrorsUNIMPLEMENTEDsupportsCreditQuery() is false
ComplianceoptionalThis method must be implemented if supportsCreditQuery() is true .
MethodmatchAnyCredit
Description

Matches an object that has any Credit .

Parametersbooleanmatchtrue to match any credit, false to match objects with no credits
CompliancemandatoryThis method must be implemented.
MethodclearCreditTerms
Description

Clears all credit terms.

CompliancemandatoryThis method must be implemented.
MethodmatchRelationshipId
Description

Matches an object that has the given relationship.

Parametersosid.id.IdrelationshipIda relationship Id
booleanmatchtrue for a positive match, false for a negative match
ErrorsNULL_ARGUMENTrelationshipId is null
CompliancemandatoryThis method must be implemented.
MethodclearRelationshipIdTerms
Description

Clears all relationship Id terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsRelationshipQuery
Description

Tests if a RelationshipQuery is available.

Returnbooleantrue if a relationship query is available, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetRelationshipQuery
Description

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

Returnosid.relationship.RelationshipQuerythe relationship query
ErrorsUNIMPLEMENTEDsupportsRelationshipQuery() is false
ComplianceoptionalThis method must be implemented if supportsRelationshipQuery() is true .
MethodmatchAnyRelationship
Description

Matches an object that has any Relationship .

Parametersbooleanmatchtrue to match any relationship, false to match objects with no relationships
CompliancemandatoryThis method must be implemented.
MethodclearRelationshipTerms
Description

Clears all relationship terms.

CompliancemandatoryThis method must be implemented.
MethodmatchRelationshipPeerId
Description

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

Parametersosid.id.IdpeerIda relationship peer Id
booleanmatchtrue for a positive match, false for a negative match
ErrorsNULL_ARGUMENTpeerId is null
CompliancemandatoryThis method must be implemented.
MethodclearRelationshipPeerIdTerms
Description

Clears all relationship Id terms.

CompliancemandatoryThis method must be implemented.