org.exoplatform.services.jcr.ext.resource
Class UnifiedNodeReference

java.lang.Object
  extended by org.exoplatform.services.jcr.ext.resource.UnifiedNodeReference

public class UnifiedNodeReference
extends java.lang.Object

Created by The eXo Platform SAS .

Version:
$Id: UnifiedNodeReference.java 35186 2009-08-07 14:23:43Z pnedonosko $
Author:
Gennady Azarenkov

Field Summary
static java.lang.String JCR_SCHEME
          Scheme name.
 
Constructor Summary
UnifiedNodeReference(java.lang.String spec)
           
UnifiedNodeReference(java.lang.String repository, java.lang.String workspace, Identifier identifier)
           
UnifiedNodeReference(java.lang.String repository, java.lang.String workspace, java.lang.String path)
           
UnifiedNodeReference(java.net.URI uri)
           
UnifiedNodeReference(java.net.URI uri, java.lang.String defaultRepository, java.lang.String defaultWorkspace)
           
UnifiedNodeReference(java.net.URL url)
           
 
Method Summary
 Identifier getIdentitifier()
           
 java.lang.String getPath()
           
 java.lang.String getRepository()
           
 java.net.URI getURI()
           
 java.net.URL getURL()
           
static java.net.URLStreamHandler getURLStreamHandler()
           
 java.lang.String getWorkspace()
           
 boolean isIdentitifier()
           
 boolean isPath()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JCR_SCHEME

public static final java.lang.String JCR_SCHEME
Scheme name.

See Also:
Constant Field Values
Constructor Detail

UnifiedNodeReference

public UnifiedNodeReference(java.lang.String spec)
                     throws java.net.URISyntaxException,
                            java.net.MalformedURLException
Parameters:
spec - string for parsing as URL
Throws:
java.net.URISyntaxException - when string could not be parsed as URI reference
java.net.MalformedURLException - if malformed URL occurs

UnifiedNodeReference

public UnifiedNodeReference(java.net.URL url)
                     throws java.net.URISyntaxException
Parameters:
url - URL
Throws:
java.net.URISyntaxException - if URL is not formated well to convert to URI

UnifiedNodeReference

public UnifiedNodeReference(java.net.URI uri)
                     throws java.net.URISyntaxException
Parameters:
uri - URI
Throws:
java.net.URISyntaxException - if URI does not contains required parts, e.g. scheme, path, fragment, etc

UnifiedNodeReference

public UnifiedNodeReference(java.net.URI uri,
                            java.lang.String defaultRepository,
                            java.lang.String defaultWorkspace)
                     throws java.net.URISyntaxException
Parameters:
uri - URI
defaultRepository - use this repository if it could not be parsed from URI
defaultWorkspace - use this workspace if it could not be parsed from URI
Throws:
java.net.URISyntaxException - if URI does not contains required parts, e.g. scheme, path, fragment, etc

UnifiedNodeReference

public UnifiedNodeReference(java.lang.String repository,
                            java.lang.String workspace,
                            Identifier identifier)
Parameters:
repository - repository name
workspace - workspace name
identifier - node identifier

UnifiedNodeReference

public UnifiedNodeReference(java.lang.String repository,
                            java.lang.String workspace,
                            java.lang.String path)
Parameters:
repository - repository name
workspace - workspace name
identifier - node path
Method Detail

getRepository

public java.lang.String getRepository()
Returns:
the repository name.

getWorkspace

public java.lang.String getWorkspace()
Returns:
the workspace name.

getIdentitifier

public Identifier getIdentitifier()
Returns:
the node identifier.

isIdentitifier

public boolean isIdentitifier()
Returns:
true if UUID used as node identifier.

getPath

public java.lang.String getPath()
Returns:
the node path.

isPath

public boolean isPath()
Returns:
true if full path used as node identifier.

getURI

public java.net.URI getURI()
                    throws java.net.URISyntaxException
Returns:
the URI of node.
Throws:
java.net.URISyntaxException

getURL

public java.net.URL getURL()
                    throws java.net.MalformedURLException
Returns:
the URL of node.
Throws:
java.net.MalformedURLException

getURLStreamHandler

public static java.net.URLStreamHandler getURLStreamHandler()
Returns:
the handler for protocol jcr.
See Also:
java.net.URLStreamHandler.


Copyright © 2012 eXo Platform SAS. All Rights Reserved.