1 package org.simantics.db.impl.graph;
3 import java.io.DataInput;
4 import java.io.DataOutput;
5 import java.io.IOException;
6 import java.util.IdentityHashMap;
10 import org.simantics.databoard.accessor.reference.ChildReference;
11 import org.simantics.databoard.binding.Binding;
12 import org.simantics.databoard.binding.impl.BindingPrintContext;
13 import org.simantics.databoard.serialization.SerializationException;
14 import org.simantics.databoard.serialization.Serializer;
15 import org.simantics.databoard.util.IdentityPair;
17 import gnu.trove.map.hash.TObjectIntHashMap;
20 * Originally within DelayedWriteGraph, put in separate file in 1.30.0.
22 * @author Antti Villberg
24 class PassthroughSerializerBinding extends Binding {
26 static final Serializer serializer = new Serializer() {
28 public byte[] serialize(Object obj) throws SerializationException {
33 public void serialize(DataOutput out,
34 TObjectIntHashMap<Object> identities, Object obj)
36 throw new Error("Not supported.");
40 public void serialize(DataOutput out, Object obj)
42 throw new Error("Not supported.");
46 public Object deserialize(DataInput in, List<Object> identities)
48 throw new Error("Not supported.");
52 public Object deserialize(DataInput in) throws IOException {
53 throw new Error("Not supported.");
57 public void deserializeTo(DataInput in, List<Object> identities,
58 Object obj) throws IOException {
59 throw new Error("Not supported.");
63 public void deserializeTo(DataInput in, Object obj)
65 throw new Error("Not supported.");
69 public void skip(DataInput in, List<Object> identities)
71 throw new Error("Not supported.");
75 public void skip(DataInput in) throws IOException {
76 throw new Error("Not supported.");
80 public Integer getConstantSize() {
81 throw new Error("Not supported.");
85 public int getSize(Object obj, TObjectIntHashMap<Object> identities)
87 throw new Error("Not supported.");
91 public int getSize(Object obj) throws IOException {
92 throw new Error("Not supported.");
96 public int getMinSize() {
97 throw new Error("Not supported.");
103 public Serializer serializer() {
108 public void accept(Visitor1 v, Object obj) {
109 throw new Error("Not supported.");
113 public <T> T accept(Visitor<T> v) {
114 throw new Error("Not supported.");
118 public boolean isInstance(Object obj) {
119 throw new Error("Not supported.");
123 public void assertInstaceIsValid(Object obj, Set<Object> validInstances)
124 throws org.simantics.databoard.binding.error.BindingException {
125 throw new Error("Not supported.");
129 public int deepHashValue(Object value,
130 IdentityHashMap<Object, Object> hashedObjects)
131 throws org.simantics.databoard.binding.error.BindingException {
132 throw new Error("Not supported.");
136 public int deepCompare(Object o1, Object o2,
137 Set<IdentityPair<Object, Object>> compareHistory)
138 throws org.simantics.databoard.binding.error.BindingException {
139 throw new Error("Not supported.");
143 public void readFrom(Binding srcBinding, Object src, Object dst)
144 throws org.simantics.databoard.binding.error.BindingException {
145 throw new Error("Not supported.");
149 public Object readFromTry(Binding srcBinding, Object src, Object dst)
150 throws org.simantics.databoard.binding.error.BindingException {
151 throw new Error("Not supported.");
155 protected void toString(Object value, BindingPrintContext ctx) throws org.simantics.databoard.binding.error.BindingException {
156 throw new Error("Not supported.");
160 public int getComponentCount() {
161 throw new Error("Not supported.");
165 public Binding getComponentBinding(int index) {
166 throw new Error("Not supported.");
170 public Binding getComponentBinding(ChildReference path) {
171 throw new Error("Not supported.");