Jeospace API

org.jeospace.simulation
Class Marshal

java.lang.Object
  extended byorg.jeospace.simulation.Marshal

public class Marshal
extends java.lang.Object

The marshaler for atlas elements. Marshal converts Java objects into xml descriptions.

Version:
$Revision: 1.1.1.1 $
Author:
Rex Melton
See Also:
Angle, Epoch, Attitude, Polar, Ellipsoid, Length, Mass, OrbitalElements, Satellite, ReferenceFrame, Color, Document, Element

Constructor Summary
Marshal(org.w3c.dom.Document doc)
          Construct a marshaler.
 
Method Summary
 org.w3c.dom.Element createAttitude(Attitude attitude)
          Create and return an Element cooresponding to the argument Attitude object
 org.w3c.dom.Element createBox(boolean sensor, Length scale, java.awt.Color color)
          Create and return a descriptor of a Box
 org.w3c.dom.Element createCartesian(Cartesian cartesian)
          Create and return an Element cooresponding to the argument Cartesian object
 org.w3c.dom.Element createColorCode(java.awt.Color color)
          Create and return an Element cooresponding to the argument Color object
 org.w3c.dom.Element createCone(boolean sensor, Length scale, java.awt.Color color)
          Create and return a descriptor of a Cone
 org.w3c.dom.Element createCoveragePlatformComponent(java.lang.String name, ReferenceFrame refFrame, java.awt.Color color)
          Create and return a platform component Element
 org.w3c.dom.Element createDecimalAngle(java.lang.String tag, DecimalAngleUnit unit, Angle angle)
          Create and return an Element cooresponding to the argument Angle object
 org.w3c.dom.Element createEllipsoid(Ellipsoid ellipsoid)
          Create and return an Element cooresponding to the argument Ellipsoid object
 org.w3c.dom.Element createEllipsoidal(Ellipsoidal ellipsoidal)
          Create and return an Element cooresponding to the argument Ellipsoidal object
 org.w3c.dom.Element createEllipticPathSystemComponent(java.lang.String name, ReferenceFrame refFrame, OrbitalElements oe, java.awt.Color color)
          Create and return an elliptic path component Element (a type of system component)
 org.w3c.dom.Element createEpoch(java.lang.String tag, Epoch epoch)
          Create and return an Element cooresponding to the argument Epoch object
 org.w3c.dom.Element createEpoch(java.lang.String tag, EpochFormatStyle style, double julianDay)
          Create and return an Element cooresponding to the arguments
 org.w3c.dom.Element createEpoch(java.lang.String tag, EpochFormatStyle style, Epoch epoch)
          Create and return an Element cooresponding to the argument Epoch object
 org.w3c.dom.Element createIdentification(Identification ident)
          Create and return an identification Element
 org.w3c.dom.Element createInlinePlatformComponent(java.lang.String name, java.lang.String type, ReferenceFrame refFrame, java.lang.String platformName, Length scale, org.w3c.dom.Element[] urlList)
          Create and return a platform component Element
 org.w3c.dom.Element createInlineSystemComponent(java.lang.String name, java.lang.String type, ReferenceFrame refFrame, Length scale, org.w3c.dom.Element[] urlList)
          Create and return a system component Element
 org.w3c.dom.Element createLength(java.lang.String tag, Length length)
          Create and return an Element cooresponding to the argument Length object
 org.w3c.dom.Element createOrbitalElements(OrbitalElements orbitalElements)
          Create and return an orbital element Element
 org.w3c.dom.Element createOrbitalLocator(SimNode from, SimNode to)
          Create and return an Element that contains the path to and identifier of an SimNode component
 org.w3c.dom.Element createOrientation(Attitude attitude)
          Create and return an orientation Element
 org.w3c.dom.Element createOrientationTrack(SimNode from, SimNode to)
          Create and return an orientation Element
 org.w3c.dom.Element createPosition(Polar coordinate)
          Create and return a position Element
 org.w3c.dom.Element createPositionShadow(SimNode from, SimNode to, Length distance)
          Create and return a position Element
 org.w3c.dom.Element createReferenceFrame(ReferenceFrame refFrame)
          Create and return an Element cooresponding to the argument ReferenceFrame object
 org.w3c.dom.Element createSatellite(Satellite satellite)
          Create and return a satellite component Element
 org.w3c.dom.Element createSphere(boolean sensor, Length scale, java.awt.Color color)
          Create and return a descriptor of a Sphere
 org.w3c.dom.Element createSpherePlatformComponent(java.lang.String name, java.lang.String type, ReferenceFrame refFrame, boolean sensor, Length scale, java.awt.Color color)
          Create and return a platform component Element
 org.w3c.dom.Element createSphereSystemComponent(java.lang.String name, java.lang.String type, ReferenceFrame refFrame, boolean sensor, Length scale, java.awt.Color color)
          Create and return a sphere component Element (a type of system component)
 org.w3c.dom.Element createSpherical(Spherical spherical)
          Create and return an Element cooresponding to the argument Spherical object
 org.w3c.dom.Element createUrl(java.lang.String path)
          Create and return an Element cooresponding to the argument url string
 org.w3c.dom.Element createViewpoint(java.lang.String name, ReferenceFrame refFrame, Polar position, Attitude attitude)
          Create and return a viewpoint Element at a fixed position and orientation
 org.w3c.dom.Element createViewpoint(java.lang.String name, ReferenceFrame refFrame, Polar position, SimNode home, SimNode target)
          Create and return a viewpoint Element at a fixed position with an orientation that tracks a target orbital object
 org.w3c.dom.Element createViewpoint(java.lang.String name, ReferenceFrame refFrame, SimNode home, SimNode target, Length distance, Attitude attitude)
          Create and return a viewpoint Element at a fixed orientation with a position that shadows a target orbital object as viewed from a separate orbital object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Marshal

