nl.esi.metis.aisparser.provenance.VDMLineProvenance Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of EsiAisParser Show documentation
Show all versions of EsiAisParser Show documentation
This package supports the parsing of AIS messages in Java. AIS, the Automatic Identification System, is a system aiming at improving maritime safety by exchanging messages between ships, other vehicles in particular aircraft involved in search-and-rescue (SAR), and (fixed) base stations. To be precise, this package support the ITU-R M.1371-4 AIS standard.
See our extensive javadoc and in particular the class AISParser for more information on how to use this package.
The parser was used in the Poseidon project, and is improved in the Metis project to better handle uncertain information. Both projects were led by the Embedded Systems Institute. In both projects Thales Nederlands was the carrying industrial partner, and multiple Dutch universities participated.
The newest version!
package nl.esi.metis.aisparser.provenance;
import java.util.List;
import java.util.ArrayList;
import nl.esi.metis.aisparser.annotations.Annotation;
/** An object of this class indicates that information is interpreted as a valid VDM Line.
*
* It implements the {@link Provenance} interface.
* @author Pierre van de Laar
*/
public class VDMLineProvenance implements Provenance {
/** The source of the line */
private Provenance source;
/** Returns the source of the line. */
public Provenance getSource () {
return source;
}
/** Returns the time stamp when the information item was created. */
public double getTime() {
return source.getTime();
}
/** The annotations associated with this VDM Line */
private List annotations = new ArrayList();
/** Returns annotations associated with the AIVDMLine.
* @return a list of annotations
*/
@Override
public List getAnnotations() {
List retval = new ArrayList();
retval.addAll(annotations);
retval.addAll(source.getAnnotations());
return retval;
}
/** Returns a description of the provenance of the information item.
* @param layout a string that should be added to the beginning of every line
* @return a string describing the provenance, possibly consisting of multiple lines
*/
public String getProvenanceTree(String layout) {
return source.getProvenanceTree(layout);
}
/** Constructs a new object describing information that was interpreted as AIVDMLine.
* @param source source that yielded AIVDMLine input
* @param annotations Annotations specifically associated with this element
*/
public VDMLineProvenance (Provenance source, List annotations)
{
this.source = source;
this.annotations = annotations;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy