jmri
Interface IdTag

Show UML class diagram
All Superinterfaces:
NamedBean
All Known Subinterfaces:
RailCom
All Known Implementing Classes:
AbstractIdTag, DefaultIdTag, DefaultRailCom

public interface IdTag
extends NamedBean

IdTag represents a tag that might be attached to a specific piece of rolling stock to uniquely identify it.

An example would be an RFID-tag.


This file is part of JMRI.

JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.

JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Since:
2.11.4

Field Summary
static int SEEN
          Constant representing a "seen" state, indicating that the tag has been seen.
static int UNSEEN
          Constant representing an "unseen" state, indicating that the ID tag has not yet been seen.
 
Fields inherited from interface jmri.NamedBean
INCONSISTENT, UNKNOWN
 
Method Summary
 String getTagID()
          Retrieve a string representation of this tag ID This is the system name without the identifier
 Date getWhenLastSeen()
          Return the Date/Time when this tag was last seen, or null if not yet seen
 Reporter getWhereLastSeen()
          Return the Reporter that last saw this tag, or null if not yet seen
 void load(org.jdom.Element e)
          Load contents of IdTag object from an XML element
 void setWhereLastSeen(Reporter reporter)
          Set the Reporter that last saw this tag.
 org.jdom.Element store(boolean storeState)
          Store the contents of this IdTag object as an XML element
 
Methods inherited from interface jmri.NamedBean
addPropertyChangeListener, addPropertyChangeListener, dispose, getComment, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListeners, getPropertyKeys, getState, getSystemName, getUserName, removeProperty, removePropertyChangeListener, setComment, setProperty, setState, setUserName, updateListenerRef
 

Field Detail

UNSEEN

static final int UNSEEN
Constant representing an "unseen" state, indicating that the ID tag has not yet been seen.

See Also:
Constant Field Values

SEEN

static final int SEEN
Constant representing a "seen" state, indicating that the tag has been seen.

To determine where this object was last seen, use:

To determine when this object was last seen, use:

See Also:
Constant Field Values
Method Detail

getTagID

String getTagID()
Retrieve a string representation of this tag ID

This is the system name without the identifier

Returns:
the tag ID

setWhereLastSeen

void setWhereLastSeen(Reporter reporter)
Set the Reporter that last saw this tag.

Also sets the Date/Time when last seen

Parameters:
reporter - Reporter object where last seen
See Also:
getWhereLastSeen(), getWhenLastSeen()

getWhereLastSeen

Reporter getWhereLastSeen()
Return the Reporter that last saw this tag, or null if not yet seen

Returns:
Reporter object where last seen, or null

getWhenLastSeen

Date getWhenLastSeen()
Return the Date/Time when this tag was last seen, or null if not yet seen

Returns:
Date object when last seen, or null

store

org.jdom.Element store(boolean storeState)
Store the contents of this IdTag object as an XML element

Parameters:
storeState - Determine if the state of this IdTag should be stored
Returns:
Element with IdTag contents

load

void load(org.jdom.Element e)
Load contents of IdTag object from an XML element

Parameters:
e - Element containing IdTag details


Copyright © 1997-2013 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads