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 String
applyToCollection()
Gets the identifier of the collection that this rule should be applied to.String
getToCollection()
Gets the new identifier for this collection.boolean
mustBeContextCollection()
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:FallbackRule
Gets the identifier of the collection that this rule should be applied to.- Specified by:
applyToCollection
in 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:FallbackRule
Returns true of the rule can only be applied to the context collection, in other words the collection that triggers the fallback actions.- Specified by:
mustBeContextCollection
in interfaceFallbackRule
- Returns:
- returns true if the rule can only be applied to the context collection, false otherwise
-
-