Package org.daisy.dotify.api.formatter
Class RenameFallbackRule
- java.lang.Object
-
- org.daisy.dotify.api.formatter.RenameFallbackRule
-
- All Implemented Interfaces:
FallbackRule
public class RenameFallbackRule extends Object implements FallbackRule
Provides a fallback rule that indicates that the collection should be reassigned to another identifier.
-
-
Constructor Summary
Constructors Constructor Description RenameFallbackRule(String fromCollection, String toCollection)Creates a new instance with the specified parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringapplyToCollection()Gets the identifier of the collection that this rule should be applied to.StringgetToCollection()Gets the new identifier for this collection.booleanmustBeContextCollection()Returns true of the rule can only be applied to the context collection, in other words the collection that triggers the fallback actions.
-
-
-
Method Detail
-
applyToCollection
public String applyToCollection()
Description copied from interface:FallbackRuleGets the identifier of the collection that this rule should be applied to.- Specified by:
applyToCollectionin interfaceFallbackRule- Returns:
- returns the identifier
-
getToCollection
public String getToCollection()
Gets the new identifier for this collection.- Returns:
- returns the identifier
-
mustBeContextCollection
public boolean mustBeContextCollection()
Description copied from interface:FallbackRuleReturns true of the rule can only be applied to the context collection, in other words the collection that triggers the fallback actions.- Specified by:
mustBeContextCollectionin interfaceFallbackRule- Returns:
- returns true if the rule can only be applied to the context collection, false otherwise
-
-