public interface Io<R extends GraphReader.ReaderBuilder,W extends GraphWriter.WriterBuilder,M extends Mapper.Builder>
GraphReader
, GraphWriter
and Mapper
.
The Io.Builder
of an Io
instance is supplied to Graph.io(Io.Builder)
and the Graph
implementation can then chose to supply an IoRegistry
to it before returning it. An Io
implementation should use that IoRegistry
to lookup custom serializers to use and register them to the
internal Mapper
(if the format has such capability).Modifier and Type | Interface and Description |
---|---|
static interface |
Io.Builder<I extends Io>
Helps to construct an
Io implementation and should be implemented by every such implementation as
that class will be passed to Graph.io(Io.Builder) by the user. |
static class |
Io.Exceptions |
Modifier and Type | Method and Description |
---|---|
M |
mapper()
Constructs a
Mapper.Builder which is responsible for constructing the abstraction over different
serialization methods. |
R |
reader()
Creates a
GraphReader.ReaderBuilder implementation . |
void |
readGraph(String file)
|
void |
writeGraph(String file)
|
W |
writer()
Creates a
GraphWriter.WriterBuilder implementation . |
R reader()
GraphReader.ReaderBuilder
implementation . Implementers should call the
mapper()
function to feed its result to the builder. In this way, custom class serializers
registered to the Mapper.Builder
by Graph
implementations will end up being used for
the serialization process.W writer()
GraphWriter.WriterBuilder
implementation . Implementers should call the
mapper()
function to feed its result to the builder. In this way, custom class serializers
registered to the Mapper.Builder
by Graph
implementations will end up being used for
the serialization process.M mapper()
Mapper.Builder
which is responsible for constructing the abstraction over different
serialization methods. Implementations should set defaults as required, but most importantly need to
make the appropriate call to Mapper.Builder.addRegistry(IoRegistry)
which will provide the
builder with any required custom serializers of the Graph
.void writeGraph(String file) throws IOException
IOException
void readGraph(String file) throws IOException
IOException
Copyright © 2013–2023 Apache Software Foundation. All rights reserved.