COSMOS ${releaseVersion} resource-modeling Project
Internal API Specification

org.eclipse.cosmos.rm.validation.internal.reference
Class URIReference

java.lang.Object
  extended by org.eclipse.cosmos.rm.validation.internal.reference.URIReference
All Implemented Interfaces:
IReferenceExpression
Direct Known Subclasses:
SMLDocumentReference

public class URIReference
extends java.lang.Object
implements IReferenceExpression

Represents an URI as specified by the grammer: http://www.ietf.org/rfc/rfc3986.txt


Constructor Summary
URIReference(java.lang.String reference)
          Constructor.
 
Method Summary
protected  java.net.URI getBase()
           
 java.lang.String getDocumentReference()
          The document reference is basically the ++ of the URI.
 java.lang.String getFragment()
          Retuns the query string of the URI
protected  java.net.URI getReference()
           
 boolean isTransformed()
          Returns true if this reference has already been transformed; false otherwise.
 org.w3c.dom.Node retrieveDocumentDOM()
          Retrieves the document node and returns the result
protected  void setBase(java.net.URI base)
           
protected  void setReference(java.net.URI reference)
           
 void transform()
          The transformation will be based on [RFC 3986]: http://www.ietf.org/rfc/rfc3986.txt.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URIReference

public URIReference(java.lang.String reference)
             throws java.net.URISyntaxException
Constructor. The reference must be a valid XPointer expression.

Parameters:
reference - The string representing the XPointer expression
Throws:
java.net.URISyntaxException - If the URI has an incorrect syntax
Method Detail

getDocumentReference

public java.lang.String getDocumentReference()
                                      throws java.net.URISyntaxException
The document reference is basically the ++ of the URI.

Specified by:
getDocumentReference in interface IReferenceExpression
Returns:
the documentAlias
Throws:
java.net.URISyntaxException

getFragment

public java.lang.String getFragment()
                             throws java.net.URISyntaxException
Retuns the query string of the URI

Returns:
The query of the reference
Throws:
java.net.URISyntaxException

isTransformed

public boolean isTransformed()
Description copied from interface: IReferenceExpression
Returns true if this reference has already been transformed; false otherwise.

Specified by:
isTransformed in interface IReferenceExpression
Returns:
true if already transformed; false otherwise.
See Also:
IReferenceExpression.isTransformed()

transform

public void transform()
               throws java.net.URISyntaxException
The transformation will be based on [RFC 3986]: http://www.ietf.org/rfc/rfc3986.txt. See section 5 for more details.

Specified by:
transform in interface IReferenceExpression
Throws:
java.net.URISyntaxException - If the base URI is invalid
See Also:
IReferenceExpression.transform()

retrieveDocumentDOM

public org.w3c.dom.Node retrieveDocumentDOM()
                                     throws java.net.URISyntaxException,
                                            SMLValidatorUtil.RemoteRetrievalException
Retrieves the document node and returns the result

Returns:
The document node
Throws:
java.net.URISyntaxException
SMLValidatorUtil.RemoteRetrievalException

getReference

protected java.net.URI getReference()
Returns:
the reference

setReference

protected void setReference(java.net.URI reference)
Parameters:
reference - the reference to set

getBase

protected java.net.URI getBase()
Returns:
the base

setBase

protected void setBase(java.net.URI base)
Parameters:
base - the base to set

COSMOS ${releaseVersion} resource-modeling Project
Internal API Specification