| java.lang.Object es.udc.mypersonalizer.kernel.model.properties.PropertyNaming
PropertyNaming | final public class PropertyNaming (Code) | | This utility class provides methods for common operations on property and
meta-property names. In both cases, a name is considered to be composed of
"components" separated by the character ".".
author: Fernando Bellas since: 1.0 |
getLastComponent | public static String getLastComponent(String name)(Code) | | Gets the last component of a name . If the name is simple,
it returns the same name.
Parameters: name - a name the last component of the name |
isSimple | public static boolean isSimple(String name)(Code) | | Checks if a given name is simple, that is, if contains ".".
Parameters: name - a name true if name is simple;false otherwise |
removeLastComponent | public static String removeLastComponent(String name)(Code) | | Removes the last component of a name . If the name is
simple, it returns "".
Parameters: name - a name the name without the last componet |
toMetaPropertyName | public static String toMetaPropertyName(String propertyName)(Code) | | Returns the name of the meta-property corresponding to the property
specified by a property name. This property name must be relative to
the root property, that is, it must start with an index. So, for
example, if the property name is "3.a.4.b", it returns "a.b". The
returned meta-property name is relative to the root meta-property. The
implementation assumes the meta-property name passed as a parameter
is correct. If not, the method will not fail, but the returned string
will not be a correct meta-property name.
Parameters: propertyName - a property name relative to the root property the name of the meta-property corresponding to the propertynamed by the property name passed as a parameter |
|
|