org.dspace.app.xmlui.aspect.general
Class HandleTypeMatcher
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.dspace.app.xmlui.aspect.general.HandleTypeMatcher
- All Implemented Interfaces:
- org.apache.avalon.framework.logger.LogEnabled, org.apache.cocoon.matching.Matcher
public class HandleTypeMatcher
- extends org.apache.avalon.framework.logger.AbstractLogEnabled
- implements org.apache.cocoon.matching.Matcher
Test the current URL to see if it contains a reference to a DSpaceObject, if
it dose then the object type is compared against the given pattern. The
matcher succeeds only if the object type matches. Valid expressions may be
combined with a comma to produce a set of "OR" expressions.
Thus if you want to match all handles that are communities or collections
then use the pattern value of "community,collection".
- Author:
- Scott Phillips
| Fields inherited from interface org.apache.cocoon.matching.Matcher |
ROLE |
|
Method Summary |
Map |
match(String pattern,
Map objectModel,
org.apache.avalon.framework.parameters.Parameters parameters)
Match the encoded DSpaceObject against a specified type. |
| 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 |
COMMUNITY_EXPRESSION
public static final String COMMUNITY_EXPRESSION
- The community expression
- See Also:
- Constant Field Values
COLLECITON_EXPRESSION
public static final String COLLECITON_EXPRESSION
- The collection expression
- See Also:
- Constant Field Values
ITEM_EXPRESSION
public static final String ITEM_EXPRESSION
- The item expression
- See Also:
- Constant Field Values
HandleTypeMatcher
public HandleTypeMatcher()
match
public Map match(String pattern,
Map objectModel,
org.apache.avalon.framework.parameters.Parameters parameters)
throws org.apache.cocoon.sitemap.PatternException
- Match the encoded DSpaceObject against a specified type.
- Specified by:
match in interface org.apache.cocoon.matching.Matcher
- Parameters:
pattern - name of sitemap parameter to findobjectModel - 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.