Class SSSOMTShortFunction
java.lang.Object
org.incenp.obofoundry.sssom.transform.SSSOMTShortFunction
- All Implemented Interfaces:
IFormatModifierFunction
Represents the SSSOM/T substitution modifier function "short".
This function shortens the substituted text, which is expected to be a IRI, into its “CURIE” form. It does not take any additional argument.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
SSSOMTShortFunction
Creates a new instance.- Parameters:
prefixManager
- The prefix manager to use to shorten the substituted text.
-
-
Method Details
-
getName
Description copied from interface:IFormatModifierFunction
Gets the name by which the function should be called in a placeholder.- Specified by:
getName
in interfaceIFormatModifierFunction
- Returns:
- The function name.
-
getSignature
Description copied from interface:IFormatModifierFunction
Gets the expected signature of the function. This works similarly toISSSOMTFunction.getSignature()
, but it only concerns the additional arguments beyond the value of the substituted placeholder to modify (e.g.extra_arg1
in the example above).- Specified by:
getSignature
in interfaceIFormatModifierFunction
- Returns:
- The function signature.
-
call
Description copied from interface:IFormatModifierFunction
Executes the function.- Specified by:
call
in interfaceIFormatModifierFunction
- Parameters:
value
- The original value this function is supposed to modify. It is guaranteed never to benull
, but the exact type will depend on what the substituted placeholder was, and also on what any previous modifier function may have done with it.arguments
- Additional arguments to the function, if any. If the function declared that it expects some mandatory arguments (through theIFormatModifierFunction.getSignature()
method), it is guaranteed the list will contains as many arguments as expected.- Returns:
- The modified value. It may not need be of the same type as the original value (e.g., a function could transform a list value into a string value).
-