de.mpiwg.itgroup.ismi.entry.beans
Class AbstractISMIBean

java.lang.Object
  extended by com.sun.rave.web.ui.appbase.FacesBean
      extended by com.sun.rave.web.ui.appbase.AbstractPageBean
          extended by de.mpiwg.itgroup.ismi.entry.beans.AbstractISMIBean
Direct Known Subclasses:
AbstractAllBean, AbstractISMIObject, CurrentAliasBean, CurrentCityBean, CurrentCollectionBean, CurrentPersonBean, CurrentRepositoryBean, CurrentTextBean, SearchResultBean

public class AbstractISMIBean
extends com.sun.rave.web.ui.appbase.AbstractPageBean

Author:
dwinter Parent class for all the Entry beans for ISMI. Diese Klasse verwaltet jeweils eine Entity zum Editieren. Die Werte kšnnen aus OpenMind gelesen und wieder in OpenMind abgespeichert werden.

Constructor Summary
AbstractISMIBean()
           
 
Method Summary
 void changeLink(com.intellibo.objects.Entity ent, AbstractISMIObject target, java.lang.String label)
          Aendert die bestehende Reation von ent auf eine neues Target.
 void createLink(com.intellibo.objects.Entity ent, AbstractISMIObject targetEnt, java.lang.String relationLabel)
          Erzeugt eine Relation zwischen ent und targetEnt, falls diese noch nicht eistiert.
 void deleteAlias(AbstractISMIObject object, java.lang.String relName, java.lang.String aliasId)
          Loescht einen Alias mit der aliasID und die Relation relName des Objektes.
 void destroy()
          Callback method that is called after rendering is completed for this request, if init() was called (regardless of whether or not this was the page that was actually rendered).
 java.util.List<Alias> getAliasesFromRelation(AbstractISMIObject person2, java.lang.String relName)
           
 java.lang.Boolean getCreate_error()
           
 long getEntityNumber()
           
 Text getSelectedTitle()
           
 java.lang.String getSelectedTitleID()
           
 Witness getSelectedWitness()
           
 java.lang.String getSelectedWitnessID()
           
 java.util.ArrayList<com.intellibo.objects.Entity> getSourcesofTargetRelationsByType(java.lang.String relType, java.lang.String objectType)
          Finds all source entities of a relation with the current object.
 java.util.ArrayList<com.intellibo.objects.Entity> getSourcesofTargetRelationsByType(java.lang.String reltype, java.lang.String objectType, java.lang.String attribute, java.lang.String value)
          Finds all source entities of a definied relation with the current object.
 java.lang.String getUniqueSourcesofTargetRelationsByType(java.lang.String reltype, java.lang.String objectType)
          Finds the id of the first source entity of a defined relation with the current object.
 java.lang.String getUniqueSourcesofTargetRelationsByType(java.lang.String reltype, java.lang.String objectType, java.lang.String attribute, java.lang.String value)
          Finds the id of the first source entity of a defined relation with the current object.
 Witness[] getWitnesses()
           
 java.util.List<javax.faces.model.SelectItem> getWitnessItems()
           
 java.lang.String hijri2gregorian(java.lang.String dt)
          #TODO: sollte in eine andere Klasse ausgelagert werden.
 void init()
          Callback method that is called whenever a page is navigated to, either directly via a URL, or indirectly via page navigation.
 boolean isShowTitle()
           
 boolean isShowWitness()
           
 void preprocess()
          Callback method that is called after the component tree has been restored, but before any event processing takes place.
 void prerender()
          Callback method that is called just before rendering takes place.
 void resetObject(java.lang.Object currentObject)
          Setzt die Felder des currentObject auf die Werte zurueck, die in der Datenbank fŸr die laufenden Entity gespeichert sind.
 javax.faces.event.ValueChangeEvent resetRelation(java.lang.String relName, AbstractISMIObject obj)
          Setzt eine SourceRelation auf den in OpenMind gespeicherten Wert zurueck.
 void setCreate_error(java.lang.Boolean create_error)
           
 void setEntityNumber(java.lang.Long entNumber)
           
 void setField(java.lang.Object object, com.intellibo.objects.Attribute a)
          Setzt den Werte eines Feldes des Objektes object auf den Wert Attributes a.
 void setSelectedTitleID(java.lang.String selectedTitleID)
           
 void setSelectedWitnessID(java.lang.String selectedTitleID)
           
 void setShowTitle(boolean showTitle)
           
 void setShowWitness(boolean showWitness)
           
 java.util.List<java.lang.String> toIDList(java.util.List<javax.faces.model.SelectItem> sitems)
           
 
Methods inherited from class com.sun.rave.web.ui.appbase.AbstractPageBean
afterPhase, beforePhase
 
Methods inherited from class com.sun.rave.web.ui.appbase.FacesBean
retrieveData, saveData
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractISMIBean

public AbstractISMIBean()
Method Detail

toIDList

public java.util.List<java.lang.String> toIDList(java.util.List<javax.faces.model.SelectItem> sitems)
Parameters:
sitems -
Returns:
Returns the list of all values form a list of SelectItems.

init

public void init()

Callback method that is called whenever a page is navigated to, either directly via a URL, or indirectly via page navigation. Customize this method to acquire resources that will be needed for event handlers and lifecycle methods, whether or not this page is performing post back processing.

Note that, if the current request is a postback, the property values of the components do not represent any values submitted with this request. Instead, they represent the property values that were saved for this view when it was rendered.

Overrides:
init in class com.sun.rave.web.ui.appbase.AbstractPageBean

preprocess

public void preprocess()

Callback method that is called after the component tree has been restored, but before any event processing takes place. This method will only be called on a postback request that is processing a form submit. Customize this method to allocate resources that will be required in your event handlers.

