public void print() { logger.info("id: " + this.getId()); logger.info("name: " + this.getName()); logger.info("description: " + this.getDescription()); logger.info(GraphUtil.labeledGraphToString(this.graph)); }
public static void main(String[] args) throws Exception { List<SemanticModel> semanticModels = null; try { semanticModels = importSemanticModelsFromJsonFiles(Params.MODEL_DIR, Params.MODEL_MAIN_FILE_EXT); if (semanticModels != null) { for (SemanticModel sm : semanticModels) { sm.print(); sm.writeGraphviz(Params.GRAPHVIS_DIR + sm.getName() + Params.GRAPHVIS_MAIN_FILE_EXT, true, true); } } } catch (IOException e) { e.printStackTrace(); } }
writer.beginObject(); writer.name("id").value(this.getId()); writer.name("name").value(this.getName()); writer.name("description").value(this.getDescription()); writer.name("sourceColumns");
public SemanticModel(SemanticModel semanticModel) { this.id = semanticModel.getId(); this.name = semanticModel.getName(); this.description = semanticModel.getDescription(); this.graph = semanticModel.getGraph(); this.sourceColumns = semanticModel.getSourceColumns(); this.mappingToSourceColumns = semanticModel.getMappingToSourceColumns(); // this.selection = SuperSelectionManager.DEFAULT_SELECTION; }
logger.info(newSource.getName() + "(#attributes:" + newSource.getColumnNodes().size() + ")"); System.out.println(newSource.getName() + "(#attributes:" + newSource.getColumnNodes().size() + ")"); logger.info("======================================================"); resultsArray[0].append(newSource.getName() + "(" + newSource.getColumnNodes().size() + ")" + "\t" + " " + "\t" + " "); if (resultsArray[1].length() > 0) resultsArray[1].append(" \t "); resultsArray[1].append("p \t r \t t"); graphPath + semanticModels.get(newSourceIndex).getName() + Params.GRAPH_JSON_FILE_EXT : graphPath + semanticModels.get(newSourceIndex).getName() + ".knownModels=" + numberOfKnownModels + Params.GRAPH_JSON_FILE_EXT; outputPath + semanticModels.get(newSourceIndex).getName() + Params.GRAPHVIS_OUT_DETAILS_FILE_EXT : outputPath + semanticModels.get(newSourceIndex).getName() + ".knownModels=" + numberOfKnownModels + Params.GRAPHVIS_OUT_DETAILS_FILE_EXT; newSource.getName(), outName, GraphVizLabelType.LocalId,
public static void exportSemanticModelToGraphviz( SemanticModel model, GraphVizLabelType nodeLabelType, GraphVizLabelType linkLabelType, boolean showNodeMetaData, boolean showLinkMetaData, String filename) throws IOException { OutputStream out = new FileOutputStream(filename); org.kohsuke.graphviz.Graph graphViz = new org.kohsuke.graphviz.Graph(); graphViz.attr("fontcolor", "blue"); graphViz.attr("remincross", "true"); graphViz.attr("label", model.getName() == null ? "" : model.getName()); // graphViz.attr("page", "8.5,11"); org.kohsuke.graphviz.Graph gViz = convertToGraphviz(GraphUtil.asDefaultGraph(model.getGraph()), model.getMappingToSourceColumns(), false, nodeLabelType, linkLabelType, showNodeMetaData, showLinkMetaData); gViz.attr("label", "model"); gViz.id("cluster"); graphViz.subGraph(gViz); graphViz.writeTo(out); out.close(); }