cz.cuni.amis.nb.pogamut.unreal.timeline.records
Class TLEntity

Package class diagram package TLEntity
java.lang.Object
  extended by cz.cuni.amis.nb.pogamut.unreal.timeline.records.TLEntity
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
TLAgentEntity

public abstract class TLEntity
extends Object
implements Serializable

One entity is part of TLDatabase and it contains several TLRecord s that represent various data.

Author:
Honza
See Also:
Serialized Form

Nested Class Summary
static class TLEntity.Adapter
           
static interface TLEntity.Listener
           
static class TLEntity.State
           
 
Field Summary
protected  TLDatabase database
          Reference to the database that contains this entity
protected  TLFolder storageFolder
           
 
Constructor Summary
protected TLEntity(TLDatabase database, long timestamp)
          Create a new timeline entity belonging to db first seen at timestamp
 
Method Summary
 void addListener(TLEntity.Listener listener)
           
 void addLogRecording(Logger logger)
          Adds TLLogRecorder = this TLEntity will store all log messages that will come from the log.
 void finish()
          Finsih this entity, after calling this method, new data are not expected to appear.
 Color getColor()
           
 TLDatabase getDatabase()
           
abstract  String getDisplayName()
           
protected  Double getDoublePropertyValue(TLFolder folder, String propName, long time)
          Get property with name propName in folder folder.
 long getEndTime()
           
 TLFolder getFolder()
           
protected  TLEntity.Listener[] getListeners()
          Get all listeners in array
abstract  cz.cuni.amis.pogamut.base3d.worldview.object.Location getLocation(long time)
           
 Set<TLLogRecorder> getLogRecorders()
          Get unmodifiable set of all log recorders this entity has.
abstract  cz.cuni.amis.pogamut.base3d.worldview.object.Rotation getRotation(long time)
           
 long getStartTime()
           
 TLEntity.State getState()
           
abstract  cz.cuni.amis.pogamut.base3d.worldview.object.Velocity getVelocity(long time)
           
 void printInfo(PrintStream stream)
           
 void removeListener(TLEntity.Listener listener)
           
protected  void setColor(Color color)
           
protected  void setEndTime(long newEnd)
          Set new timestamp indicating when was last seen some info from the entity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

database

protected TLDatabase database
Reference to the database that contains this entity


storageFolder

protected TLFolder storageFolder
Constructor Detail

TLEntity

protected TLEntity(TLDatabase database,
                   long timestamp)
Create a new timeline entity belonging to db first seen at timestamp

Parameters:
database - db this entity belongs to
timestamp - Starting timestamp of entity
Method Detail

getListeners

protected TLEntity.Listener[] getListeners()
Get all listeners in array

Returns:

addListener

public void addListener(TLEntity.Listener listener)

removeListener

public void removeListener(TLEntity.Listener listener)

getStartTime

public long getStartTime()

getEndTime

public long getEndTime()

setEndTime

protected void setEndTime(long newEnd)
Set new timestamp indicating when was last seen some info from the entity.

Parameters:
newEnd -

finish

public void finish()
Finsih this entity, after calling this method, new data are not expected to appear. Should be used if user stops the recording or if underlying entity stops working.


getDatabase

public TLDatabase getDatabase()

getDisplayName

public abstract String getDisplayName()

addLogRecording

public void addLogRecording(Logger logger)
Adds TLLogRecorder = this TLEntity will store all log messages that will come from the log. So be very carefull if you have only little memory.


getLogRecorders

public Set<TLLogRecorder> getLogRecorders()
Get unmodifiable set of all log recorders this entity has. Used during widget initialization

Returns:

getState

public TLEntity.State getState()

getDoublePropertyValue

protected Double getDoublePropertyValue(TLFolder folder,
                                        String propName,
                                        long time)
                                 throws NoSuchFieldException,
                                        DataFormatException
Get property with name propName in folder folder.

Parameters:
folder - folder we are looking in.
propName - Name of property
Returns:
Throws:
NoSuchFieldException - property is not in the folder
DataFormatException - If property is not double of value is not specified

setColor

protected void setColor(Color color)

getColor

public Color getColor()

getLocation

public abstract cz.cuni.amis.pogamut.base3d.worldview.object.Location getLocation(long time)

getRotation

public abstract cz.cuni.amis.pogamut.base3d.worldview.object.Rotation getRotation(long time)

getVelocity

public abstract cz.cuni.amis.pogamut.base3d.worldview.object.Velocity getVelocity(long time)

getFolder

public TLFolder getFolder()

printInfo

public void printInfo(PrintStream stream)


Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.