public class PlanType extends java.lang.Object implements XmlOutputMethods, PropertiesProvider, NameId
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
DEFAULT_ROOT_ELEMENT |
protected PlanActions |
endActions |
protected GraphType |
graph |
protected java.lang.String |
id |
static int |
INIT_HOMEREF |
static int |
INIT_NONE |
static int |
INIT_START_WPT |
protected MissionType |
missionType |
protected PlanElements |
planElements |
protected PlanActions |
startActions |
protected java.util.Vector<VehicleType> |
vehicles |
Constructor and Description |
---|
PlanType(MissionType mt) |
PlanType(java.lang.String xml,
MissionType mt) |
Modifier and Type | Method and Description |
---|---|
void |
addVehicle(java.lang.String vehicle)
Adds the given vehicle to the set of vehicles in this plan
|
org.dom4j.Document |
asDocument() |
org.dom4j.Document |
asDocument(java.lang.String rootElementName) |
org.dom4j.Element |
asElement() |
org.dom4j.Element |
asElement(java.lang.String rootElementName) |
pt.lsts.imc.IMCMessage |
asIMCPlan() |
pt.lsts.imc.IMCMessage |
asIMCPlan(boolean fillInPayloads) |
java.lang.String |
asXML()
Este problema foi resolvido com a versão 1.6.1 do DOM4J.
|
java.lang.String |
asXML(java.lang.String rootElementName)
Este problema foi resolvido com a versão 1.6.1 do DOM4J.
|
protected java.lang.Object |
clone() |
PlanType |
clonePlan() |
PlanType |
copy(java.lang.String newID) |
void |
getAsImage(java.awt.image.BufferedImage img) |
java.lang.String |
getDisplayName() |
PlanActions |
getEndActions() |
java.util.Vector<TransitionType> |
getExitingTransitions(java.lang.String maneuverId) |
GraphType |
getGraph() |
java.lang.String |
getId() |
java.lang.String |
getIdentification() |
MapGroup |
getMapGroup() |
MissionType |
getMissionType() |
PlanElements |
getPlanElements() |
MapType |
getPlanMap() |
com.l2fprod.common.propertysheet.DefaultProperty[] |
getProperties() |
java.lang.String |
getPropertiesDialogTitle() |
java.lang.String[] |
getPropertiesErrors(com.l2fprod.common.propertysheet.Property[] properties) |
PlanActions |
getStartActions() |
int |
getStartMode() |
java.lang.String |
getVehicle() |
java.util.Vector<VehicleType> |
getVehicles() |
VehicleType |
getVehicleType() |
boolean |
hasInitialManeuver() |
boolean |
hasMultipleVehiclesAssociated() |
boolean |
isCompatibleWith(VehicleType vehicle) |
boolean |
isEmpty() |
boolean |
isSaveGotoSequenceAsTrajectory() |
boolean |
isSupportedBy(VehicleType vehicle) |
boolean |
load(java.lang.String xml) |
static void |
main(java.lang.String[] args) |
java.lang.String |
planStatistics() |
void |
setId(java.lang.String id) |
void |
setMapGroup(MapGroup mapGroup) |
void |
setMissionType(MissionType missionType) |
void |
setPayloads() |
void |
setPlanMap(MapType planMap) |
void |
setProperties(com.l2fprod.common.propertysheet.Property[] properties) |
void |
setSaveGotoSequenceAsTrajectory(boolean saveGotoSequenceAsTrajectory) |
void |
setStartMode(int startMode) |
void |
setVehicle(java.lang.String vehicle) |
void |
setVehicle(VehicleType vehicle) |
void |
setVehicles(java.util.Collection<VehicleType> vehicles) |
java.lang.String |
toString() |
java.lang.String |
toStringWithVehicles() |
java.lang.String |
toStringWithVehicles(boolean extended) |
boolean |
validatePlan()
This method verifies that all the maneuvers in this plan have some incoming transition, returning true in that case.
|
public static final int INIT_HOMEREF
public static final int INIT_START_WPT
public static final int INIT_NONE
protected static final java.lang.String DEFAULT_ROOT_ELEMENT
protected java.lang.String id
protected java.util.Vector<VehicleType> vehicles
protected MissionType missionType
protected GraphType graph
protected PlanActions startActions
protected PlanActions endActions
protected PlanElements planElements
public PlanType(MissionType mt)
public PlanType(java.lang.String xml, MissionType mt)
public boolean validatePlan() throws java.lang.Exception
java.lang.Exception
- If some maneuver has no incoming transitions (unreacheable)public boolean load(java.lang.String xml)
pt.lsts.neptus.types.mission.plan.AbstractPlanType#load(java.lang.String)
public java.lang.String getId()
public void setId(java.lang.String id)
id
- The id to set.public java.lang.String getVehicle()
public void addVehicle(java.lang.String vehicle)
vehicle
- The vehicle to be added to this planpublic void setVehicle(java.lang.String vehicle)
vehicle
- The vehicle to set.public void setVehicle(VehicleType vehicle)
vehicle
- public GraphType getGraph()
public java.lang.String asXML()
XmlOutputMethods
FileUtil.saveToFile(String, String)
e afins. Isto porque ao gravar como UTF-8
os caracteres são adulterados guardando por exemplo "é" em 2 caracteres (ou seja pega nos dois caracteres UTF-8 e
transforma-os em 2 UTF-8s).asXML
in interface XmlOutputMethods
public java.lang.String asXML(java.lang.String rootElementName)
XmlOutputMethods
FileUtil.saveToFile(String, String)
e afins. Isto porque ao gravar como UTF-8
os caracteres são adulterados guardando por exemplo "é" em 2 caracteres (ou seja pega nos dois caracteres UTF-8 e
transforma-os em 2 UTF-8s).asXML
in interface XmlOutputMethods
public org.dom4j.Element asElement()
asElement
in interface XmlOutputMethods
public org.dom4j.Element asElement(java.lang.String rootElementName)
asElement
in interface XmlOutputMethods
public org.dom4j.Document asDocument()
asDocument
in interface XmlOutputMethods
public org.dom4j.Document asDocument(java.lang.String rootElementName)
asDocument
in interface XmlOutputMethods
public boolean hasMultipleVehiclesAssociated()
public java.util.Vector<VehicleType> getVehicles()
public void setVehicles(java.util.Collection<VehicleType> vehicles)
public VehicleType getVehicleType()
public boolean isEmpty()
public boolean hasInitialManeuver()
public MissionType getMissionType()
public void setMissionType(MissionType missionType)
missionType
- public MapGroup getMapGroup()
public void setMapGroup(MapGroup mapGroup)
mapGroup
- public MapType getPlanMap()
public void setPlanMap(MapType planMap)
planMap
- public PlanType copy(java.lang.String newID)
newID
- public boolean isSaveGotoSequenceAsTrajectory()
public void setSaveGotoSequenceAsTrajectory(boolean saveGotoSequenceAsTrajectory)
saveGotoSequenceAsTrajectory
- public boolean isSupportedBy(VehicleType vehicle)
vehicle
- public PlanType clonePlan()
protected java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public java.lang.String toStringWithVehicles()
public java.lang.String toStringWithVehicles(boolean extended)
public java.lang.String toString()
toString
in class java.lang.Object
public void setStartMode(int startMode)
startMode
- public int getStartMode()
public java.util.Vector<TransitionType> getExitingTransitions(java.lang.String maneuverId)
maneuverId
- public void setPayloads()
public pt.lsts.imc.IMCMessage asIMCPlan()
public pt.lsts.imc.IMCMessage asIMCPlan(boolean fillInPayloads)
public java.lang.String planStatistics()
public void getAsImage(java.awt.image.BufferedImage img)
public com.l2fprod.common.propertysheet.DefaultProperty[] getProperties()
getProperties
in interface PropertiesProvider
public void setProperties(com.l2fprod.common.propertysheet.Property[] properties)
setProperties
in interface PropertiesProvider
public java.lang.String getPropertiesDialogTitle()
getPropertiesDialogTitle
in interface PropertiesProvider
public java.lang.String[] getPropertiesErrors(com.l2fprod.common.propertysheet.Property[] properties)
getPropertiesErrors
in interface PropertiesProvider
public PlanActions getStartActions()
public PlanActions getEndActions()
public PlanElements getPlanElements()
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
public boolean isCompatibleWith(VehicleType vehicle)
public java.lang.String getIdentification()
getIdentification
in interface NameId
public java.lang.String getDisplayName()
getDisplayName
in interface NameId
Copyright © 2004-2020 FEUP-LSTS and Neptus developers. All Rights Reserved.