public Marshal(org.w3c.dom.Document doc)
Construct a marshaler.

Method Detail

createViewpoint

public org.w3c.dom.Element createViewpoint(java.lang.String name,
                                           ReferenceFrame refFrame,
                                           Polar position,
                                           Attitude attitude)
Create and return a viewpoint Element at a fixed position and orientation

Parameters:
name - the identifier of the viewpoint
refFrame - the reference frame of the viewpoint
position - the position coordinate of the viewpoint within the system and reference frame
attitude - the orientation coordinate of the viewpoint within the system and reference frame
Returns:
the cooresponding Element

createViewpoint

public org.w3c.dom.Element createViewpoint(java.lang.String name,
                                           ReferenceFrame refFrame,
                                           SimNode home,
                                           SimNode target,
                                           Length distance,
                                           Attitude attitude)
Create and return a viewpoint Element at a fixed orientation with a position that shadows a target orbital object as viewed from a separate orbital object

Parameters:
name - the identifier of the viewpoint
refFrame - the reference frame of the viewpoint
home - the SimNode from which to shadow the target orbital object
target - the SimNode to be shadowed
distance - the distance from the origin of the home system to shadow the target system
attitude - the orientation coordinate of the viewpoint within the system and reference frame
Returns:
the cooresponding Element

createViewpoint

public org.w3c.dom.Element createViewpoint(java.lang.String name,
                                           ReferenceFrame refFrame,
                                           Polar position,
                                           SimNode home,
                                           SimNode target)
Create and return a viewpoint Element at a fixed position with an orientation that tracks a target orbital object

Parameters:
name - the identifier of the viewpoint
refFrame - the reference frame of the viewpoint
position - the position coordinate of the viewpoint within the system and reference frame
home - the SimNode from which to track the target orbital object
target - the SimNode to be tracked
Returns:
the cooresponding Element

createPosition

public org.w3c.dom.Element createPosition(Polar coordinate)
Create and return a position Element

Parameters:
coordinate - the position coordinate within the reference frame
Returns:
the cooresponding Element

createPositionShadow

public org.w3c.dom.Element createPositionShadow(SimNode from,
                                                SimNode to,
                                                Length distance)
Create and return a position Element

Parameters:
from - the SimNode component that the position will shadow from
to - the SimNode component that the position will shadow
distance - the Length distance from the home world to shadow the orbiter at. If the distance is null, the position will be shadowed at the orbiter's position
Returns:
the cooresponding Element

createOrbitalLocator

public org.w3c.dom.Element createOrbitalLocator(SimNode from,
                                                SimNode to)
Create and return an Element that contains the path to and identifier of an SimNode component

Parameters:
from - the source SimNode component
to - the target SimNode component
Returns:
the cooresponding Element

createOrientation

