edu.indiana.dde.mylead.common
Class MyLeadPerson

java.lang.Object
  extended by edu.indiana.dde.mylead.common.MyLeadPerson

public class MyLeadPerson
extends java.lang.Object

class MyLeadPerson The person class is used in defining queries to allow any field based on the mcs_writer table (e.g., the creator for investigations, views, collections, or files) to be queries based on multiple possibilities. there is a matchAny/matchAll setting that allows the query to specify whether only one field has to match (e.g., institution or name) or whether all specified fields need to match. The default is matchAll. Each text field also has a separate "exact" setting to specify whether it should be an exact match or whether the criteria is a fragment. Although the mcs_writer has many fields, the person class only allows for querying on the following fields: 1. distinguished name 2. first name 3. last name 4. description 5. institution In designing the query system, it was assumed that queries based on location (other than institution), phone number, email, fax, or zip code would be very rare and unlikely.


Constructor Summary
MyLeadPerson()
           
MyLeadPerson(java.lang.String dName, java.lang.String first, java.lang.String last, java.lang.String desc, java.lang.String inst)
           
 
Method Summary
 void addDescription(MyLeadStrItem descItem)
           
 void addDescription(java.lang.String desc, boolean exact)
           
 void addDn(MyLeadStrItem dName)
           
 void addDn(java.lang.String name, boolean exact)
           
 void addFirstName(MyLeadStrItem fName)
           
 void addFirstName(java.lang.String first, boolean exact)
           
 void addInstitution(MyLeadStrItem instItem)
           
 void addInstitution(java.lang.String inst, boolean exact)
           
 void addLastName(MyLeadStrItem lName)
           
 void addLastName(java.lang.String last, boolean exact)
           
 boolean getMatchAll()
           
 void setMatchAll(boolean matchAll)
           
 java.lang.String wrapPerson(java.lang.String tag)
          wrapPerson public String wrapPerson(String tag) This routine wraps up a "person" definition and returns a string that can then be used in a query definition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MyLeadPerson

public MyLeadPerson()

MyLeadPerson

public MyLeadPerson(java.lang.String dName,
                    java.lang.String first,
                    java.lang.String last,
                    java.lang.String desc,
                    java.lang.String inst)
Method Detail

addDn

public void addDn(java.lang.String name,
                  boolean exact)

addDn

public void addDn(MyLeadStrItem dName)

addFirstName

public void addFirstName(java.lang.String first,
                         boolean exact)

addFirstName

public void addFirstName(MyLeadStrItem fName)

addLastName

public void addLastName(java.lang.String last,
                        boolean exact)

addLastName

public void addLastName(MyLeadStrItem lName)

addDescription

public void addDescription(java.lang.String desc,
                           boolean exact)

addDescription

public void addDescription(MyLeadStrItem descItem)

addInstitution

public void addInstitution(java.lang.String inst,
                           boolean exact)

addInstitution

public void addInstitution(MyLeadStrItem instItem)

setMatchAll

public void setMatchAll(boolean matchAll)

getMatchAll

public boolean getMatchAll()

wrapPerson

public java.lang.String wrapPerson(java.lang.String tag)
wrapPerson public String wrapPerson(String tag) This routine wraps up a "person" definition and returns a string that can then be used in a query definition. The program calling this method passes the tag that it wishes to wrap the person definition in (e.g., creator).

Parameters:
tag - String with the tag to wrap the person definition in.
Returns:
String The XML fragment for this person object.