Overrides:
preprocess in class com.sun.rave.web.ui.appbase.AbstractPageBean

prerender

public void prerender()

Callback method that is called just before rendering takes place. This method will only be called for the page that will actually be rendered (and not, for example, on a page that handled a postback and then navigated to a different page). Customize this method to allocate resources that will be required for rendering this page.

Overrides:
prerender in class com.sun.rave.web.ui.appbase.AbstractPageBean

destroy

public void destroy()

Callback method that is called after rendering is completed for this request, if init() was called (regardless of whether or not this was the page that was actually rendered). Customize this method to release resources acquired in the init(), preprocess(), or prerender() methods (or acquired during execution of an event handler).

Overrides:
destroy in class com.sun.rave.web.ui.appbase.AbstractPageBean

setEntityNumber

public void setEntityNumber(java.lang.Long entNumber)
Parameters:
entNumber - Sets the number of the current entity. At the sametime the entity itself is changed to the corresponding entity

getEntityNumber

public long getEntityNumber()
Returns:
the entityNumber

getSourcesofTargetRelationsByType

public java.util.ArrayList<com.intellibo.objects.Entity> getSourcesofTargetRelationsByType(java.lang.String relType,
                                                                                           java.lang.String objectType)
Finds all source entities of a relation with the current object.

Parameters:
relType - type of the relation (label).
objectType - object type of the sources to be founds. Relations are not typed therefore it is filtered here.
Returns:
All Entities which are the sources of relations to the current entity.

getSourcesofTargetRelationsByType

public java.util.ArrayList<com.intellibo.objects.Entity> getSourcesofTargetRelationsByType(java.lang.String reltype,
                                                                                           java.lang.String objectType,
                                                                                           java.lang.String attribute,
                                                                                           java.lang.String value)
Finds all source entities of a definied relation with the current object. The result is filtered by the attributes with the given value.

Parameters:
reltype -
objectType -
attribute -
value -
Returns:

getUniqueSourcesofTargetRelationsByType

public java.lang.String getUniqueSourcesofTargetRelationsByType(java.lang.String reltype,
                                                                java.lang.String objectType,
                                                                java.lang.String attribute,
                                                                java.lang.String value)
Finds the id of the first source entity of a defined relation with the current object. The result is filtered by the attributes with the given value.

Parameters:
reltype -
objectType -
attribute -
value -
Returns:

getUniqueSourcesofTargetRelationsByType

public java.lang.String getUniqueSourcesofTargetRelationsByType(java.lang.String reltype,
                                                                java.lang.String objectType)
Finds the id of the first source entity of a defined relation with the current object.

Parameters:
reltype -
objectType -
Returns:

setCreate_error

public void setCreate_error(java.lang.Boolean create_error)

getCreate_error

public java.lang.Boolean getCreate_error()

resetObject

public void resetObject(java.lang.Object currentObject)
Setzt die Felder des currentObject auf die Werte zurueck, die in der Datenbank fŸr die laufenden Entity gespeichert sind.

Parameters:
currentObject -

setField

public void setField(java.lang.Object object,
                     com.intellibo.objects.Attribute a)
Setzt den Werte eines Feldes des Objektes object auf den Wert Attributes a. Der Name des Feldes ist gleich dem Name des Attributes.

Parameters:
object -
a -

createLink

public void createLink(com.intellibo.objects.Entity ent,
                       AbstractISMIObject targetEnt,
                       java.lang.String relationLabel)
Erzeugt eine Relation zwischen ent und targetEnt, falls diese noch nicht eistiert.

Parameters:
ent -
targetEnt -
relationLabel -

changeLink

public void changeLink(com.intellibo.objects.Entity ent,
                       AbstractISMIObject target,
                       java.lang.String label)
Aendert die bestehende Reation von ent auf eine neues Target.

Parameters:
ent -
target -
label -

resetRelation

public javax.faces.event.ValueChangeEvent resetRelation(java.lang.String relName,
                                                        AbstractISMIObject obj)
Setzt eine SourceRelation auf den in OpenMind gespeicherten Wert zurueck. obj wird auf dabei mit den in OpenMind gespeicherten Target initialisiert.

Parameters:
relName -
obj -
Returns:

hijri2gregorian

public java.lang.String hijri2gregorian(java.lang.String dt)
#TODO: sollte in eine andere Klasse ausgelagert werden.

Parameters:
dt -
Returns:

deleteAlias

public void deleteAlias(AbstractISMIObject object,
                        java.lang.String relName,
                        java.lang.String aliasId)
Loescht einen Alias mit der aliasID und die Relation relName des Objektes.

Parameters:
object -
relName -
aliasId -

getAliasesFromRelation

public java.util.List<Alias> getAliasesFromRelation(AbstractISMIObject person2,
                                                    java.lang.String relName)

getSelectedWitness

public Witness getSelectedWitness()

setSelectedWitnessID

public void setSelectedWitnessID(java.lang.String selectedTitleID)

getSelectedWitnessID

public java.lang.String getSelectedWitnessID()

setShowWitness

public void setShowWitness(boolean showWitness)

isShowWitness

public boolean isShowWitness()

getSelectedTitle

public Text getSelectedTitle()

setSelectedTitleID

public void setSelectedTitleID(java.lang.String selectedTitleID)

getSelectedTitleID

public java.lang.String getSelectedTitleID()

setShowTitle

public void setShowTitle(boolean showTitle)

isShowTitle

public boolean isShowTitle()

getWitnesses

public Witness[] getWitnesses()

getWitnessItems

public java.util.List<javax.faces.model.SelectItem> getWitnessItems()