DocPattern implements one of the principal components of DocHelper, the Pattern.
More...


Public Member Functions | |
| DocPattern (String pattern) throws PatternSyntaxException | |
| Creates a new instance. | |
| DocPattern (String pattern, TransformDefinition transform) throws PatternSyntaxException | |
| Creates a new instance. | |
| ResultNode | execute (String value) |
| Executes this pattern for the given value. | |
| String | render (MatchResult mr) |
| Render the matchresult passed in behaving as if this pattern was a RenderDefiniton. | |
| String | getText () |
| Implementation of the RenderDefinition interface. | |
| String | getName () |
| Name Accessor + Modifier. | |
| void | setName (String name) |
Package Attributes | |
| TransformDefinition | node |
| The Node Definition that tells this pattern how to render matches. | |
| Pattern | regExp |
| String: Regular Expressions Pattern to Match. | |
| HashMap< String, String > | params |
Private Attributes | |
| String | name |
DocPattern implements one of the principal components of DocHelper, the Pattern.
It is intended to hold a Regular Expression pattern in String form and RenderDefinition. The regular expression indicates what to match in Record, and the RenderDefinition indicates how to render the matches for each Record.
This class implements RenderDefinition to become a rendering mechanism itself. TODO.
This class implements DocumentSection in order to implement output encapsulation.
DocumentSection, RenderDefinition Definition at line 36 of file DocPattern.java.
| dochelper.DocPattern.DocPattern | ( | String | pattern | ) | throws PatternSyntaxException |
Creates a new instance.
This Object represents a regular expression pattern and how it should be rendered in the resulting document. The rendering is done through the relationship to its NodeDefinition. A pattern implements the NodeDefinition interface itself in order to be itself a valid way to render a node.
| pattern | String that defines the regular expression to search for |
| PatternSyntaxException |
Definition at line 67 of file DocPattern.java.
| dochelper.DocPattern.DocPattern | ( | String | pattern, | |
| TransformDefinition | transform | |||
| ) | throws PatternSyntaxException |
Creates a new instance.
This Object represents a regular expression pattern and how it should be rendered in the resulting document. The rendering is done through the relationship to its RenderDefinition. A pattern implements the RenderDefinition interface itself in order to be itself a valid way to render a pattern.
| pattern | String that defines the regular expression to search for | |
| transform |
| PatternSyntaxException |
Definition at line 86 of file DocPattern.java.

| ResultNode dochelper.DocPattern.execute | ( | String | value | ) |
Executes this pattern for the given value.
This method will match the regular expression for this DocPattern and pass the result to the RenderDefinition associated with it , to render the result.
| value | String that hold the value that will be search for matches of the pattern. |
Definition at line 105 of file DocPattern.java.

| String dochelper.DocPattern.render | ( | MatchResult | mr | ) |
Render the matchresult passed in behaving as if this pattern was a RenderDefiniton.
Implementation of the RenderDefinition.
TODO: X or Implement, Document.
| mr |
Implements dochelper.TransformDefinition.
Definition at line 134 of file DocPattern.java.
| String dochelper.DocPattern.getText | ( | ) |
Implementation of the RenderDefinition interface.
Implementing the RenderDefinition interface allows a DocPattern to have a sub pattern perform the rendering functions. The allow nesting to occur.
TODO: X or Implement, Document.
Implements dochelper.TransformDefinition.
Definition at line 146 of file DocPattern.java.
| String dochelper.DocPattern.getName | ( | ) |
| void dochelper.DocPattern.setName | ( | String | name | ) |
| name |
Definition at line 161 of file DocPattern.java.

TransformDefinition dochelper.DocPattern.node [package] |
The Node Definition that tells this pattern how to render matches.
Definition at line 39 of file DocPattern.java.
Pattern dochelper.DocPattern.regExp [package] |
String dochelper.DocPattern.name [private] |
Definition at line 49 of file DocPattern.java.
HashMap<String, String> dochelper.DocPattern.params [package] |
Definition at line 52 of file DocPattern.java.
1.5.6