org.ocd.docservice
Class XMLDocumentService

java.lang.Object
  |
  +--org.ocd.docservice.XMLDocumentService
All Implemented Interfaces:
IXMLDocumentService

public class XMLDocumentService
extends java.lang.Object
implements IXMLDocumentService

Since:
$Date: 2002/06/12 03:58:04 $
Version:
$Revision: 1.7 $
Author:
$Author: drichan $, ocd_dino - ocd_dino@users.sourceforge.net (initial author)

Fields inherited from interface org.ocd.docservice.IXMLDocumentService
PATH_SEPERATOR, PROTOCOL
 
Method Summary
static IXMLDocumentService getDefaultService()
          Get the Default Document Service
 org.w3c.dom.Document getDocument(java.lang.String pPath)
          Get a Document from the Specified Path
 java.net.URLStreamHandler getHandler()
          Get the URLStreamHandler for the DocSerice
 java.io.InputStream getInputStream(java.lang.String pPath)
          Gets an InputStream to a document
 java.lang.String[] listDocuments(java.lang.String pPath)
          List Documents in an Path
 java.lang.String[] listSubDirectories(java.lang.String pPath)
          List Sub Directories in a Path
 void removeDocument(java.lang.String pPath)
          Removes a Document
 void storeDocument(java.lang.String pPath, org.w3c.dom.Document pDocument)
          Stores a Document
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDefaultService

public static IXMLDocumentService getDefaultService()
Get the Default Document Service

listDocuments

public java.lang.String[] listDocuments(java.lang.String pPath)
                                 throws java.io.IOException
List Documents in an Path
Specified by:
listDocuments in interface IXMLDocumentService
Parameters:
pPath - parent path you want to retrieve document names from
Returns:
Array of Strings

listSubDirectories

public java.lang.String[] listSubDirectories(java.lang.String pPath)
                                      throws java.io.IOException
List Sub Directories in a Path
Specified by:
listSubDirectories in interface IXMLDocumentService
Parameters:
pPath - parent path you want to retrieve sub dirs names from
Returns:
Array of Strings

removeDocument

public void removeDocument(java.lang.String pPath)
                    throws java.io.IOException
Removes a Document
Specified by:
removeDocument in interface IXMLDocumentService
Parameters:
pPath - file name of document you want to store

getDocument

public org.w3c.dom.Document getDocument(java.lang.String pPath)
                                 throws XMLDocumentNotFound,
                                        java.io.IOException
Get a Document from the Specified Path
Specified by:
getDocument in interface IXMLDocumentService
Following copied from interface: org.ocd.docservice.IXMLDocumentService
Parameters:
pPath - file name of document you want to get
Returns:
DOM Document

storeDocument

public void storeDocument(java.lang.String pPath,
                          org.w3c.dom.Document pDocument)
                   throws java.io.IOException
Description copied from interface: IXMLDocumentService
Stores a Document
Specified by:
storeDocument in interface IXMLDocumentService
Following copied from interface: org.ocd.docservice.IXMLDocumentService
Parameters:
pPath - file name of document you want to store
pDocument - DOM Document object for the Document

getInputStream

public java.io.InputStream getInputStream(java.lang.String pPath)
                                   throws java.io.IOException
Gets an InputStream to a document
Specified by:
getInputStream in interface IXMLDocumentService
Parameters:
pPath - file name of document you want an inputstream to
Returns:
InputStream

getHandler

public java.net.URLStreamHandler getHandler()
Get the URLStreamHandler for the DocSerice
Specified by:
getHandler in interface IXMLDocumentService
Returns:
handler for this Service