Class APreprocessingFunction
- java.lang.Object
-
- org.aksw.limes.core.io.preprocessing.APreprocessingFunction
-
- All Implemented Interfaces:
IPreprocessingFunction
- Direct Known Subclasses:
CleanIri,CleanNumber,Concat,RegexReplace,RemoveBraces,RemoveLanguageTag,RemoveNonAlphanumeric,RenameProperty,Replace,Split,ToCelsius,ToFahrenheit,ToLowercase,ToUppercase,ToWktPoint,UriAsString
public abstract class APreprocessingFunction extends Object implements IPreprocessingFunction
-
-
Field Summary
Fields Modifier and Type Field Description static StringATstatic PatterncheckFunctionStringstatic StringcommaNotInsideQuotationMatches comma if that comma is not followed by quotation mark
-
Constructor Summary
Constructors Constructor Description APreprocessingFunction()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description InstanceapplyFunction(Instance inst, String property, String... arguments)Applies the function to this instanceabstract InstanceapplyFunctionAfterCheck(Instance inst, String property, String... arguments)booleanisComplex()String[]retrieveArguments(String args)Retrieves the arguments for a function, but ignores the function idStringretrieveKeywordArgumentValue(String arg, String keyword)voidsanityCheckArguments(String args)voidtestIfNumberOfArgumentsIsLegal(String... arguments)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.aksw.limes.core.io.preprocessing.IPreprocessingFunction
maxNumberOfArguments, minNumberOfArguments
-
-
-
-
Field Detail
-
AT
public static final String AT
- See Also:
- Constant Field Values
-
commaNotInsideQuotation
public static final String commaNotInsideQuotation
Matches comma if that comma is not followed by quotation mark- See Also:
- Constant Field Values
-
checkFunctionString
public static final Pattern checkFunctionString
-
-
Method Detail
-
applyFunction
public Instance applyFunction(Instance inst, String property, String... arguments)
Description copied from interface:IPreprocessingFunctionApplies the function to this instance- Specified by:
applyFunctionin interfaceIPreprocessingFunction- Parameters:
inst- the instance that will be preprocessedproperty- for unary operators this is the property on which the function will be applied, for n-ary fucntions this is the name of the new property where the result of the preprocessing will be storedarguments- some functions take arguments- Returns:
- the preprocessed instance
-
applyFunctionAfterCheck
public abstract Instance applyFunctionAfterCheck(Instance inst, String property, String... arguments)
-
testIfNumberOfArgumentsIsLegal
public void testIfNumberOfArgumentsIsLegal(String... arguments) throws IllegalNumberOfParametersException
-
retrieveArguments
public String[] retrieveArguments(String args)
Retrieves the arguments for a function, but ignores the function id- Parameters:
args- the string from the config e.g.replace(test,)- Returns:
- array containing only the arguments without function id e.g.
[test,]
-
sanityCheckArguments
public void sanityCheckArguments(String args)
-
retrieveKeywordArgumentValue
public String retrieveKeywordArgumentValue(String arg, String keyword)
-
isComplex
public boolean isComplex()
- Specified by:
isComplexin interfaceIPreprocessingFunction
-
-