HiRISE

HiRISE.HiPlan.HiWeb
Class Person

java.lang.Object
  extended by HiRISE.HiPlan.HiWeb.Person

public class Person
extends Object

A representation of an entry in the HiCat People table. Only a limited subset of the People table fields are included in this class.

Version:
1.7
Author:
Christian Schaller - UA/PIRL

Field Summary
static String DEVELOPER
           
static String EDITOR
           
static String EPO
           
static String HIROC_STAFF
           
static String HITS
           
static String ID
          Class identification name with source code version and date.
static String POSTDOC_STUDENT
           
static String PUB
           
static String QUEST_CHALLENGE
           
static String STL
           
static String TAG
           
static String TEAM_MEMBER
           
static String VALIDATOR
           
 
Constructor Summary
Person(String username, Database database)
           
 
Method Summary
 String additional_names()
           
 String affiliation()
           
 String country()
           
 String email_address()
           
 String family_name()
           
 String given_name()
           
 Vector<String> groups()
          Gets the list of groups to which the Person belongs.
 int id()
           
 boolean is_developer()
          Tests whether the Person is a HiRISE software developer.
 boolean is_editor()
          Tests whether the Person is a HiRISE editor.
 boolean is_hits()
          Tests whether the Person is a HiRISE targeting specialist.
 boolean is_in_group(String group)
          Tests whether the Person is in the named group.
 boolean is_stl()
          Tests whether the Person is a Science Theme Lead.
 boolean is_stl(String science_theme)
          Tests whether the Person is a Science Theme Lead for a given science theme.
 String name_suffix()
           
 String occupation()
           
 Parameter parameter()
          Gets the person as a PVL parameter.
 Vector<String> science_themes()
          Gets the list of science themes applicable to this Person.
 String username()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ID

public static final String ID
Class identification name with source code version and date.

See Also:
Constant Field Values

TEAM_MEMBER

public static final String TEAM_MEMBER
See Also:
Constant Field Values

VALIDATOR

public static final String VALIDATOR
See Also:
Constant Field Values

TAG

public static final String TAG
See Also:
Constant Field Values

EPO

public static final String EPO
See Also:
Constant Field Values

PUB

public static final String PUB
See Also:
Constant Field Values

HIROC_STAFF

public static final String HIROC_STAFF
See Also:
Constant Field Values

POSTDOC_STUDENT

public static final String POSTDOC_STUDENT
See Also:
Constant Field Values

QUEST_CHALLENGE

public static final String QUEST_CHALLENGE
See Also:
Constant Field Values

HITS

public static final String HITS
See Also:
Constant Field Values

STL

public static final String STL
See Also:
Constant Field Values

DEVELOPER

public static final String DEVELOPER
See Also:
Constant Field Values

EDITOR

public static final String EDITOR
See Also:
Constant Field Values
Constructor Detail

Person

public Person(String username,
              Database database)
       throws Configuration_Exception,
              Database_Exception,
              Invalid_Argument_Exception,
              SQLException
Throws:
Configuration_Exception
Database_Exception
Invalid_Argument_Exception
SQLException
Method Detail

id

public int id()

username

public String username()

given_name

public String given_name()

family_name

public String family_name()

additional_names

public String additional_names()

name_suffix

public String name_suffix()

email_address

public String email_address()

occupation

public String occupation()

affiliation

public String affiliation()

country

public String country()

groups

public Vector<String> groups()
Gets the list of groups to which the Person belongs. If the Person is part of no group, the list is empty, but non-null.

Returns:
the Person's groups.

science_themes

public Vector<String> science_themes()
Gets the list of science themes applicable to this Person. If the Person is not associated with an science themes, the list is empty, but non-null.

Returns:
the Person's science themes.

is_in_group

public boolean is_in_group(String group)
Tests whether the Person is in the named group. If the Person's groups include the indicated group, this method returns true. If the the Person is not, or if the group is the null or empty string, it returns false. There is no attempt made to ensure a valid group name is used; if the group is not valid, the method simply returns false.

The test is performed without regard to case.

Parameters:
group - the test group.
Returns:
true if the Person's list of groups includes the input group; false otherwise.

is_hits

public boolean is_hits()
Tests whether the Person is a HiRISE targeting specialist. A Person is such if the Person is in the HiTS group.

Returns:
true if the Person is in the HiTS group, false otherwise.

is_editor

public boolean is_editor()
Tests whether the Person is a HiRISE editor. A Person is such if the Person is in the Editor group.

Returns:
true if the Person is in the Editor group, false otherwise.

is_developer

public boolean is_developer()
Tests whether the Person is a HiRISE software developer. A Person is such if the Person is in the Developer group.

Returns:
true if the Person is in the Developer group, false otherwise.

is_stl

public boolean is_stl()
Tests whether the Person is a Science Theme Lead. A Person is such if the Person is in the STL group.

Returns:
true if the Person is in the STL group, false otherwise.

is_stl

public boolean is_stl(String science_theme)
Tests whether the Person is a Science Theme Lead for a given science theme. A Perons is such iff the Person is in the STL group and the indicated science theme is in the Person's list of science themes. Note that all STLs are treated as STL for the "Other" theme.

The test for science theme is conducted without regard to case.

Parameters:
science_theme - the test science theme.
Returns:
true if the Person is an STL for the indicated theme, false otherwise.

parameter

public Parameter parameter()
Gets the person as a PVL parameter.

Returns:
a parameter representing the person.

HiRISE

Copyright (C) Arizona Board of Regents on behalf of the Planetary Image Research Laboratory, Lunar and Planetary Laboratory at the University of Arizona