net.sourceforge.chaperon.model.pattern
Class Pattern

java.lang.Object
  extended by net.sourceforge.chaperon.model.pattern.Pattern
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
BeginOfLine, CharacterClass, CharacterString, EndOfLine, PatternList, UniversalCharacter

public abstract class Pattern
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

This class describes an abstract pattern element.

Version:
CVS $Id: Pattern.java,v 1.3 2003/12/09 19:55:52 benedikta Exp $
Author:
Stephan Michels
See Also:
Serialized Form

Constructor Summary
Pattern()
           
 
Method Summary
abstract  java.lang.Object clone()
          Create a clone this pattern.
 java.lang.String getLocation()
          Returns the location from the input source.
 int getMaxOccurs()
          Returns the maximum occurs property
 int getMinOccurs()
          Returns the minimum occurs property
 void setLocation(java.lang.String location)
          Set the location from the input source.
 void setMaxOccurs(int maxOccurs)
          Sets the maximum occurs property
 void setMinOccurs(int minOccurs)
          Sets the minimum occurs property
abstract  Violations validate()
          Validates this pattern.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pattern

public Pattern()
Method Detail

setMinOccurs

public void setMinOccurs(int minOccurs)
Sets the minimum occurs property

Parameters:
minOccurs - Minimum occurs property

getMinOccurs

public int getMinOccurs()
Returns the minimum occurs property

Returns:
Minimum occurs property

setMaxOccurs

public void setMaxOccurs(int maxOccurs)
Sets the maximum occurs property

Parameters:
maxOccurs - Maximum occurs property

getMaxOccurs

public int getMaxOccurs()
Returns the maximum occurs property

Returns:
Maximum occurs property

clone

public abstract java.lang.Object clone()
                                throws java.lang.CloneNotSupportedException
Create a clone this pattern.

Overrides:
clone in class java.lang.Object
Returns:
Clone of this pattern.
Throws:
java.lang.CloneNotSupportedException - If an exception occurs during the cloning.

setLocation

public void setLocation(java.lang.String location)
Set the location from the input source.

Parameters:
location - Location in the input source.

getLocation

public java.lang.String getLocation()
Returns the location from the input source.

Returns:
Location in the input source.

validate

public abstract Violations validate()
Validates this pattern.

Returns:
Return a list of violations, if this pattern isn't valid.


Copyright ? 2003 Chaperon project. All Rights Reserved.