* limitations under the License.
* ============LICENSE_END=========================================================
*/
+
package org.onap.aai.dbgen;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.Optional;
+import java.util.function.Consumer;
+
import org.apache.tinkerpop.gremlin.structure.Graph;
import org.apache.tinkerpop.gremlin.structure.io.Io;
import org.apache.tinkerpop.gremlin.structure.io.IoRegistry;
import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONVersion;
import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONWriter;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.Optional;
-import java.util.function.Consumer;
-
/**
- * Constructs GraphSON IO implementations given a {@link Graph} and {@link IoRegistry}. Implementers of the {@link Graph}
+ * Constructs GraphSON IO implementations given a {@link Graph} and {@link IoRegistry}. Implementers of the
+ * {@link Graph}
* interfaces should see the {@link GraphSONMapper} for information on the expectations for the {@link IoRegistry}.
*
* @author Stephen Mallette (http://stephen.genoprime.com)
*/
-public final class GraphSONPartialIO implements Io<GraphSONPartialReader.Builder, GraphSONWriter.Builder, GraphSONMapper.Builder> {
+public final class GraphSONPartialIO
+ implements Io<GraphSONPartialReader.Builder, GraphSONWriter.Builder, GraphSONMapper.Builder> {
private final IoRegistry registry;
private final Graph graph;
private final Optional<Consumer<Mapper.Builder>> onMapper;
*/
@Override
public GraphSONMapper.Builder mapper() {
- final GraphSONMapper.Builder builder = (null == this.registry) ?
- GraphSONMapper.build().version(version) : GraphSONMapper.build().version(version).addRegistry(this.registry);
+ final GraphSONMapper.Builder builder = (null == this.registry) ? GraphSONMapper.build().version(version)
+ : GraphSONMapper.build().version(version).addRegistry(this.registry);
onMapper.ifPresent(c -> c.accept(builder));
return builder;
}
@Override
public GraphSONPartialIO create() {
- if (null == graph) throw new IllegalArgumentException("The graph argument was not specified");
+ if (null == graph)
+ throw new IllegalArgumentException("The graph argument was not specified");
return new GraphSONPartialIO(this);
}
}