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

nl.esi.metis.aisparser.provenance.AISMessageProvenance Maven / Gradle / Ivy

Go to download

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!
/* ESI AIS Parser
 * 
 * Copyright 2011/2012 by Pierre van de Laar & Pierre America (Embedded Systems Institute)
 * Copyright 2008 by Brian C. Lane 
 * All Rights Reserved
 * 
 */
package nl.esi.metis.aisparser.provenance;

import java.util.ArrayList;
import java.util.List;

import nl.esi.metis.aisparser.annotations.Annotation;

/** An object of this class indicates that information is contained in an VDM message that was obtained from one or more sources together.
 * @author Pierre America
 * @author Pierre van de Laar
 */
public class AISMessageProvenance implements Provenance {
	/** This field contains the provenance for the underlying VDM message */
	private VDMMessageProvenance provenance;

	/** Returns a description of the provenance of the information item. 
	 * In this case, it just forward it to the provenance of the underlying VDM Message. 
	 */
	public VDMMessageProvenance getProvenance() {
		return provenance;
	}


	/** Returns a description of the provenance of the information item. 
	 * In this case, it just forward it to the provenance of the underlying VDM Message. 
	 */
	public String getProvenanceTree(String layout) {
		return provenance.getProvenanceTree(layout);
	}

	/** Returns the time stamp when the information item was created. */
	public double getTime() {
		return provenance.getTime();
	}

	/** The annotations associated with this AIS Message */
	private List annotations = new ArrayList();

	/** Returns the annotations associated with this AIS message. */
	@Override
	public List getAnnotations() {
		List retval = new ArrayList();
		retval.addAll(annotations);
		retval.addAll(provenance.getAnnotations());
		return retval;
	}
	
	/** Constructs a provenance object describing an VDM message that was obtained from one or more parts together.
	 * @param provenance the provenance of the VDMMessage object used to create this AIS Message
	 * @param annotations the annotations associated with this AIS Message
	 */
	public AISMessageProvenance (VDMMessageProvenance provenance, List annotations)
	{
		this.provenance = provenance;
		this.annotations = annotations;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy