Class MCRCategoryCondition
java.lang.Object
org.mycore.access.facts.condition.MCRAbstractCondition
org.mycore.access.facts.condition.fact.MCRAbstractFactCondition<MCRCategoryIDFact>
org.mycore.access.facts.condition.fact.MCRCategoryCondition
- All Implemented Interfaces:
MCRCondition
,MCRFactComputable<MCRCategoryIDFact>
,MCRFactCondition<MCRCategoryIDFact>
This implementation checks if the given object belongs to a certain classification entry.
As default the object is read from the fact "objid".
Using the attribute 'idfact' another fact containing an object id can be specified
Example:
<category idfact='the_other_object' fact='published'>state:published</category>
This rule will check if the object already stored as fact 'the_other_object' belongs to
the category 'state:published'.
If true, a fact 'published' will be stored in the facts holder.
- Author:
- Robert Stephan
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncomputeFact
(MCRFactsHolder facts) Implementors are responsible to store the facts holder in the fact set if applicableboolean
int
hashCode()
void
implementors of this method should call super.parse(xml) to bind the XML element to the conditionMethods inherited from class org.mycore.access.facts.condition.fact.MCRAbstractFactCondition
getTerm, matches, setFactName, setTerm
Methods inherited from class org.mycore.access.facts.condition.MCRAbstractCondition
getBoundElement, getType, isDebug, setDebug
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.mycore.access.facts.model.MCRCondition
getBoundElement, getType, isDebug, setDebug
-
Constructor Details
-
MCRCategoryCondition
public MCRCategoryCondition()
-
-
Method Details
-
parse
Description copied from class:MCRAbstractFactCondition
implementors of this method should call super.parse(xml) to bind the XML element to the condition- Specified by:
parse
in interfaceMCRCondition
- Overrides:
parse
in classMCRAbstractFactCondition<MCRCategoryIDFact>
-
computeFact
Description copied from interface:MCRFactComputable
Implementors are responsible to store the facts holder in the fact set if applicable- Parameters:
facts
- - the facts holder containing already retrieved facts- Returns:
-
getFactName
- Specified by:
getFactName
in interfaceMCRFactComputable<MCRCategoryIDFact>
- Overrides:
getFactName
in classMCRAbstractFactCondition<MCRCategoryIDFact>
-
equals
-
hashCode
public int hashCode()
-