Skip to content
Snippets Groups Projects
Commit a7126e96 authored by Andrea Burattin's avatar Andrea Burattin
Browse files

Fixed some javadoc

parent 67515def
No related branches found
No related tags found
No related merge requests found
......@@ -33,6 +33,9 @@ public class BEvent implements Serializable, Comparable<BEvent> {
private Map<String, Serializable> traceAttributes;
private Map<String, Serializable> logAttributes;
/**
* Constructor of a new event
*/
public BEvent() {
this.eventAttributes = new HashMap<>();
this.traceAttributes = new HashMap<>();
......@@ -43,8 +46,9 @@ public class BEvent implements Serializable, Comparable<BEvent> {
// Factories
//
/**
* Creates a new {@link XTrace} referring to one event
* Creates a new {@link BEvent} referring to one event
*
* @param processName the name of the process
* @param activityName the name of the activity
* @param caseId the identifier of the process instance
* @param time the time when the event has happened
......@@ -82,8 +86,9 @@ public class BEvent implements Serializable, Comparable<BEvent> {
}
/**
* Creates a new {@link XTrace} referring to one event
* Creates a new {@link BEvent} referring to one event
*
* @param processName the name of the process
* @param activityName the name of the activity
* @param caseId the identifier of the process instance
* @param time the time when the event has happened
......@@ -99,6 +104,7 @@ public class BEvent implements Serializable, Comparable<BEvent> {
* Creates a new {@link XTrace} referring to one event. The time of the
* event is set to the current time
*
* @param processName the name of the process
* @param activityName the name of the activity
* @param caseId the identifier of the process instance
* @return the new event
......
......@@ -44,7 +44,8 @@ public abstract class StreamMiningAlgorithm<T extends Response> extends RichFlat
*
* @param event the new event being observed
* @return the result of the mining of the event
* @throws Exception
* @throws Exception general exception that can occur with the ingestion of
* the event
*/
public abstract T ingest(BEvent event) throws Exception;
......@@ -60,7 +61,7 @@ public abstract class StreamMiningAlgorithm<T extends Response> extends RichFlat
}
return processedEvents.value().longValue();
} catch (IOException e) {
e.printStackTrace();
// this exception would mean that there are serialization issues
}
return -1;
}
......@@ -78,7 +79,7 @@ public abstract class StreamMiningAlgorithm<T extends Response> extends RichFlat
}
processedEvents.update(value);
} catch (IOException e) {
e.printStackTrace();
// this exception would mean that there are serialization issues
}
T tmp = ingest(event);
if (tmp != null) {
......
......@@ -21,9 +21,8 @@ public class DirectlyFollowsRelation extends Response {
/**
* Constructor
*
* @param caseId the case id
* @param first the first event
* @param second the second event
* @param from the first event
* @param to the second event
*/
public DirectlyFollowsRelation(BEvent from, BEvent to) {
if (!from.getTraceName().equals(to.getTraceName())) {
......
package beamline.sources;
import org.apache.flink.streaming.api.functions.source.RichSourceFunction;
import org.apache.flink.streaming.api.functions.source.SourceFunction;
import beamline.events.BEvent;
/**
* This interface is supposed just to bind the type of {@link SourceFunction} to
* {@link BEvent}.
* This interface is supposed to bind the type of {@link RichSourceFunction} to
* {@link BEvent} and to provide minimal infrastructure to check if the sourece
* is currently running.
*
* @author Andrea Burattin
*/
......@@ -17,8 +17,9 @@ public abstract class BeamlineAbstractSource extends RichSourceFunction<BEvent>
private boolean running = true;
/**
* Returns if the source is still generting events
*
* @return
* @return whether the current source is still running or not
*/
public boolean isRunning() {
return running;
......
......@@ -97,6 +97,7 @@ public class CSVLogSource extends BeamlineAbstractSource {
}
/**
* This class is used to configure the parser of the CSV
*
* @author Andrea Burattin
*/
......@@ -106,9 +107,10 @@ public class CSVLogSource extends BeamlineAbstractSource {
char separator = ICSVParser.DEFAULT_SEPARATOR;
/**
* Configures the fields separator
*
* @param separator
* @return
* @param separator the separator for the lines' fields
* @return the parser configuration object
*/
public ParserConfiguration withSeparator(char separator) {
this.separator = separator;
......
......@@ -27,9 +27,9 @@ import beamline.exceptions.EventException;
import beamline.exceptions.SourceException;
/**
* This implementation of a {@link BeamlineAbstractSource} produces events according to
* the events contained in an {@link XLog}. The events are first sorted
* according to their timestamp and then sent.
* This implementation of a {@link BeamlineAbstractSource} produces events
* according to the events contained in an {@link XLog}. The events are first
* sorted according to their timestamp and then sent.
*
* @author Andrea Burattin
*/
......@@ -45,8 +45,8 @@ public class XesLogSource extends BeamlineAbstractSource {
*
* @param fileName the file containing the log to use. The file can be
* either a file parsed by {@link XesXmlGZIPParser} or {@link XesXmlParser}
* (i.e., extensions <code>.xes.gz</code> or <code>.xes</code>). If the file
* is none of these, then {@link #prepare()} will throw an exception.
* (i.e., extensions <code>.xes.gz</code> or <code>.xes</code>) or any other
* parser currently supported by the OpenXES library.
*/
public XesLogSource(String fileName) {
this.fileName = fileName;
......@@ -56,7 +56,8 @@ public class XesLogSource extends BeamlineAbstractSource {
* Constructs a source from the given log
*
* @param log the log to use as source
* @throws IOException
* @throws IOException an exception that might occur when a temporary file
* is created
*/
public XesLogSource(XLog log) throws IOException {
File tmpFile = File.createTempFile("file", ".xes.gz");
......
/**
* This package contains all classes necessary to construct
* {@link io.reactivex.rxjava3.core.Observable}s that can be used in the rest of
* the project.
* {@link org.apache.flink.streaming.api.functions.source.RichSourceFunction}s
* that can be used in the rest of the project.
*/
package beamline.sources;
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment