Class MCRStringCondition

All Implemented Interfaces:
MCRCondition, MCRFactComputable<MCRStringFact>, MCRFactCondition<MCRStringFact>
Direct Known Subclasses:
MCRCreatedByCondition, MCRMODSCollectionCondition, MCRMODSEmbargoCondition, MCRMODSGenreCondition, MCRPIHasRegisteredCondition, MCRRegExCondition, MCRRoleCondition, MCRStateCondition, MCRUserCondition

public class MCRStringCondition extends MCRAbstractFactCondition<MCRStringFact>
This is a simple implemenation. It checks if the fact already exists in the fact database and returns it. Otherwise it returns an empty Optional This is useful for "static" facts that are created before the rule processing started in MCRFactsAccessSystem.
Author:
Robert Stephan
  • Constructor Details

    • MCRStringCondition

      public MCRStringCondition()
  • Method Details

    • computeFact

      public Optional<MCRStringFact> computeFact(MCRFactsHolder facts)
      Subclasses should override this method to retrieve the fact from MyCoReObject, MCRSession or from elsewhere ...
      Parameters:
      facts - - the facts holder containing already retrieved facts
      Returns:
      See Also: