Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.archive.uid
Interface Generator

All Known Implementing Classes:
  GeneratorFactory, UUIDGenerator

    public interface Generator

A `record-id` generator. `GeneratorFactory` assumes implementations have a no-arg Constructor.

Version:
  $Revision: 4495 $ $Date: 2006-08-15 00:25:03 +0000 (Tue, 15 Aug 2006) $
Author:
  stack
See Also:
  `GeneratorFactory`

Method Summary
`java.net.URI` | `getQualifiedRecordID(java.util.Map<java.lang.String,java.lang.String> qualifiers)`
`java.net.URI` | `getQualifiedRecordID(java.lang.String key, java.lang.String value)`
`java.net.URI` | `getRecordID()`
`java.net.URI` | `qualifyRecordID(java.net.URI recordId, java.util.Map<java.lang.String,java.lang.String> qualifiers)` Append (or if already present, update) qualifiers to passed `recordId`.

Method Detail

### getRecordID

    java.net.URI getRecordID()
                             throws java.net.URISyntaxException

  Returns:
    A URI that can serve as a record-id.
  Throws:
    `java.net.URISyntaxException`

### getQualifiedRecordID

    java.net.URI getQualifiedRecordID(java.util.Map<java.lang.String,java.lang.String> qualifiers)
                                      throws java.net.URISyntaxException

  Parameters:
    `qualifiers` - Qualifiers to add.
  Returns:
    A URI qualified with passed `qualifiers` that can serve as a record-id, or, a new, unique record-id without qualifiers (if qualifiers not easily implemented using passed URI scheme).
  Throws:
    `java.net.URISyntaxException`

### getQualifiedRecordID

    java.net.URI getQualifiedRecordID(java.lang.String key,
                                      java.lang.String value)
                                      throws java.net.URISyntaxException

  Parameters:
    `key` - Name of qualifier
    `value` - Value of qualifier
  Returns:
    A URI qualified with passed `qualifiers` that can serve as a record-id, or, a new, unique record-id without qualifiers (if qualifiers not easily implemented using passed URI scheme).
  Throws:
    `java.net.URISyntaxException`

### qualifyRecordID

    java.net.URI qualifyRecordID(java.net.URI recordId,
                                 java.util.Map<java.lang.String,java.lang.String> qualifiers)
                                 throws java.net.URISyntaxException

  Append (or if already present, update) qualifiers to passed `recordId`. Use with caution. Guard against turning up a result that already exists. Use when writing a group of records inside a single transaction. How qualifiers are appended/updated varies with URI scheme. Its allowed that an invocation of this method does nought but call `getRecordID()`, returning a new URI unrelated to the passed recordId and passed qualifier.

  Parameters:
    `recordId` - URI to append qualifier to.
    `qualifiers` - Map of qualifier values keyed by qualifier name.
  Returns:
    New URI based off passed `uri` and passed qualifier.
  Throws:
    `java.net.URISyntaxException` - if probably constructing URI OR if the resultant UUID does not differ from the one passed.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2008 Internet Archive. All Rights Reserved.