Package edu.isi.karma.modeling.alignment

Examples of edu.isi.karma.modeling.alignment.GraphBuilder


    }
  }

  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());
    }
View Full Code Here


      if (new File(graphName).exists()) {
        // read graph from file
        try {
          logger.info("loading the graph ...");
          DirectedWeightedMultigraph<Node, DefaultLink> graph = GraphUtil.importJson(graphName);
          modelLearner = new LODModelLearner(new GraphBuilder(ontologyManager, graph), steinerNodes);
        } catch (Exception e) {
          e.printStackTrace();
        }
      } else
      {
View Full Code Here

      DirectedWeightedMultigraph<Node, DefaultLink> graph =
          GraphUtil.importJson(getGraphJsonName());
      if (type == ModelLearningGraphType.Compact)
        this.graphBuilder = new GraphBuilderTopK(ontologyManager, graph);
      else
        this.graphBuilder = new GraphBuilder(ontologyManager, graph);
      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());
View Full Code Here

  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();
  }
View Full Code Here

  public GraphBuilder getGraphBuilder() {
    return this.graphBuilder;
  }
 
  public GraphBuilder getGraphBuilderClone() {
    GraphBuilder clonedGraphBuilder = null;
    if (this instanceof ModelLearningGraphSparse) {
      clonedGraphBuilder = new GraphBuilder(this.ontologyManager, this.getGraphBuilder().getGraph());
    } else if (this instanceof ModelLearningGraphCompact) {
      clonedGraphBuilder = new GraphBuilderTopK(this.ontologyManager, this.getGraphBuilder().getGraph());
    }
    return clonedGraphBuilder;
  }
View Full Code Here

 
  public void initializeFromJsonRepository() {
    logger.info("initializing the graph from models in the json repository ...");
   
    if (this instanceof ModelLearningGraphSparse)
      this.graphBuilder = new GraphBuilder(ontologyManager, false);
    else
      this.graphBuilder = new GraphBuilderTopK(ontologyManager, false);
    this.nodeIdFactory = new NodeIdFactory();
   
    Set<InternalNode> addedNodes = new HashSet<InternalNode>();
View Full Code Here

      String objectPropertiesFile,
      String dataPropertiesFile) {

    this.ontologyManager = ontologyManager;
    this.nodeIdFactory = new NodeIdFactory();
    this.graphBuilder = new GraphBuilder(this.ontologyManager, false);

    List<Triple> objectPropertiesTriples = null;
    List<Triple> dataPropertiesTriples = null;
    try {
      objectPropertiesTriples = readObjectProperties(objectPropertiesFile);
View Full Code Here

        steinerNodes == null ||
        steinerNodes.isEmpty()) {
      logger.error("cannot instanciate model learner!");
      return;
    }
    GraphBuilder gb = ModelLearningGraph.getInstance(ontologyManager, ModelLearningGraphType.Compact).getGraphBuilder();
    this.ontologyManager = ontologyManager;
    this.steinerNodes = steinerNodes;
    this.graphBuilder = cloneGraphBuilder(gb); // create a copy of the graph builder
    this.nodeIdFactory = this.graphBuilder.getNodeIdFactory();
  }
View Full Code Here

        steinerNodes == null ||
        steinerNodes.isEmpty()) {
      logger.error("cannot instanciate model learner!");
      return;
    }
    GraphBuilder gb = ModelLearningGraph.getInstance(ontologyManager, ModelLearningGraphType.Compact).getGraphBuilder();
    this.ontologyManager = ontologyManager;
    this.steinerNodes = steinerNodes;
    this.graphBuilder = cloneGraphBuilder(gb); // create a copy of the graph builder
    this.nodeIdFactory = this.graphBuilder.getNodeIdFactory();
    if (steinerNodes != null) {
View Full Code Here

    }
  }

  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());
    }
View Full Code Here

TOP

Related Classes of edu.isi.karma.modeling.alignment.GraphBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.