Gremlin Pipelines in Java with Orient 3.x

I’m trying to upgrade from Orient 2 to 3.0. in my old code base, I’m using the following construct:

import com.tinkerpop.blueprints.Direction;    
import com.tinkerpop.blueprints.Edge;
import com.tinkerpop.blueprints.impls.orient.OrientBaseGraph;
import com.tinkerpop.blueprints.impls.orient.OrientEdge;
import com.tinkerpop.blueprints.impls.orient.OrientElement;
import com.tinkerpop.blueprints.impls.orient.OrientVertex;
import com.tinkerpop.gremlin.java.GremlinPipeline;

GremlinPipeline<OrientVertex, Object> pipeline = new GremlinPipeline<>();
pipeline.start(startVertex)
    .bothE("linkType")
    .bothV()
...

Try as I might, I can’t figure out the equivalent approach for Orient 3.0. I don’t know what to import, how to open the database, and how to use a pipeline on that database. Been googling and trying the docs for days now - I’d appreciate an example for dummies that replicates the above.

I am running orientdb-tp3-3.0.31, for what it’s worth. I can connect to the database, too, using an ODatabasePool and - I think - acquiring a session from there.