private static void addIncompatibilities(final NodeFlag flag1, final NodeFlag flag2) {
        Objects.requireNonNull(flag1);
        Objects.requireNonNull(flag2);

        if (Objects.equals(flag1, flag2)) {
            throw new RuntimeException(flag1 + " can't be incompatible with itself");
        }
        // Map it both ways
        INCOMPATIBLE_FLAGS.computeIfAbsent(flag1, k -> EnumSet.noneOf(NodeFlag.class))
                .add(flag2);
        INCOMPATIBLE_FLAGS.computeIfAbsent(flag2, k -> EnumSet.noneOf(NodeFlag.class))
                .add(flag1);
    }
Use the shortForm for json serialisation to reduce the size of the json as trees can contain a LOT
of nodes.
stroom-core-shared/src/main/java/stroom/explorer/shared/NodeFlag.java