public org.w3c.dom.Element createOrientation(Attitude attitude)
Create and return an orientation Element

Parameters:
attitude - the orientation coordinate within the reference frame
Returns:
the cooresponding Element

createOrientationTrack

public org.w3c.dom.Element createOrientationTrack(SimNode from,
                                                  SimNode to)
Create and return an orientation Element

Parameters:
from - the source SimNode component
to - the target SimNode component
Returns:
the cooresponding Element

createOrbitalElements

public org.w3c.dom.Element createOrbitalElements(OrbitalElements orbitalElements)
Create and return an orbital element Element

Parameters:
orbitalElements - the orbital elements
Returns:
the cooresponding Element

createInlineSystemComponent

public org.w3c.dom.Element createInlineSystemComponent(java.lang.String name,
                                                       java.lang.String type,
                                                       ReferenceFrame refFrame,
                                                       Length scale,
                                                       org.w3c.dom.Element[] urlList)
Create and return a system component Element

Parameters:
name - the identifier of the component
type - the identifier of the type of component
refFrame - the reference frame of the component
scale - the scale to which the component has been created
urlList - an array of urls for the X3D content of the component
Returns:
the cooresponding Element

createEllipticPathSystemComponent

public org.w3c.dom.Element createEllipticPathSystemComponent(java.lang.String name,
                                                             ReferenceFrame refFrame,
                                                             OrbitalElements oe,
                                                             java.awt.Color color)
Create and return an elliptic path component Element (a type of system component)

Parameters:
name - the identifier of the component
refFrame - the reference frame of the component
oe - the orbital elements that describe the elliptic path
color - the color to create the path model
Returns:
the cooresponding Element

createSphereSystemComponent

public org.w3c.dom.Element createSphereSystemComponent(java.lang.String name,
                                                       java.lang.String type,
                                                       ReferenceFrame refFrame,
                                                       boolean sensor,
                                                       Length scale,
                                                       java.awt.Color color)
Create and return a sphere component Element (a type of system component)

Parameters:
name - the identifier of the component
type - the identifier of the type of component
refFrame - the reference frame of the component
sensor - flag indicating that this component should be a navigational marker
scale - the scale to which the component will be created
color - the color of the component
Returns:
the cooresponding Element

createColorCode

public org.w3c.dom.Element createColorCode(java.awt.Color color)
Create and return an Element cooresponding to the argument Color object

Parameters:
color - the Color object
Returns:
the cooresponding Element

createInlinePlatformComponent

public org.w3c.dom.Element createInlinePlatformComponent(java.lang.String name,
                                                         java.lang.String type,
                                                         ReferenceFrame refFrame,
                                                         java.lang.String platformName,
                                                         Length scale,
                                                         org.w3c.dom.Element[] urlList)
Create and return a platform component Element

Parameters:
name - the identifier of the component
type - the identifier of the type of platform
refFrame - the reference frame of the component
platformName - the identifier of the platform (e.g. Satellite) to which this component should be added
scale - the scale to which the component has been created
urlList - an array of urls for the X3D content of the component
Returns:
the cooresponding Element

createSpherePlatformComponent

public org.w3c.dom.Element createSpherePlatformComponent(java.lang.String name,
                                                         java.lang.String type,
                                                         ReferenceFrame refFrame,
                                                         boolean sensor,
                                                         Length scale,
                                                         java.awt.Color color)
Create and return a platform component Element

Parameters:
name - the identifier of the component
type - the identifier of the type of platform
refFrame - the reference frame of the component
sensor - flag indicating that this component should be a navigational marker
scale - the scale of the component
color - the color of the component
Returns:
the cooresponding Element

createCoveragePlatformComponent

public org.w3c.dom.Element createCoveragePlatformComponent(java.lang.String name,
                                                           ReferenceFrame refFrame,
                                                           java.awt.Color color)
Create and return a platform component Element

Parameters:
name - the identifier of the component
refFrame - the reference frame of the component
color - the color of the component
Returns:
the cooresponding Element

createBox

public org.w3c.dom.Element createBox(boolean sensor,
                                     Length scale,
                                     java.awt.Color color)
Create and return a descriptor of a Box

Parameters:
sensor - flag indicating that this component should be a navigational marker
scale - the scale of the component
color - the color of the component
Returns:
the cooresponding Element

createCone

