+
+ public static Resource dataTypeOfDatatype(ReadGraph g, Datatype type) {
+ if (type instanceof OptionalType)
+ return dataTypeOfDatatype(g, ((OptionalType) type).getComponentType());
+
+ Layer0 b = Layer0.getInstance(g);
+ if (type instanceof DoubleType)
+ return b.Double;
+ else if(type instanceof StringType)
+ return b.String;
+ else if(type instanceof IntegerType)
+ return b.Integer;
+ else if(type instanceof FloatType)
+ return b.Float;
+ else if(type instanceof BooleanType)
+ return b.Boolean;
+ else if(type instanceof LongType)
+ return b.Long;
+ else if(type instanceof ByteType)
+ return b.Byte;
+
+ else if (type instanceof ArrayType) {
+ type = ((ArrayType) type).componentType();
+
+ if (type instanceof DoubleType)
+ return b.DoubleArray;
+ else if(type instanceof IntegerType)
+ return b.IntegerArray;
+ else if(type instanceof ByteType)
+ return b.ByteArray;
+ else if(type instanceof FloatType)
+ return b.FloatArray;
+ else if(type instanceof BooleanType)
+ return b.BooleanArray;
+ else if(type instanceof StringType)
+ return b.StringArray;
+ else if(type instanceof LongType)
+ return b.LongArray;
+ }
+
+ LOGGER.error("No literal type found for data type {}", type);
+ return null;
+ }