org.inria.ns.reflex.modules.io.xmldb
Class XMLDBFileName

java.lang.Object
  extended by org.apache.commons.vfs.provider.AbstractFileName
      extended by org.apache.commons.vfs.provider.GenericFileName
          extended by org.inria.ns.reflex.modules.io.xmldb.XMLDBFileName
All Implemented Interfaces:
Comparable, FileName

public class XMLDBFileName
extends GenericFileName

An XMLDBFileName is the file name of an URL which scheme is the name of the XML:DB provider and wrapped in an URI which scheme is "xmldb" : xmldb:provider://host:port/path.

Author:
Philippe Poulard

Field Summary
static String XMLDB_SCHEME
          The XML:DB scheme "xmldb".
 
Fields inherited from interface org.apache.commons.vfs.FileName
ROOT_PATH, SEPARATOR, SEPARATOR_CHAR
 
Method Summary
 FileName createName(String absPath, FileType type)
          Create a new XML:DB file name from a path.
 String getProvider()
          Return the XML:DB provider.
 String getScheme()
          Return the XML:DB scheme.
static XMLDBFileName parseURI(String uri, int defaultPort)
          Return the file name from an XML:DB URI.
 
Methods inherited from class org.apache.commons.vfs.provider.GenericFileName
getDefaultPort, getHostName, getPassword, getPort, getUserName
 
Methods inherited from class org.apache.commons.vfs.provider.AbstractFileName
checkName, compareTo, equals, getBaseName, getDepth, getExtension, getFriendlyURI, getParent, getPath, getPathDecoded, getRelativeName, getRoot, getRootURI, getType, getURI, hashCode, isAncestor, isDescendent, isDescendent, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

XMLDB_SCHEME

public static final String XMLDB_SCHEME
The XML:DB scheme "xmldb".

See Also:
Constant Field Values
Method Detail

parseURI

public static XMLDBFileName parseURI(String uri,
                                     int defaultPort)
                              throws FileSystemException
Return the file name from an XML:DB URI.

Parameters:
uri - The URI "xmldb:provider://host:port/path".
Returns:
The XMLDBFileName of this URI.
Throws:
FileSystemException - If the URI can't be parsed.

createName

public FileName createName(String absPath,
                           FileType type)
Create a new XML:DB file name from a path.

Overrides:
createName in class GenericFileName
Parameters:
absPath - The absolute path "/path/to/file".
Returns:
The file name that endorsed the same components as this file name, except the path.
See Also:
XMLDBFileName, org.apache.commons.vfs.provider.AbstractFileName#createName(java.lang.String)

getProvider

public String getProvider()
Return the XML:DB provider.

Returns:
The XML:DB provider.

getScheme

public String getScheme()
Return the XML:DB scheme.

Specified by:
getScheme in interface FileName
Overrides:
getScheme in class AbstractFileName
Returns:
"xmldb"