Class SSSOMTReplaceModifierFunction
java.lang.Object
org.incenp.obofoundry.sssom.transform.BaseStringModifierFunction
org.incenp.obofoundry.sssom.transform.SSSOMTReplaceModifierFunction
- All Implemented Interfaces:
IFormatModifierFunction
Represents the SSSOM/T modifier function "replace".
Use this function to perform a basic find-and-replace operation within the substituted value. The function accepts two parameters, being the text to find and the replacement text, respectively.
For example, to get a shortened identifier for the predicate_id,
but with the colon (:) character replaced by an underscore (_):
"%{predicate_id|short|replace(':', '_')}
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.incenp.obofoundry.sssom.transform.BaseStringModifierFunction
call
-
Constructor Details
-
SSSOMTReplaceModifierFunction
public SSSOMTReplaceModifierFunction()
-
-
Method Details
-
getName
Description copied from interface:IFormatModifierFunctionGets the name by which the function should be called in a placeholder.- Returns:
- The function name.
-
getSignature
Description copied from interface:IFormatModifierFunctionGets 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_arg1in the example above).- Returns:
- The function signature.
-
apply
Description copied from class:BaseStringModifierFunctionApplies the function to a single value.- Specified by:
applyin classBaseStringModifierFunction- Parameters:
value- The value to apply the function to.extra- Arguments to the function, if any.- Returns:
- The modified value.
-