1 /* 2 * Copyright (c) 2006-2007 Creative Sphere Limited. 3 * All rights reserved. This program and the accompanying materials 4 * are made available under the terms of the Eclipse Public License v1.0 5 * which accompanies this distribution, and is available at 6 * http://www.eclipse.org/legal/epl-v10.html 7 * 8 * Contributors: 9 * 10 * Creative Sphere - initial API and implementation 11 * 12 */ 13 package org.abstracthorizon.danube.webdav.util; 14 15 import org.abstracthorizon.danube.webdav.xml.XMLParserHandler; 16 17 /** 18 * An interface that defined namespace provider 19 * 20 * @author Daniel Sendula 21 */ 22 public interface NamespacesProvider { 23 24 /** 25 * Returns an array of defined URLS 26 * @return an array of defined URLS 27 */ 28 String[] getDefinedURLs(); 29 30 /** 31 * Returns assigned prefix for given URL 32 * @param url URL 33 * @return assigned prefix for given URL 34 */ 35 String getAssignedPrefix(String url); 36 37 /** 38 * Returns {@link XMLParserHandler} for given URL 39 * @param url URL 40 * @return {@link XMLParserHandler} for given URL 41 */ 42 XMLParserHandler getParserHandler(String url); 43 44 /** 45 * Adds new namespace to the provider 46 * @param url namespace's URL 47 * @param preferredPrefix preferred prefix 48 * @param parserHandler parser handler 49 */ 50 void addNamespace(String url, String preferredPrefix, XMLParserHandler parserHandler); 51 52 }