private GraphBuilder cloneGraphBuilder(GraphBuilder graphBuilder) { GraphBuilder clonedGraphBuilder = null; if (graphBuilder == null || graphBuilder.getGraph() == null) { clonedGraphBuilder = new GraphBuilderTopK(this.ontologyManager, false); } else { clonedGraphBuilder = new GraphBuilderTopK(this.ontologyManager, graphBuilder.getGraph()); } return clonedGraphBuilder; }
protected ModelLearningGraph(OntologyManager ontologyManager, boolean emptyInstance, ModelLearningGraphType type) { this.ontologyManager = ontologyManager; if (type == ModelLearningGraphType.Compact) this.graphBuilder = new GraphBuilderTopK(ontologyManager, false); else this.graphBuilder = new GraphBuilder(ontologyManager, false); this.nodeIdFactory = this.graphBuilder.getNodeIdFactory(); this.lastUpdateTime = System.currentTimeMillis(); }
this.graphBuilder = new GraphBuilder(ontologyManager, false); else this.graphBuilder = new GraphBuilderTopK(ontologyManager, false); this.nodeIdFactory = new NodeIdFactory();
protected ModelLearningGraph(OntologyManager ontologyManager, ModelLearningGraphType type) throws IOException { this.ontologyManager = ontologyManager; this.totalNumberOfKnownModels = 0; File file = new File(getGraphJsonName()); if (!file.exists()) { this.initializeFromJsonRepository(); } else { logger.info("loading the alignment graph ..."); DirectedWeightedMultigraph<Node, DefaultLink> graph = GraphUtil.importJson(getGraphJsonName()); if (type == ModelLearningGraphType.Compact) this.graphBuilder = new GraphBuilderTopK(ontologyManager, graph); else this.graphBuilder = new GraphBuilder(ontologyManager, graph, false); this.nodeIdFactory = this.graphBuilder.getNodeIdFactory(); logger.info("loading is done!"); } if (this.graphBuilder.getGraph() != null) { logger.info("number of nodes: " + this.graphBuilder.getGraph().vertexSet().size()); logger.info("number of links: " + this.graphBuilder.getGraph().edgeSet().size()); } this.lastUpdateTime = System.currentTimeMillis(); }
public GraphBuilder getGraphBuilderClone() { GraphBuilder clonedGraphBuilder = null; if (this instanceof ModelLearningGraphSparse) { clonedGraphBuilder = new GraphBuilder(this.ontologyManager, this.getGraphBuilder().getGraph(), false); } else if (this instanceof ModelLearningGraphCompact) { clonedGraphBuilder = new GraphBuilderTopK(this.ontologyManager, this.getGraphBuilder().getGraph()); } return clonedGraphBuilder; }
GraphBuilderTopK gbtk = new GraphBuilderTopK(mgr, false);