Class FileURIId
java.lang.Object
net.okapia.osid.primordium.id.spi.AbstractId
net.okapia.osid.primordium.id.FileURIId
- All Implemented Interfaces:
Serializable, Id, OsidPrimitive, Id, OsidPrimitive
Defines an
Id using a file based URI scheme for local
identifiers.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class AbstractId
equals, getAuthority, getIdentifier, getIdentifierNamespace, hashCode, toStringModifier and TypeMethodDescriptionfinal booleanDetermines if the givenIdis equal to this one.final StringGets the authority of thisId.final StringGets the identifier of thisId.final StringGets the namespace of the identifier.final inthashCode()Returns a hash code value for thisIdbased on the authority, namespace and identifier.toString()Returns a string representation of this Id.
-
Constructor Details
-
FileURIId
Creates a newFileURIIdfor localhost from an absolute path name.- Parameters:
path- the path- Throws:
NullArgumentException- null argument provided
-
-
Method Details
-
valueOf
Returns anIdfrom an absolute path name.- Parameters:
path- the absolute path to include as the identifier- Returns:
- an
Idwith the string components - Throws:
NullArgumentException-pathisnull- See Also:
-
valueOf
Returns anIdfrom a file based URI.- Parameters:
uri- the URI- Returns:
- an
Idwith the string components - Throws:
InvalidArgumentException- cannot parse file uri because uri protocol is notfileor host is notlocalhostNullArgumentException-uriisnull- See Also:
-
id
Returns anIdfrom an absolute path name.- Parameters:
path- the absolute path to include as the identifier- Returns:
- an
Idwith the string components - Throws:
NullArgumentException-pathisnull- See Also:
-
id
Returns anIdfrom a file based URI.- Parameters:
uri- the URI- Returns:
- an
Idwith the string components - Throws:
InvalidArgumentException- cannot parse file uri because uri protocol is notfileor host is notlocalhostNullArgumentException-uriisnull- See Also:
-
formatLabel
Converts an OSID Id into a URI.- Specified by:
formatLabelin classAbstractId- Returns:
- formatted string
-