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