public void writeExternal(ObjectOutput out) throws IOException { super.writeExternal(out); int N = getTriplesForSubject(getObject()).size(); out.writeInt(N); for (Triple t : getTriplesForSubject(getObject())) { out.writeObject(tripleFactory.newTriple(null, t.getProperty(), t.getValue())); } }
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { super.readExternal(in); int N = in.readInt(); for (int j = 0; j < N; j++) { Triple t = (Triple) in.readObject(); ((TripleImpl) t).setInstance(getObject()); store.put(t, false); } }