org.oclc.da.gdfr.registryprototype
Interface Collection

All Known Implementing Classes:
CollectionBL, CollectionBLVersioned, CollectionDbXml, CollectionManagerBL, CollectionManagerDbXml, StubCollection, StubCollectionsCollection

public interface Collection


Method Summary
 void add(CollectionItem item)
          Adds the given CollectionItem to the collection preconditions: 1) The user is recognized and is allowed to execute this feature 2) The identifier given to the record is valid and does not already exist.
 CollectionItem create()
          Creates a new instance of CollectionItem with a GUID associated with it preconditions: 1) The collection exists postconditions: 1) The GUID is in fact globally unique
 void delete(Ref ref)
          Deletes the record identified by the given ref preconditions 1) The record with the given Ref exists postconditions 1) The record is deleted from the collection
 CollectionItem read(Ref ref)
          Returns the CollectionItem identified by the given Ref preconditions 1) The record identified by the given identifier exists.
 AdminData readAdmin(Ref ref)
          Returns the admin data of the CollectionItem identified by the given Ref preconditions 1) The record identified by the given identifier exists.
 Content readContent(Ref ref)
          Returns the content data of the CollectionItem identified by the given Ref preconditions 1) The record identified by the given identifier exists.
 Abstract[] search(Query query)
          Return a list (possibly empty if no matches) of abstracts of registry records, containing its known identifiers and some unique & relevant identifying attributes.
 void update(CollectionItem item)
          Updates the given CollectionItem in the Collection preconditions: 1) The user is recognized and is allowed to execute this feature 2) The identifier given to the record is valid and already exists.
 

Method Detail

add

void add(CollectionItem item)
         throws RegistryException
Adds the given CollectionItem to the collection preconditions: 1) The user is recognized and is allowed to execute this feature 2) The identifier given to the record is valid and does not already exist. 3) The record contains all the required data elements, in the proper format. postconditions: The CollectionItem is now part of the collection

Parameters:
item - CollectionItem to add
Throws:
RegistryException - if any erros occur.

create

CollectionItem create()
                      throws RegistryException
Creates a new instance of CollectionItem with a GUID associated with it preconditions: 1) The collection exists postconditions: 1) The GUID is in fact globally unique

Returns:
The CollectionItem created
Throws:
RegistryException - if anything goes wrong

delete

void delete(Ref ref)
            throws RegistryException
Deletes the record identified by the given ref preconditions 1) The record with the given Ref exists postconditions 1) The record is deleted from the collection

Parameters:
ref - The Ref of the record to delete
Throws:
RegistryException - if anything goes wrong

readAdmin

AdminData readAdmin(Ref ref)
                    throws RegistryException
Returns the admin data of the CollectionItem identified by the given Ref preconditions 1) The record identified by the given identifier exists. postconditions 1) true

Parameters:
ref - The Ref of the CollectionItem
Returns:
The admin data of the CollectionItem identified by id, null if not found
Throws:
RegistryException - If anything goes wrong

readContent

Content readContent(Ref ref)
                    throws RegistryException
Returns the content data of the CollectionItem identified by the given Ref preconditions 1) The record identified by the given identifier exists. postconditions 1) true

Parameters:
ref - The Ref of the CollectionItem
Returns:
The content data of the CollectionItem identified by id, null if not found
Throws:
RegistryException - If anything goes wrong

read

CollectionItem read(Ref ref)
                    throws RegistryException
Returns the CollectionItem identified by the given Ref preconditions 1) The record identified by the given identifier exists. postconditions 1) true

Parameters:
ref - The Ref of the CollectionItem
Returns:
The CollectionItem identified by id, null if not found
Throws:
RegistryException - If anything goes wrong

search

Abstract[] search(Query query)
                  throws RegistryException
Return a list (possibly empty if no matches) of abstracts of registry records, containing its known identifiers and some unique & relevant identifying attributes. preconditions: 1) The query statement is valid. postconditions: 2) true

Parameters:
query - The query to search on
Returns:
An array of Abstracts representing the search results.
Throws:
RegistryException

update

void update(CollectionItem item)
            throws RegistryException
Updates the given CollectionItem in the Collection preconditions: 1) The user is recognized and is allowed to execute this feature 2) The identifier given to the record is valid and already exists. 3) The record contains all the required data elements, in the proper format. postconditions: 1) Record is correctly updated in the Source Node repository. 2) Attributes are correctly indexed.

Parameters:
item - The new version of the CollectionItem
Throws:
RegistryException - if anything goes wrong


Copyright © 2008 OCLC Online Computer Library Center, Inc.. All Rights Reserved.