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

ai.stapi.graphoperations.graphLanguage.graphDescription.AbstractGraphDescription Maven / Gradle / Ivy

There is a newer version: 0.3.2
Show newest version
package ai.stapi.graphoperations.graphLanguage.graphDescription;

import ai.stapi.graphoperations.graphLanguage.AbstractGraphDeclaration;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

public abstract class AbstractGraphDescription extends AbstractGraphDeclaration
    implements GraphDescription {

  protected List childGraphDescriptions;
  protected String traversingType;

  protected AbstractGraphDescription() {
  }

  protected AbstractGraphDescription(
      String deserializationType,
      String traversingType,
      List childGraphDescriptions
  ) {
    super(deserializationType);
    this.traversingType = traversingType;
    this.childGraphDescriptions = childGraphDescriptions;
  }

  protected AbstractGraphDescription(
      String deserializationType,
      String traversingType,
      GraphDescription... childGraphDescriptions
  ) {
    super(deserializationType);
    this.traversingType = traversingType;
    this.childGraphDescriptions =
        Arrays.stream(childGraphDescriptions).collect(Collectors.toCollection(ArrayList::new));
  }

  @Override
  public String getDeclarationType() {
    return GraphDescription.DECLARATION_TYPE;
  }

  @Override
  public String getGraphTraversingType() {
    return traversingType;
  }

  @Override
  public List getChildGraphDescriptions() {
    return this.childGraphDescriptions;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy