Added Remove functionality for all components and fixed broken Edit for Passage Translations

This commit is contained in:
travismccauley 2003-12-19 19:32:04 +00:00
parent c9fa3dbb16
commit 57c4afe8bc
38 changed files with 430 additions and 146 deletions

BIN
images/remove.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 B

View file

@ -8,7 +8,7 @@
<property name="connection.datasource">java:comp/env/jdbc/lex-datasource</property>
<property name="show_sql">true</property>
<property name="use_outer_join">false</property>
<property name="use_outer_join">true</property>
<property name="dialect">net.sf.hibernate.dialect.MySQLDialect</property>
<!-- <property name="max_fetch_depth">15</property>
-->

View file

@ -209,7 +209,10 @@ public class LexActionServlet extends HttpServlet
commands.put( "displayFull", new DisplayCommand( "displayEntry.jsp" ) );
commands.put( "editEntry", new DisplayCommand( "displayEntry.jsp" ) );
commands.put( "remove", new RemoveCommand( "displayEntry.jsp" ) );
commands.put( "getRemoveForm", new GetRemoveFormCommand( "displayForm.jsp?formMode=remove", Boolean.FALSE ) );
commands.put( "getRemoveTermForm", new GetRemoveFormCommand( "displayForm.jsp?formMode=remove", Boolean.TRUE ) );
commands.put( "remove", new RemoveCommand( "displayEntry.jsp", Boolean.FALSE ) );
commands.put( "removeTerm", new RemoveCommand( "menu.jsp", Boolean.TRUE ) );
commands.put( "setMetaPrefs", new PreferencesCommand( "menu.jsp" ) );
commands.put( "setMetaDefaults", new PreferencesCommand( "menu.jsp" ) );

View file

@ -426,6 +426,28 @@ public class LexComponentRepository
}
/**
* Description of the Method
*
* @param component Description of the Parameter
* @exception LexRepositoryException Description of the Exception
*/
public static void remove( ILexComponent component ) throws LexRepositoryException
{
try
{
beginTransaction();
getSession().delete( component );
endTransaction( true );
}
catch ( HibernateException he )
{
throw new LexRepositoryException( he );
}
}
/**
* Description of the Method
*

View file

@ -66,7 +66,8 @@ public class LogoutServlet extends HttpServlet
UserSessionManager.getInstance().removeVisit( session );
try
{
UserSessionManager.doRedirect( request, response, goodbyePage );
String redirect = response.encodeRedirectURL( getGoodbyePage() );
response.sendRedirect( redirect );
}
catch ( IOException e )
{

View file

@ -1,7 +1,7 @@
package org.thdl.lex.commands;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
@ -58,7 +58,7 @@ public class GetUpdateFormCommand extends LexCommand implements Command
{
String next = getNext();
Visit visit = UserSessionManager.getInstance().getVisit( req.getSession( true ) );
LexQuery query = visit.getQuery( );
LexQuery query = visit.getQuery();
ITerm term = query.getEntry();
String msg = null;
ThdlUser user = visit.getUser();
@ -74,6 +74,26 @@ public class GetUpdateFormCommand extends LexCommand implements Command
{
component = query.getEntry();
}
else if ( component instanceof Translatable && null != ( (Translatable) component ).getTranslationOf() )
{
LexComponentRepository.update( term );
Translatable translation = (Translatable) component;
Translatable source = null;
try
{
source = (Translatable) translation.getClass().newInstance();
}
catch ( Exception e )
{
throw new CommandException( e );
}
source.setMetaId( translation.getTranslationOf() );
source.setParentId( translation.getParentId() );
source = (Translatable) term.findChild( source );
List translationList = source.getTranslations();
component = (ILexComponent) translationList.get( translationList.indexOf( translation ) );
req.setAttribute( LexConstants.ORIGINALBEAN_REQ_ATTR, source );
}
else
{
LexComponentRepository.update( term );
@ -93,33 +113,6 @@ public class GetUpdateFormCommand extends LexCommand implements Command
}
//if the component is a translation of another component get the original as well to assist in editing
if ( component instanceof Translatable )
{
Translatable translatable = (Translatable) component;
if ( null != translatable.getTranslationOf() && translatable.getTranslationOf().intValue() > 0 )
{
try
{
LexComponent source = (LexComponent) translatable.getClass().newInstance();
Integer sourcePk = translatable.getTranslationOf();
source.setMetaId( sourcePk );
LexComponentRepository.loadByPk( source );
req.setAttribute( LexConstants.ORIGINALBEAN_REQ_ATTR, source );
}
catch ( InstantiationException ie )
{
throw new CommandException( ie );
}
catch ( IllegalAccessException iae )
{
throw new CommandException( iae );
}
catch ( LexRepositoryException lre )
{
throw new CommandException( lre );
}
}
}
msg = "You have reached the Update Form";
visit.setDisplayMode( "addEditForm" );

View file

@ -91,6 +91,24 @@ public class InsertCommand extends LexCommand implements Command
ILexComponent parent = term.findParent( component.getParentId() );
parent.getAnalyticalNotes().add( component );
}
else if ( component instanceof Translatable && null != ( (Translatable) component ).getTranslationOf() )
{
Translatable translation = (Translatable) component;
Translatable source = null;
try
{
source = (Translatable) translation.getClass().newInstance();
}
catch ( Exception e )
{
throw new CommandException( e );
}
source.setMetaId( translation.getTranslationOf() );
source.setParentId( translation.getParentId() );
source = (Translatable) term.findChild( source );
List l = source.getTranslations();
l.add( translation );
}
else
{
term.addChild( component );

View file

@ -1,23 +1,51 @@
package org.thdl.lex.commands;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import org.thdl.lex.*;
import org.thdl.lex.component.*;
import org.thdl.users.*;
/**
* Description of the Class
*
* @author travis
* @created October 14, 2003
* @created October 6, 2003
*/
public class RemoveCommand extends LexCommand implements Command
{
private boolean termMode;
/**
* Sets the termMode attribute of the GetFormCommand object
*
* @param termMode The new termMode value
*/
public void setTermMode( boolean termMode )
{
this.termMode = termMode;
}
/**
* Gets the termMode attribute of the GetFormCommand object
*
* @return The termMode value
*/
public boolean isTermMode()
{
return termMode;
}
//helper methods
/**
* Description of the Method
@ -29,46 +57,95 @@ public class RemoveCommand extends LexCommand implements Command
*/
public String execute( HttpServletRequest req, ILexComponent component ) throws CommandException
{
String msg = null;
String next = getNext();
Visit visit = UserSessionManager.getInstance().getVisit( req.getSession( true ) );
DisplayHelper displayHelper = visit.getHelper();
try
{
HttpSession ses = req.getSession( false );
if ( null == ses )
{
throw new CommandException( "Could not remove component, user's session has expired" );
}
/*
try
{
setComponent( (LexComponent)component );
getComponent().query( Integer.parseInt( req.getParameter("id") ) );
String msg=null;
int successCode = getComponent().remove();
msg=null;
String label = req.getParameter( LexConstants.LABEL_REQ_PARAM );
if (successCode > 0)
{ msg = "The " + label +" was successfully removed."; }
else
{ msg = "Failure: The " + getComponent().getLabel() +" was not removed."; }
req.setAttribute(LexConstants.MESSAGE_REQ_ATTR, msg);
*/
return getNext();
/*
}
catch (LexComponentException e)
{
throw new CommandException("Lex Action Exception: " + e.getMessage());
}
*/
ThdlUser user = visit.getUser();
LexQuery query = visit.getQuery();
ITerm term = query.getEntry();
if ( CommandToken.isValid( req ) && validate( user, component ) )
{
if ( isTermMode() )
{
term.setDeleted( Boolean.TRUE );
LexComponentRepository.update( term );
query.setEntry( null );
}
else if ( component instanceof Translatable && null != ( (Translatable) component ).getTranslationOf() )
{
Translatable translation = (Translatable) component;
Translatable source = null;
try
{
source = (Translatable) translation.getClass().newInstance();
}
catch ( Exception e )
{
throw new CommandException( e );
}
source.setMetaId( translation.getTranslationOf() );
source.setParentId( translation.getParentId() );
source = (Translatable) term.findChild( source );
List translationList = source.getTranslations();
ILexComponent doomedComponent = (ILexComponent) translationList.get( translationList.indexOf( translation ) );
doomedComponent.setDeleted( Boolean.TRUE );
LexComponentRepository.update( doomedComponent );
translationList.remove( doomedComponent );
LexComponentRepository.update( term );
}
else
{
LexLogger.debug( "Checking component state from updateCommand BEFORE component assignment" );
LexLogger.debugComponent( component );
ILexComponent doomedComponent = term.findChild( component );
doomedComponent.setDeleted( Boolean.TRUE );
LexComponentRepository.update( doomedComponent );
term.removeChild( doomedComponent );
LexComponentRepository.update( term );
}
msg = "Successfully removed component";
}
else
{
msg = CommandToken.isValid( req ) ? "Unauthorized update attempted" : "Invalid reload attempted.";
}
return next;
}
catch ( LexComponentException e )
{
throw new CommandException( "Command had trouble processing " + component, e );
}
catch ( LexRepositoryException e )
{
throw new CommandException( "Command had trouble processing " + component, e );
}
finally
{
req.setAttribute( LexConstants.MESSAGE_REQ_ATTR, msg );
}
}
//constructors
/**
*Constructor for the RemoveCommand object
*Constructor for the GetFormCommand object
*
* @param next Description of the Parameter
* @param next Description of the Parameter
* @param termMode Description of the Parameter
*/
public RemoveCommand( String next )
public RemoveCommand( String next, Boolean termMode )
{
super( next );
setTermMode( termMode.booleanValue() );
}
}

