Package be.ugent.rml.functions.lib
Class IDLabFunctions
- java.lang.Object
-
- be.ugent.rml.functions.lib.IDLabFunctions
-
- Direct Known Subclasses:
IDLabTestFunctions
public class IDLabFunctions extends Object
-
-
Constructor Summary
Constructors Constructor Description IDLabFunctions()
-
Method Summary
Modifier and Type Method Description static booleanbooleanMatch(String valueParameter, String regexParameter)static List<String>dbpediaSpotlight(String text, String endpoint)static Stringdecide(String input, String expected, String result)static StringgetMIMEType(String filename)static booleaninRange(Double testNumber, Double from, Double to)Tests whether a certain number is in a certain range.static booleanisSet(String valueParameter)static Stringjoin2(String s1, String s2, String sep)Returns the string obtained by joining two strings `s1` and `s2` with the separator `sep`.static booleanlistContainsElement(List list, String str)static StringnormalizeDate(String s, String f)Returns `s` as a normalized xsd:date string, using `f` as current date form.static Stringrandom()static StringreadFile(String path)static booleanstringContainsOtherString(String str, String otherStr, String delimiter)static StringtoUpperCaseURL(String test)static ObjecttrueCondition(String bool, String value)
-
-
-
Method Detail
-
stringContainsOtherString
public static boolean stringContainsOtherString(String str, String otherStr, String delimiter)
-
random
public static String random()
-
inRange
public static boolean inRange(Double testNumber, Double from, Double to)
Tests whether a certain number is in a certain range. Everything is optional: - function returns false when testNumber is null - function only tests from constraint when to is null - function only tests to constraint when from is null - function returns true when from and to are null.- Parameters:
testNumber- The number put under the test. Optional (function returns false when is null)from- The number from where (inclusive)to- The number until where (exclusive)- Returns:
- whether it's in range or not
-
isSet
public static boolean isSet(String valueParameter)
-
join2
public static String join2(String s1, String s2, String sep)
Returns the string obtained by joining two strings `s1` and `s2` with the separator `sep`. For example, `join("foo", "bar", ";")` returns the string `foo;bar`.- Parameters:
s1- strings2- stringsep- separator- Returns:
- the string obtained by joining two strings `s1` and `s2` with the separator `sep`
-
-