|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fcrepo.server.storage.lowlevel.akubra.HashPathIdMapper
public class HashPathIdMapper
Provides a hash-based file: mapping for any URI.
The path component of each internal URI is derived from an MD5 hash of the external URI. The filename component is a reversible encoding of the external URI that is safe to use as a filename on modern filesystems.
Patterns:
Example patterns:
a-z A-Z 0-9 = ( ) [ ] -
In addition, . (period) will be escaped as %2E when
it occurs as the last character of the URI.
urn:example1 becomes file:0/8/urn%3Aexample1http://tinyurl.com/cxzzf becomes file:6/2/http%3A%2F%2Ftinyurl.com%2Fcxzzfurn:example1 becomes file:08/86/urn%3Aexample1http://tinyurl.com/cxzzf becomes file:62/ca/http%3A%2F%2Ftinyurl.com%2Fcxzzf
| Constructor Summary | |
|---|---|
HashPathIdMapper(String pattern)
Creates an instance that will use the given pattern. |
|
| Method Summary | |
|---|---|
URI |
getExternalId(URI internalId)
|
URI |
getInternalId(URI externalId)
|
String |
getInternalPrefix(String externalPrefix)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HashPathIdMapper(String pattern)
pathPattern - the pattern to use, possibly null or "".
IllegalArgumentException - if the pattern is invalid.| Method Detail |
|---|
public URI getExternalId(URI internalId)
throws NullPointerException
getExternalId in interface org.akubraproject.map.IdMapperNullPointerException
public URI getInternalId(URI externalId)
throws NullPointerException
getInternalId in interface org.akubraproject.map.IdMapperNullPointerException
public String getInternalPrefix(String externalPrefix)
throws NullPointerException
getInternalPrefix in interface org.akubraproject.map.IdMapperNullPointerException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||