@Override public BigDecimal transform(RDFBackend<Node> backend, Node node, Map<String, String> configuration) throws IllegalArgumentException { if(backend.isLiteral(node)) { return backend.decimalValue(node); } else { throw new IllegalArgumentException("cannot transform node of type "+node.getClass().getCanonicalName()+" to BigDecimal"); } } }
@Override public BigDecimal transform(RDFBackend<Node> backend, Node node, Map<String, String> configuration) throws IllegalArgumentException { if(backend.isLiteral(node)) { return backend.decimalValue(node); } else { throw new IllegalArgumentException("cannot transform node of type "+node.getClass().getCanonicalName()+" to BigDecimal"); } } }
@Override public Short transform(RDFBackend<Node> backend, Node node, Map<String, String> configuration) throws IllegalArgumentException { if(backend.isLiteral(node)) { return backend.decimalValue(node).shortValueExact(); } else { throw new IllegalArgumentException("cannot transform node of type "+ node.getClass().getCanonicalName()+" to short"); } }
@Override public Byte transform(RDFBackend<Node> backend, Node node, Map<String, String> configuration) throws IllegalArgumentException { if(backend.isLiteral(node)) { return backend.decimalValue(node).byteValueExact(); } else { throw new IllegalArgumentException("cannot transform node of type "+ node.getClass().getCanonicalName()+" to byte"); } }
@Override public Short transform(RDFBackend<Node> backend, Node node, Map<String, String> configuration) throws IllegalArgumentException { if(backend.isLiteral(node)) { return backend.decimalValue(node).shortValueExact(); } else { throw new IllegalArgumentException("cannot transform node of type "+ node.getClass().getCanonicalName()+" to short"); } }
@Override public Byte transform(RDFBackend<Node> backend, Node node, Map<String, String> configuration) throws IllegalArgumentException { if(backend.isLiteral(node)) { return backend.decimalValue(node).byteValueExact(); } else { throw new IllegalArgumentException("cannot transform node of type "+ node.getClass().getCanonicalName()+" to byte"); } }