com.funambol.common.pim.model.model
Class PropertySemantics

java.lang.Object
  extended by com.funambol.common.pim.model.model.PropertySemantics

public class PropertySemantics
extends java.lang.Object

The PropertySemantics class provides the limitations of the properties.

Version:
$Id: PropertySemantics.java,v 1.2 2007-11-28 11:14:05 nichele Exp $

Field Summary
 java.lang.String name
           
 
Constructor Summary
PropertySemantics(java.lang.String name, ValueInterface value, java.util.Hashtable registry)
          The constructor for the semantics of a property.
PropertySemantics(java.lang.String name, ValueInterface value, ParameterSemantics[] parameters, int min, int max, java.util.Hashtable registry)
          The constructor for the semantics of a property.
 
Method Summary
 boolean checkParameter(java.lang.String pn, java.lang.String pv)
          Perform a check if the parameter (name and value) of the property are allowed according to the standard.
 boolean checkValue(java.lang.String v)
          Perform a check for the value of the property if it is according to the standard.
 int getMaxOccurrences()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

public java.lang.String name
Constructor Detail

PropertySemantics

public PropertySemantics(java.lang.String name,
                         ValueInterface value,
                         java.util.Hashtable registry)
The constructor for the semantics of a property.

Parameters:
name - the name of the property (String).
value - the value class of the property (ValueInterface)
registry - The quick lookup to register the property semantics.

PropertySemantics

public PropertySemantics(java.lang.String name,
                         ValueInterface value,
                         ParameterSemantics[] parameters,
                         int min,
                         int max,
                         java.util.Hashtable registry)
The constructor for the semantics of a property. Upon creation the property is also registered in the lookup table.

Parameters:
name - the name of the property (String).
value - the value class of the property (ValueInterface)
parameters - the parameters allowed for the property (ParameterSematics[]).
min - the minimum amount of occurences
max - the maximum amount of occurences
registry - The quick lookup to register the property semantics.
Method Detail

checkValue

public boolean checkValue(java.lang.String v)
Perform a check for the value of the property if it is according to the standard.

Parameters:
v - The String based value.
Returns:
True if the value is allowed according to the specification.

checkParameter

public boolean checkParameter(java.lang.String pn,
                              java.lang.String pv)
Perform a check if the parameter (name and value) of the property are allowed according to the standard.

Parameters:
pn - The name of the parameter.
pv - The String based value of the parameter.
Returns:
True if the parameter is allowed according to the specification.

getMaxOccurrences

public int getMaxOccurrences()


Copyright © 2001-2009 Funambol.