jautil
Class JAAvatarsEnv

java.lang.Object
  extended by jautil.JAAvatarsEnv

public class JAAvatarsEnv
extends java.lang.Object

A JA avatars environment provides information about the available avatars based on the JA options settings (JAOptions) and the current execution context (JAEnv). The avatars environment also keeps track of the identity of the currently selected selected avatar.


Field Summary
static java.lang.String ASD_XML_NAME
          ASD (Avatar Structure Definition) XML file name.
static java.lang.String AVATAR_DEF_NAME_ARP
          Avatar definition file name with ".arp" suffix.
static java.lang.String AVATAR_DEF_NAME_JARP
          Avatar definition file name with standard ".jarp" suffix.
static java.lang.String AVATAR_DEF_STEM
          Avatar definition file name stem.
static int AXI_ASD
          Avatar XML Index: for avatar's ASD file.
static int AXI_AVATAR_CONFIG
          Avatar XML Index: for avatar's configuration file.
static int AXI_COMMON_CONFIG
          Avatar XML Index: for common configuration file.
static int AXI_COUNT
          Total count of valid Avatar XML Indices.
static int AXI_NONMANUALS
          Avatar XML Index: for avatar's non-manuals file.
static java.lang.String COMMON_BASE_NAME
          Common avatar data base directory name.
static java.lang.String CONFIG_XML_NAME
          Animgen configuration XML file name.
static java.lang.String NONMANUALS_XML_NAME
          Nonmanuals XML file name.
 
Constructor Summary
JAAvatarsEnv(JAOptions jaopts)
          Constructs a new avatars environment based on the given JA options collection.
 
Method Summary
 int countAvatars()
          Returns the number of avatars in this environment's avatar list.
 java.lang.String currentAvatar()
          Returns the name of this environment's currently selected avatar.
 java.lang.String[] getAvatars()
          Returns this environment's avatar list.
 AvatarDefinitionAccess getDefinition(java.lang.String av)
           
 byte[][] getXMLConfigTexts(java.lang.String av)
          Returns the texts of the XML configuration files for the current avatar, as byte arrays, whose indices are AXI_COMMON_CONFIG, etc.
 boolean isValidAvatar(java.lang.String av)
          Tests for the presence of the given name in the avatar list.
 void setAvatar(java.lang.String av)
          Sets the avatar currently selected in this environment to be the given one, providing it is in the avatar list; otherwise makes no change.
 void terminate()
          Terminates this avatars environment, by terminating each of its cached data access objects.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMMON_BASE_NAME

public static final java.lang.String COMMON_BASE_NAME
Common avatar data base directory name.

See Also:
Constant Field Values

CONFIG_XML_NAME

public static final java.lang.String CONFIG_XML_NAME
Animgen configuration XML file name.

See Also:
Constant Field Values

ASD_XML_NAME

public static final java.lang.String ASD_XML_NAME
ASD (Avatar Structure Definition) XML file name.

See Also:
Constant Field Values

NONMANUALS_XML_NAME

public static final java.lang.String NONMANUALS_XML_NAME
Nonmanuals XML file name.

See Also:
Constant Field Values

AVATAR_DEF_STEM

public static final java.lang.String AVATAR_DEF_STEM
Avatar definition file name stem.

See Also:
Constant Field Values

AVATAR_DEF_NAME_JARP

public static final java.lang.String AVATAR_DEF_NAME_JARP
Avatar definition file name with standard ".jarp" suffix.

See Also:
Constant Field Values

AVATAR_DEF_NAME_ARP

public static final java.lang.String AVATAR_DEF_NAME_ARP
Avatar definition file name with ".arp" suffix.

See Also:
Constant Field Values

AXI_COMMON_CONFIG

public static final int AXI_COMMON_CONFIG
Avatar XML Index: for common configuration file.

See Also:
Constant Field Values

AXI_AVATAR_CONFIG

public static final int AXI_AVATAR_CONFIG
Avatar XML Index: for avatar's configuration file.

See Also:
Constant Field Values

AXI_ASD

public static final int AXI_ASD
Avatar XML Index: for avatar's ASD file.

See Also:
Constant Field Values

AXI_NONMANUALS

public static final int AXI_NONMANUALS
Avatar XML Index: for avatar's non-manuals file.

See Also:
Constant Field Values

AXI_COUNT

public static final int AXI_COUNT
Total count of valid Avatar XML Indices.

See Also:
Constant Field Values
Constructor Detail

JAAvatarsEnv

public JAAvatarsEnv(JAOptions jaopts)
Constructs a new avatars environment based on the given JA options collection.

Method Detail

countAvatars

public int countAvatars()
Returns the number of avatars in this environment's avatar list.


currentAvatar

public java.lang.String currentAvatar()
Returns the name of this environment's currently selected avatar.


getAvatars

public java.lang.String[] getAvatars()
Returns this environment's avatar list.


setAvatar

public void setAvatar(java.lang.String av)
Sets the avatar currently selected in this environment to be the given one, providing it is in the avatar list; otherwise makes no change.


getXMLConfigTexts

public byte[][] getXMLConfigTexts(java.lang.String av)
Returns the texts of the XML configuration files for the current avatar, as byte arrays, whose indices are AXI_COMMON_CONFIG, etc. .


isValidAvatar

public boolean isValidAvatar(java.lang.String av)
Tests for the presence of the given name in the avatar list.


terminate

public void terminate()
Terminates this avatars environment, by terminating each of its cached data access objects.


getDefinition

public AvatarDefinitionAccess getDefinition(java.lang.String av)