serialization - types only

Only type defs for now, will add in the actual stuff once this is okay'd.

Sort of odd way of getting all the maps but the alternatives are exposing them directly or using reflection, both of which I feel are worse.

Oh, and checkstyles suck... it dies on java 8 features (lambdas).
I would be okay with exposing it, at least in the form of an immutable copy (that's what `getNodes()` and `getConnections()` do, or at least what they should do).