JavaView® v2.00.008

jv.rsrc
Class PsAuthorInfo

java.lang.Object
  |
  +--jv.object.PsObject
        |
        +--jv.rsrc.PsAuthorInfo
All Implemented Interfaces:
java.lang.Cloneable, PsUpdateIf, java.io.Serializable

public final class PsAuthorInfo
extends PsObject

Information on a single author used in resource files.

Version:
20.04.00, 1.00 revised (kp)
20.04.00, 1.00 created (kp)
Author:
Konrad Polthier
See Also:
Serialized Form

Field Summary
static int ADDRESS
          Code to access mailing address of authors with topics separated by '\n'.
static int EMAIL
          Code to access email address of authors.
static int FIRST_NAME
          Code to access first name of authors.
static int LAST_NAME
          Code to access last name of authors.
protected  int m_currAuthor
          Index of currently selected author.
protected  java.lang.String[][] m_info
          All author data.
protected  int m_numAuthors
          Number of authors and length of string arrays of instance variables.
static int ORGANIZATION
          Code to access organization of authors where they are employed.
static int URL
          Code to access url of home page of authors.
 
Fields inherited from class jv.object.PsObject
HAS_CONFIG_PANEL, HAS_INFO_PANEL, HAS_MATERIAL_PANEL, INSPECTOR_INFO, INSPECTOR_INFO_EXT, IS_DELETED, IS_FIXED, IS_SELECTED, IS_USED, m_infoPanel, m_name, m_panelList, m_parent, m_tag, m_updateList, NUM_TAGS
 
Constructor Summary
PsAuthorInfo()
          Information about authors with one array for each info topic.
 
Method Summary
 java.lang.Object clone()
          Duplicate object by recursively cloning all instance variables except inspector panels and lists of registered listeners.
 java.lang.String getInfo(int ind, int code)
          Get information of author with given index.
 int getNumAuthors()
          Get number of authors.
protected static int getNumCodes()
          Get number of codes.
 int getSelectedAuthor()
          Get index of currently selected author.
 PsXmlNode getXmlNode()
          Fills an XML subtree with data from this instance, for example, to print to file.
 void init()
          If instance has missing name then assign default name 'object_NUMBER' where number is the total number of already created instances.
 void setInfo(int ind, int code, java.lang.String name)
          Set information of author with given index.
 void setNumAuthors(int num)
          Set number of authors and allocate space use get/set methods for accessing instance variables.
 void setSelectedAuthor(int ind)
          Select currently active author.
 void setXmlNode(PsXmlNode node)
          Fill this instance with data from an XML node, for example, previously read from file.
 
Methods inherited from class jv.object.PsObject
addInspector, addUpdateListener, clearTag, clone, clone, copy, getFather, getInfoPanel, getInspector, getName, getNumObjects, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, removeInspector, removeUpdateListener, setName, setParent, setTag, toString, update, updatePanels
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FIRST_NAME

public static final int FIRST_NAME
Code to access first name of authors.

LAST_NAME

public static final int LAST_NAME
Code to access last name of authors.

ORGANIZATION

public static final int ORGANIZATION
Code to access organization of authors where they are employed.

ADDRESS

public static final int ADDRESS
Code to access mailing address of authors with topics separated by '\n'.

EMAIL

public static final int EMAIL
Code to access email address of authors.

URL

public static final int URL
Code to access url of home page of authors.

m_numAuthors

protected int m_numAuthors
Number of authors and length of string arrays of instance variables.

m_currAuthor

protected int m_currAuthor
Index of currently selected author.

m_info

protected java.lang.String[][] m_info
All author data. First entry runs through all codes, and second index runs through all authors.
Constructor Detail

PsAuthorInfo

public PsAuthorInfo()
Information about authors with one array for each info topic. Info topics can be accessed with static varibles.
Method Detail

init

public void init()
Description copied from class: PsObject
If instance has missing name then assign default name 'object_NUMBER' where number is the total number of already created instances.
Overrides:
init in class PsObject

clone

public java.lang.Object clone()
Duplicate object by recursively cloning all instance variables except inspector panels and lists of registered listeners.
Overrides:
clone in class PsObject
Following copied from class: jv.object.PsObject
See Also:
PsObject.copy(PsObject)

getSelectedAuthor

public int getSelectedAuthor()
Get index of currently selected author.

setSelectedAuthor

public void setSelectedAuthor(int ind)
Select currently active author.

getNumCodes

protected static int getNumCodes()
Get number of codes. Since codes are directly related to array indices the number codes can be used to automatically access all author information.

getNumAuthors

public int getNumAuthors()
Get number of authors. Other get/set methods to access indexed instance variables allow indices in the range [0,getNumAuthors()-1].

setNumAuthors

public void setNumAuthors(int num)
Set number of authors and allocate space use get/set methods for accessing instance variables.

getInfo

public java.lang.String getInfo(int ind,
                                int code)
Get information of author with given index.

setInfo

public void setInfo(int ind,
                    int code,
                    java.lang.String name)
Set information of author with given index.
Parameters:
index - must be in range [0,numAuthors-1].
code - must be one of the code tags defined in PsAuthorInfo.
name - new information given as string.

getXmlNode

public PsXmlNode getXmlNode()
Fills an XML subtree with data from this instance, for example, to print to file.
Returns:
XML tree filled with data from this instance.

setXmlNode

public void setXmlNode(PsXmlNode node)
Fill this instance with data from an XML node, for example, previously read from file. Argument element type must be 'authors'.
Parameters:
node - XML node of element type 'authors' used to fill this instance with data.

JavaView® v2.00.008

The software JavaView® is copyright protected. All Rights Reserved.