no.uio.edd.model.geo
Class GeoModelPersonReg

java.lang.Object
  extended by no.uio.edd.model.geo.GeoModelPersonReg

public class GeoModelPersonReg
extends java.lang.Object

A class for full sets of person information records.

Author:
oeide

Constructor Summary
GeoModelPersonReg(GeoModelRunner inGeoModelRunner, org.w3c.dom.Element rootNode, GeoModelPersonTitCat inGeoModelPersonTitCat)
          Creates a new set based on input data.
 
Method Summary
(package private)  void addLinkPersonregNamenode(java.lang.String linkString)
          Adds a link between a person element and a node representing use of the person's name.
(package private)  void addLinksPersonregNamenodes(org.w3c.dom.Element rootNode)
          Adds a set of links between person elements and nodes representing use of the persons' names.
(package private)  void addSpeakerOfParagraph(java.lang.String linkString)
          Adds to the person object a reference to a paragraph for which a person is the speaker.
(package private)  void addSpeakersOfParagraphs(org.w3c.dom.Element rootNode)
          Adds to the person object a set of reference to paragraphs for which a person is the speaker.
(package private)  java.lang.String FormatAllPersonsFull()
          A report for all persons.
(package private)  java.lang.String FormatAllPersonsWithParagraphsFull()
          A report for all persons who has paragraphs they are speakers for.
(package private)  java.lang.String FormatAllSpeakersWithText()
          A report consisting of all speakers with their spoken text.
 GeoModelPerson getGeoModelPersonFromId(int id)
          Return the person object with the requested id value.
 GeoModelPerson getGeoModelPersonFromId(java.lang.String idTxt)
          Return the person object with the requested id value.
(package private)  GeoModelPerson getGeoModelPersonFromPointingNodeId(java.lang.String nodeId)
          Get a person element from an XML name element.
(package private)  GeoModelPerson getGeoModelPersonFromSpeakerNodeId(java.lang.String nodeId)
          Gets a person element representing the speaker of an XML paragraph type element.
 GeoModelPerson[] getGeoModelPersons()
           
(package private)  java.lang.String getGeoModelPersonsWithChangedCoref()
           
(package private)  GeoModelPersonTitCat getGeoModelPersonTitCat()
          Find the object containing the taxonomy of titles and categories for this person set.
(package private)  java.lang.String[] getIds(java.lang.String linkString)
          Separates an XML type link string and returns the parts as a string array.
(package private)  GeoModelRunner getMyGeoModelRunner()
           
(package private)  void insertCorefs(org.w3c.dom.NodeList inNodeList)
           
(package private)  java.lang.String tableOfSpeakingPersons()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeoModelPersonReg

GeoModelPersonReg(GeoModelRunner inGeoModelRunner,
                  org.w3c.dom.Element rootNode,
                  GeoModelPersonTitCat inGeoModelPersonTitCat)
            throws java.lang.NullPointerException
Creates a new set based on input data.

Parameters:
inGeoModelRunner - The runner holding this object.
rootNode - A TEI node of type personList, containing one or more person elements.
inGeoModelPersonTitCat - An object containing a taxonomy of titles and categories.
Throws:
java.lang.NullPointerException - When there is something wrong with rootNode.
Method Detail

addLinksPersonregNamenodes

void addLinksPersonregNamenodes(org.w3c.dom.Element rootNode)
                          throws javax.xml.datatype.DatatypeConfigurationException
Adds a set of links between person elements and nodes representing use of the persons' names.

Parameters:
rootNode - The node whose children are link elements.
Throws:
javax.xml.datatype.DatatypeConfigurationException - On malformed links format.

addLinkPersonregNamenode

void addLinkPersonregNamenode(java.lang.String linkString)
                        throws javax.xml.datatype.DatatypeConfigurationException
Adds a link between a person element and a node representing use of the person's name.

Parameters:
linkString - An XML type link string, linking two xml:id's.
Throws:
javax.xml.datatype.DatatypeConfigurationException - On malformed link format.

addSpeakersOfParagraphs

void addSpeakersOfParagraphs(org.w3c.dom.Element rootNode)
                       throws javax.xml.datatype.DatatypeConfigurationException
Adds to the person object a set of reference to paragraphs for which a person is the speaker.

Parameters:
rootNode - The node whose children are link elements.
Throws:
javax.xml.datatype.DatatypeConfigurationException - On malformed links format.

addSpeakerOfParagraph

void addSpeakerOfParagraph(java.lang.String linkString)
                     throws javax.xml.datatype.DatatypeConfigurationException
Adds to the person object a reference to a paragraph for which a person is the speaker.

Parameters:
linkString - An XML type link string, linking two xml:id's.
Throws:
javax.xml.datatype.DatatypeConfigurationException - On malformed link format.

getIds

java.lang.String[] getIds(java.lang.String linkString)
                    throws javax.xml.datatype.DatatypeConfigurationException
Separates an XML type link string and returns the parts as a string array.

Parameters:
linkString - The string with an XML link.
Returns:
The parts of the link in a two slots array.
Throws:
javax.xml.datatype.DatatypeConfigurationException - If the XML link in malformed.

FormatAllPersonsFull

java.lang.String FormatAllPersonsFull()
A report for all persons.

Returns:
A string with a printable report for all person information.

FormatAllPersonsWithParagraphsFull

java.lang.String FormatAllPersonsWithParagraphsFull()
A report for all persons who has paragraphs they are speakers for.

Returns:
A string with a printable report for all person information.

FormatAllSpeakersWithText

java.lang.String FormatAllSpeakersWithText()
A report consisting of all speakers with their spoken text.

Returns:
A string containing the report.

getGeoModelPersonTitCat

GeoModelPersonTitCat getGeoModelPersonTitCat()
Find the object containing the taxonomy of titles and categories for this person set.

Returns:
The taxonomy object.

getGeoModelPersonFromPointingNodeId

GeoModelPerson getGeoModelPersonFromPointingNodeId(java.lang.String nodeId)
Get a person element from an XML name element.

Parameters:
nodeId - The xml:id for the name element.
Returns:
The person object, or null if not found.

getGeoModelPersonFromSpeakerNodeId

GeoModelPerson getGeoModelPersonFromSpeakerNodeId(java.lang.String nodeId)
Gets a person element representing the speaker of an XML paragraph type element.

Parameters:
nodeId -
nodeId - The xml:id for the paragraph type element.
Returns:
The person object, or null if not found.

getGeoModelPersonFromId

public GeoModelPerson getGeoModelPersonFromId(int id)
Return the person object with the requested id value.

Parameters:
id - The numeric ID value.
Returns:
The person element, null if it does not exist.

getGeoModelPersonFromId

public GeoModelPerson getGeoModelPersonFromId(java.lang.String idTxt)
Return the person object with the requested id value.

Parameters:
idTxt - The ID value.
Returns:
The person element, null if it does not exist.

getGeoModelPersonsWithChangedCoref

java.lang.String getGeoModelPersonsWithChangedCoref()
Returns:
An XML version of this person reg. TODO: Change this into RDF.

insertCorefs

void insertCorefs(org.w3c.dom.NodeList inNodeList)

getMyGeoModelRunner

GeoModelRunner getMyGeoModelRunner()

tableOfSpeakingPersons

java.lang.String tableOfSpeakingPersons()

getGeoModelPersons

public GeoModelPerson[] getGeoModelPersons()