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

net.sourceforge.plantuml.syntax.SyntaxResult Maven / Gradle / Ivy

There is a newer version: 1.2025.0
Show newest version
// THIS FILE HAS BEEN GENERATED BY A PREPROCESSOR.
package net.sourceforge.plantuml.syntax;

import java.io.IOException;
import java.io.OutputStream;
import java.util.Collection;
import java.util.Collections;
import java.util.TreeSet;

import net.sourceforge.plantuml.FileFormatOption;
import net.sourceforge.plantuml.error.PSystemError;
import net.sourceforge.plantuml.skin.UmlDiagramType;
import net.sourceforge.plantuml.utils.LineLocation;

public class SyntaxResult {
	// ::remove file when __CORE__

	private UmlDiagramType umlDiagramType;
	private boolean isError;
	private String description;
	private Collection errors = new TreeSet<>();
	private boolean hasCmapData;
	private PSystemError systemError;
	private LineLocation lineLocation;

	public UmlDiagramType getUmlDiagramType() {
		return umlDiagramType;
	}

	public boolean isError() {
		return isError;
	}

	public String getDescription() {
		return description;
	}

	public Collection getErrors() {
		return Collections.unmodifiableCollection(errors);
	}

	public void setUmlDiagramType(UmlDiagramType umlDiagramType) {
		this.umlDiagramType = umlDiagramType;
	}

	public void setError(boolean isError) {
		this.isError = isError;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public void addErrorText(String error) {
		this.errors.add(error);
	}

	public final boolean hasCmapData() {
		return hasCmapData;
	}

	public final void setCmapData(boolean hasCmapData) {
		this.hasCmapData = hasCmapData;
	}

	public void setSystemError(PSystemError systemError) {
		this.systemError = systemError;
	}

	public void generateDiagramDescriptionForError(OutputStream os, FileFormatOption fileFormatOption)
			throws IOException {
		if (systemError == null)
			throw new IllegalStateException();

		systemError.exportDiagram(os, 0, fileFormatOption);
	}

	public void setLineLocation(LineLocation lineLocation) {
		this.lineLocation = lineLocation;
	}

	public LineLocation getLineLocation() {
		return lineLocation;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy