Repository: marmotta Updated Branches: refs/heads/develop 22bee5c9e -> 1d9fa7105
Some code-cleanup in ldpath-core Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/1d9fa710 Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/1d9fa710 Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/1d9fa710 Branch: refs/heads/develop Commit: 1d9fa7105a807d836c16f6967895e56cb9a375d6 Parents: 22bee5c Author: Jakob Frank <[email protected]> Authored: Wed Dec 17 15:06:19 2014 +0100 Committer: Jakob Frank <[email protected]> Committed: Wed Dec 17 15:06:19 2014 +0100 ---------------------------------------------------------------------- .../ldpath/model/backend/AbstractBackend.java | 40 +++++++++++--------- .../ldpath/model/functions/CountFunction.java | 2 +- .../ldpath/model/functions/FirstFunction.java | 7 ---- .../ldpath/model/functions/LastFunction.java | 7 ---- .../ldpath/model/functions/SortFunction.java | 6 --- .../marmotta/ldpath/model/programs/Program.java | 18 ++++----- .../model/selectors/FunctionSelector.java | 1 - .../ldpath/model/selectors/PathSelector.java | 2 +- .../marmotta/ldpath/model/tests/AndTest.java | 2 +- .../ldpath/model/tests/FunctionTest.java | 2 +- .../marmotta/ldpath/model/tests/IsATest.java | 2 +- .../ldpath/model/tests/LiteralLanguageTest.java | 1 - .../ldpath/model/tests/LiteralTypeTest.java | 1 - .../ldpath/model/tests/PathEqualityTest.java | 1 - .../marmotta/ldpath/model/tests/PathTest.java | 1 - .../tests/functions/BinaryNumericTest.java | 2 +- .../marmotta/ldpath/parser/Configuration.java | 8 ++-- .../ldpath/parser/DefaultConfiguration.java | 4 +- 18 files changed, 44 insertions(+), 63 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/marmotta/blob/1d9fa710/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/backend/AbstractBackend.java ---------------------------------------------------------------------- diff --git a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/backend/AbstractBackend.java b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/backend/AbstractBackend.java index 4f52530..209a87e 100644 --- a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/backend/AbstractBackend.java +++ b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/backend/AbstractBackend.java @@ -74,14 +74,14 @@ public abstract class AbstractBackend<Node> implements NodeBackend<Node> { * values. This is necessary because {@link SimpleDateFormat} is not thread * save and therefore we do not directly use a public static member. */ - private SimpleDateFormat dateFormat = (SimpleDateFormat)FormatUtils.ISO8601FORMAT_DATE.clone(); + private final SimpleDateFormat dateFormat = (SimpleDateFormat)FormatUtils.ISO8601FORMAT_DATE.clone(); /** * A clone of the DateFormat provided by {@link FormatUtils} to parse xsd:time * values. This is necessary because {@link SimpleDateFormat} is not thread * save and therefore we do not directly use a public static member. */ - private SimpleDateFormat timeFormat = (SimpleDateFormat)FormatUtils.ISO8601FORMAT_TIME.clone(); + private final SimpleDateFormat timeFormat = (SimpleDateFormat)FormatUtils.ISO8601FORMAT_TIME.clone(); /** * Parses the Double value of the parsed node based on its lexical form as * returned by {@link #stringValue(Object)}. @@ -104,7 +104,7 @@ public abstract class AbstractBackend<Node> implements NodeBackend<Node> { */ public Float floatValue(Node node) { return new Float(trimPlusSign(stringValue(node))); - }; + } /** * Parses the {@link BigDecimal#longValueExact() Long value} of the parsed @@ -138,7 +138,8 @@ public abstract class AbstractBackend<Node> implements NodeBackend<Node> { @Override public Integer intValue(Node node) { return decimalValue(node).intValueExact(); - }; + } + /** * Parses the {@link BigDecimal} value from the lexical form of the parsed * node as returned by {@link RDFBackend#stringValue(Object)}. This @@ -152,7 +153,8 @@ public abstract class AbstractBackend<Node> implements NodeBackend<Node> { */ public BigDecimal decimalValue(Node node) { return new BigDecimal(trimPlusSign(stringValue(node))); - }; + } + /** * Parses the {@link BigDecimal#toBigIntegerExact() BugIneger value} of the parsed * node by using {@link #decimalValue(Object)}. This has the advantage, that @@ -162,7 +164,8 @@ public abstract class AbstractBackend<Node> implements NodeBackend<Node> { */ public java.math.BigInteger integerValue(Node node) { return decimalValue(node).toBigIntegerExact(); - }; + } + /** * Parses the boolean value from the {@link #stringValue(Object) lexical form}. * Supports both '1' and {@link Boolean#parseBoolean(String)}. @@ -176,7 +179,8 @@ public abstract class AbstractBackend<Node> implements NodeBackend<Node> { } else { return Boolean.parseBoolean(lexicalForm); } - }; + } + /** * Parses date vales based on the ISO8601 specification by using the * {@link #stringValue(Object) lexical form} of the parsed node. @@ -194,8 +198,8 @@ public abstract class AbstractBackend<Node> implements NodeBackend<Node> { throw new IllegalArgumentException("could not parse ISO8601 date from '"+ lexicalForm+"'!",e); } - }; - + } + /** * Parses time value based on the ISO8601 specification by using the * {@link #stringValue(Object) lexical form} of the parsed node. @@ -213,8 +217,8 @@ public abstract class AbstractBackend<Node> implements NodeBackend<Node> { throw new IllegalArgumentException("could not parse ISO8601 time from '"+ lexicalForm+"'!",e); } - }; - + } + /** * Parses dateTime value based on the {@link #stringValue(Object) lexical form} * of the parsed node. For details about parsing see @@ -233,8 +237,8 @@ public abstract class AbstractBackend<Node> implements NodeBackend<Node> { } else { return date; } - }; - + } + @Override public abstract String stringValue(Node node); @@ -247,22 +251,24 @@ public abstract class AbstractBackend<Node> implements NodeBackend<Node> { private static String trimPlusSign(String s) { return (s.length() > 0 && s.charAt(0) == '+') ? s.substring(1) : s; } + /** * Utility to parse xsd:date strings - * @param dateString - * @return + * @param dateString date-string to parse, in ISO8601 * @throws ParseException + * @see org.apache.marmotta.ldpath.util.FormatUtils#ISO8601FORMAT_DATE */ protected Date parseDate(String dateString) throws ParseException { synchronized (dateFormat) { return dateFormat.parse(dateString); } } + /** * Utility to parse xsd:time strings - * @param timeString - * @return + * @param timeString time-string to parse, in ISO8601 * @throws ParseException + * @see org.apache.marmotta.ldpath.util.FormatUtils#ISO8601FORMAT_TIME */ protected Date parseTime(String timeString) throws ParseException { synchronized (timeFormat) { http://git-wip-us.apache.org/repos/asf/marmotta/blob/1d9fa710/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/CountFunction.java ---------------------------------------------------------------------- diff --git a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/CountFunction.java b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/CountFunction.java index ececd2c..cfd01dc 100644 --- a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/CountFunction.java +++ b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/CountFunction.java @@ -34,7 +34,7 @@ public class CountFunction<Node> extends SelectorFunction<Node> { @SafeVarargs public final Collection<Node> apply(RDFBackend<Node> backend, Node context, Collection<Node>... args) throws IllegalArgumentException { - LinkedList<Node> result = new LinkedList<Node>(); + LinkedList<Node> result = new LinkedList<>(); for (Collection<Node> coll : args) { final Node intLit = backend.createLiteral(String.valueOf(coll.size()), null, dataType); result.add(intLit); http://git-wip-us.apache.org/repos/asf/marmotta/blob/1d9fa710/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/FirstFunction.java ---------------------------------------------------------------------- diff --git a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/FirstFunction.java b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/FirstFunction.java index b7a518b..8a44c53 100644 --- a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/FirstFunction.java +++ b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/FirstFunction.java @@ -54,9 +54,6 @@ public class FirstFunction<Node> extends SelectorFunction<Node> { /** * Return the name of the NodeFunction for registration in the function registry - * - * @return - * @param backend */ @Override public String getLocalName() { @@ -67,8 +64,6 @@ public class FirstFunction<Node> extends SelectorFunction<Node> { * A string describing the signature of this node function, e.g. "fn:content(uris : Nodes) : Nodes". The * syntax for representing the signature can be chosen by the implementer. This method is for informational * purposes only. - * - * @return */ @Override public String getSignature() { @@ -77,8 +72,6 @@ public class FirstFunction<Node> extends SelectorFunction<Node> { /** * A short human-readable description of what the node function does. - * - * @return */ @Override public String getDescription() { http://git-wip-us.apache.org/repos/asf/marmotta/blob/1d9fa710/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/LastFunction.java ---------------------------------------------------------------------- diff --git a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/LastFunction.java b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/LastFunction.java index d2a8592..5d40edf 100644 --- a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/LastFunction.java +++ b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/LastFunction.java @@ -51,9 +51,6 @@ public class LastFunction<Node> extends SelectorFunction<Node> { /** * Return the name of the NodeFunction for registration in the function registry - * - * @return - * @param backend */ @Override public String getLocalName() { @@ -64,8 +61,6 @@ public class LastFunction<Node> extends SelectorFunction<Node> { * A string describing the signature of this node function, e.g. "fn:content(uris : Nodes) : Nodes". The * syntax for representing the signature can be chosen by the implementer. This method is for informational * purposes only. - * - * @return */ @Override public String getSignature() { @@ -74,8 +69,6 @@ public class LastFunction<Node> extends SelectorFunction<Node> { /** * A short human-readable description of what the node function does. - * - * @return */ @Override public String getDescription() { http://git-wip-us.apache.org/repos/asf/marmotta/blob/1d9fa710/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/SortFunction.java ---------------------------------------------------------------------- diff --git a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/SortFunction.java b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/SortFunction.java index c15a96b..ed82985 100644 --- a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/SortFunction.java +++ b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/functions/SortFunction.java @@ -130,8 +130,6 @@ public class SortFunction<Node> extends SelectorFunction<Node> { /** * Return the representation of the NodeFunction or NodeSelector in the RDF Path Language - * - * @return */ @Override public String getLocalName() { @@ -143,8 +141,6 @@ public class SortFunction<Node> extends SelectorFunction<Node> { * A string describing the signature of this node function, e.g. "fn:content(uris : Nodes) : Nodes". The * syntax for representing the signature can be chosen by the implementer. This method is for informational * purposes only. - * - * @return */ @Override public String getSignature() { @@ -153,8 +149,6 @@ public class SortFunction<Node> extends SelectorFunction<Node> { /** * A short human-readable description of what the node function does. - * - * @return */ @Override public String getDescription() { http://git-wip-us.apache.org/repos/asf/marmotta/blob/1d9fa710/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/programs/Program.java ---------------------------------------------------------------------- diff --git a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/programs/Program.java b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/programs/Program.java index c625e9f..41db200 100644 --- a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/programs/Program.java +++ b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/programs/Program.java @@ -40,7 +40,7 @@ public class Program<Node> implements LDPathConstruct<Node> { public static final Map<String, String> DEFAULT_NAMESPACES; static { - HashMap<String, String> defNS = new HashMap<String, String>(); + HashMap<String, String> defNS = new HashMap<>(); defNS.put("rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#"); defNS.put("rdfs", "http://www.w3.org/2000/01/rdf-schema#"); defNS.put("owl", "http://www.w3.org/2002/07/owl#"); @@ -82,9 +82,9 @@ public class Program<Node> implements LDPathConstruct<Node> { private Set<FieldMapping<?,Node>> fields; public Program() { - namespaces = new LinkedHashMap<String, String>(); - fields = new LinkedHashSet<FieldMapping<?,Node>>(); - graphs = new LinkedHashSet<URI>(); + namespaces = new LinkedHashMap<>(); + fields = new LinkedHashSet<>(); + graphs = new LinkedHashSet<>(); } public void addNamespace(String prefix, String uri) { @@ -133,7 +133,7 @@ public class Program<Node> implements LDPathConstruct<Node> { } public void setNamespaces(Map<String, String> namespaces) { - this.namespaces = new LinkedHashMap<String, String>(namespaces); + this.namespaces = new LinkedHashMap<>(namespaces); } public Set<URI> getGraphs() { @@ -141,7 +141,7 @@ public class Program<Node> implements LDPathConstruct<Node> { } public URI[] getGraphArr() { - return this.graphs.toArray(new URI[0]); + return this.graphs.toArray(new URI[this.graphs.size()]); } public void setGraphs(Collection<URI> graphs) { @@ -155,7 +155,7 @@ public class Program<Node> implements LDPathConstruct<Node> { * @return The result */ public Map<String,Collection<?>> execute(RDFBackend<Node> backend, Node context) { - Map<String,Collection<?>> result = new HashMap<String, Collection<?>>(); + Map<String,Collection<?>> result = new HashMap<>(); for(FieldMapping<?,Node> mapping : getFields()) { result.put(mapping.getFieldName(),mapping.getValues(backend,context)); @@ -170,7 +170,7 @@ public class Program<Node> implements LDPathConstruct<Node> { * @return The result */ public Map<String,Collection<?>> execute(RDFBackend<Node> backend, Node context, Map<Node, List<Node>> paths) { - Map<String,Collection<?>> result = new HashMap<String, Collection<?>>(); + Map<String,Collection<?>> result = new HashMap<>(); for(FieldMapping<?,Node> mapping : getFields()) { result.put(mapping.getFieldName(),mapping.getValues(backend,context, paths)); @@ -216,7 +216,7 @@ public class Program<Node> implements LDPathConstruct<Node> { String progWithoutNamespace = sb.toString(); // Defined Namespaces (reverse sorted, to give longer prefixes precedence over shorter) - final TreeSet<Entry<String, String>> sortedNamespaces = new TreeSet<Entry<String,String>>(new Comparator<Entry<String, String>>() { + final TreeSet<Entry<String, String>> sortedNamespaces = new TreeSet<>(new Comparator<Entry<String, String>>() { @Override public int compare(Entry<String, String> e1, Entry<String, String> e2) { return e2.getValue().compareTo(e1.getValue()); http://git-wip-us.apache.org/repos/asf/marmotta/blob/1d9fa710/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/selectors/FunctionSelector.java ---------------------------------------------------------------------- diff --git a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/selectors/FunctionSelector.java b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/selectors/FunctionSelector.java index 807cebc..429e23c 100644 --- a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/selectors/FunctionSelector.java +++ b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/selectors/FunctionSelector.java @@ -97,7 +97,6 @@ public class FunctionSelector<Node> implements NodeSelector<Node> { /** * Return the name of the NodeSelector for registration in the selector registry * - * @return * @param backend */ @Override http://git-wip-us.apache.org/repos/asf/marmotta/blob/1d9fa710/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/selectors/PathSelector.java ---------------------------------------------------------------------- diff --git a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/selectors/PathSelector.java b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/selectors/PathSelector.java index 0ac0886..456991d 100644 --- a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/selectors/PathSelector.java +++ b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/selectors/PathSelector.java @@ -60,7 +60,7 @@ public class PathSelector<Node> implements NodeSelector<Node> { // a new map for storing the result path for the left selector Map<Node,List<Node>> myResultPaths = null; if(resultPaths != null && path != null) { - myResultPaths = new HashMap<Node, List<Node>>(); + myResultPaths = new HashMap<>(); } Collection<Node> nodesLeft = left.select(rdfBackend,context,path,myResultPaths); http://git-wip-us.apache.org/repos/asf/marmotta/blob/1d9fa710/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/AndTest.java ---------------------------------------------------------------------- diff --git a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/AndTest.java b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/AndTest.java index 5d05f36..c111544 100644 --- a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/AndTest.java +++ b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/AndTest.java @@ -26,7 +26,7 @@ import org.apache.marmotta.ldpath.api.tests.NodeTest; * <p/> * Author: Sebastian Schaffert <[email protected]> * - * @param <T> the type of object to filter + * @param <Node> the type of object to filter */ public class AndTest<Node> extends ComplexTest<Node> { http://git-wip-us.apache.org/repos/asf/marmotta/blob/1d9fa710/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/FunctionTest.java ---------------------------------------------------------------------- diff --git a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/FunctionTest.java b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/FunctionTest.java index 2bdf3b5..d0d7742 100644 --- a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/FunctionTest.java +++ b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/FunctionTest.java @@ -41,7 +41,7 @@ public class FunctionTest<Node> extends NodeTest<Node> { @Override public boolean accept(RDFBackend<Node> backend, Node context, Node target) throws IllegalArgumentException { - ArrayList<Collection<Node>> fktArgs = new ArrayList<Collection<Node>>(); + ArrayList<Collection<Node>> fktArgs = new ArrayList<>(); for (NodeSelector<Node> sel : argSelectors) { fktArgs.add(sel.select(backend, target, null, null)); } http://git-wip-us.apache.org/repos/asf/marmotta/blob/1d9fa710/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/IsATest.java ---------------------------------------------------------------------- diff --git a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/IsATest.java b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/IsATest.java index 310a764..8ddce70 100644 --- a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/IsATest.java +++ b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/IsATest.java @@ -29,7 +29,7 @@ import org.apache.marmotta.ldpath.model.selectors.PropertySelector; public class IsATest<Node> extends PathEqualityTest<Node> { public IsATest(Node rdfType, Node node) { - super(new PropertySelector<Node>(rdfType), node); + super(new PropertySelector<>(rdfType), node); } @Override http://git-wip-us.apache.org/repos/asf/marmotta/blob/1d9fa710/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/LiteralLanguageTest.java ---------------------------------------------------------------------- diff --git a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/LiteralLanguageTest.java b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/LiteralLanguageTest.java index 3be8e58..e6a8b62 100644 --- a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/LiteralLanguageTest.java +++ b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/LiteralLanguageTest.java @@ -45,7 +45,6 @@ public class LiteralLanguageTest<Node> extends NodeTest<Node> { * Throws IllegalArgumentException if the function cannot be applied to the nodes passed as argument * or the number of arguments is not correct. * - * @param args a nested list of KiWiNodes * @return */ @Override http://git-wip-us.apache.org/repos/asf/marmotta/blob/1d9fa710/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/LiteralTypeTest.java ---------------------------------------------------------------------- diff --git a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/LiteralTypeTest.java b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/LiteralTypeTest.java index 8187adb..02d00d8 100644 --- a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/LiteralTypeTest.java +++ b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/LiteralTypeTest.java @@ -52,7 +52,6 @@ public class LiteralTypeTest<Node> extends NodeTest<Node> { * Throws IllegalArgumentException if the function cannot be applied to the nodes passed as argument * or the number of arguments is not correct. * - * @param args a nested list of KiWiNodes * @return */ @Override http://git-wip-us.apache.org/repos/asf/marmotta/blob/1d9fa710/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/PathEqualityTest.java ---------------------------------------------------------------------- diff --git a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/PathEqualityTest.java b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/PathEqualityTest.java index 8e6ce43..528d986 100644 --- a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/PathEqualityTest.java +++ b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/PathEqualityTest.java @@ -50,7 +50,6 @@ public class PathEqualityTest<Node> extends NodeTest<Node> { * Throws IllegalArgumentException if the function cannot be applied to the nodes passed as argument * or the number of arguments is not correct. * - * @param args a nested list of KiWiNodes * @return */ @Override http://git-wip-us.apache.org/repos/asf/marmotta/blob/1d9fa710/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/PathTest.java ---------------------------------------------------------------------- diff --git a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/PathTest.java b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/PathTest.java index dfd4b68..0c79a60 100644 --- a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/PathTest.java +++ b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/PathTest.java @@ -44,7 +44,6 @@ public class PathTest<Node> extends NodeTest<Node> { * Throws IllegalArgumentException if the function cannot be applied to the nodes passed as argument * or the number of arguments is not correct. * - * @param args a nested list of KiWiNodes * @return */ @Override http://git-wip-us.apache.org/repos/asf/marmotta/blob/1d9fa710/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/BinaryNumericTest.java ---------------------------------------------------------------------- diff --git a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/BinaryNumericTest.java b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/BinaryNumericTest.java index 1c4b8fc..8ae58f6 100644 --- a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/BinaryNumericTest.java +++ b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/model/tests/functions/BinaryNumericTest.java @@ -27,7 +27,7 @@ import org.apache.marmotta.ldpath.model.transformers.DoubleTransformer; public abstract class BinaryNumericTest<Node> extends TestFunction<Node> { - protected final DoubleTransformer<Node> transformer = new DoubleTransformer<Node>(); + protected final DoubleTransformer<Node> transformer = new DoubleTransformer<>(); @Override @SafeVarargs http://git-wip-us.apache.org/repos/asf/marmotta/blob/1d9fa710/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/parser/Configuration.java ---------------------------------------------------------------------- diff --git a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/parser/Configuration.java b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/parser/Configuration.java index f654bc9..1941058 100644 --- a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/parser/Configuration.java +++ b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/parser/Configuration.java @@ -61,10 +61,10 @@ public class Configuration<Node> { protected Map<String, TestFunction<Node>> testFunctions; public Configuration() { - namespaces = new HashMap<String,String>(); - transformers = new HashMap<String, NodeTransformer<?, Node>>(); - functions = new HashMap<String, SelectorFunction<Node>>(); - testFunctions = new HashMap<String, TestFunction<Node>>(); + namespaces = new HashMap<>(); + transformers = new HashMap<>(); + functions = new HashMap<>(); + testFunctions = new HashMap<>(); } /** http://git-wip-us.apache.org/repos/asf/marmotta/blob/1d9fa710/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/parser/DefaultConfiguration.java ---------------------------------------------------------------------- diff --git a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/parser/DefaultConfiguration.java b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/parser/DefaultConfiguration.java index 9f41a51..261a151 100644 --- a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/parser/DefaultConfiguration.java +++ b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/parser/DefaultConfiguration.java @@ -57,7 +57,7 @@ public class DefaultConfiguration<Node> extends Configuration<Node> { public static final Map<String, String> DEFAULT_NAMESPACES; static { - HashMap<String, String> defNS = new HashMap<String, String>(); + HashMap<String, String> defNS = new HashMap<>(); defNS.put("rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#"); defNS.put("rdfs", "http://www.w3.org/2000/01/rdf-schema#"); defNS.put("owl", "http://www.w3.org/2002/07/owl#"); @@ -71,7 +71,7 @@ public class DefaultConfiguration<Node> extends Configuration<Node> { DEFAULT_NAMESPACES = Collections.unmodifiableMap(defNS); } - public static final Set<Class<?>> DEFAULT_FUNCTIONS = new HashSet<Class<?>>(); + public static final Set<Class<?>> DEFAULT_FUNCTIONS = new HashSet<>(); static { DEFAULT_FUNCTIONS.add(ConcatenateFunction.class); DEFAULT_FUNCTIONS.add(FirstFunction.class);
