org.apache.cocoon.ant
Class UriType

java.lang.Object
  extended byorg.apache.cocoon.ant.UriType

public class UriType
extends Object

Encapsulate URI arithmetic. A simple class for encapsultating URI computations, avoiding to use extensive String operation spread over all classes.

Version:
CVS $Id: UriType.java 30941 2004-07-29 19:56:58Z vgritsenko $
Author:
huber@apache.org

Constructor Summary
UriType(String uri)
          Constructor for the UriType object
UriType(UriType parent, String uri)
          Constructor for the UriType object
 
Method Summary
 void addLink(UriType uriType)
          Adds a feature to the Link attribute of the UriType object
 boolean equals(Object o)
          Compute equality of Uri objects.
 String getContentType()
          Gets the contentType attribute of the UriType object
 String getDeparameterizedUri()
          Gets the deparameterizedURI attribute of the UriType object
 File getDestFile()
          Gets the destFile attribute of the UriType object
 String getExtension()
          Gets the extension attribute of the UriType object
 String getFilename()
          Gets the filename attribute of the UriType object
 Collection getLinks()
          Gets the links attribute of the UriType object
 String getMangledUri()
          Gets the mangledURI attribute of the UriType object
 String getMergedParameterizedUri(Map additionalParameters)
          Gets the mergedParameterizedURI attribute of the UriType object
 String getOriginalParameterizedUri()
          Gets the originalParameterizedURI attribute of the UriType object
 String getParameterizedUri(boolean addOriginalParameters, boolean addAdditionalParameters, Map additionalParameters)
          Gets the parameterizedURI attribute of the UriType object
 Map getParameters()
          Gets the parameters attribute of the UriType object
 String getPath()
          Gets the path attribute of the UriType object
 String getSUri()
          Gets the sURI attribute of the UriType object
 String getUri()
          Constructor for the getURI object
 int hashCode()
          Compute hash code of this object
protected  void init()
          Calculate all member values depending on the uri member value
protected  String mangledUri(String uri)
          Mangle a URI.
 void setContentType(String contentType)
          Sets the contentType attribute of the UriType object
 void setDestFile(File destFile)
          Sets the destFile attribute of the UriType object
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UriType

public UriType(String uri)
Constructor for the UriType object

Parameters:
uri - String representation of a Uri

UriType

public UriType(UriType parent,
               String uri)
Constructor for the UriType object

Parameters:
parent - Parent context of a Uri
uri - String representation of a Uri
Method Detail

setDestFile

public void setDestFile(File destFile)
Sets the destFile attribute of the UriType object

Parameters:
destFile - The new destFile value

setContentType

public void setContentType(String contentType)
Sets the contentType attribute of the UriType object

Parameters:
contentType - The new contentType value

getDestFile

public File getDestFile()
Gets the destFile attribute of the UriType object

Returns:
The destFile value

getContentType

public String getContentType()
Gets the contentType attribute of the UriType object

Returns:
The contentType value

getLinks

public Collection getLinks()
Gets the links attribute of the UriType object

Returns:
The links value

getUri

public String getUri()
Constructor for the getURI object

Returns:
The uRI value

getParameters

public Map getParameters()
Gets the parameters attribute of the UriType object

Returns:
The parameters value

getDeparameterizedUri

public String getDeparameterizedUri()
Gets the deparameterizedURI attribute of the UriType object

Returns:
The deparameterizedURI value

getSUri

public String getSUri()
Gets the sURI attribute of the UriType object

Returns:
The sURI value

getMangledUri

public String getMangledUri()
Gets the mangledURI attribute of the UriType object

Returns:
The mangledURI value

getPath

public String getPath()
Gets the path attribute of the UriType object

Returns:
The path value

getFilename

public String getFilename()
Gets the filename attribute of the UriType object

Returns:
The filename value

getExtension

public String getExtension()
Gets the extension attribute of the UriType object

Returns:
The extension value

getParameterizedUri

public String getParameterizedUri(boolean addOriginalParameters,
                                  boolean addAdditionalParameters,
                                  Map additionalParameters)
Gets the parameterizedURI attribute of the UriType object

Parameters:
addOriginalParameters - Description of Parameter
addAdditionalParameters - Description of Parameter
additionalParameters - Description of Parameter
Returns:
The parameterizedURI value

getMergedParameterizedUri

public String getMergedParameterizedUri(Map additionalParameters)
Gets the mergedParameterizedURI attribute of the UriType object

Parameters:
additionalParameters - Description of Parameter
Returns:
The mergedParameterizedURI value

getOriginalParameterizedUri

public String getOriginalParameterizedUri()
Gets the originalParameterizedURI attribute of the UriType object

Returns:
The originalParameterizedURI value

addLink

public void addLink(UriType uriType)
Adds a feature to the Link attribute of the UriType object

Parameters:
uriType - The feature to be added to the Link attribute

equals

public boolean equals(Object o)
Compute equality of Uri objects. Two uri objects are equal iff non-null, and uri member is non null, and uri member are equal.

Parameters:
o - Checked against this for equality
Returns:
boolean true if URIType objects are equal else false

hashCode

public int hashCode()
Compute hash code of this object

Returns:
HashCode of uri member

mangledUri

protected String mangledUri(String uri)
Mangle a URI.

Parameters:
uri - the Uri value
Returns:
mangled Uri

init

protected void init()
Calculate all member values depending on the uri member value



Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.