Java Doc for AbstractRegexpSelector.java in  » Content-Management-System » apache-lenya-2.0 » org » apache » cocoon » selection » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Content Management System » apache lenya 2.0 » org.apache.cocoon.selection 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.cocoon.selection.AbstractSwitchSelector
   org.apache.cocoon.selection.AbstractRegexpSelector

All known Subclasses:   org.apache.cocoon.selection.RegexpRequestParameterSelector,  org.apache.cocoon.selection.RegexpHeaderSelector,
AbstractRegexpSelector
abstract public class AbstractRegexpSelector extends AbstractSwitchSelector implements Configurable(Code)

The AbstractRegexpSelector abstract class defines a simple selector operating over configured regular-expression patterns.

Configuration of an AbstractRegexpSelector is quite simple: first of all the patterns used for selections must be configured:

 <map:components>
 ...
 <map:selectors default="...">
 <map:selector name="..." src="org.apache.cocoon.selection....">
 <pattern name="empty">^$</pattern>
 <pattern name="number">^[0-9]+$</pattern>
 <pattern name="string">^.+$</pattern>
 </map:selector>
 </map:selectors>
 </map:components>
 

Then, each configured pattern can be referenced in the pipelines section of the sitemap:

 <map:pipelines>
 ...
 <map:match ...>
 ...
 <map:select type="browser">
 <map:when test="empty">...</map:when>
 <map:when test="number">...</map:when>
 <map:when test="string">...</map:when>
 <map:otherwise>...</map:otherwise>
 </map:select>
 ...
 </map:match>
 ...
 </map:pipelines>
 

author:
   Pier Fumagalli
version:
   CVS $Id: AbstractRegexpSelector.java 30941 2004-07-29 19:56:58Z vgritsenko $


Field Summary
protected  Mappatterns
    

Constructor Summary
protected  AbstractRegexpSelector()
    

Method Summary
protected  REProgramcompile(String pattern)
    

Compile the pattern in a REProgram .


Parameters:
  pattern - the regular expression pattern in a textual format.
public  voidconfigure(Configuration configuration)
    
public  booleanselect(String patternName, Object selectorContext)
    

Select a pipeline fragment based on a previously configured pattern.


Parameters:
  patternName - the name of the configured pattern.
Parameters:
  selectorContext - the string to be matched by the named pattern.

Field Detail
patterns
protected Map patterns(Code)

A Map of regular expression programs by name.





Constructor Detail
AbstractRegexpSelector
protected AbstractRegexpSelector()(Code)

Create a new AbstractRegexpSelector instance.





Method Detail
compile
protected REProgram compile(String pattern) throws ConfigurationException(Code)

Compile the pattern in a REProgram .


Parameters:
  pattern - the regular expression pattern in a textual format. a compiled regular expression pattern.
throws:
  ConfigurationException - in the pattern could not be compiled.



configure
public void configure(Configuration configuration) throws ConfigurationException(Code)

Configure this instance parsing all regular expression patterns.


Parameters:
  configuration - the Configuration instance where configuredpatterns are defined.
throws:
  ConfigurationException - if one of the regular-expression to configurecould not be compiled.



select
public boolean select(String patternName, Object selectorContext)(Code)

Select a pipeline fragment based on a previously configured pattern.


Parameters:
  patternName - the name of the configured pattern.
Parameters:
  selectorContext - the string to be matched by the named pattern. true if the contexts is matched by the configured pattern.



Methods inherited from org.apache.cocoon.selection.AbstractSwitchSelector
public boolean select(String expr, Map objectModel, Parameters params)(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.