org.dspace.app.xmlui.cocoon
Class AspectMatcher

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.dspace.app.xmlui.cocoon.AspectMatcher
All Implemented Interfaces:
org.apache.avalon.framework.logger.LogEnabled, org.apache.cocoon.matching.Matcher

public class AspectMatcher
extends org.apache.avalon.framework.logger.AbstractLogEnabled
implements org.apache.cocoon.matching.Matcher

This class determines the correct Aspect to use. This is determined by the url string, if it is prepended with a number followed by a slash (such as 1/ or 3/) then the Aspect identified by the number is used. When the URL does not start with an integer then the first Aspect (aspect zero) is loaded. Once the Aspect has been identified the following sitemap parameters are provided: {ID} is the Aspect ID, {aspect} is the path to the aspect, {aspectName} is a unique name for the aspect, and {prefix} is the aspect identifier prepending the URL (if one exists!).

Author:
Scott Phillips

Field Summary
 
Fields inherited from interface org.apache.cocoon.matching.Matcher
ROLE
 
Constructor Summary
AspectMatcher()
           
 
Method Summary
 Map match(String pattern, Map objectModel, org.apache.avalon.framework.parameters.Parameters parameters)
          Determine the correct aspect to load.
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AspectMatcher

public AspectMatcher()
Method Detail

match

public Map match(String pattern,
                 Map objectModel,
                 org.apache.avalon.framework.parameters.Parameters parameters)
          throws org.apache.cocoon.sitemap.PatternException
Determine the correct aspect to load.

Specified by:
match in interface org.apache.cocoon.matching.Matcher
Parameters:
pattern - name of sitemap parameter to find
objectModel - environment passed through via cocoon
Returns:
null or map containing value of sitemap parameter 'pattern'
Throws:
org.apache.cocoon.sitemap.PatternException


Copyright © 2012 DuraSpace. All Rights Reserved.