public org.w3c.dom.Element createCone(boolean sensor,
                                      Length scale,
                                      java.awt.Color color)
Create and return a descriptor of a Cone

Parameters:
sensor - flag indicating that this component should be a navigational marker
scale - the scale of the component
color - the color of the component
Returns:
the cooresponding Element

createSphere

public org.w3c.dom.Element createSphere(boolean sensor,
                                        Length scale,
                                        java.awt.Color color)
Create and return a descriptor of a Sphere

Parameters:
sensor - flag indicating that this component should be a navigational marker
scale - the scale of the component
color - the color of the component
Returns:
the cooresponding Element

createSatellite

public org.w3c.dom.Element createSatellite(Satellite satellite)
Create and return a satellite component Element

Parameters:
satellite - the properties object describing the satellite
Returns:
the cooresponding Element

createIdentification

public org.w3c.dom.Element createIdentification(Identification ident)
Create and return an identification Element

Parameters:
ident - the Identification object
Returns:
the cooresponding Element

createUrl

public org.w3c.dom.Element createUrl(java.lang.String path)
Create and return an Element cooresponding to the argument url string

Parameters:
path - the url string
Returns:
the cooresponding Element

createReferenceFrame

public org.w3c.dom.Element createReferenceFrame(ReferenceFrame refFrame)
Create and return an Element cooresponding to the argument ReferenceFrame object

Parameters:
refFrame - the ReferenceFrame object
Returns:
the cooresponding Element

createEllipsoid

public org.w3c.dom.Element createEllipsoid(Ellipsoid ellipsoid)
Create and return an Element cooresponding to the argument Ellipsoid object

Parameters:
ellipsoid - the Ellipsoid object
Returns:
the cooresponding Element

createAttitude

public org.w3c.dom.Element createAttitude(Attitude attitude)
Create and return an Element cooresponding to the argument Attitude object

Parameters:
attitude - the Attitude object
Returns:
the cooresponding Element

createCartesian

public org.w3c.dom.Element createCartesian(Cartesian cartesian)
Create and return an Element cooresponding to the argument Cartesian object

Parameters:
cartesian - the Cartesian object
Returns:
the cooresponding Element

createSpherical

public org.w3c.dom.Element createSpherical(Spherical spherical)
Create and return an Element cooresponding to the argument Spherical object

Parameters:
spherical - the Spherical object
Returns:
the cooresponding Element

createEllipsoidal

public org.w3c.dom.Element createEllipsoidal(Ellipsoidal ellipsoidal)
Create and return an Element cooresponding to the argument Ellipsoidal object

Parameters:
ellipsoidal - the Ellipsoidal object
Returns:
the cooresponding Element

createDecimalAngle

public org.w3c.dom.Element createDecimalAngle(java.lang.String tag,
                                              DecimalAngleUnit unit,
                                              Angle angle)
Create and return an Element cooresponding to the argument Angle object

Parameters:
tag - the tag name to use for the element
unit - the DecimalAngleUnit descriptor to use
angle - the Angle object
Returns:
the cooresponding Element

createLength

public org.w3c.dom.Element createLength(java.lang.String tag,
                                        Length length)
Create and return an Element cooresponding to the argument Length object

Parameters:
tag - the tag name to use for the element
length - the Length object
Returns:
the cooresponding Element

createEpoch

public org.w3c.dom.Element createEpoch(java.lang.String tag,
                                       Epoch epoch)
Create and return an Element cooresponding to the argument Epoch object

Parameters:
tag - the tag name to use for the element
epoch - the Epoch object
Returns:
the cooresponding Element

createEpoch

public org.w3c.dom.Element createEpoch(java.lang.String tag,
                                       EpochFormatStyle style,
                                       Epoch epoch)
Create and return an Element cooresponding to the argument Epoch object

Parameters:
tag - the tag name to use for the element
style - the EpochFormatStyle object
epoch - the Epoch object
Returns:
the cooresponding Element

createEpoch

public org.w3c.dom.Element createEpoch(java.lang.String tag,
                                       EpochFormatStyle style,
                                       double julianDay)
Create and return an Element cooresponding to the arguments

Parameters:
tag - the tag name to use for the element
style - the EpochFormatStyle object
julianDay - the epoch value
Returns:
the cooresponding Element

Jeospace API

Copyright © 2006 - jeospace.org