View file

@ -59,9 +59,9 @@ public class UpdateCommand extends LexCommand implements Command
{
String msg = null;
String next = getNext();
Visit visit = UserSessionManager.getInstance().getVisit( req.getSession( true ) );
Visit visit = UserSessionManager.getInstance().getVisit( req.getSession( true ) );
DisplayHelper displayHelper = visit.getHelper( );
DisplayHelper displayHelper = visit.getHelper();
try
{
HttpSession ses = req.getSession( false );
@ -86,6 +86,26 @@ public class UpdateCommand extends LexCommand implements Command
term.getMeta().populate( req.getParameterMap() );
component = term;
}
else if ( component instanceof Translatable && null != ( (Translatable) component ).getTranslationOf() )
{
Translatable translation = (Translatable) component;
Translatable source = null;
try
{
source = (Translatable) translation.getClass().newInstance();
}
catch ( Exception e )
{
throw new CommandException( e );
}
source.setMetaId( translation.getTranslationOf() );
source.setParentId( translation.getParentId() );
source = (Translatable) term.findChild( source );
List translationList = source.getTranslations();
component = (ILexComponent) translationList.get( translationList.indexOf( translation ) );
component.populate( req.getParameterMap() );
component.getMeta().populate( req.getParameterMap() );
}
else
{
ILexComponent ilc = term.findChild( component.getMetaId() );

View file

@ -2,7 +2,6 @@ package org.thdl.lex.component;
import java.io.Serializable;
import java.util.List;
import java.util.Set;
import org.apache.commons.lang.builder.ToStringBuilder;
/** @author Hibernate CodeGenerator */
@ -23,6 +22,9 @@ abstract public class BaseDefinition extends LexComponent implements org.thdl.le
/** nullable persistent field */
private org.thdl.lex.component.ILexComponent parent;
/** persistent field */
private List translations;
/** persistent field */
private List subdefinitions;
@ -47,17 +49,15 @@ abstract public class BaseDefinition extends LexComponent implements org.thdl.le
/** persistent field */
private List registers;
/** persistent field */
private Set translations;
/** full constructor */
public BaseDefinition(java.lang.Boolean deleted, List analyticalNotes, org.thdl.lex.component.Meta meta, java.lang.Integer parentId, java.lang.Integer precedence, java.lang.String definition, java.lang.Integer translationOf, org.thdl.lex.component.ILexComponent parent, List subdefinitions, List glosses, List keywords, List modelSentences, List translationEquivalents, List relatedTerms, List passages, List registers, Set translations) {
public BaseDefinition(java.lang.Boolean deleted, List analyticalNotes, org.thdl.lex.component.Meta meta, java.lang.Integer parentId, java.lang.Integer precedence, java.lang.String definition, java.lang.Integer translationOf, org.thdl.lex.component.ILexComponent parent, List translations, List subdefinitions, List glosses, List keywords, List modelSentences, List translationEquivalents, List relatedTerms, List passages, List registers) {
super(deleted, analyticalNotes, meta);
this.parentId = parentId;
this.precedence = precedence;
this.definition = definition;
this.translationOf = translationOf;
this.parent = parent;
this.translations = translations;
this.subdefinitions = subdefinitions;
this.glosses = glosses;
this.keywords = keywords;
@ -66,7 +66,6 @@ abstract public class BaseDefinition extends LexComponent implements org.thdl.le
this.relatedTerms = relatedTerms;
this.passages = passages;
this.registers = registers;
this.translations = translations;
}
/** default constructor */
@ -74,9 +73,10 @@ abstract public class BaseDefinition extends LexComponent implements org.thdl.le
}
/** minimal constructor */
public BaseDefinition(java.lang.Boolean deleted, List analyticalNotes, org.thdl.lex.component.Meta meta, java.lang.Integer precedence, List subdefinitions, List glosses, List keywords, List modelSentences, List translationEquivalents, List relatedTerms, List passages, List registers, Set translations) {
public BaseDefinition(java.lang.Boolean deleted, List analyticalNotes, org.thdl.lex.component.Meta meta, java.lang.Integer precedence, List translations, List subdefinitions, List glosses, List keywords, List modelSentences, List translationEquivalents, List relatedTerms, List passages, List registers) {
super(deleted, analyticalNotes, meta);
this.precedence = precedence;
this.translations = translations;
this.subdefinitions = subdefinitions;
this.glosses = glosses;
this.keywords = keywords;
@ -85,7 +85,6 @@ abstract public class BaseDefinition extends LexComponent implements org.thdl.le
this.relatedTerms = relatedTerms;
this.passages = passages;
this.registers = registers;
this.translations = translations;
}
public java.lang.Integer getParentId() {
@ -128,6 +127,14 @@ abstract public class BaseDefinition extends LexComponent implements org.thdl.le
this.parent = parent;
}
public java.util.List getTranslations() {
return this.translations;
}
public void setTranslations(java.util.List translations) {
this.translations = translations;
}
public java.util.List getSubdefinitions() {
return this.subdefinitions;
}
@ -192,14 +199,6 @@ abstract public class BaseDefinition extends LexComponent implements org.thdl.le
this.registers = registers;
}
public java.util.Set getTranslations() {
return this.translations;
}
public void setTranslations(java.util.Set translations) {
this.translations = translations;
}
public String toString() {
return new ToStringBuilder(this)
.append("metaId", getMetaId())

View file

@ -2,7 +2,6 @@ package org.thdl.lex.component;
import java.io.Serializable;
import java.util.List;
import java.util.Set;
import org.apache.commons.lang.builder.ToStringBuilder;
/** @author Hibernate CodeGenerator */
@ -33,10 +32,10 @@ abstract public class BaseEtymology extends LexComponent implements org.thdl.lex
private org.thdl.lex.component.ILexComponent parent;
/** persistent field */
private Set translations;
private List translations;
/** full constructor */
public BaseEtymology(java.lang.Boolean deleted, List analyticalNotes, org.thdl.lex.component.Meta meta, java.lang.Integer parentId, java.lang.Integer precedence, java.lang.Integer loanLanguage, java.lang.Integer etymologyType, java.lang.String derivation, java.lang.String etymologyDescription, java.lang.Integer translationOf, org.thdl.lex.component.ILexComponent parent, Set translations) {
public BaseEtymology(java.lang.Boolean deleted, List analyticalNotes, org.thdl.lex.component.Meta meta, java.lang.Integer parentId, java.lang.Integer precedence, java.lang.Integer loanLanguage, java.lang.Integer etymologyType, java.lang.String derivation, java.lang.String etymologyDescription, java.lang.Integer translationOf, org.thdl.lex.component.ILexComponent parent, List translations) {
super(deleted, analyticalNotes, meta);
this.parentId = parentId;
this.precedence = precedence;
@ -54,7 +53,7 @@ abstract public class BaseEtymology extends LexComponent implements org.thdl.lex
}
/** minimal constructor */
public BaseEtymology(java.lang.Boolean deleted, List analyticalNotes, org.thdl.lex.component.Meta meta, java.lang.Integer etymologyType, java.lang.String derivation, java.lang.String etymologyDescription, Set translations) {
public BaseEtymology(java.lang.Boolean deleted, List analyticalNotes, org.thdl.lex.component.Meta meta, java.lang.Integer etymologyType, java.lang.String derivation, java.lang.String etymologyDescription, List translations) {
super(deleted, analyticalNotes, meta);
this.etymologyType = etymologyType;
this.derivation = derivation;
@ -126,11 +125,11 @@ abstract public class BaseEtymology extends LexComponent implements org.thdl.lex
this.parent = parent;
}
public java.util.Set getTranslations() {
public java.util.List getTranslations() {
return this.translations;
}
public void setTranslations(java.util.Set translations) {
public void setTranslations(java.util.List translations) {
this.translations = translations;
}

View file

@ -2,7 +2,6 @@ package org.thdl.lex.component;
import java.io.Serializable;
import java.util.List;
import java.util.Set;
import org.apache.commons.lang.builder.ToStringBuilder;
/** @author Hibernate CodeGenerator */
@ -24,10 +23,10 @@ abstract public class BaseModelSentence extends LexComponent implements org.thdl
private org.thdl.lex.component.ILexComponent parent;
/** persistent field */
private Set translations;
private List translations;
/** full constructor */
public BaseModelSentence(java.lang.Boolean deleted, List analyticalNotes, org.thdl.lex.component.Meta meta, java.lang.Integer parentId, java.lang.Integer precedence, java.lang.String modelSentence, java.lang.Integer translationOf, org.thdl.lex.component.ILexComponent parent, Set translations) {
public BaseModelSentence(java.lang.Boolean deleted, List analyticalNotes, org.thdl.lex.component.Meta meta, java.lang.Integer parentId, java.lang.Integer precedence, java.lang.String modelSentence, java.lang.Integer translationOf, org.thdl.lex.component.ILexComponent parent, List translations) {
super(deleted, analyticalNotes, meta);
this.parentId = parentId;
this.precedence = precedence;
@ -42,7 +41,7 @@ abstract public class BaseModelSentence extends LexComponent implements org.thdl
}
/** minimal constructor */
public BaseModelSentence(java.lang.Boolean deleted, List analyticalNotes, org.thdl.lex.component.Meta meta, Set translations) {
public BaseModelSentence(java.lang.Boolean deleted, List analyticalNotes, org.thdl.lex.component.Meta meta, List translations) {
super(deleted, analyticalNotes, meta);
this.translations = translations;
}
@ -87,11 +86,11 @@ abstract public class BaseModelSentence extends LexComponent implements org.thdl
this.parent = parent;
}
public java.util.Set getTranslations() {
public java.util.List getTranslations() {
return this.translations;
}
public void setTranslations(java.util.Set translations) {
public void setTranslations(java.util.List translations) {
this.translations = translations;
}

View file

@ -2,7 +2,6 @@ package org.thdl.lex.component;
import java.io.Serializable;
import java.util.List;
import java.util.Set;
import org.apache.commons.lang.builder.ToStringBuilder;
/** @author Hibernate CodeGenerator */
@ -33,10 +32,10 @@ abstract public class BasePassage extends LexComponent implements org.thdl.lex.c
private org.thdl.lex.component.ILexComponent parent;
/** persistent field */
private Set translations;
private List translations;
/** full constructor */
public BasePassage(java.lang.Boolean deleted, List analyticalNotes, org.thdl.lex.component.Meta meta, java.lang.Integer parentId, java.lang.Integer precedence, java.lang.String literarySource, java.lang.String spelling, java.lang.String pagination, java.lang.String passage, java.lang.Integer translationOf, org.thdl.lex.component.ILexComponent parent, Set translations) {
public BasePassage(java.lang.Boolean deleted, List analyticalNotes, org.thdl.lex.component.Meta meta, java.lang.Integer parentId, java.lang.Integer precedence, java.lang.String literarySource, java.lang.String spelling, java.lang.String pagination, java.lang.String passage, java.lang.Integer translationOf, org.thdl.lex.component.ILexComponent parent, List translations) {
super(deleted, analyticalNotes, meta);
this.parentId = parentId;
this.precedence = precedence;
@ -54,7 +53,7 @@ abstract public class BasePassage extends LexComponent implements org.thdl.lex.c
}
/** minimal constructor */
public BasePassage(java.lang.Boolean deleted, List analyticalNotes, org.thdl.lex.component.Meta meta, Set translations) {
public BasePassage(java.lang.Boolean deleted, List analyticalNotes, org.thdl.lex.component.Meta meta, List translations) {
super(deleted, analyticalNotes, meta);
this.translations = translations;
}
@ -123,11 +122,11 @@ abstract public class BasePassage extends LexComponent implements org.thdl.lex.c
this.parent = parent;
}
public java.util.Set getTranslations() {
public java.util.List getTranslations() {
return this.translations;
}
public void setTranslations(java.util.Set translations) {
public void setTranslations(java.util.List translations) {
this.translations = translations;
}

View file

@ -2,7 +2,6 @@ package org.thdl.lex.component;
import java.io.Serializable;
import java.util.List;
import java.util.Set;
import org.apache.commons.lang.builder.ToStringBuilder;
/** @author Hibernate CodeGenerator */
@ -23,6 +22,9 @@ abstract public class BaseSubdefinition extends LexComponent implements org.thdl
/** nullable persistent field */
private org.thdl.lex.component.ILexComponent parent;
/** persistent field */
private List translations;
/** persistent field */
private List glosses;
@ -44,17 +46,15 @@ abstract public class BaseSubdefinition extends LexComponent implements org.thdl
/** persistent field */
private List registers;
/** persistent field */
private Set translations;
/** full constructor */
public BaseSubdefinition(java.lang.Boolean deleted, List analyticalNotes, org.thdl.lex.component.Meta meta, java.lang.Integer parentId, java.lang.Integer precedence, java.lang.String subdefinition, java.lang.Integer translationOf, org.thdl.lex.component.ILexComponent parent, List glosses, List keywords, List modelSentences, List translationEquivalents, List relatedTerms, List passages, List registers, Set translations) {
public BaseSubdefinition(java.lang.Boolean deleted, List analyticalNotes, org.thdl.lex.component.Meta meta, java.lang.Integer parentId, java.lang.Integer precedence, java.lang.String subdefinition, java.lang.Integer translationOf, org.thdl.lex.component.ILexComponent parent, List translations, List glosses, List keywords, List modelSentences, List translationEquivalents, List relatedTerms, List passages, List registers) {
super(deleted, analyticalNotes, meta);
this.parentId = parentId;
this.precedence = precedence;
this.subdefinition = subdefinition;
this.translationOf = translationOf;
this.parent = parent;
this.translations = translations;
this.glosses = glosses;
this.keywords = keywords;
this.modelSentences = modelSentences;
@ -62,7 +62,6 @@ abstract public class BaseSubdefinition extends LexComponent implements org.thdl
this.relatedTerms = relatedTerms;
this.passages = passages;
this.registers = registers;
this.translations = translations;
}
/** default constructor */
@ -70,8 +69,9 @@ abstract public class BaseSubdefinition extends LexComponent implements org.thdl
}
/** minimal constructor */
public BaseSubdefinition(java.lang.Boolean deleted, List analyticalNotes, org.thdl.lex.component.Meta meta, List glosses, List keywords, List modelSentences, List translationEquivalents, List relatedTerms, List passages, List registers, Set translations) {
public BaseSubdefinition(java.lang.Boolean deleted, List analyticalNotes, org.thdl.lex.component.Meta meta, List translations, List glosses, List keywords, List modelSentences, List translationEquivalents, List relatedTerms, List passages, List registers) {
super(deleted, analyticalNotes, meta);
this.translations = translations;
this.glosses = glosses;
this.keywords = keywords;
this.modelSentences = modelSentences;
@ -79,7 +79,6 @@ abstract public class BaseSubdefinition extends LexComponent implements org.thdl
this.relatedTerms = relatedTerms;
this.passages = passages;
this.registers = registers;
this.translations = translations;
}
public java.lang.Integer getParentId() {
@ -122,6 +121,14 @@ abstract public class BaseSubdefinition extends LexComponent implements org.thdl
this.parent = parent;
}
public java.util.List getTranslations() {
return this.translations;
}
public void setTranslations(java.util.List translations) {
this.translations = translations;
}
public java.util.List getGlosses() {
return this.glosses;
}
@ -178,14 +185,6 @@ abstract public class BaseSubdefinition extends LexComponent implements org.thdl
this.registers = registers;
}
public java.util.Set getTranslations() {
return this.translations;
}
public void setTranslations(java.util.Set translations) {
this.translations = translations;
}
public String toString() {
return new ToStringBuilder(this)
.append("metaId", getMetaId())

View file

@ -345,5 +345,14 @@ public interface ITerm extends LexComponentNode
* @exception LexComponentException Description of the Exception
*/
public void addChild( ILexComponent component ) throws LexComponentException;
/**
* Description of the Method
*
* @param component Description of the Parameter
* @exception LexComponentException Description of the Exception
*/
public void removeChild( ILexComponent component ) throws LexComponentException;
}

View file

@ -144,10 +144,11 @@
<property name="precedence" type="java.lang.Integer" column="precedence" not-null="true" length="6"/>
<property name="definition" type="java.lang.String" column="definition" length="65535"/>
<property name="translationOf" type="java.lang.Integer" column="translationOf" length="11"/>
<set name="translations" table="Definitions" lazy="true" where="translationOf IS NOT NULL">
<list name="translations" table="Definitions" lazy="true" where="translationOf IS NOT NULL">
<key column="translationOf"/>
<index column="precedence"/>
<one-to-many class="org.thdl.lex.component.Definition"/>
</set>
</list>
<list name="subdefinitions" table="Subdefinitions" lazy="true" where="translationOf IS NULL">
<key column="parentId"/>
<index column="precedence"/>
@ -203,10 +204,11 @@
<property name="precedence" type="java.lang.Integer" column="precedence" length="6"/>
<property name="subdefinition" type="java.lang.String" column="subdefinition" length="65535"/>
<property name="translationOf" type="java.lang.Integer" column="translationOf" length="11"/>
<set name="translations" table="Subdefinitions" lazy="true" where="translationOf IS NOT NULL">
<list name="translations" table="Subdefinitions" lazy="true" where="translationOf IS NOT NULL">
<key column="translationOf"/>
<index column="precedence"/>
<one-to-many class="org.thdl.lex.component.Subdefinition"/>
</set>
</list>
<list name="glosses" table="Glosses" lazy="true">
<key column="parentId"/>
<index column="precedence"/>
@ -274,10 +276,11 @@
<property name="derivation" type="java.lang.String" column="derivation" not-null="true" length="255"/>
<property name="etymologyDescription" type="java.lang.String" column="etymologyDescription" not-null="true" length="65535"/>
<property name="translationOf" type="java.lang.Integer" column="translationOf" length="11"/>
<set name="translations" table="Etymologies" lazy="true" where="translationOf IS NOT NULL">
<list name="translations" table="Etymologies" lazy="true" where="translationOf IS NOT NULL">
<key column="translationOf"/>
<index column="precedence"/>
<one-to-many class="org.thdl.lex.component.Etymology"/>
</set>
</list>
</joined-subclass>
<joined-subclass name="org.thdl.lex.component.Spelling" proxy="org.thdl.lex.component.ISpelling" table="Spellings">
@ -361,10 +364,11 @@
<property name="precedence" type="java.lang.Integer" column="precedence" length="6"/>
<property name="modelSentence" type="java.lang.String" column="modelSentence" length="65535"/>
<property name="translationOf" type="java.lang.Integer" column="translationOf" length="11"/>
<set name="translations" table="ModelSentences" lazy="true" where="translationOf IS NOT NULL">
<list name="translations" table="ModelSentences" lazy="true" where="translationOf IS NOT NULL">
<key column="translationOf"/>
<index column="precedence"/>
<one-to-many class="org.thdl.lex.component.ModelSentence"/>
</set>
</list>
</joined-subclass>
<joined-subclass name="org.thdl.lex.component.TranslationEquivalent" proxy="org.thdl.lex.component.ITranslationEquivalent" table="TranslationEquivalents">
@ -410,10 +414,11 @@
<property name="pagination" type="java.lang.String" column="pagination" length="65535"/>
<property name="passage" type="java.lang.String" column="passage" length="65535"/>
<property name="translationOf" type="java.lang.Integer" column="translationOf" length="11"/>
<set name="translations" table="LiteraryQuotations" lazy="true" where="translationOf IS NOT NULL">
<list name="translations" table="LiteraryQuotations" lazy="true" where="translationOf IS NOT NULL">
<key column="translationOf"/>
<index column="precedence"/>
<one-to-many class="org.thdl.lex.component.Passage"/>
</set>
</list>
</joined-subclass>
<joined-subclass name="org.thdl.lex.component.SpeechRegister" proxy="org.thdl.lex.component.IRegister" table="SpeechRegisters">

View file

@ -205,6 +205,22 @@ public abstract class LexComponent extends BaseLexComponent implements Serializa
}
/**
* Description of the Method
*
* @param o Description of the Parameter
* @return Description of the Return Value
*/
public boolean equals( Object o )
{
boolean b = false;
if ( o instanceof ILexComponent )
{
b = this.metaId.equals( ( (ILexComponent) o ).getMetaId() );
}
return b;
}
//constructors
/**

View file

@ -160,6 +160,20 @@ public class Term extends BaseTerm implements Serializable, LexComponentNode
}
/**
* Description of the Method
*
* @param child Description of the Parameter
* @exception LexComponentException Description of the Exception
*/
public void removeChild( ILexComponent child ) throws LexComponentException
{
List list = findSiblings( child );
child = findChild( list, child.getMetaId() );
list.remove( child );
}
/**
* Description of the Method
*

View file

@ -18,7 +18,7 @@ public interface Translatable extends ILexComponent
/**
* Sets the translationOf attribute of the Translatable object
* Lists the translationOf attribute of the Translatable object
*
* @param pkReference The new translationOf value
*/
@ -30,15 +30,15 @@ public interface Translatable extends ILexComponent
*
* @return The translations value
*/
public java.util.Set getTranslations();
public java.util.List getTranslations();
/**
* Sets the translations attribute of the Translatable object
* Lists the translations attribute of the Translatable object
*
* @param translations The new translations value
*/
public void setTranslations( java.util.Set translations );
public void setTranslations( java.util.List translations );
}

View file

@ -14,6 +14,7 @@
<c:out value='<a href="/lex/action?cmd=getUpdateForm&amp;comp=definition&amp;metaId=${ definition.metaId }" title="Edit this Definition"><img alt="Edit this Definition" src="/lex/images/edit.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getTranslationForm&amp;comp=definition&amp;parentId=${definition.parentId}&amp;translationOf=${definition.metaId}" title="Translate this Definition"><img alt="Translate this Definition" src="/lex/images/trans.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getInsertForm&amp;comp=subdefinition&amp;parentId=${definition.metaId}" title="Add a Subdefinition"><img alt="Add a Subdefinition" src="/lex/images/subdef.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=definition&amp;metaId=${ definition.metaId }" title="Remove this Definition"><img alt="Remove this Definition" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
</span>
</c:if>

View file

@ -9,6 +9,7 @@
<span class="compEditOptions">
<c:out value='<a href="/lex/action?cmd=getAnnotationForm&amp;comp=encyclopediaArticle&amp;metaId=${ encyclopediaArticle.metaId }" title="Add Analytical Note"><img alt="Add Analytical Note" src="/lex/images/note.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getUpdateForm&amp;comp=encyclopediaArticle&amp;metaId=${ encyclopediaArticle.metaId }" title="Edit this encyclopediaArticle"><img alt="Edit this encyclopediaArticle" src="/lex/images/edit.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=encyclopediaArticle&amp;metaId=${ encyclopediaArticle.metaId }" title="Remove this encyclopediaArticle"><img alt="Remove this encyclopediaArticle" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
</span>
</c:if>
<!--<span class="label">Encyclopedia Article:</span>-->

View file

@ -13,6 +13,7 @@
<c:out value='<a href="/lex/action?cmd=getAnnotationForm&amp;comp=etymology&amp;metaId=${etymology.metaId}" title="Add Analytical Note"><img alt="Add Analytical Note" src="/lex/images/note.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getUpdateForm&amp;comp=etymology&amp;metaId=${ etymology.metaId }&amp;parentId=${etymology.parentId}" title="Edit this Etymology"><img alt="Edit this component" src="/lex/images/edit.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getTranslationForm&amp;comp=etymology&amp;parentId=${etymology.parentId}&amp;translationOf=${etymology.metaId}" title="Translate this Etymology"><img alt="Translate this Etymology" src="/lex/images/trans.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=etymology&amp;metaId=${ etymology.metaId }&amp;parentId=${etymology.parentId}" title="Remove this Etymology"><img alt="Remove this component" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
</span>
</c:if>

View file

@ -3,6 +3,7 @@
<% request.setCharacterEncoding("UTF-8"); %>
<jsp:include page="header.jsf" flush="false" />
<jsp:include page="navLinks.jsf" flush="false" />
<!--displayEntry.jsp-->
@ -36,8 +37,95 @@ Back to:
<c:set var="newForm" value="${ true }" />
</c:if>
<c:set var="cmd" value="remove"/>
<c:if test="${ param.cmd == 'getRemoveTermForm' }">
<c:set var="cmd" value="removeTerm"/>
</c:if>
<c:if test="${ param.cmd == 'getRemoveForm' || param.cmd == 'getRemoveTermForm' }">
<c:out value='<form action="/lex/action" method="get">' escapeXml="false"/>
<p class="warning">
<c:out value='<input type="hidden" name="cmd" value="${cmd}"/>' escapeXml="false"/>
<c:out value='<input type="hidden" name="comp" value="${param.comp}"/>' escapeXml="false"/>
<c:out value='<input type="hidden" name="metaId" value="${ param.metaId }"/>' escapeXml="false"/>
<c:out value='<input type="hidden" name="parentId" value="${ param.parentId }"/>' escapeXml="false"/>
<c:out value='<input type="hidden" name="translationOf" value="${ param.translationOf }"/>' escapeXml="false"/>
<c:out value='<input type="hidden" name="token" value="${ sessionScope.visit.token }" />' escapeXml="false" />
<strong>Warning!!</strong> This is your last chance. Are you sure you want to remove this component and all of its sub-components?
<input type="submit" value="Yes, I am sure. Delete Now"/>
</p>
</form>
</c:if>
<c:set target="${ sessionScope.visit.helper }" property="component" value="${component}"/>
<c:choose>
<c:when test="${ param.cmd == 'getRemoveForm' && param.comp == 'analyticalNote' }">
<p><jsp:include page="displayAnalyticalNote.jsf" /></p>
</c:when>
<c:when test="${ param.cmd == 'getRemoveTermForm' && param.comp == 'term' }">
<p><p><jsp:include page="displayTerm.jsf" /></p></p>
</c:when>
<c:when test="${ param.cmd == 'getRemoveForm' && param.comp == 'pronunciation'}">
<p><jsp:include page="displayPronunciation.jsf" /></p>
</c:when>
<c:when test="${ param.cmd == 'getRemoveForm' && param.comp == 'etymology'}">
<p><jsp:include page="displayEtymology.jsf" /></p>
</c:when>
<c:when test="${ param.cmd == 'getRemoveForm' && param.comp == 'spelling'}">
<p><jsp:include page="displaySpelling.jsf" /></p>
</c:when>
<c:when test="${ param.cmd == 'getRemoveForm' && param.comp == 'grammaticalFunction'}">
<p><jsp:include page="displayFunction.jsf" /></p>
</c:when>
<c:when test="${ param.cmd == 'getRemoveForm' && param.comp == 'encyclopediaArticle'}">
<p><jsp:include page="displayEncyclopediaArticle.jsf" /></p>
</c:when>
<c:when test="${ param.cmd == 'getRemoveForm' && param.comp == 'definition'}">
<p><jsp:include page="displayDefinition.jsf" /></p>
</c:when>
<c:when test="${ param.cmd == 'getRemoveForm' && param.comp == 'subdefinition'}">
<p><jsp:include page="displaySubdefinition.jsf" /></p>
</c:when>
<c:when test="${ param.cmd == 'getRemoveForm' && param.comp == 'keyword' }">
<p><jsp:include page="displayKeyword.jsf" /></p>
</c:when>
<c:when test="${ param.cmd == 'getRemoveForm' && param.comp == 'modelSentence' }">
<p><jsp:include page="displayModelSentence.jsf" /></p>
</c:when>
<c:when test="${ param.cmd == 'getRemoveForm' && param.comp == 'translationEquivalent' }">
<p><jsp:include page="displayTranslationEquivalent.jsf" /></p>
</c:when>
<c:when test="${ param.cmd == 'getRemoveForm' && param.comp == 'relatedTerm' }">
<p><jsp:include page="displayRelatedTerm.jsf" /></p>
</c:when>
<c:when test="${ param.cmd == 'getRemoveForm' && param.comp == 'passage' }">
<p><jsp:include page="displayPassage.jsf" /></p>
</c:when>
<c:when test="${ param.cmd == 'getRemoveForm' && param.comp == 'speechRegister' }">
<p><jsp:include page="displayRegister.jsf" /></p>
</c:when>
<c:when test="${ param.cmd == 'getRemoveForm' && param.comp == 'transitionalData' }">
<p><jsp:include page="displayTransitionalData.jsf" /></p>
</c:when>
<%--Insert Form--%>
<c:when test="${ param.cmd == 'getAnnotationForm' }">
<jsp:include page="analyticalNoteForm.jsf" />
</c:when>

View file

@ -7,6 +7,7 @@
<span class="compEditOptions">
<c:out value='<a href="/lex/action?cmd=getAnnotationForm&amp;comp=grammaticalFunction&amp;metaId=${ function.metaId }" title="Add Analytical Note"><img alt="Add Analytical Note" src="/lex/images/note.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getUpdateForm&amp;comp=grammaticalFunction&amp;metaId=${ function.metaId }" title="Edit this component"><img alt="Edit this component" src="/lex/images/edit.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=grammaticalFunction&amp;metaId=${ function.metaId }" title="Remove this component"><img alt="Remove this component" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
</span>
</c:if>

View file

@ -11,6 +11,7 @@
<span class="compEditOptions">
<c:out value='<a href="/lex/action?cmd=getAnnotationForm&amp;comp=keyword&amp;metaId=${ keyword.metaId }" title="Add Analytical Note"><img alt="Add Analytical Note" src="/lex/images/note.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getUpdateForm&amp;comp=keyword&amp;metaId=${ keyword.metaId }" title="Edit this keyword"><img alt="Edit this keyword" src="/lex/images/edit.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=keyword&amp;metaId=${ keyword.metaId }" title="Remove this keyword"><img alt="Remove this keyword" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
</span>
</c:if>

View file

@ -12,6 +12,7 @@
<c:out value='<a href="/lex/action?cmd=getAnnotationForm&amp;comp=modelSentence&amp;metaId=${ modelSentence.metaId }" title="Add Analytical Note"><img alt="Add Analytical Note" src="/lex/images/note.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getUpdateForm&amp;comp=modelSentence&amp;metaId=${ modelSentence.metaId }" title="Edit this modelSentence"><img alt="Edit this modelSentence" src="/lex/images/edit.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getTranslationForm&amp;comp=modelSentence&amp;parentId=${modelSentence.parentId}&amp;translationOf=${modelSentence.metaId}" title="Translate this modelSentence"><img alt="Translate this modelSentence" src="/lex/images/trans.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=modelSentence&amp;metaId=${ modelSentence.metaId }" title="Remove this modelSentence"><img alt="Remove this modelSentence" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
</span>
</c:if>

View file

@ -11,6 +11,14 @@
<ol class="notes">
<c:forEach var="note" items="${ sessionScope.visit.helper.component.analyticalNotes }">
<li>
<c:if test="${ editMode }">
<span class="compEditOptions">
<c:out value='<a href="/lex/action?cmd=getUpdateForm&amp;comp=analyticalNote&amp;metaId=${ note.metaId }" title="Edit this analyticalNote"><img alt="Edit this analyticalNote" src="/lex/images/edit.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=analyticalNote&amp;metaId=${ note.metaId }" title="Remove this analyticalNote"><img alt="Remove this analyticalNote" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
</span>
</c:if>
<span class="analysis">
<c:out value="${ note.analyticalNote }" escapeXml="false" />

View file

@ -12,7 +12,7 @@
<c:out value='<a href="/lex/action?cmd=getAnnotationForm&amp;comp=passage&amp;metaId=${ passage.metaId }" title="Add Analytical Note"><img alt="Add Analytical Note" src="/lex/images/note.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getUpdateForm&amp;comp=passage&amp;metaId=${ passage.metaId }" title="Edit this passage"><img alt="Edit this passage" src="/lex/images/edit.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getTranslationForm&amp;comp=passage&amp;parentId=${passage.parentId}&amp;translationOf=${passage.metaId}" title="Translate this passage"><img alt="Translate this passage" src="/lex/images/trans.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getTranslationForm&amp;comp=passage&amp;parentId=${passage.parentId}&amp;translationOf=${passage.metaId}" title="Translate this passage"><img alt="Translate this passage" src="/lex/images/trans.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=passage&amp;metaId=${ passage.metaId }" title="Remove this passage"><img alt="Remove this passage" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
</span>
</c:if>
@ -63,6 +63,13 @@
<ul>
<c:forEach var="translation" items="${ passage.translations }" >
<li>
<p class="data">
<c:if test="${ editMode }">
<span class="compEditOptions">
<c:out value='<a href="/lex/action?cmd=getUpdateForm&amp;comp=passage&amp;metaId=${ translation.metaId }&amp;translationOf=${ translation.translationOf }&amp;parentId=${ translation.parentId }" title="Edit this passage"><img alt="Edit this passage" src="/lex/images/edit.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=passage&amp;metaId=${ translation.metaId }&amp;translationOf=${ translation.translationOf }&amp;parentId=${ translation.parentId }" title="Remove this passage"><img alt="Remove this passage" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
</span>
</c:if>
<%-- <c:set var='href' value='#'/>
<c:if test="${ editMode }">
<c:set var='href' value='/lex/action?cmd=getUpdateForm&amp;comp=passage&amp;metaId=${ translation.metaId }' />
@ -93,7 +100,7 @@
<jsp:include page="displayMeta.jsf" />
<c:set target="${ sessionScope.visit.helper }" property="component" value="${ originalComponent }" />
</p>
</li>
</c:forEach>
</ul>

View file

@ -12,6 +12,7 @@
<span class="compEditOptions">
<c:out value='<a href="/lex/action?cmd=getAnnotationForm&amp;comp=pronunciation&amp;metaId=${ pronunciation.metaId }" title="Add Analytical Note"><img alt="Add Analytical Note" src="/lex/images/note.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getUpdateForm&amp;comp=pronunciation&amp;metaId=${ pronunciation.metaId }" title="Edit this component"><img alt="Edit this component" src="/lex/images/edit.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=pronunciation&amp;metaId=${ pronunciation.metaId }" title="Remove this component"><img alt="Remove this component" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
</span>
</c:if>

View file

@ -11,6 +11,7 @@
<span class="compEditOptions">
<c:out value='<a href="/lex/action?cmd=getAnnotationForm&amp;comp=speechRegister&amp;metaId=${ register.metaId }" title="Add Analytical Note"><img alt="Add Analytical Note" src="/lex/images/note.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getUpdateForm&amp;comp=speechRegister&amp;metaId=${ register.metaId }" title="Edit this speechRegister"><img alt="Edit this speechRegister" src="/lex/images/edit.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=speechRegister&amp;metaId=${ register.metaId }" title="Remove this speechRegister"><img alt="Remove this speechRegister" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
</span>
</c:if>
<!--<span class="label">Speech Register:</span>-->

View file

@ -10,6 +10,7 @@
<span class="compEditOptions">
<c:out value='<a href="/lex/action?cmd=getAnnotationForm&amp;comp=relatedTerm&amp;metaId=${ relatedTerm.metaId }" title="Add Analytical Note"><img alt="Add Analytical Note" src="/lex/images/note.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getUpdateForm&amp;comp=relatedTerm&amp;metaId=${ relatedTerm.metaId }" title="Edit this relatedTerm"><img alt="Edit this relatedTerm" src="/lex/images/edit.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=relatedTerm&amp;metaId=${ relatedTerm.metaId }" title="Remove this relatedTerm"><img alt="Remove this relatedTerm" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
</span>
</c:if>

View file

@ -7,6 +7,7 @@
<span class="compEditOptions">
<c:out value='<a href="/lex/action?cmd=getAnnotationForm&amp;comp=spelling&amp;metaId=${ spelling.metaId }" title="Add Analytical Note"><img alt="Add Analytical Note" src="/lex/images/note.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getUpdateForm&amp;comp=spelling&amp;metaId=${ spelling.metaId }" title="Edit this component"><img alt="Edit this component" src="/lex/images/edit.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=spelling&amp;metaId=${ spelling.metaId }" title="Remove this component"><img alt="Remove this component" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
</span>
</c:if>

View file

@ -20,6 +20,7 @@
<c:out value='<a href="/lex/action?cmd=getInsertForm&amp;comp=relatedTerm&amp;parentId=${subdefinition.metaId}" title="Add a Related Term"><img alt="Add a Related Term" src="/lex/images/rel-term.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getInsertForm&amp;comp=passage&amp;parentId=${subdefinition.metaId}" title="Add a Passage"><img alt="Add a Passage" src="/lex/images/pass.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getInsertForm&amp;comp=speechRegister&amp;parentId=${subdefinition.metaId}" title="Add a Speech Register"><img alt="Add a Speech Register" src="/lex/images/reg.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=subdefinition&amp;metaId=${ subdefinition.metaId }" title="Remove this subdefinition"><img alt="Remove this subdefinition" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
</span>
</c:if>

View file

@ -29,11 +29,12 @@
<c:out value='<a href="/lex/action?cmd=getInsertForm&amp;comp=grammaticalFunction&amp;parentId=${sessionScope.visit.query.entry.metaId}" title="Add Grammatical Function"><img alt="Add a Grammatical Function" src="/lex/images/gram.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getInsertForm&amp;comp=encyclopediaArticle&amp;parentId=${sessionScope.visit.query.entry.metaId}" title="Add Encyclopedia Article"><img alt="Add Encyclopedia Article" src="/lex/images/ency.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getInsertForm&amp;comp=definition&amp;parentId=${sessionScope.visit.query.entry.metaId}" title="Add Definition"><img alt="Add Definition" src="/lex/images/def.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveTermForm&amp;comp=term&amp;metaId=${ sessionScope.visit.query.entry.metaId }" title="Remove Term"><img alt="Edit Term" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
</span>
</c:if>
<strong><c:out value="${ sessionScope.visit.query.entry.term }" /></strong>
<c:set target="${ sessionScope.visit.helper }" property="component" value="${ sessionScope.visit.query.entry }" />
<jsp:include page="displayMeta.jsf" />

View file

@ -13,6 +13,7 @@
<span class="compEditOptions">
<c:out value='<a href="/lex/action?cmd=getAnnotationForm&amp;comp=transitionalData&amp;metaId=${ transitionalData.metaId }" title="Add Analytical Note"><img alt="Add Analytical Note" src="/lex/images/note.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getUpdateForm&amp;comp=transitionalData&amp;metaId=${ transitionalData.metaId }" title="Edit this component"><img alt="Edit this component" src="/lex/images/edit.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=transitionalData&amp;metaId=${ transitionalData.metaId }" title="Remove this component"><img alt="Remove this component" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
</span>
</c:if>

View file

@ -11,20 +11,15 @@
<span class="compEditOptions">
<c:out value='<a href="/lex/action?cmd=getAnnotationForm&amp;comp=translationEquivalent&amp;metaId=${ translationEquivalent.metaId }" title="Add Analytical Note"><img alt="Add Analytical Note" src="/lex/images/note.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getUpdateForm&amp;comp=translationEquivalent&amp;metaId=${ translationEquivalent.metaId }" title="Edit this translationEquivalent"><img alt="Edit this translationEquivalent" src="/lex/images/edit.gif"/></a>' escapeXml="false" />
<c:out value='<a href="/lex/action?cmd=getRemoveForm&amp;comp=translationEquivalent&amp;metaId=${ translationEquivalent.metaId }" title="Remove this translationEquivalent"><img alt="Remove this translationEquivalent" src="/lex/images/remove.gif"/></a>' escapeXml="false" />
</span>
</c:if>
<!--<span class="label">Translation Equivalent: </span> -->
<c:out value="${ translationEquivalent.translationEquivalent }" escapeXml="false" />
<jsp:include page="displayMeta.jsf" />
<jsp:include page="displayNotes.jsf" />

View file

@ -41,8 +41,8 @@ The message appears below.<br />
<b>Message: </b> <%= exception.getMessage() %> <br /><br />
<% if (request.getAttribute("component") != null)
{ LexComponent lab = (LexComponent) request.getAttribute("component");
<% if (request.getAttribute("comp") != null)
{ LexComponent lab = (LexComponent) request.getAttribute("comp");
%>
<b> Label: </b> <i> <%= lab %> </i><br /><br />

View file

@ -39,8 +39,8 @@
<c:set var="translateMode" value="${ true }" />
<c:set var="originalPagination" value="Original Pagination: ${ original.pagination } <br /> Translation " />
<c:set var="originalPassage" value="Original Passage: ${ original.passage } <br /> Translation " />
<c:set var="pagination" value="" />
<c:set var="passage" value="" />
<%-- <c:set var="pagination" value="" />
<c:set var="passage" value="" /> --%>
</c:if>
<form id="newCompForm" action="/lex/action" method="post">
@ -61,11 +61,11 @@ Spelling: <c:out value='<input type="text" value="${ spelling }" name="spelling"
<c:out value="${ originalPagination } " escapeXml='false' />
Pagination: <br />
<textarea name="pagination" rows="8" cols="90"><c:out value='${ pagination }' /></textarea><br />
<c:out value='<input type="text" name="pagination" cols="90" value="${ pagination }"/>' escapeXml="false"/><br />
<c:out value="${ originalPassage }" escapeXml='false' />
Passage: <br />
<textarea name="passage" rows="8" cols="90"><c:out value='${ passage }' /> </textarea> <br />
<textarea name="passage" rows="8" cols="90"><c:out value='${ passage }' /></textarea> <br />
<jsp:include page="metaForm.jsf" />