gremlin> g = graph.traversal()
==>graphtraversalsource[tinkergraph[vertices:6 edges:14], standard]
gremlin> subgraph = g.V().hasLabel('person').outE('develops').subgraph('sg').cap('sg').next()
==>tinkergraph[vertices:5 edges:5]
gremlin> sg = subgraph.traversal()
==>graphtraversalsource[tinkergraph[vertices:5 edges:5], standard]
in this case "location" is a multi-property on "person" vertices:
gremlin> sg.V().hasLabel('person').valueMap()
==>[name:[marko],location:[san diego,santa cruz,brussels,santa fe]]
==>[name:[stephen],location:[centreville,dulles,purcellville]]
==>[name:[matthias],location:[bremen,baltimore,oakland,seattle]]
then just write some Gremlin on the subgraph to flatten the multi-properties - here's the pattern that strips out all but the most recently added "location":
gremlin> sg.V().hasLabel('person').
......1> map(properties('location').
......2> group().
......3> by(key()).
......4> by(value()))
==>[location:santa fe]
==>[location:purcellville]
==>[location:seattle]
Note that i'm relying on TinkerGraph ordering here - not sure how JanusGraph will produce the subgraph so you might need to be smarter about how you choose the value from the multilist that you want. The traversal above was just meant to show the mechanics of how to flatten multiproperties to a single property, but you then need to write them back to the subgraph:
gremlin> sg.V().hasLabel('person').as('p').
......1> map(properties('location').
......2> group().
......3> by(key()).
......4> by(value())).as('n').
......5> select('p').
......6> property(select('n').by(keys).unfold(),
......7> select('n').by(values).unfold())
==>v[1]
==>v[7]
==>v[8]
gremlin> sg.V().hasLabel('person').valueMap()
==>[name:[marko],location:[santa fe]]
==>[name:[stephen],location:[purcellville]]
==>[name:[matthias],location:[seattle]]
You can now write the subgraph to graphml.