public abstract class IdentifierProvider<V extends Identifier> extends Object implements javax.inject.Provider<V>
Identifiable
objects.
Override for specific semantics.
Created by Jeff Gaynor
on 4/3/12 at 1:54 PM
Modifier and Type | Field and Description |
---|---|
protected String |
component |
static String |
SCHEME |
static String |
SCHEME_SPECIFIC_PART |
protected String |
schemeSpecificPart |
protected String |
uriScheme |
protected boolean |
useTimestamps |
Modifier | Constructor and Description |
---|---|
protected |
IdentifierProvider(String component) |
protected |
IdentifierProvider(String component,
boolean useTimestamps) |
protected |
IdentifierProvider(String scheme,
String schemeSpecificPart,
String component,
boolean useTimestamps)
The main constructor.
|
protected |
IdentifierProvider(URI uri,
String component,
boolean useTimestamps) |
Modifier and Type | Method and Description |
---|---|
V |
get() |
protected String |
getCaput()
Creates the caput (="head") from the uri scheme and scheme specific part.
|
static void |
setScheme(String SCHEME) |
static void |
setSchemeSpecificPart(String SCHEME_SPECIFIC_PART) |
protected URI |
uniqueIdentifier()
Creates identifiers of the form
caput + head + hexString + t with forward slashes added between components as needed. E.g. |
public static String SCHEME
public static String SCHEME_SPECIFIC_PART
protected String uriScheme
protected String schemeSpecificPart
protected boolean useTimestamps
protected String component
protected IdentifierProvider(String component)
protected IdentifierProvider(String component, boolean useTimestamps)
protected IdentifierProvider(String scheme, String schemeSpecificPart, String component, boolean useTimestamps)
scheme
- schemeSpecificPart
- component
- useTimestamps
- public static void setScheme(String SCHEME)
public static void setSchemeSpecificPart(String SCHEME_SPECIFIC_PART)
protected String getCaput()
Note that this does allow for empty scheme specific parts vs. null ones. In the former, it is assumed the user is actively suppressing this component, where as in the null case the default is used.
protected URI uniqueIdentifier()
public V get()
get
in interface javax.inject.Provider<V extends Identifier>
Copyright © 2019. All Rights Reserved.