Package cz.vutbr.fit.layout.api
Interface Tagger
-
- All Superinterfaces:
ParametrizedOperation,Service
public interface Tagger extends Service, ParametrizedOperation
A generic tagger that is able to assign tags to areas.- Author:
- burgetr
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanallowsContinuation(Area node)Checks whether the area may be a continuation of a previously started area tagged with this tag.booleanallowsJoining()Checks whether the tag may be used for joining the areas in the visual area tree.floatbelongsTo(Area node)Checks whether the area may be tagged with the tag.List<TagOccurrence>extract(String src)Extracts the parts of a source string that correspond to this tag.booleanmayCoexistWith(Tag other)Check if the area tagged with this tag may be tagged with another tag.-
Methods inherited from interface cz.vutbr.fit.layout.api.ParametrizedOperation
getParam, getParams, getParamString, setParam
-
Methods inherited from interface cz.vutbr.fit.layout.api.Service
getCategory, getDescription, getId, getName, setServiceManager
-
-
-
-
Method Detail
-
belongsTo
float belongsTo(Area node)
Checks whether the area may be tagged with the tag. This method does not actually assign the tag to the area.- Parameters:
node- The examined area node.- Returns:
- the relevance of the assignment (0.0 = not assigned, 0.1 = hopefully possible, >0.5 quite possible, 1.0 absolutely sure)
-
allowsContinuation
boolean allowsContinuation(Area node)
Checks whether the area may be a continuation of a previously started area tagged with this tag.- Parameters:
node- The examined area node.- Returns:
trueif the area may be a continuation of a tagged area
-
allowsJoining
boolean allowsJoining()
Checks whether the tag may be used for joining the areas in the visual area tree.- Returns:
trueif the tag may be used for joining.
-
mayCoexistWith
boolean mayCoexistWith(Tag other)
Check if the area tagged with this tag may be tagged with another tag. If not, this tag won't be used for the areas already tagged with another tag.
-
extract
List<TagOccurrence> extract(String src)
Extracts the parts of a source string that correspond to this tag.- Parameters:
src- The source string.- Returns:
- A list of extracted strings.
-
-