|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.contentmanager.storageclient.model.protocol.URIs
public class URIs
Utility methods for content URI creation and manipulation.
| Field Summary | |
|---|---|
static String |
PROTOCOL
Scheme of cms URIs. |
| Constructor Summary | |
|---|---|
URIs()
|
|
| Method Summary | |
|---|---|
static String |
collectionID(URI uri)
Returns the collection identifier in a sm URI. |
static URLConnection |
connection(URI uri,
String scope)
Deprecated. since 2.3.1. Use URLConnection normally in current scope. |
static String |
documentID(URI uri)
Returns the document identifier in a content URI. |
static URI |
documentURI(URI uri)
Returns a content URI for the document of the node identified by another content URI. |
static URI |
make(String collectionID,
String... identifiers)
Constructs a content URI from a collection identifiers and one or more node identifiers. |
static String |
nodeID(URI uri)
Returns the identifier of the node identified by a content URI. |
static String[] |
nodeIDs(URI uri)
Returns the identifiers in a content URI. |
static URI |
parentURI(URI uri)
Returns a content URI for the parent of the node identified by another content URI. |
static void |
validate(URI uri)
Indicates whether a URI is a valid content URI. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String PROTOCOL
| Constructor Detail |
|---|
public URIs()
| Method Detail |
|---|
public static void validate(URI uri)
throws URISyntaxException
uri - the URI.
URISyntaxException - if the URI fails validation.
public static URI make(String collectionID,
String... identifiers)
throws IllegalArgumentException
collectionID - the collection identifier.identifiers - the node identifiers.
IllegalArgumentException - if the input is null or empty.
public static String collectionID(URI uri)
throws URISyntaxException
sm URI.
uri - the URI.
URISyntaxException - if the URI is not a content URI.
public static String documentID(URI uri)
throws URISyntaxException
uri - the URI.
URISyntaxException - if the URI is not a content URI.
public static String nodeID(URI uri)
throws URISyntaxException
uri - the URI.
URISyntaxException - if the URI is not a content URI.
public static String[] nodeIDs(URI uri)
throws URISyntaxException
uri - the URI.
URISyntaxException - if the URI is not a content URI.
public static URI parentURI(URI uri)
throws URISyntaxException
uri - the input URI.
URISyntaxException - if the input URI is not a content URL.
public static URI documentURI(URI uri)
throws URISyntaxException
uri - the input URI.
URISyntaxException - if the input URI is not a content URI.
public static URLConnection connection(URI uri,
String scope)
throws IOException,
URISyntaxException
URLConnection normally in current scope.
uri - a content URI.scope - the scope.
IOException - if the connections could not be established.
URISyntaxException - if the URI is not a content URI or if the protocol handler for the smp scheme is not active.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||