sk.uniba.euromath.document.schema
Class AttributeRule

java.lang.Object
  extended by sk.uniba.euromath.document.schema.BaseRule
      extended by sk.uniba.euromath.document.schema.AttributeRule

public class AttributeRule
extends BaseRule

Wraps the IAttributeRuleP instance.

Author:
Martin Vysny

Method Summary
 boolean acceptsSomething()
          Checks, whether this value rule accepts any non-empty string.
 boolean acceptsValue(String value)
          Checks whether this textual rule can contain given value.
 String getDatatypeName()
          Returns human-readable name for the datatype, that is represented by this instance.
 String getErrorMessage(String value)
          Compose and return an error message, why given value was not accepted.
 
Methods inherited from class sk.uniba.euromath.document.schema.BaseRule
valueOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

acceptsValue

public boolean acceptsValue(String value)
Checks whether this textual rule can contain given value.

Parameters:
value - value to check.
Returns:
true if the value is valid.

getDatatypeName

public String getDatatypeName()
Returns human-readable name for the datatype, that is represented by this instance.

Returns:
Short displayable name (and description, if necessary) of datatype.

acceptsSomething

public boolean acceptsSomething()
Checks, whether this value rule accepts any non-empty string.

Returns:
true if this value rule accepts any non-empty string.

getErrorMessage

public String getErrorMessage(String value)
Compose and return an error message, why given value was not accepted.

Parameters:
value - the value
Returns:
error message, possibly suggesting correct value whenever possible. If no error message is available then return empty string. If the value is acceptable return null.


Copyright © 2003-2006 null. All Rights Reserved.