|
From: Elmer G. <ega...@us...> - 2004-07-27 05:23:34
|
Update of /cvsroot/javaowl/JavaOWL/src/org/javaowl/models/prevalence In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12922/src/org/javaowl/models/prevalence Modified Files: StorageUtil.java AddTripleCommand.java Log Message: Working on prevayler persistence. Serialize through StorageUtil class. Index: StorageUtil.java =================================================================== RCS file: /cvsroot/javaowl/JavaOWL/src/org/javaowl/models/prevalence/StorageUtil.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** StorageUtil.java 27 Jul 2004 04:43:42 -0000 1.3 --- StorageUtil.java 27 Jul 2004 05:23:24 -0000 1.4 *************** *** 33,65 **** * EOS_LEN is the length of EOS (0 or 1). */ ! private String EOS = ""; ! private char EOS_CHAR = ':'; ! private int EOS_LEN = 0; /** * the quote character used to delimit characters and strings. */ ! private char QUOTE_CHAR = '\"'; ! ! /** ! * true if URI's are to be compressed by storing prefixes (an approximation ! * of a namespace) in the JENA_PREFIX table. note that "short" prefixes are ! * not stored, i.e., the prefix length not more than URI_COMPRESS_LENGTH. ! */ ! protected boolean URI_COMPRESS; ! ! /** if URI_COMPRESS is true, compress prefixes that are longer than this. */ ! protected int URI_COMPRESS_LENGTH = 100; ! ! /** The maximum size of an object that can be stored in a Statement table */ ! protected int LONG_OBJECT_LENGTH; ! ! /** The maximum possible value for LONG_OBJECT_LENGTH (db-dependent) */ ! protected int LONG_OBJECT_LENGTH_MAX; /** Set to true if IDs are allocated prior to insert */ ! protected boolean PRE_ALLOCATE_ID; // ======================================================================= --- 33,49 ---- * EOS_LEN is the length of EOS (0 or 1). */ ! private final static String EOS = ""; ! private final static char EOS_CHAR = ':'; ! private final static int EOS_LEN = 0; /** * the quote character used to delimit characters and strings. */ ! private final char QUOTE_CHAR = '\"'; /** Set to true if IDs are allocated prior to insert */ ! private final static boolean PRE_ALLOCATE_ID = false; // ======================================================================= *************** *** 71,87 **** * statements * */ ! protected String SYSTEM_STMT_TABLE; /** Name of the long literal table * */ ! protected String LONG_LIT_TABLE; /** Name of the long URI table * */ ! protected String LONG_URI_TABLE; /** Name of the prefix table * */ ! protected String PREFIX_TABLE; /** Name of the graph table * */ ! protected String GRAPH_TABLE; // ======================================================================= --- 55,71 ---- * statements * */ ! private final static String SYSTEM_STMT_TABLE = ""; /** Name of the long literal table * */ ! private final static String LONG_LIT_TABLE = ""; /** Name of the long URI table * */ ! private final static String LONG_URI_TABLE = ""; /** Name of the prefix table * */ ! private final static String PREFIX_TABLE = ""; /** Name of the graph table * */ ! private final static String GRAPH_TABLE = ""; // ======================================================================= *************** *** 92,98 **** * Instance of SQLCache used by Driver for hard-coded db commands */ ! protected SQLCache m_sql = null; ! protected LRUCache prefixCache = null; /* --- 76,82 ---- * Instance of SQLCache used by Driver for hard-coded db commands */ ! private final static SQLCache m_sql = null; ! private final static LRUCache prefixCache = null; /* *************** *** 157,181 **** */ ! protected static String RDB_CODE_URI = "U"; ! protected static String RDB_CODE_BLANK = "B"; ! protected static String RDB_CODE_LITERAL = "L"; ! protected static String RDB_CODE_VARIABLE = "V"; ! protected static String RDB_CODE_ANY = "A"; ! protected static String RDB_CODE_PREFIX = "P"; ! protected static String RDB_CODE_VALUE = "v"; ! protected static String RDB_CODE_REF = "r"; ! protected static String RDB_CODE_DELIM = ":"; ! protected static char RDB_CODE_DELIM_CHAR = ':'; ! protected static String RDB_CODE_INVALID = "X"; private static final int INDEX_KEY_LENGTH = 0; --- 141,165 ---- */ ! private static String RDB_CODE_URI = "U"; ! private static String RDB_CODE_BLANK = "B"; ! private static String RDB_CODE_LITERAL = "L"; ! private static String RDB_CODE_VARIABLE = "V"; ! private static String RDB_CODE_ANY = "A"; ! private static String RDB_CODE_PREFIX = "P"; ! private static String RDB_CODE_VALUE = "v"; ! private static String RDB_CODE_REF = "r"; ! private static String RDB_CODE_DELIM = ":"; ! private static char RDB_CODE_DELIM_CHAR = ':'; ! private static String RDB_CODE_INVALID = "X"; private static final int INDEX_KEY_LENGTH = 0; *************** *** 186,195 **** * @param Node * The node to convert to a string. Must be a concrete node. - * @param addIfLong - * If the node is a long object and is not in the database, add - * it. * @return the string or null if failure. */ ! public String nodeToRDBString(Node node, boolean addIfLong) throws RDFRDBException { String res = null; --- 170,176 ---- * @param Node * The node to convert to a string. Must be a concrete node. * @return the string or null if failure. */ ! public static String nodeToRDBString(Node node) throws RDFRDBException { String res = null; *************** *** 206,218 **** // databases may become inaccessible. int pos = 0; ! boolean noCompress; String pfx; String qname; - if (URI_COMPRESS == true) { - pos = dbSplitNamespace(uri); - noCompress = (pos == uri.length()) - || (pos <= URI_COMPRESS_LENGTH); - } else - noCompress = true; if (noCompress) { pfx = RDB_CODE_DELIM + RDB_CODE_DELIM; --- 187,193 ---- // databases may become inaccessible. int pos = 0; ! boolean noCompress = true; String pfx; String qname; if (noCompress) { pfx = RDB_CODE_DELIM + RDB_CODE_DELIM; *************** *** 220,224 **** } else { // see if it's cached ! DBIDInt pfxid = uriToPrefix(uri, pos, addIfLong); if (pfxid == null) return res; --- 195,199 ---- } else { // see if it's cached ! DBIDInt pfxid = uriToPrefix(uri, pos); if (pfxid == null) return res; *************** *** 228,243 **** } int encodeLen = RDB_CODE_URI.length() + 1 + pfx.length() + EOS_LEN; - boolean uriIsLong = objectIsLong(encodeLen, qname); - if (uriIsLong) { - int dbid; - // belongs in URI table - DBIDInt uriID = getURIID(qname, addIfLong); - if (uriID == null) - return res; - dbid = uriID.getIntID(); - res = new String(RDB_CODE_URI + RDB_CODE_REF + pfx + dbid); - } else { res = RDB_CODE_URI + RDB_CODE_VALUE + pfx + qname + EOS; - } } else if (node.isLiteral()) { // TODO: may need to encode literal value when datatype is not a --- 203,207 ---- *************** *** 251,292 **** int encodeLen = RDB_CODE_LITERAL.length() + 2 + ld.length() + EOS_LEN; ! boolean litIsLong = objectIsLong(encodeLen, lval); ! if (litIsLong) { ! int dbid; ! // belongs in literal table ! DBIDInt lid = getLiteralID(litNode, addIfLong); ! if (lid == null) ! return res; ! dbid = lid.getIntID(); ! res = new String(RDB_CODE_LITERAL + RDB_CODE_REF ! + RDB_CODE_DELIM + dbid); ! } else { ! res = new String(RDB_CODE_LITERAL + RDB_CODE_VALUE + RDB_CODE_DELIM + ld + lval + EOS); - } } else if (node.isBlank()) { ! String bnid = node.getBlankNodeId().toString(); String delims = "::"; int encodeLen = RDB_CODE_BLANK.length() + 1 + delims.length() + EOS_LEN; - boolean BisLong = objectIsLong(encodeLen, bnid); - if (BisLong) { - int dbid; - // belongs in URI table - DBIDInt URIid = getBlankID(bnid, addIfLong); - if (URIid == null) - return res; - dbid = URIid.getIntID(); - res = new String(RDB_CODE_BLANK + RDB_CODE_REF + delims + dbid); - } else { res = new String(RDB_CODE_BLANK + RDB_CODE_VALUE + delims ! + bnid + EOS); ! } ! } else if (node.isVariable()) { String name = ((Node_Variable) node).getName(); int len = name.length(); - if ((len + 3 + EOS_LEN) > LONG_OBJECT_LENGTH) - throw new JenaException("Variable name too long: " + name); res = RDB_CODE_VARIABLE + RDB_CODE_VALUE + RDB_CODE_DELIM + name + EOS; --- 215,230 ---- int encodeLen = RDB_CODE_LITERAL.length() + 2 + ld.length() + EOS_LEN; ! res = new String(RDB_CODE_LITERAL + RDB_CODE_VALUE + RDB_CODE_DELIM + ld + lval + EOS); } else if (node.isBlank()) { ! String bnID = node.getBlankNodeId().toString(); String delims = "::"; int encodeLen = RDB_CODE_BLANK.length() + 1 + delims.length() + EOS_LEN; res = new String(RDB_CODE_BLANK + RDB_CODE_VALUE + delims ! + bnID + EOS); } else if (node.isVariable()) { String name = ((Node_Variable) node).getName(); int len = name.length(); res = RDB_CODE_VARIABLE + RDB_CODE_VALUE + RDB_CODE_DELIM + name + EOS; *************** *** 308,312 **** * @return The node or null if failure. */ ! public Node rdbStringToNode(String rdbString) throws RDFRDBException { Node res = null; int len = rdbString.length(); --- 246,250 ---- * @return The node or null if failure. */ ! public static Node rdbStringToNode(String rdbString) throws RDFRDBException { Node res = null; int len = rdbString.length(); *************** *** 322,350 **** int npos; ! if (nodeType.equals(RDB_CODE_URI)) { ! ParseInt pi = new ParseInt(pos); ! String prefix = ""; ! rdbStringParseInt(rdbString, pi, false); ! if (pi.val != null) { ! if (URI_COMPRESS == false) ! throw new RDFRDBException( ! "Bad URI: Prefix Compression Disabled: " ! + rdbString); ! prefix = idToPrefix(pi.val.intValue()); ! if (prefix == null) ! throw new RDFRDBException("Bad URI Prefix: " + rdbString); ! } ! pos = pi.pos + 1; ! String qname; ! if (valType.equals(RDB_CODE_REF)) { ! qname = idToURI(rdbString.substring(pos)); ! if (qname == null) ! throw new RDFRDBException("Bad URI: " + rdbString); ! } else ! qname = rdbString.substring(pos, len - EOS_LEN); ! ! res = Node.createURI(prefix + qname); ! ! } else if (nodeType.equals(RDB_CODE_LITERAL)) { ParseInt pi = new ParseInt(pos); String litString = null; --- 260,264 ---- int npos; ! if (nodeType.equals(RDB_CODE_LITERAL)) { ParseInt pi = new ParseInt(pos); String litString = null; *************** *** 360,366 **** len = litString.length(); String lang; ! String dtype; int langLen = 0; ! int dtypeLen = 0; LiteralLabel llabel; pi.pos = 0; --- 274,280 ---- len = litString.length(); String lang; ! String dType; int langLen = 0; ! int dTypeLen = 0; LiteralLabel llabel; pi.pos = 0; *************** *** 373,394 **** rdbStringParseInt(litString, pi, false); if (pi.val == null) ! dtypeLen = 0; else ! dtypeLen = pi.val.intValue(); pos = pi.pos + 1; ! if ((pos + langLen + dtypeLen) > len) throw new RDFRDBException("Malformed Literal: " + litString); lang = litString.substring(pos, pos + langLen); pos = pos + langLen; ! dtype = litString.substring(pos, pos + dtypeLen); ! pos = pos + dtypeLen; String val = litString.substring(pos); ! if ((dtype == null) || (dtype.equals(""))) { llabel = new LiteralLabel(val, lang == null ? "" : lang); } else { RDFDatatype dt = TypeMapper.getInstance().getSafeTypeByName( ! dtype); llabel = new LiteralLabel(val, lang == null ? "" : lang, dt); } --- 287,308 ---- rdbStringParseInt(litString, pi, false); if (pi.val == null) ! dTypeLen = 0; else ! dTypeLen = pi.val.intValue(); pos = pi.pos + 1; ! if ((pos + langLen + dTypeLen) > len) throw new RDFRDBException("Malformed Literal: " + litString); lang = litString.substring(pos, pos + langLen); pos = pos + langLen; ! dType = litString.substring(pos, pos + dTypeLen); ! pos = pos + dTypeLen; String val = litString.substring(pos); ! if ((dType == null) || (dType.equals(""))) { llabel = new LiteralLabel(val, lang == null ? "" : lang); } else { RDFDatatype dt = TypeMapper.getInstance().getSafeTypeByName( ! dType); llabel = new LiteralLabel(val, lang == null ? "" : lang, dt); } *************** *** 435,439 **** * @return the index of the first character of the localname */ ! public static int dbSplitNamespace(String uri) { char ch; int lg = uri.length(); --- 349,353 ---- * @return the index of the first character of the localname */ ! private static int dbSplitNamespace(String uri) { char ch; int lg = uri.length(); *************** *** 460,464 **** } ! class ParseInt { int pos; --- 374,378 ---- } ! private final static class ParseInt { int pos; *************** *** 470,480 **** } ! private void rdbStringParseInt(String RDBString, ParseInt pi, boolean toEnd) { ! int npos = toEnd ? RDBString.length() : RDBString.indexOf( RDB_CODE_DELIM_CHAR, pi.pos); if (npos < 0) { ! throw new RDFRDBException("Bad RDB String: " + RDBString); } ! String intStr = RDBString.substring(pi.pos, npos); pi.pos = npos; if (intStr.equals("")) --- 384,394 ---- } ! private static void rdbStringParseInt(String rdbString, ParseInt pi, boolean toEnd) { ! int npos = toEnd ? rdbString.length() : rdbString.indexOf( RDB_CODE_DELIM_CHAR, pi.pos); if (npos < 0) { ! throw new RDFRDBException("Bad RDB String: " + rdbString); } ! String intStr = rdbString.substring(pi.pos, npos); pi.pos = npos; if (intStr.equals("")) *************** *** 484,498 **** pi.val = new Integer(intStr); } catch (NumberFormatException e1) { ! throw new RDFRDBException("Bad RDB String: " + RDBString); } return; } ! private DBIDInt uriToPrefix(String uri, int pos, boolean add) { DBIDInt res; Object key = prefixCache.getByValue(uri.substring(0, pos)); if (key == null) { RDBLongObject lobj = prefixToLongObject(uri, pos); ! res = getLongObjectID(lobj, PREFIX_TABLE, add); if (res != null) prefixCache.put(res, uri.substring(0, pos)); --- 398,412 ---- pi.val = new Integer(intStr); } catch (NumberFormatException e1) { ! throw new RDFRDBException("Bad RDB String: " + rdbString); } return; } ! private static DBIDInt uriToPrefix(String uri, int pos) { DBIDInt res; Object key = prefixCache.getByValue(uri.substring(0, pos)); if (key == null) { RDBLongObject lobj = prefixToLongObject(uri, pos); ! res = getLongObjectID(lobj, PREFIX_TABLE); if (res != null) prefixCache.put(res, uri.substring(0, pos)); *************** *** 502,506 **** } ! private RDBLongObject prefixToLongObject(String prefix, int split) { RDBLongObject res = new RDBLongObject(); int headLen; --- 416,420 ---- } ! private static RDBLongObject prefixToLongObject(String prefix, int split) { RDBLongObject res = new RDBLongObject(); int headLen; *************** *** 528,532 **** * @return the string. */ ! public String litLangTypeToRDBString(String lang, String dtype) throws RDFRDBException { String res = RDB_CODE_DELIM; --- 442,446 ---- * @return the string. */ ! private static String litLangTypeToRDBString(String lang, String dtype) throws RDFRDBException { String res = RDB_CODE_DELIM; *************** *** 539,553 **** } ! /** ! * Check if an object is long, i.e., it exceeds the length limit for storing ! * in a statement table. ! * ! * @return true if literal is long, else false. ! */ ! protected boolean objectIsLong(int encodingLen, String objAsString) { ! return ((encodingLen + objAsString.length()) > LONG_OBJECT_LENGTH); ! } ! ! class RDBLongObject { String head; /* prefix of long object that can be indexed */ --- 453,457 ---- } ! private final static class RDBLongObject { String head; /* prefix of long object that can be indexed */ *************** *** 557,561 **** } ! protected RDBLongObject literalToLongObject(Node_Literal node) { RDBLongObject res = new RDBLongObject(); int headLen; --- 461,465 ---- } ! private RDBLongObject literalToLongObject(Node_Literal node) { RDBLongObject res = new RDBLongObject(); int headLen; *************** *** 583,587 **** } ! protected long stringToHash(String str) { CRC32 checksum = new CRC32(); checksum.update(str.getBytes()); --- 487,491 ---- } ! private static long stringToHash(String str) { CRC32 checksum = new CRC32(); checksum.update(str.getBytes()); *************** *** 592,598 **** * Return the database ID for the URI, if it exists */ ! public DBIDInt getBlankID(String bstr, boolean add) throws RDFRDBException { ! RDBLongObject lobj = URIToLongObject(bstr, RDB_CODE_BLANK); ! return getLongObjectID(lobj, LONG_URI_TABLE, add); } --- 496,502 ---- * Return the database ID for the URI, if it exists */ ! private DBIDInt getBlankID(String bstr) throws RDFRDBException { ! RDBLongObject lobj = uriToLongObject(bstr, RDB_CODE_BLANK); ! return getLongObjectID(lobj, LONG_URI_TABLE); } *************** *** 600,609 **** * Return the database ID for the URI, if it exists */ ! public DBIDInt getURIID(String qname, boolean add) throws RDFRDBException { ! RDBLongObject lobj = URIToLongObject(qname, RDB_CODE_URI); ! return getLongObjectID(lobj, LONG_URI_TABLE, add); } ! protected RDBLongObject URIToLongObject(String qname, String code) { RDBLongObject res = new RDBLongObject(); int headLen; --- 504,513 ---- * Return the database ID for the URI, if it exists */ ! private DBIDInt getURIID(String qname) throws RDFRDBException { ! RDBLongObject lobj = uriToLongObject(qname, RDB_CODE_URI); ! return getLongObjectID(lobj, LONG_URI_TABLE); } ! private RDBLongObject uriToLongObject(String qname, String code) { RDBLongObject res = new RDBLongObject(); int headLen; *************** *** 628,638 **** * Return the database ID for the literal, if it exists */ ! public DBIDInt getLiteralID(Node_Literal lnode, boolean add) throws RDFRDBException { RDBLongObject lobj = literalToLongObject(lnode); ! return getLongObjectID(lobj, LONG_LIT_TABLE, add); } ! public DBIDInt getLongObjectID(RDBLongObject lobj, String table, boolean add) throws RDFRDBException { try { --- 532,542 ---- * Return the database ID for the literal, if it exists */ ! private DBIDInt getLiteralID(Node_Literal lnode) throws RDFRDBException { RDBLongObject lobj = literalToLongObject(lnode); ! return getLongObjectID(lobj, LONG_LIT_TABLE); } ! private static DBIDInt getLongObjectID(RDBLongObject lobj, String table) throws RDFRDBException { try { *************** *** 650,655 **** result = wrapDBID(rs.getObject(1)); } else { ! if (add) ! result = addRDBLongObject(lobj, table); } m_sql.returnPreparedSQLStatement(ps, opName); --- 554,558 ---- result = wrapDBID(rs.getObject(1)); } else { ! result = addRDBLongObject(lobj, table); } m_sql.returnPreparedSQLStatement(ps, opName); *************** *** 668,672 **** * @return the db index of the added literal */ ! public DBIDInt addRDBLongObject(RDBLongObject lobj, String table) throws RDFRDBException { try { --- 571,575 ---- * @return the db index of the added literal */ ! private static DBIDInt addRDBLongObject(RDBLongObject lobj, String table) throws RDFRDBException { try { *************** *** 721,725 **** * @return */ ! private int getInsertID(String table) { // TODO Auto-generated method stub return 0; --- 624,628 ---- * @return */ ! private static int getInsertID(String table) { // TODO Auto-generated method stub return 0; *************** *** 733,737 **** * @return the prefix string or null if it does not exist. */ ! protected String idToPrefix(int prefixID) { // check cache DBIDInt dbid = new DBIDInt(prefixID); --- 636,640 ---- * @return the prefix string or null if it does not exist. */ ! private static String idToPrefix(int prefixID) { // check cache DBIDInt dbid = new DBIDInt(prefixID); *************** *** 750,754 **** * @return the Blank node string or null if it does not exist. */ ! protected String idToBlank(String bnID) { return idToString(bnID, LONG_URI_TABLE, RDB_CODE_BLANK); } --- 653,657 ---- * @return the Blank node string or null if it does not exist. */ ! private static String idToBlank(String bnID) { return idToString(bnID, LONG_URI_TABLE, RDB_CODE_BLANK); } *************** *** 761,765 **** * @return the uri string or null if it does not exist. */ ! protected String idToURI(String uriID) { return idToString(uriID, LONG_URI_TABLE, RDB_CODE_URI); } --- 664,668 ---- * @return the uri string or null if it does not exist. */ ! private static String idToURI(String uriID) { return idToString(uriID, LONG_URI_TABLE, RDB_CODE_URI); } *************** *** 772,780 **** * @return the long literal string or null if it does not exist. */ ! protected String idToLiteral(int litID) { return idToString(litID, LONG_LIT_TABLE, RDB_CODE_LITERAL); } ! protected String idToString(String dbidAsString, String table, String RDBcode) { int dbID; --- 675,683 ---- * @return the long literal string or null if it does not exist. */ ! private static String idToLiteral(int litID) { return idToString(litID, LONG_LIT_TABLE, RDB_CODE_LITERAL); } ! private static String idToString(String dbidAsString, String table, String RDBcode) { int dbID; *************** *** 788,792 **** } ! protected String idToString(int dbID, String table, String RDBcode) { String res = null; RDBLongObject lobj = idToLongObject(dbID, table); --- 691,695 ---- } ! private static String idToString(int dbID, String table, String RDBcode) { String res = null; RDBLongObject lobj = idToLongObject(dbID, table); *************** *** 803,807 **** } ! protected RDBLongObject idToLongObject(int dbid, String table) { RDBLongObject res = null; try { --- 706,710 ---- } ! private static RDBLongObject idToLongObject(int dbid, String table) { RDBLongObject res = null; try { *************** *** 824,828 **** } ! protected RDBLongObject idToLongObject(String idAsString, String table) { RDBLongObject res = null; int dbid; --- 727,731 ---- } ! private RDBLongObject idToLongObject(String idAsString, String table) { RDBLongObject res = null; int dbid; *************** *** 839,843 **** * java object which meets the DBIDInt interface. */ ! public DBIDInt wrapDBID(Object id) throws RDFRDBException { if (id instanceof Number) { return new DBIDInt(((Number) id).intValue()); --- 742,746 ---- * java object which meets the DBIDInt interface. */ ! private static DBIDInt wrapDBID(Object id) throws RDFRDBException { if (id instanceof Number) { return new DBIDInt(((Number) id).intValue()); Index: AddTripleCommand.java =================================================================== RCS file: /cvsroot/javaowl/JavaOWL/src/org/javaowl/models/prevalence/AddTripleCommand.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AddTripleCommand.java 27 Jul 2004 04:43:42 -0000 1.2 --- AddTripleCommand.java 27 Jul 2004 05:23:24 -0000 1.3 *************** *** 45,58 **** private void writeObject(ObjectOutputStream out) throws IOException { ! //String subject = triple.getSubject().equals(Node.NULL) ? null : ! // m_driver.nodeToRDBString(t.getSubject(),true); ! //String predicate = triple.getPredicate().equals(Node.NULL) ? null : ! // m_driver.nodeToRDBString(t.getPredicate(),true); ! //String object = triple.getObject().equals(Node.NULL) ? null : ! // m_driver.nodeToRDBString(t.getObject(),true); ! //System.out.println(PrintUtil.print(triple)); ! //System.out.println(triple.getSubject() + "^" + triple.getSubject().getClass()); ! //System.out.println(triple.getPredicate() + "^" + triple.getPredicate().getClass()); ! //System.out.println(triple.getObject() + "^" + triple.getObject().getClass()); } --- 45,51 ---- private void writeObject(ObjectOutputStream out) throws IOException { ! out.writeUTF(StorageUtil.nodeToRDBString(triple.getSubject())); ! out.writeUTF(StorageUtil.nodeToRDBString(triple.getPredicate())); ! out.writeUTF(StorageUtil.nodeToRDBString(triple.getObject())); } |