/** * Serialize the ClassHierarchy into the AvroNode. * @param ch ClassHierarchy to serialize * @return a Avro node having class hierarchy */ public AvroNode toAvro(final ClassHierarchy ch) { return newAvroNode(ch.getNamespace()); }
/** * Serialize a class hierarchy into a protocol buffer object. * * @param classHierarchy * @return * @deprecated in 0.12. Use AvroClassHierarchySerializer instead */ public static ClassHierarchyProto.Node serialize(final ClassHierarchy classHierarchy) { return serializeNode(classHierarchy.getNamespace()); }
/** * serialize a class hierarchy into a file. * * @param file * @param classHierarchy * @throws IOException * @deprecated in 0.12. Use AvroClassHierarchySerializer instead */ public static void serialize(final File file, final ClassHierarchy classHierarchy) throws IOException { final ClassHierarchyProto.Node node = serializeNode(classHierarchy.getNamespace()); try (final FileOutputStream output = new FileOutputStream(file)) { try (final DataOutputStream dos = new DataOutputStream(output)) { node.writeTo(dos); } } }
/** * Produce a Graphviz DOT string for a given TANG configuration. * * @param config TANG configuration object. * @param showImpl If true, plot IS-A edges for know implementations. * @param showLegend If true, add legend to the plot. * @return configuration graph represented as a string in Graphviz DOT format. */ public static String getGraphvizString(final Configuration config, final boolean showImpl, final boolean showLegend) { final GraphvizConfigVisitor visitor = new GraphvizConfigVisitor(config, showImpl, showLegend); final Node root = config.getClassHierarchy().getNamespace(); Walk.preorder(visitor, visitor, root); return visitor.toString(); }
for (final Node n : ch.getNamespace().getChildren()) { if (!this.namespace.contains(n.getFullName())) { if (n instanceof NamedParameter) {
for (final Node n : ch.getNamespace().getChildren()) { if (!this.namespace.contains(n.getFullName())) { if (n instanceof NamedParameter) {