Public Member Functions | Static Public Attributes

org.exolab.castor.xml.util.DefaultNaming Class Reference

Inheritance diagram for org.exolab.castor.xml.util.DefaultNaming:
org.exolab.castor.xml.XMLNaming

List of all members.

Public Member Functions

 DefaultNaming ()
void setStyle (short style)
String createXMLName (Class c)
String toXMLName (String name)

Static Public Attributes

static final short LOWER_CASE_STYLE = 0
static final short MIXED_CASE_STYLE = 1

Detailed Description

The default implementation of org.exolab.castor.xml.Naming

Author:
Keith Visco
Version:
Revision:
1.1.1.1
Date:
2003/03/03 07:09:47

Constructor & Destructor Documentation

org.exolab.castor.xml.util.DefaultNaming.DefaultNaming (  ) 

Creates a new DefaultNaming


Member Function Documentation

String org.exolab.castor.xml.util.DefaultNaming.createXMLName ( Class  c  )  [virtual]

Creates the XML Name for the given class. It would be nearly impossible for this method to please every one, so I picked common "de-facto" XML naming conventions. This can be overridden by either extending org.exolab.castor.xml.Naming and implementing the proper methods, or by ClassDescriptors for your classes.

Parameters:
name the String to convert to an XML name
Returns:
the xml name representation of the given String
examples:
"Blob" becomes "blob" and "DataSource" becomes "data-source".
Parameters:
c the Class to create the XML Name for
Returns:
the xml name for the given class
See also:
org.exolab.castor.xml.XMLNaming

Implements org.exolab.castor.xml.XMLNaming.

References org.exolab.castor.xml.util.DefaultNaming.toXMLName().

void org.exolab.castor.xml.util.DefaultNaming.setStyle ( short  style  ) 
String org.exolab.castor.xml.util.DefaultNaming.toXMLName ( String  name  )  [virtual]

Converts the given name to an XML name. It would be nearly impossible for this method to please every one, so I picked common "de-facto" XML naming conventions. This can be overridden by either extending org.exolab.castor.xml.Naming and implementing the proper methods, or by ClassDescriptors for your classes.

Parameters:
name the String to convert to an XML name
Returns:
the xml name representation of the given String
examples:
"Blob" becomes "blob" and "DataSource" becomes "data-source". @ see org.exolab.castor.xml.Naming

Implements org.exolab.castor.xml.XMLNaming.

References org.exolab.castor.xml.util.DefaultNaming.LOWER_CASE_STYLE.

Referenced by org.exolab.castor.xml.util.DefaultNaming.createXMLName().


Member Data Documentation

The lower case style with hyphens to separate words. Default
examples:
"Blob" becomes "blob" and "DataSource" becomes "data-source".

Referenced by org.exolab.castor.xml.util.DefaultNaming.setStyle(), and org.exolab.castor.xml.util.DefaultNaming.toXMLName().

The mixed case style with uppercase characters to separate words.
examples:
"Blob" becomes "blob" and "DataSource" becomes "dataSource".

Referenced by org.exolab.castor.xml.util.DefaultNaming.setStyle().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties