Interface AssetQuery

All Superinterfaces:
Extensible, OsidAggregateableQuery, OsidBrowsableQuery, OsidExtensibleQuery, OsidIdentifiableQuery, OsidObjectQuery, OsidQuery, OsidSourceableQuery, Suppliable

public interface AssetQuery extends OsidObjectQuery, OsidAggregateableQuery, OsidSourceableQuery

This is the query for searching assets. Each method specifies an AND term while multiple invocations of the same method produce a nested OR . The query record is identified by the Asset Type .

  • Method Details

    • matchTitle

      void matchTitle(String title, Type stringMatchType, boolean match)
      Adds a title for this query.
      Parameters:
      title - title string to match
      stringMatchType - the string match type
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - title not of stringMatchType
      NullArgumentException - title or stringMatchType is null
      UnsupportedException - supportsStringMatchType(stringMatchType) is false
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyTitle

      void matchAnyTitle(boolean match)
      Matches a title that has any value.
      Parameters:
      match - true to match assets with any title, false to match assets with no title
      Compliance:
      mandatory - This method must be implemented.
    • clearTitleTerms

      void clearTitleTerms()
      Clears the title terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchPublicDomain

      void matchPublicDomain(boolean publicDomain)
      Matches assets marked as public domain.
      Parameters:
      publicDomain - public domain flag
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyPublicDomain

      void matchAnyPublicDomain(boolean match)
      Matches assets with any public domain value.
      Parameters:
      match - true to match assets with any public domain value, false to match assets with no public domain value
      Compliance:
      mandatory - This method must be implemented.
    • clearPublicDomainTerms

      void clearPublicDomainTerms()
      Clears the public domain terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchCopyright

      void matchCopyright(String copyright, Type stringMatchType, boolean match)
      Adds a copyright for this query.
      Parameters:
      copyright - copyright string to match
      stringMatchType - the string match type
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - copyright not of stringMatchType
      NullArgumentException - copyright or stringMatchType is null
      UnsupportedException - supportsStringMatchType(stringMatchType) is false
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyCopyright

      void matchAnyCopyright(boolean match)
      Matches assets with any copyright statement.
      Parameters:
      match - true to match assets with any copyright value, false to match assets with no copyright value
      Compliance:
      mandatory - This method must be implemented.
    • clearCopyrightTerms

      void clearCopyrightTerms()
      Clears the copyright terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchCopyrightRegistration

      void matchCopyrightRegistration(String registration, Type stringMatchType, boolean match)
      Adds a copyright registration for this query.
      Parameters:
      registration - copyright registration string to match
      stringMatchType - the string match type
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - registration not of stringMatchType
      NullArgumentException - registration or stringMatchType is null
      UnsupportedException - supportsStringMatchType(stringMatchType) is false
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyCopyrightRegistration

      void matchAnyCopyrightRegistration(boolean match)
      Matches assets with any copyright registration.
      Parameters:
      match - true to match assets with any copyright registration value, false to match assets with no copyright registration value
      Compliance:
      mandatory - This method must be implemented.
    • clearCopyrightRegistrationTerms

      void clearCopyrightRegistrationTerms()
      Clears the copyright registration terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchDistributeVerbatim

      void matchDistributeVerbatim(boolean distributable)
      Matches assets marked as distributable.
      Parameters:
      distributable - distribute verbatim rights flag
      Compliance:
      mandatory - This method must be implemented.
    • clearDistributeVerbatimTerms

      void clearDistributeVerbatimTerms()
      Clears the distribute verbatim terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchDistributeAlterations

      void matchDistributeAlterations(boolean alterable)
      Matches assets that whose alterations can be distributed.
      Parameters:
      alterable - distribute alterations rights flag
      Compliance:
      mandatory - This method must be implemented.
    • clearDistributeAlterationsTerms

      void clearDistributeAlterationsTerms()
      Clears the distribute alterations terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchDistributeCompositions

      void matchDistributeCompositions(boolean composable)
      Matches assets that can be distributed as part of other compositions.
      Parameters:
      composable - distribute compositions rights flag
      Compliance:
      mandatory - This method must be implemented.
    • clearDistributeCompositionsTerms

      void clearDistributeCompositionsTerms()
      Clears the distribute compositions terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchSourceId

      void matchSourceId(Id sourceId, boolean match)
      Sets the source Id for this query.
      Parameters:
      sourceId - the source Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - sourceId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearSourceIdTerms

      void clearSourceIdTerms()
      Clears the source Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsSourceQuery

      boolean supportsSourceQuery()
      Tests if a ResourceQuery is available for the source.
      Returns:
      true if a resource query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getSourceQuery

      ResourceQuery getSourceQuery()
      Gets the query for the source. Multiple queries can be retrieved for a nested OR term.
      Returns:
      the source query
      Throws:
      UnimplementedException - supportsSourceQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsSourceQuery()} is {@code true} .
    • matchAnySource

      void matchAnySource(boolean match)
      Matches assets with any source.
      Parameters:
      match - true to match assets with any source, false to match assets with no sources
      Compliance:
      mandatory - This method must be implemented.
    • clearSourceTerms

      void clearSourceTerms()
      Clears the source terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchCreatedDate

      void matchCreatedDate(DateTime start, DateTime end, boolean match)
      Match assets that are created between the specified time period.
      Parameters:
      start - start time of the query
      end - end time of the query
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - end is les than start
      NullArgumentException - start or end is null
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyCreatedDate

      void matchAnyCreatedDate(boolean match)
      Matches assets with any creation time.
      Parameters:
      match - true to match assets with any created time, false to match assets with no cerated time
      Compliance:
      mandatory - This method must be implemented.
    • clearCreatedDateTerms

      void clearCreatedDateTerms()
      Clears the created time terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchPublished

      void matchPublished(boolean published)
      Marks assets that are marked as published.
      Parameters:
      published - published flag
      Compliance:
      mandatory - This method must be implemented.
    • clearPublishedTerms

      void clearPublishedTerms()
      Clears the published terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchPublishedDate

      void matchPublishedDate(DateTime start, DateTime end, boolean match)
      Match assets that are published between the specified time period.
      Parameters:
      start - start time of the query
      end - end time of the query
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - end is les than start
      NullArgumentException - start or end is null
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyPublishedDate

      void matchAnyPublishedDate(boolean match)
      Matches assets with any published time.
      Parameters:
      match - true to match assets with any published time, false to match assets with no published time
      Compliance:
      mandatory - This method must be implemented.
    • clearPublishedDateTerms

      void clearPublishedDateTerms()
      Clears the published time terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchPrincipalCreditString

      void matchPrincipalCreditString(String credit, Type stringMatchType, boolean match)
      Adds a principal credits for this query.
      Parameters:
      credit - credit string to match
      stringMatchType - the string match type
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - credit not of stringMatchType
      NullArgumentException - credit or stringMatchType is null
      UnsupportedException - supportsStringMatchType(stringMatchType) is false
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyPrincipalCreditString

      void matchAnyPrincipalCreditString(boolean match)
      Matches a principal credits that has any value.
      Parameters:
      match - true to match assets with any principal credits, false to match assets with no principal credits
      Compliance:
      mandatory - This method must be implemented.
    • clearPrincipalCreditStringTerms

      void clearPrincipalCreditStringTerms()
      Clears the principal credits terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchTemporalCoverage

      void matchTemporalCoverage(DateTime start, DateTime end, boolean match)
      Match assets that whose coverage falls between the specified time period inclusive.
      Parameters:
      start - start time of the query
      end - end time of the query
      match - true for a positive match, false for a negative match
      Throws:
      InvalidArgumentException - end is less than start
      NullArgumentException - start or end is null
      Compliance:
      mandatory - This method must be implemented.
    • matchAnyTemporalCoverage

      void matchAnyTemporalCoverage(boolean match)
      Matches assets with any temporal coverage.
      Parameters:
      match - true to match assets with any temporal coverage, false to match assets with no temporal coverage
      Compliance:
      mandatory - This method must be implemented.
    • clearTemporalCoverageTerms

      void clearTemporalCoverageTerms()
      Clears the temporal coverage terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchLocationId

      void matchLocationId(Id locationId, boolean match)
      Sets the location Id for this query of spatial coverage.
      Parameters:
      locationId - the location Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - locationId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearLocationIdTerms

      void clearLocationIdTerms()
      Clears the location Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsLocationQuery

      boolean supportsLocationQuery()
      Tests if a LocationQuery is available for the provider.
      Returns:
      true if a location query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getLocationQuery

      LocationQuery getLocationQuery()
      Gets the query for a location. Multiple queries can be retrieved for a nested OR term.
      Returns:
      the location query
      Throws:
      UnimplementedException - supportsLocationQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsLocationQuery()} is {@code true} .
    • matchAnyLocation

      void matchAnyLocation(boolean match)
      Matches assets with any provider.
      Parameters:
      match - true to match assets with any location, false to match assets with no locations
      Compliance:
      mandatory - This method must be implemented.
    • clearLocationTerms

      void clearLocationTerms()
      Clears the location terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchSpatialCoverage

      void matchSpatialCoverage(SpatialUnit spatialUnit, boolean match)
      Matches assets that are contained within the given spatial unit.
      Parameters:
      spatialUnit - the spatial unit
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - spatialUnit is null
      UnsupportedException - spatialUnit is not suppoted
      Compliance:
      mandatory - This method must be implemented.
    • clearSpatialCoverageTerms

      void clearSpatialCoverageTerms()
      Clears the spatial coverage terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchSpatialCoverageOverlap

      void matchSpatialCoverageOverlap(SpatialUnit spatialUnit, boolean match)
      Matches assets that overlap or touch the given spatial unit.
      Parameters:
      spatialUnit - the spatial unit
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - spatialUnit is null
      UnsupportedException - spatialUnit is not suppoted
      Compliance:
      mandatory - This method must be implemented.
    • matchAnySpatialCoverage

      void matchAnySpatialCoverage(boolean match)
      Matches assets with no spatial coverage.
      Parameters:
      match - true to match assets with any spatial coverage, false to match assets with no spatial coverage
      Compliance:
      mandatory - This method must be implemented.
    • clearSpatialCoverageOverlapTerms

      void clearSpatialCoverageOverlapTerms()
      Clears the spatial coverage overlap terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchAssetContentId

      void matchAssetContentId(Id assetContentId, boolean match)
      Sets the asset content Id for this query.
      Parameters:
      assetContentId - the asset content Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - assetContentId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearAssetContentIdTerms

      void clearAssetContentIdTerms()
      Clears the asset content Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsAssetContentQuery

      boolean supportsAssetContentQuery()
      Tests if an AssetContentQuery is available.
      Returns:
      true if an asset content query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getAssetContentQuery

      AssetContentQuery getAssetContentQuery()
      Gets the query for the asset content. Multiple queries can be retrieved for a nested OR term.
      Returns:
      the asset contents query
      Throws:
      UnimplementedException - supportsAssetContentQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsAssetContentQuery()} is {@code true} .
    • matchAnyAssetContent

      void matchAnyAssetContent(boolean match)
      Matches assets with any content.
      Parameters:
      match - true to match assets with any content, false to match assets with no content
      Compliance:
      mandatory - This method must be implemented.
    • clearAssetContentTerms

      void clearAssetContentTerms()
      Clears the asset content terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchCompositionId

      void matchCompositionId(Id compositionId, boolean match)
      Sets the composition Id for this query to match assets that are a part of the composition.
      Parameters:
      compositionId - the composition Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - compositionId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearCompositionIdTerms

      void clearCompositionIdTerms()
      Clears the composition Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsCompositionQuery

      boolean supportsCompositionQuery()
      Tests if a CompositionQuery is available.
      Returns:
      true if a composition query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getCompositionQuery

      CompositionQuery getCompositionQuery()
      Gets the query for a composition. Multiple queries can be retrieved for a nested OR term.
      Returns:
      the composition query
      Throws:
      UnimplementedException - supportsCompositionQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsCompositionQuery()} is {@code true} .
    • matchAnyComposition

      void matchAnyComposition(boolean match)
      Matches assets with any composition mappings.
      Parameters:
      match - true to match assets with any composition, false to match assets with no composition mappings
      Compliance:
      mandatory - This method must be implemented.
    • clearCompositionTerms

      void clearCompositionTerms()
      Clears the composition terms.
      Compliance:
      mandatory - This method must be implemented.
    • matchRepositoryId

      void matchRepositoryId(Id repositoryId, boolean match)
      Sets the repository Id for this query.
      Parameters:
      repositoryId - the repository Id
      match - true for a positive match, false for a negative match
      Throws:
      NullArgumentException - repositoryId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearRepositoryIdTerms

      void clearRepositoryIdTerms()
      Clears the repository Id terms.
      Compliance:
      mandatory - This method must be implemented.
    • supportsRepositoryQuery

      boolean supportsRepositoryQuery()
      Tests if a RepositoryQuery is available.
      Returns:
      true if a repository query is available, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getRepositoryQuery

      RepositoryQuery getRepositoryQuery()
      Gets the query for a repository. Multiple queries can be retrieved for a nested OR term.
      Returns:
      the repository query
      Throws:
      UnimplementedException - supportsRepositoryQuery() is false
      Compliance:
      optional - This method must be implemented if {@code supportsRepositoryQuery()} is {@code true} .
    • clearRepositoryTerms

      void clearRepositoryTerms()
      Clears the repository terms.
      Compliance:
      mandatory - This method must be implemented.
    • getAssetQueryRecord

      AssetQueryRecord getAssetQueryRecord(Type assetRecordType) throws OperationFailedException
      Gets the asset query record corresponding to the given Asset record Type .Multiuple retrievals produce a nested OR term.
      Parameters:
      assetRecordType - an asset record type
      Returns:
      the asset query record
      Throws:
      NullArgumentException - assetRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(assetRecordType) is false
      Compliance:
      mandatory - This method must be implemented.