/** * Read a KiWiIntLiteral serialized with writeIntLiteral from a DataInput source * * @param input the source * @return the de-serialized KiWiIntLiteral * @throws IOException */ public static KiWiIntLiteral readIntLiteral(DataInput input) throws IOException { long id = input.readLong(); if (id == -1) { return null; } long content = input.readLong(); KiWiUriResource dtype = readURI(input); Date created = new Date(input.readLong()); KiWiIntLiteral r = new KiWiIntLiteral(content, dtype, created); r.setId(id); return r; }
/** * Read a KiWiIntLiteral serialized with writeIntLiteral from a DataInput source * * @param input the source * @return the de-serialized KiWiIntLiteral * @throws IOException */ public static KiWiIntLiteral readIntLiteral(DataInput input) throws IOException { long id = input.readLong(); if (id == -1) { return null; } long content = input.readLong(); KiWiUriResource dtype = readURI(input); Date created = new Date(input.readLong()); KiWiIntLiteral r = new KiWiIntLiteral(content, dtype, created); r.setId(id); return r; }
KiWiIntLiteral result = new KiWiIntLiteral(row.getLong(4), null, new Date(row.getTimestamp(11, calendarUTC).getTime())); result.setId(id); if(row.getLong(10) != 0) {
result= new KiWiIntLiteral(ivalue, rtype);
result= new KiWiIntLiteral(ivalue, rtype);
KiWiIntLiteral result = new KiWiIntLiteral(row.getLong(4), null, new Date(row.getTimestamp(11, calendarUTC).getTime())); result.setId(id); if(row.getLong(10) != 0) {
/** * Creates a new <tt>xsd:short</tt>-typed literal representing the specified * value. * * @param value The value for the literal. * @return An <tt>xsd:short</tt>-typed literal for the specified value. */ @Override public Literal createLiteral(short value) { KiWiLiteral l = new KiWiIntLiteral(Long.valueOf(value), (KiWiUriResource) createURI(LiteralCommons.getXSDType(Short.class)), new Date()); l.setId(idGenerator.getId()); return l; }
/** * Creates a new <tt>xsd:long</tt>-typed literal representing the specified * value. * * @param value The value for the literal. * @return An <tt>xsd:long</tt>-typed literal for the specified value. */ @Override public Literal createLiteral(long value) { KiWiLiteral l = new KiWiIntLiteral(Long.valueOf(value), (KiWiUriResource) createURI(LiteralCommons.getXSDType(Long.class)), new Date()); l.setId(idGenerator.getId()); return l; }
/** * Creates a new <tt>xsd:byte</tt>-typed literal representing the specified * value. * * @param value The value for the literal. * @return An <tt>xsd:byte</tt>-typed literal for the specified value. */ @Override public Literal createLiteral(byte value) { KiWiLiteral l = new KiWiIntLiteral(Long.valueOf(value), (KiWiUriResource) createURI(LiteralCommons.getXSDType(Byte.class)), new Date()); l.setId(idGenerator.getId()); return l; }
/** * Creates a new <tt>xsd:int</tt>-typed literal representing the specified * value. * * @param value The value for the literal. * @return An <tt>xsd:int</tt>-typed literal for the specified value. */ @Override public Literal createLiteral(int value) { KiWiLiteral l = new KiWiIntLiteral(Long.valueOf(value), (KiWiUriResource) createURI(LiteralCommons.getXSDType(Integer.class)), new Date()); l.setId(idGenerator.getId()); return l; }
result= new KiWiIntLiteral(ivalue, rtype, importDate); } else { nodesLoaded++;
result= new KiWiIntLiteral(ivalue, rtype, importDate); } else { nodesLoaded++;
KiWiIntLiteral literal = new KiWiIntLiteral(value, uri); connection.storeNode(literal);