|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectfedora.common.PID
A persistent identifier for Fedora digital objects.
The following describes the syntactic constraints for PIDs in normalized form. The only differences with non-normalized PIDs are that the colon delimiter may be encoded as "%3a" or "%3A", and hex-digits may use lowercase [a-f].
PID: Length : maximum 64 Syntax : namespace-id ":" object-id namespace-id: Syntax : ( [A-Z] / [a-z] / [0-9] / "-" / "." ) 1+ object-id: Syntax : ( [A-Z] / [a-z] / [0-9] / "-" / "." / "~" / "_" / escaped-octet ) 1+ escaped-octet: Syntax : "%" hex-digit hex-digit hex-digit: Syntax : [0-9] / [A-F]-----------------------------------------------------------------------------
License and Copyright: The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/.
Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
The entire file consists of original code. Copyright © 2002-2005 by The Rector and Visitors of the University of Virginia and Cornell University. All rights reserved.
-----------------------------------------------------------------------------
| Field Summary | |
static int |
MAX_LENGTH
The maximum length of a PID is 64. |
| Constructor Summary | |
PID(java.lang.String pidString)
Construct a PID from a string, throwing a MalformedPIDException if it's not well-formed. |
|
| Method Summary | |
static PID |
fromFilename(java.lang.String filenameString)
Construct a PID given a filename of the form produced by toFilename(), throwing a MalformedPIDException if it's not well-formed. |
static PID |
getInstance(java.lang.String pidString)
Alternate constructor that throws an unchecked exception if it's not well-formed. |
static void |
main(java.lang.String[] args)
Command-line interactive tester. |
static java.lang.String |
normalize(java.lang.String pidString)
Return the normalized form of the given pid string, or throw a MalformedPIDException. |
java.lang.String |
toFilename()
Return a string representing this PID that can be safely used as a filename on any OS. |
java.lang.String |
toString()
Return the normalized form of this PID. |
java.lang.String |
toURI()
Return the URI form of this PID. |
static java.lang.String |
toURI(java.lang.String pidString)
Return the URI form of some PID string, assuming it is well-formed. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int MAX_LENGTH
| Constructor Detail |
public PID(java.lang.String pidString)
throws MalformedPIDException
| Method Detail |
public static PID getInstance(java.lang.String pidString)
public static PID fromFilename(java.lang.String filenameString)
throws MalformedPIDException
MalformedPIDException
public static java.lang.String normalize(java.lang.String pidString)
throws MalformedPIDException
MalformedPIDExceptionpublic java.lang.String toString()
public java.lang.String toURI()
public static java.lang.String toURI(java.lang.String pidString)
public java.lang.String toFilename()
public static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exception
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||