org.moremotion.evaluator
Class Conventions

java.lang.Object
  extended by org.moremotion.evaluator.Conventions

public class Conventions
extends java.lang.Object

This class provides static methods for checking the validity of the given identities or to convert the given strings to valid identifiers.

Version:
$Id: Conventions.java 51 2008-03-10 11:46:54Z erkan $

Constructor Summary
Conventions()
           
 
Method Summary
static java.lang.String generateValidId(java.lang.String str)
          Generates a valid identity string, which can be used as a XML tag, from the given string.
static boolean isValidEntityIdentifier(java.lang.String id)
          Returns true is the given string is a valid identifier that can be used as an XML tag name.
static boolean isValidFieldName(java.lang.String name)
          Returns true if the given string is a valid field name.
static java.lang.String safeXmlNodeName(java.lang.String str)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Conventions

public Conventions()
Method Detail

isValidEntityIdentifier

public static boolean isValidEntityIdentifier(java.lang.String id)
Returns true is the given string is a valid identifier that can be used as an XML tag name.


isValidFieldName

public static boolean isValidFieldName(java.lang.String name)
Returns true if the given string is a valid field name. In a valid field name:


generateValidId

public static java.lang.String generateValidId(java.lang.String str)
Generates a valid identity string, which can be used as a XML tag, from the given string. The invalid characters in the given string are replaced with '_' character.


safeXmlNodeName

public static java.lang.String safeXmlNodeName(java.lang.String str)


Copyright © 2002-2008 MOR YAZILIM. All Rights Reserved.