fr.cnes.sirius.patrius.assembly
Class MainPart

java.lang.Object
  extended by fr.cnes.sirius.patrius.assembly.MainPart
All Implemented Interfaces:
IPart

public class MainPart
extends Object
implements IPart

-Class to manage the assembly's main part.

-Contains the assembly's main frame and the main part's properties.

Since:
1.1 HISTORY VERSION::FA:231:03/04/2014:bad updating of the assembly's tree of frames END-HISTORY
Version:
$Id: MainPart.java 10215 2014-04-09 14:11:40Z houdroge $
Author:
Thomas Trapier
See Also:
IPart
Concurrency :
not thread-safe
Concurrency comment :
The use of a frame linked to the tree of frames makes this class not thread-safe.

Constructor Summary
MainPart(String inName)
          Constructor of the main part.
 
Method Summary
 void addProperty(IPartProperty property)
          Adds a property to the part.
 Frame getFrame()
           
 String getName()
           
 IPart getParent()
          Returns null : this part has no parent.
 int getPartLevel()
           
 IPartProperty getProperty(PropertyType propertyType)
          Returns a property of the part : if in this part, one exists of the given type.
 boolean hasProperty(PropertyType propertyType)
          Checks if a property of the given type exists in this part.
 boolean isLinkedToOrekitTree()
           
 void reinitializeFrame()
          This method implements no action for the main part.
 void setFrame(UpdatableFrame inFrame)
          Method to modify the frame of the main part.
 void updateFrame(Transform inTransform)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MainPart

public MainPart(String inName)
Constructor of the main part.

Parameters:
inName - the name of the main part
Method Detail

getName

public final String getName()
Specified by:
getName in interface IPart
Returns:
the name of the part

getParent

public final IPart getParent()
Returns null : this part has no parent.

Specified by:
getParent in interface IPart
Returns:
null

getFrame

public final Frame getFrame()
Specified by:
getFrame in interface IPart
Returns:
the associated frame

getProperty

public final IPartProperty getProperty(PropertyType propertyType)
Description copied from interface: IPart
Returns a property of the part : if in this part, one exists of the given type.

Specified by:
getProperty in interface IPart
Parameters:
propertyType - the type of the wanted property
Returns:
the property

addProperty

public final void addProperty(IPartProperty property)
Description copied from interface: IPart
Adds a property to the part.

Specified by:
addProperty in interface IPart
Parameters:
property - the property

hasProperty

public final boolean hasProperty(PropertyType propertyType)
Description copied from interface: IPart
Checks if a property of the given type exists in this part.

Specified by:
hasProperty in interface IPart
Parameters:
propertyType - the type
Returns:
true if the property exists

getPartLevel

public final int getPartLevel()
Specified by:
getPartLevel in interface IPart
Returns:
the level of the part in the tree

reinitializeFrame

public void reinitializeFrame()
This method implements no action for the main part.

Specified by:
reinitializeFrame in interface IPart

updateFrame

public final void updateFrame(Transform inTransform)
                       throws OrekitException
Specified by:
updateFrame in interface IPart
Parameters:
inTransform - new transformation to be applied Updates the part's frame with a new definition of its Transform.
Throws:
OrekitException - if update fails

setFrame

public final void setFrame(UpdatableFrame inFrame)
Method to modify the frame of the main part.

Parameters:
inFrame - the new frame of the main part

isLinkedToOrekitTree

public final boolean isLinkedToOrekitTree()
Returns:
true if the assembly is linked to another tree of frames.


Copyright © 2016 CNES. All Rights Reserved.