org.abstracthorizon.danube.webdav.util
Class SimpleNamespacesProvider

java.lang.Object
  extended by org.abstracthorizon.danube.webdav.util.SimpleNamespacesProvider
All Implemented Interfaces:
NamespacesProvider

public class SimpleNamespacesProvider
extends Object
implements NamespacesProvider

Simple name space provider implementation

Author:
Daniel Sendula

Nested Class Summary
protected static class SimpleNamespacesProvider.NamespaceSlot
          Class that defines namespace
 
Field Summary
protected  SimpleNamespacesProvider.NamespaceSlot[] namespaces
          Array of namespaces
protected  int numberOfNamespaces
          Number of namespaces in the array
 
Constructor Summary
SimpleNamespacesProvider()
           
 
Method Summary
 void addNamespace(String url, String preferredPrefix, XMLParserHandler parserHandler)
          Adds new namespace to the provider
 String getAssignedPrefix(String url)
          Returns assigned prefix for given URL
 String[] getDefinedURLs()
          Returns an array of defined URLS
 XMLParserHandler getParserHandler(String url)
          Returns XMLParserHandler for given URL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

namespaces

protected SimpleNamespacesProvider.NamespaceSlot[] namespaces
Array of namespaces


numberOfNamespaces

protected int numberOfNamespaces
Number of namespaces in the array

Constructor Detail

SimpleNamespacesProvider

public SimpleNamespacesProvider()
Method Detail

getDefinedURLs

public String[] getDefinedURLs()
Returns an array of defined URLS

Specified by:
getDefinedURLs in interface NamespacesProvider
Returns:
an array of defined URLS

getAssignedPrefix

public String getAssignedPrefix(String url)
Returns assigned prefix for given URL

Specified by:
getAssignedPrefix in interface NamespacesProvider
Parameters:
url - URL
Returns:
assigned prefix for given URL

getParserHandler

public XMLParserHandler getParserHandler(String url)
Returns XMLParserHandler for given URL

Specified by:
getParserHandler in interface NamespacesProvider
Parameters:
url - URL
Returns:
XMLParserHandler for given URL

addNamespace

public void addNamespace(String url,
                         String preferredPrefix,
                         XMLParserHandler parserHandler)
Adds new namespace to the provider

Specified by:
addNamespace in interface NamespacesProvider
Parameters:
url - namespace's URL
preferredPrefix - preferred prefix
parserHandler - parser handler


Copyright © 2005-2009 Abstract Horizon. All Rights Reserved.