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

org.activiti.bpmn.model.parse.Warning Maven / Gradle / Ivy

There is a newer version: 5.13.8
Show newest version
package org.activiti.bpmn.model.parse;

import javax.xml.stream.XMLStreamReader;

import org.activiti.bpmn.model.BaseElement;

public class Warning {

  protected String warningMessage;
  protected String resource;
  protected int line;
  protected int column;
  
  public Warning(String warningMessage, XMLStreamReader xtr) {
    this.warningMessage = warningMessage;
    this.resource = xtr.getLocalName();
    this.line = xtr.getLocation().getLineNumber();
    this.column = xtr.getLocation().getColumnNumber();
  }
  
  public Warning(String warningMessage, BaseElement element) {
    this.warningMessage = warningMessage;
    this.resource = element.getId();
    line = element.getXmlRowNumber();
    column = element.getXmlColumnNumber();
  }
  
  public String toString() {
    return warningMessage + (resource != null ? " | "+resource : "") + " | line " +line + " | column " + column;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy