All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.lionweb.serialization.extensions.BulkImport Maven / Gradle / Ivy

package io.lionweb.serialization.extensions;

import io.lionweb.lioncore.java.model.ClassifierInstance;
import io.lionweb.lioncore.java.serialization.data.MetaPointer;
import java.util.LinkedList;
import java.util.List;

public class BulkImport {

  private final List attachPoints;
  private final List> nodes;

  public BulkImport() {
    this(new LinkedList<>(), new LinkedList<>());
  }

  public BulkImport(List attachPoints, List> nodes) {
    this.attachPoints = attachPoints;
    this.nodes = nodes;
  }

  public void addNode(ClassifierInstance classifierInstance) {
    nodes.add(classifierInstance);
  }

  public void addAttachPoint(AttachPoint attachPoint) {
    attachPoints.add(attachPoint);
  }

  public List getAttachPoints() {
    return attachPoints;
  }

  public List> getNodes() {
    return nodes;
  }

  public static class AttachPoint {
    public String container;
    public MetaPointer containment;
    public String rootId;

    public AttachPoint(String container, MetaPointer containment, String rootId) {
      this.container = container;
      this.containment = containment;
      this.rootId = rootId;
    }

    public AttachPoint() {}
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy