private RDFGraphvizRenderer(final Builder builder) { this.nodeNamespaces = builder.nodeNamespaces == null ? ImmutableSet.of() // : ImmutableSet.copyOf(builder.nodeNamespaces); this.nodeTypes = builder.nodeTypes == null ? ImmutableSet.of() // : ImmutableSet.copyOf(builder.nodeTypes); this.ignoredProperties = builder.ignoredProperties == null ? ImmutableSet.of() // : ImmutableSet.copyOf(builder.ignoredProperties); this.collapsedProperties = builder.collapsedProperties == null ? ImmutableSet.of() // : ImmutableSet.copyOf(builder.collapsedProperties); this.colorMap = builder.colorMap == null ? null : ImmutableMap.copyOf(builder.colorMap); this.styleMap = builder.styleMap == null ? null : ImmutableMap.copyOf(builder.styleMap); this.namespaces = builder.namespaces == null ? Namespaces.DEFAULT : builder.namespaces; this.valueComparator = builder.valueComparator != null ? Ordering .from(builder.valueComparator) : Ordering.from(Statements.valueComparator()); this.graphvizCommand = builder.graphvizCommand == null ? "neato" : builder.graphvizCommand; }
this.nodeNamespaces = builder.nodeNamespaces == null ? DEFAULT_NODE_NAMESPACES : ImmutableSet.copyOf(builder.nodeNamespaces); this.valueComparator = Ordering.from(Statements.valueComparator(Iterables.toArray( builder.rankedNamespaces == null ? DEFAULT_RANKED_NAMESPACES : builder.rankedNamespaces, String.class)));
private NAFRenderer(final Builder builder) { this.colorMap = builder.colorMap == null ? DEFAULT_COLOR_MAP : ImmutableMap .copyOf(builder.colorMap); this.valueComparator = Ordering.from(Statements.valueComparator(Iterables.toArray( builder.rankedNamespaces == null ? DEFAULT_RANKED_NAMESPACES : builder.rankedNamespaces, String.class))); this.statementComparator = Ordering.from(Statements.statementComparator("spoc", this.valueComparator)); this.graphvizRenderer = RDFGraphvizRenderer .builder() .withNodeNamespaces( builder.nodeNamespaces == null ? DEFAULT_NODE_NAMESPACES : builder.nodeNamespaces) .withNodeTypes(builder.nodeTypes == null ? DEFAULT_NODE_TYPES : builder.nodeTypes) .withValueComparator(this.valueComparator) // .withColorMap(this.colorMap) // .withStyleMap(MoreObjects.firstNonNull(builder.styleMap, DEFAULT_STYLE_MAP)) // .withGraphvizCommand("neato").build(); this.template = MoreObjects.firstNonNull(builder.template, DEFAULT_TEMPLATE); this.templateParameters = builder.templateParameters; }
final Set<URI> ids = new TreeSet<>(Statements.valueComparator()); final Map<URI, TupleExpr> heads = new HashMap<>(); final Map<URI, TupleExpr> bodies = new HashMap<>();