1 /* 2 * Copyright 2007 Joachim Grueneis 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 * in compliance with the License. You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software distributed under the License 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 * or implied. See the License for the specific language governing permissions and limitations under 12 * the License. 13 */ 14 package org.castor.xml; 15 16 /** 17 * XMLNaming contains all methods required by Castor to build valid XML names. It was originally an 18 * abstract class by <a href="mailto:kvisco@intalio.com">Keith Visco</a> for which I create this 19 * interface. 20 * 21 * @author Joachim Grueneis, jgrueneis_at_codehaus_dot_org 22 * @version $Id$ 23 */ 24 public interface XMLNaming { 25 26 /** 27 * Creates the XML Name for the given class The actual behavior of this method is determined by 28 * the implementation. The only restriction is that the name returned must be a valid xml name. 29 * 30 * @param c the Class to create the XML Name for 31 * @return the XML name based on the given class 32 * @deprecated because this method removes the package part which is JavaNaming responsibility 33 **/ 34 public abstract String createXMLName(Class<?> c); 35 36 /** 37 * Converts the given String to an XML name. The actual behavior of this method is determined by 38 * the implementation. The only restriction is that the name returned must be a valid xml name. 39 * 40 * @return an XML name based on the given String 41 **/ 42 public abstract String toXMLName(String name); 43 44 }