fr.cnes.sirius.patrius.assembly
Class Part

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

public class Part
extends Object
implements IPart

-Class to manage the assembly's part (the main part is excluded).

-Contains the part's local frame and properties.

Since:
1.1
Version:
$Id: Part.java 10910 2014-10-09 11:26:33Z maggiorani $
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
Part(String inName, IPart inParentPart, Transform inTransform)
          Constructor of a part with a transformation.
 
Method Summary
 void addProperty(IPartProperty property)
          Adds a property to the part.
 UpdatableFrame getFrame()
           
 String getName()
           
 IPart getParent()
           
 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.
 void reinitializeFrame()
          Reinitialize the part's frame with the same Transform.
 void updateFrame(Transform inTransform)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Part

public Part(String inName,
            IPart inParentPart,
            Transform inTransform)
Constructor of a part with a transformation.

Parameters:
inName - the name of the part
inParentPart - the parent part
inTransform - transformation between the part's frame and the parent's one
Method Detail

reinitializeFrame

public final void reinitializeFrame()
Description copied from interface: IPart
Reinitialize the part's frame with the same Transform. This method is ONLY USED WHEN INITIALIZING the main part's frame.

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

getName

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

getParent

public final IPart getParent()
Specified by:
getParent in interface IPart
Returns:
the parent part

getFrame

public final UpdatableFrame 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

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

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


Copyright © 2016 CNES. All Rights Reserved.