@Override public void write(ObjectDataOutput output, KiWiUriResource object) throws IOException { KiWiIO.writeURI(output, object); }
@Override public void write(ObjectDataOutput output, KiWiUriResource object) throws IOException { KiWiIO.writeURI(output, object); }
@Override public void writeObject(ObjectOutput output, KiWiUriResource object) throws IOException { KiWiIO.writeURI(output, object); }
/** * Efficiently serialize a KiWiDoubleLiteral to a DataOutput destination. * * @param out the destination * @param literal the KiWiDoubleLiteral to serialize * @throws IOException */ public static void writeDoubleLiteral(DataOutput out, KiWiDoubleLiteral literal) throws IOException { if(literal == null) { out.writeLong(-1L); } else { out.writeLong(literal.getId()); out.writeDouble(literal.getDoubleContent()); writeURI(out, literal.getType()); out.writeLong(literal.getCreated().getTime()); } }
/** * Efficiently serialize a KiWiBooleanLiteral to a DataOutput destination. * * @param out the destination * @param literal the KiWiBooleanLiteral to serialize * @throws IOException */ public static void writeBooleanLiteral(DataOutput out, KiWiBooleanLiteral literal) throws IOException { if(literal == null) { out.writeLong(-1L); } else { out.writeLong(literal.getId()); out.writeBoolean(literal.booleanValue()); writeURI(out, literal.getType()); out.writeLong(literal.getCreated().getTime()); } }
/** * Efficiently serialize a KiWiIntLiteral to a DataOutput destination. * * @param out the destination * @param literal the KiWiIntLiteral to serialize * @throws IOException */ public static void writeIntLiteral(DataOutput out, KiWiIntLiteral literal) throws IOException { if(literal == null) { out.writeLong(-1L); } else { out.writeLong(literal.getId()); out.writeLong(literal.getIntContent()); writeURI(out, literal.getType()); out.writeLong(literal.getCreated().getTime()); } }
/** * Efficiently serialize a KiWiDoubleLiteral to a DataOutput destination. * * @param out the destination * @param literal the KiWiDoubleLiteral to serialize * @throws IOException */ public static void writeDoubleLiteral(DataOutput out, KiWiDoubleLiteral literal) throws IOException { if(literal == null) { out.writeLong(-1L); } else { out.writeLong(literal.getId()); out.writeDouble(literal.getDoubleContent()); writeURI(out, literal.getType()); out.writeLong(literal.getCreated().getTime()); } }
/** * Efficiently serialize a KiWiBooleanLiteral to a DataOutput destination. * * @param out the destination * @param literal the KiWiBooleanLiteral to serialize * @throws IOException */ public static void writeBooleanLiteral(DataOutput out, KiWiBooleanLiteral literal) throws IOException { if(literal == null) { out.writeLong(-1L); } else { out.writeLong(literal.getId()); out.writeBoolean(literal.booleanValue()); writeURI(out, literal.getType()); out.writeLong(literal.getCreated().getTime()); } }
/** * Efficiently serialize a KiWiIntLiteral to a DataOutput destination. * * @param out the destination * @param literal the KiWiIntLiteral to serialize * @throws IOException */ public static void writeIntLiteral(DataOutput out, KiWiIntLiteral literal) throws IOException { if(literal == null) { out.writeLong(-1L); } else { out.writeLong(literal.getId()); out.writeLong(literal.getIntContent()); writeURI(out, literal.getType()); out.writeLong(literal.getCreated().getTime()); } }
/** * Efficiently serialize a KiWiDateLiteral to a DataOutput destination. * * @param out the destination * @param literal the KiWiDateLiteral to serialize * @throws IOException */ public static void writeDateLiteral(DataOutput out, KiWiDateLiteral literal) throws IOException { if(literal == null) { out.writeLong(-1L); } else { out.writeLong(literal.getId()); out.writeLong(literal.getDateContent().getMillis()); out.writeInt(literal.getDateContent().getZone().getOffset(literal.getDateContent())); writeURI(out, literal.getType()); out.writeLong(literal.getCreated().getTime()); } }
/** * Efficiently serialize a KiWiDateLiteral to a DataOutput destination. * * @param out the destination * @param literal the KiWiDateLiteral to serialize * @throws IOException */ public static void writeDateLiteral(DataOutput out, KiWiDateLiteral literal) throws IOException { if(literal == null) { out.writeLong(-1L); } else { out.writeLong(literal.getId()); out.writeLong(literal.getDateContent().getMillis()); out.writeInt(literal.getDateContent().getZone().getOffset(literal.getDateContent())); writeURI(out, literal.getType()); out.writeLong(literal.getCreated().getTime()); } }
/** * Efficiently serialize a KiWiStringLiteral to a DataOutput destination. * * @param out the destination * @param literal the KiWiStringLiteral to serialize * @throws IOException */ public static void writeStringLiteral(DataOutput out, KiWiStringLiteral literal) throws IOException { if(literal == null) { out.writeLong(-1L); } else { out.writeLong(literal.getId()); writeContent(out, literal.getContent()); if(langTable.containsKey(literal.getLanguage())) { out.writeByte(langTable.get(literal.getLanguage())); } else { out.writeByte(LANG_UNKNOWN); DataIO.writeString(out, literal.getLanguage()); } writeURI(out, literal.getType()); out.writeLong(literal.getCreated().getTime()); } }
/** * Efficiently serialize a KiWiStringLiteral to a DataOutput destination. * * @param out the destination * @param literal the KiWiStringLiteral to serialize * @throws IOException */ public static void writeStringLiteral(DataOutput out, KiWiStringLiteral literal) throws IOException { if(literal == null) { out.writeLong(-1L); } else { out.writeLong(literal.getId()); writeContent(out, literal.getContent()); if(langTable.containsKey(literal.getLanguage())) { out.writeByte(langTable.get(literal.getLanguage())); } else { out.writeByte(LANG_UNKNOWN); DataIO.writeString(out, literal.getLanguage()); } writeURI(out, literal.getType()); out.writeLong(literal.getCreated().getTime()); } }
switch (type) { case TYPE_URI: writeURI(output, (KiWiUriResource) node); break; case TYPE_BNODE:
switch (type) { case TYPE_URI: writeURI(output, (KiWiUriResource) node); break; case TYPE_BNODE: