You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(4) |
Dec
(12) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(4) |
Feb
|
Mar
(36) |
Apr
(8) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: C. R. D. <rya...@us...> - 2003-04-30 16:14:54
|
Update of /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/tags
In directory sc8-pr-cvs1:/tmp/cvs-serv27578/src/org/dlese/dpc/vocab/tags
Modified Files:
MetadataVocabSelectListTag.java
Log Message:
Fixed bug in select list tag
Index: MetadataVocabSelectListTag.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/tags/MetadataVocabSelectListTag.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** MetadataVocabSelectListTag.java 7 Apr 2003 18:38:31 -0000 1.7
--- MetadataVocabSelectListTag.java 30 Apr 2003 16:14:50 -0000 1.8
***************
*** 48,52 ****
try {
setupTag( pageContext );
! pageContext.getOut().print( vocab.getVocabSelectList( group, size, pageContext ) );
}
catch ( java.io.IOException ex ) {
--- 48,52 ----
try {
setupTag( pageContext );
! pageContext.getOut().print( vocab.getVocabSelectList( system, group, size, pageContext ) );
}
catch ( java.io.IOException ex ) {
|
|
From: C. R. D. <rya...@us...> - 2003-04-30 00:05:42
|
Update of /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/tags In directory sc8-pr-cvs1:/tmp/cvs-serv18293/src/org/dlese/dpc/vocab/tags Modified Files: MetadataVocabTreeMenuTag.java Log Message: Minor tweaks in rendering of info. panels and drop-downs Index: MetadataVocabTreeMenuTag.java =================================================================== RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/tags/MetadataVocabTreeMenuTag.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** MetadataVocabTreeMenuTag.java 23 Apr 2003 23:43:41 -0000 1.3 --- MetadataVocabTreeMenuTag.java 30 Apr 2003 00:05:38 -0000 1.4 *************** *** 20,25 **** import org.dlese.dpc.vocab.MetadataVocabInputState; import java.util.*; ! import javax.servlet.jsp.JspException; ! import javax.servlet.jsp.tagext.TagSupport; import javax.servlet.http.*; --- 20,26 ---- import org.dlese.dpc.vocab.MetadataVocabInputState; import java.util.*; ! import java.io.*; ! import javax.servlet.jsp.*; ! import javax.servlet.jsp.tagext.*; import javax.servlet.http.*; |
|
From: C. R. D. <rya...@us...> - 2003-04-30 00:05:41
|
Update of /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab
In directory sc8-pr-cvs1:/tmp/cvs-serv18293/src/org/dlese/dpc/vocab
Modified Files:
MetadataVocab.java
Log Message:
Minor tweaks in rendering of info. panels and drop-downs
Index: MetadataVocab.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/MetadataVocab.java,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -r1.28 -r1.29
*** MetadataVocab.java 23 Apr 2003 23:43:41 -0000 1.28
--- MetadataVocab.java 30 Apr 2003 00:05:38 -0000 1.29
***************
*** 876,884 ****
VocabList current = setCurrent( system, group );
current.jsVar = "tm_" + name + "0";
- System.out.println( "group = " + group );
VocabNode node = (VocabNode)vocab.map.get( system + '.' + group );
ret.append( "<script language='javascript'>\n<!--\n" );
try {
- System.out.println( "trio: " + language + name + node.id );
String abbrevLabel = node.labelAbbrev;
if ( abbrevLabel == null ) {
--- 876,882 ----
***************
*** 894,898 ****
ret.append( "\nRenderVocabSelectedState();\n//-->\n</script>" );
ret.append( treeMenuDivs( current, Integer.parseInt( x ), Integer.parseInt( y ),
! ( (HttpServletRequest)page.getRequest() ).getContextPath(), 3 ) );
ret.append( "<script language='javascript'>\n<!--\n" );
ret.append( "SetToVisible( tm_" + name + "0 );\n// -->\n</script>\n" );
--- 892,896 ----
ret.append( "\nRenderVocabSelectedState();\n//-->\n</script>" );
ret.append( treeMenuDivs( current, Integer.parseInt( x ), Integer.parseInt( y ),
! ( (HttpServletRequest)page.getRequest() ).getContextPath(), 3, page ) );
ret.append( "<script language='javascript'>\n<!--\n" );
ret.append( "SetToVisible( tm_" + name + "0 );\n// -->\n</script>\n" );
***************
*** 919,922 ****
--- 917,921 ----
int jsCount = 0;
HttpSession session = page.getSession();
+ String base = page.getServletContext().getRealPath( "/" );
for ( int i = 0; i < list.item.size(); i++ ) {
VocabNode node = (VocabNode)list.item.get( i );
***************
*** 965,970 ****
*@param siteRoot
*@param zindex
*/
! private String treeMenuDivs( VocabList list, int x, int y, String siteRoot, int zindex ) {
String buff = null;
if ( x > -1 ) {
--- 964,970 ----
*@param siteRoot
*@param zindex
+ *@param page
*/
! private String treeMenuDivs( VocabList list, int x, int y, String siteRoot, int zindex, PageContext page ) {
String buff = null;
if ( x > -1 ) {
***************
*** 984,997 ****
+ "class='vocabFlyout' onMouseOver='moCount++' onMouseOut='moCount--'>" );
}
! else if ( list.groupType == 2 ) {
ret.append( "<div onMouseOver='moCount++' onMouseOut='moCount--' border='0' cellpadding='3' cellspacing='0' id='"
! + list.jsVar + "div' style='position: relative; "
! + "display: block; visibility: visible; margin-left: 13px; z-index: " + Integer.toString( zindex ) + "' "
+ "onMouseOver='moCount++' onMouseOut='moCount--'>" );
}
! else if ( isDropdown ) {
ret.append( "<div onMouseOver='moCount++' onMouseOut='moCount--' border='0' cellpadding='3' cellspacing='0' id='"
! + list.jsVar + "div' style='position: relative; z-index: " + Integer.toString( zindex ) + " "
! + "display: block; visibility: hidden; margin-left: 13px;' "
+ "onMouseOver='moCount++' onMouseOut='moCount--'>" );
}
--- 984,997 ----
+ "class='vocabFlyout' onMouseOver='moCount++' onMouseOut='moCount--'>" );
}
! else if ( list.groupType == 1 ) { // inline="drop"
ret.append( "<div onMouseOver='moCount++' onMouseOut='moCount--' border='0' cellpadding='3' cellspacing='0' id='"
! + list.jsVar + "div' style='position: relative; z-index: " + Integer.toString( zindex ) + " "
! + "display: block; visibility: hidden; margin-left: 13px; margin-bottom: 6px;' "
+ "onMouseOver='moCount++' onMouseOut='moCount--'>" );
}
! else if ( list.groupType == 2 ) { // inline="indent"
ret.append( "<div onMouseOver='moCount++' onMouseOut='moCount--' border='0' cellpadding='3' cellspacing='0' id='"
! + list.jsVar + "div' style='position: relative; margin-bottom: 6px;"
! + "display: block; visibility: visible; margin-left: 13px; z-index: " + Integer.toString( zindex ) + "' "
+ "onMouseOver='moCount++' onMouseOut='moCount--'>" );
}
***************
*** 1039,1043 ****
+ "check' width='8' height='8' border='0' src='" + siteRoot + "/images/vocab/boxWhite.gif"
+ "' style='margin-top: 4px; margin-bottom: 0px;' alt='Click to select " + node.label + "'></a> " );
! if ( node.list.item.size() > 0 ) {
if ( node.list.groupType == 2 ) {
rightLink = "<a href='javascript:checkAll( " + node.list.jsVar + ", -1 );' "
--- 1039,1048 ----
+ "check' width='8' height='8' border='0' src='" + siteRoot + "/images/vocab/boxWhite.gif"
+ "' style='margin-top: 4px; margin-bottom: 0px;' alt='Click to select " + node.label + "'></a> " );
! if ( node.src != null ) {
! rightLink = "<a href='javascript:toggleVocabInfo( \"" + list.jsVar
! + i + "\" );' "
! + "onMouseOver='window.status = \"\"; return true;' class='listToggleLink'>";
! }
! else if ( node.list.item.size() > 0 ) {
if ( node.list.groupType == 2 ) {
rightLink = "<a href='javascript:checkAll( " + node.list.jsVar + ", -1 );' "
***************
*** 1059,1076 ****
ret.append( "</td><td valign='top'> " + rightLink + "<img id='" + list.jsVar + i
+ "arrow' border='0' src='" + siteRoot + "/images/vocab/ArrowSideTransp.gif"
! + "' width='14' height='8' style='margin-top: 4px; margin-bottom: 0px;'></a></td><td width='1%'>" );
}
else if ( node.list.groupType == 1 ) {
! ret.append( "</td><td valign='top' width='99%'> " + rightLink + "<img id='" + list.jsVar + i
+ "arrow' border='0' src='" + siteRoot + "/images/vocab/ArrowDownTransp.gif"
+ "' width='8' height='8' style='margin-top: 4px; margin-bottom: 0px;'></a>" );
}
else {
! ret.append( ":</td><td valign='top'> " );
}
if ( node.list.groupType > 0 ) {
! ret.append( "</td></tr><tr><td colspan='3'>" );
}
! ret.append( treeMenuDivs( node.list, -1, -1, siteRoot, zindex + 1 ) );
}
else {
--- 1064,1109 ----
ret.append( "</td><td valign='top'> " + rightLink + "<img id='" + list.jsVar + i
+ "arrow' border='0' src='" + siteRoot + "/images/vocab/ArrowSideTransp.gif"
! + "' width='14' height='8' style='margin-top: 4px; margin-bottom: 0px;'></a>" );
}
else if ( node.list.groupType == 1 ) {
! ret.append( " " + rightLink + "<img id='"
! + list.jsVar + i
+ "arrow' border='0' src='" + siteRoot + "/images/vocab/ArrowDownTransp.gif"
+ "' width='8' height='8' style='margin-top: 4px; margin-bottom: 0px;'></a>" );
}
else {
! ret.append( ": " );
}
if ( node.list.groupType > 0 ) {
! ret.append( "</td></tr><tr><td colspan='2'>" );
}
! ret.append( treeMenuDivs( node.list, -1, -1, siteRoot, zindex + 1, page ) );
! }
! else if ( node.src != null ) {
! ret.append( "</td><td valign='top'> " + rightLink + "<img id='" + list.jsVar + i
! + "arrow' border='0' src='" + siteRoot + "/images/vocab/ArrowDownTransp.gif"
! + "' width='8' height='8' style='margin-top: 4px; margin-bottom: 0px;'></a>" );
! ret.append( "</td><td><div style='position: relative'><div id='vocab_info" + list.jsVar
! + Integer.toString( i ) + "' style='position: absolute; left: -400px; top: 10px; "
! + "display: none; width: 400px;' class='vocabFlyout' "
! + "onMouseOver='moCount++' onMouseOut='moCount--'>" );
! ret.append( "<table width='100%' onMouseOver='moCount++' onMouseOut='moCount--' "
! + "border='0' cellpadding='0' cellspacing='0'>"
! + "<td align='right' valign='top' nowrap><a href='javascript:toggleVocabInfo( \""
! + list.jsVar + i + "\" );' "
! + "onMouseOver='window.status = \"Close this panel\"; return true;' "
! + "onMouseOut='window.status = \"\"; return true;' class='selectClearLinks'>X</a>"
! + "</td></table>" );
! /*
! ret.append( "<table cellpadding='0' cellspacing='0' width='100%' height='1'>"
! + "<td height='1' bgcolor='#999999'>"
! + "<img src='images/blank.gif' height='1'></td></table>" );
! */
! ret.append( getFileText( node.src, page ) );
! /*
! + "<table cellpadding='0' cellspacing='0' width='100%' height='1'>"
! + "<td height='1' bgcolor='#999999'>"
! + "<img src='images/blank.gif' height='1'></td></table></div></div>" );
! */
}
else {
***************
*** 1079,1084 ****
ret.append( "</td></tr>" );
if ( node.divider ) {
! ret.append( "<tr><td></td><td height='8' align='left' nowrap> "
! + "<img border='0' src='" + siteRoot + "/images/vocab/hr.gif' height='6' width='95%'>"
+ "</td><td></td></tr>" );
}
--- 1112,1117 ----
ret.append( "</td></tr>" );
if ( node.divider ) {
! ret.append( "<tr><td></td><td height='7' align='left' valign='center' nowrap>"
! + "<img border='0' src='" + siteRoot + "/images/vocab/hr.gif' height='1' width='95%'>"
+ "</td><td></td></tr>" );
}
***************
*** 1106,1109 ****
--- 1139,1168 ----
/**
+ * Reads the given file and returns its contents as a string
+ *
+ *@param filename
+ *@param page
+ */
+ private String getFileText( String filename, PageContext page ) {
+ StringBuffer ret = new StringBuffer();
+ try {
+ BufferedReader in = new BufferedReader( new FileReader( page.getServletContext().getRealPath( filename ) ) );
+ String s = null;
+ while ( ( s = in.readLine() ) != null ) {
+ ret.append( s );
+ }
+ }
+ catch ( FileNotFoundException fnfe ) {
+ System.err.println( "File not found - " );
+ System.err.println( fnfe.getClass() + " " + fnfe.getMessage() );
+ }
+ catch ( IOException ioe ) {
+ System.err.println( "Exception occurred reading " + filename );
+ System.err.println( ioe.getClass() + " " + ioe.getMessage() );
+ }
+ return ret.toString();
+ }
+
+ /**
* LIGHT (non-nested DIVs, no tables) version of vocab flyouts/dropdowns for
* slow browsers (Mac IE).
***************
*** 1399,1404 ****
for ( int i = 0; i < list.item.size(); i++ ) {
VocabNode node = (VocabNode)list.item.get( i );
! String system = node.name.substring( 0, node.name.lastIndexOf( "." ) );
! setUiLabelOfSystemIds( node.list, system, node.id );
}
}
--- 1458,1465 ----
for ( int i = 0; i < list.item.size(); i++ ) {
VocabNode node = (VocabNode)list.item.get( i );
! if ( node.name.lastIndexOf( "." ) > -1 ) {
! String system = node.name.substring( 0, node.name.lastIndexOf( "." ) );
! setUiLabelOfSystemIds( node.list, system, node.id );
! }
}
}
***************
*** 1457,1460 ****
--- 1518,1522 ----
public String labelAbbrev = null; // Abbreviated interface label
public String definition = ""; // Definition
+ public String src = null; // Source file for information panel
public VocabList list = new VocabList(); // Sub-list, if this is a sub-header node
public boolean noDisplay = false; // Don't display this value in this UI
***************
*** 1878,1881 ****
--- 1940,1944 ----
currentNode = node;
currentNode.label = newNodeLabel;
+ currentNode.src = (String)attributes.get( "src" );
}
else if ( localName.equals( "divider" ) ) {
|
|
From: C. R. D. <rya...@us...> - 2003-04-23 23:43:46
|
Update of /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab
In directory sc8-pr-cvs1:/tmp/cvs-serv7539/src/org/dlese/dpc/vocab
Modified Files:
MetadataVocab.java
Log Message:
Support for rendering vocab flyouts/dropdowns with label and list
wrapping, and optional abbreviated versions of labels
Index: MetadataVocab.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/MetadataVocab.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -r1.27 -r1.28
*** MetadataVocab.java 7 Apr 2003 18:38:25 -0000 1.27
--- MetadataVocab.java 23 Apr 2003 23:43:41 -0000 1.28
***************
*** 80,85 ****
private String xmlFile;
private boolean rewriteXML = false;
! private final String XML_HEAD = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<!DOCTYPE field SYSTEM \"ControlledVocab.dtd\">\n";
private boolean parsingDefinitions = false;
// For tracking changes via database (or other means):
--- 80,87 ----
private String xmlFile;
private boolean rewriteXML = false;
! private boolean startSavingXML = false;
private boolean parsingDefinitions = false;
+ private String currentHeader = "";
+ private String currentFooter = "";
// For tracking changes via database (or other means):
***************
*** 89,95 ****
--- 91,99 ----
private HashMap uiSystems = new HashMap(); // keep track of all UI "system" attributes encountered
private HashMap uiSystemFields = new HashMap(); // keep track of system fields for UIs
+ private HashMap abbreviatedLabels = new HashMap();// store system/field/value label abbreviations
private HashMap uiLabelOf = new HashMap(); // metadata name -> UI label mapping
private HashMap uiLabelOfSystemIds = new HashMap();// encoded Ids -> UI label mapping
private HashMap fieldValueIdPairExists = new HashMap();// does the given field/value Id pair exist in XML?
+ private HashMap treeMenuDivsBuffer = new HashMap();// cache tree menu DIVs for faster response
// Messages/errors
***************
*** 284,292 ****
}
if ( node.list.item.size() > 0 ) {
! ret.append( node.getLabel().toUpperCase() )
.append( ":</option>\n" );
}
else {
! ret.append( node.getLabel() )
.append( "</option>\n" );
}
--- 288,296 ----
}
if ( node.list.item.size() > 0 ) {
! ret.append( node.label.toUpperCase() )
.append( ":</option>\n" );
}
else {
! ret.append( node.label )
.append( "</option>\n" );
}
***************
*** 416,420 ****
}
if ( isHeading ) {
! ret.append( node.getLabel() + ":</div><div class='subCatBlock'>\n" )
.append( vocabCheckboxes( node.list, size, tdWidth, inputState, name, count, jsCount, skipTopRow ) )
.append( "</div>\n" );
--- 420,424 ----
}
if ( isHeading ) {
! ret.append( node.label + ":</div><div class='subCatBlock'>\n" )
.append( vocabCheckboxes( node.list, size, tdWidth, inputState, name, count, jsCount, skipTopRow ) )
.append( "</div>\n" );
***************
*** 425,429 ****
.append( node.id )
.append( "\">" )
! .append( node.getLabel() )
.append( "</label></nobr></div>\n" );
}
--- 429,433 ----
.append( node.id )
.append( "\">" )
! .append( node.label )
.append( "</label></nobr></div>\n" );
}
***************
*** 630,634 ****
.append( "<span class='histogramSubHeader'>" )
.append( a_href )
! .append( node.getLabel() )
.append( "</a></span>" )
.append( "</i></b></td><td background='" + imgPrefix + "images/hist_ruler.gif' width='78%'> " )
--- 634,638 ----
.append( "<span class='histogramSubHeader'>" )
.append( a_href )
! .append( node.label )
.append( "</a></span>" )
.append( "</i></b></td><td background='" + imgPrefix + "images/hist_ruler.gif' width='78%'> " )
***************
*** 655,659 ****
ret.append( "<tr><td background='" + imgPrefix + "images/hist_back.gif' align='right' width='25%' height='8'>" )
.append( a_href )
! .append( node.getLabel() )
.append( "</a></td><td background='" + imgPrefix + "images/hist_ruler.gif' width='75%'><span class='histogramCounts'> " )
.append( a_href )
--- 659,663 ----
ret.append( "<tr><td background='" + imgPrefix + "images/hist_back.gif' align='right' width='25%' height='8'>" )
.append( a_href )
! .append( node.label )
.append( "</a></td><td background='" + imgPrefix + "images/hist_ruler.gif' width='75%'><span class='histogramCounts'> " )
.append( a_href )
***************
*** 817,822 ****
String subQuery = "";
try {
! subQuery = (String)luceneQuery.get( getFieldSystemId( name )
! + "=" + node.name );
}
catch ( Exception e ) {
--- 821,825 ----
String subQuery = "";
try {
! subQuery = (String)luceneQuery.get( getFieldSystemId( name ) + "=" + node.name );
}
catch ( Exception e ) {
***************
*** 854,870 ****
* Generates a Javascript Tree Menu of the specified part of the vocabulary
*
! *@param group colon-seperated specifier of the part of the vocab hierarchy
! * which is to be displayed
*@param system
! *@return the Javascript code defining the menu
! */
! public String getVocabTreeMenu( String system, String group ) {
StringBuffer ret = new StringBuffer();
String name = setTopName( system, group );
VocabList current = setCurrent( system, group );
ret.append( "<script language='javascript'>\n<!--\n" );
! ret.append( "var tm_0 = new TreeMenu( 'tm_0' );\n" );
! ret.append( vocabTreeMenu( current, "0" ) );
! ret.append( "Display( tm_0 );\n// -->\n</script>\n" );
return ret.toString();
}
--- 857,900 ----
* Generates a Javascript Tree Menu of the specified part of the vocabulary
*
! *@param group colon-seperated specifier of the part of the vocab
! * hierarchy which is to be displayed
*@param system
! *@param x
! *@param y
! *@param page
! *@param language
! *@return the Javascript code defining the menu
! */
! public String getVocabTreeMenu( String system,
! String language,
! String group,
! String x,
! String y,
! PageContext page ) {
StringBuffer ret = new StringBuffer();
String name = setTopName( system, group );
VocabList current = setCurrent( system, group );
+ current.jsVar = "tm_" + name + "0";
+ System.out.println( "group = " + group );
+ VocabNode node = (VocabNode)vocab.map.get( system + '.' + group );
ret.append( "<script language='javascript'>\n<!--\n" );
! try {
! System.out.println( "trio: " + language + name + node.id );
! String abbrevLabel = node.labelAbbrev;
! if ( abbrevLabel == null ) {
! abbrevLabel = node.label;
! }
! ret.append( "var tm_" + name + "0 = new VocabList( 'tm_" + name + "0', 0, '"
! + node.label + "', '" + abbrevLabel + "' );\n" );
! }
! catch ( Exception e ) {
! e.printStackTrace();
! }
! ret.append( vocabTreeMenu( current, language, name + "0", name, page ) );
! ret.append( "\nRenderVocabSelectedState();\n//-->\n</script>" );
! ret.append( treeMenuDivs( current, Integer.parseInt( x ), Integer.parseInt( y ),
! ( (HttpServletRequest)page.getRequest() ).getContextPath(), 3 ) );
! ret.append( "<script language='javascript'>\n<!--\n" );
! ret.append( "SetToVisible( tm_" + name + "0 );\n// -->\n</script>\n" );
return ret.toString();
}
***************
*** 875,896 ****
*@param list
*@param id
*@return
*/
public String vocabTreeMenu( VocabList list,
! String id ) {
StringBuffer ret = new StringBuffer();
boolean isHeading = false;
for ( int i = 0; i < list.item.size(); i++ ) {
VocabNode node = (VocabNode)list.item.get( i );
isHeading = ( node.list.item.size() > 0 ) ? true : false;
if ( isHeading ) {
! String varName = id + new Integer( i ).toString();
! ret.append( "var tm_" + varName + " = new TreeMenu( 'tm_" + varName + "' );\n" );
! ret.append( "ATE( tm_" + id + ", '', \"" + node.getLabel() + "\", tm_" + varName + " );\n" );
! ret.append( vocabTreeMenu( node.list, varName ) );
}
else {
! ret.append( "ATE( tm_" + id + ", '', \"" + node.getLabel() + "\" );\n" );
}
}
return ret.toString();
--- 905,1181 ----
*@param list
*@param id
+ *@param fieldId
+ *@param page
+ *@param language
*@return
*/
public String vocabTreeMenu( VocabList list,
! String language,
! String id,
! String fieldId,
! PageContext page ) {
StringBuffer ret = new StringBuffer();
boolean isHeading = false;
+ int jsCount = 0;
+ HttpSession session = page.getSession();
for ( int i = 0; i < list.item.size(); i++ ) {
VocabNode node = (VocabNode)list.item.get( i );
isHeading = ( node.list.item.size() > 0 ) ? true : false;
+ String wrap = "false";
+ if ( node.wrap ) {
+ wrap = "true";
+ }
+ String labelAbbrev = node.labelAbbrev;
+ if ( labelAbbrev == null ) {
+ labelAbbrev = (String)abbreviatedLabels.get( language + fieldId + node.id );
+ if ( labelAbbrev == null ) {
+ labelAbbrev = node.label;
+ }
+ }
if ( isHeading ) {
! String varName = id + new Integer( jsCount++ ).toString();
! String groupType = Integer.toString( node.list.groupType );
! node.list.jsVar = "tm_" + varName;
! ret.append( "var tm_" + varName + " = new VocabList( 'tm_" + varName + "', " + groupType + " );\n" );
! ret.append( "AV( tm_" + id + ", \"" + node.label + "\", \"" + labelAbbrev + "\", '"
! + fieldId + "', '" + node.id + "', false, " + wrap + ", tm_" + varName + " );\n" );
! ret.append( vocabTreeMenu( node.list, language, varName, fieldId, page ) );
! }
! else if ( !node.noDisplay ) {
! jsCount++;
! HashMap inputState = getState( fieldId, session );
! String selected = "false";
! if ( ( inputState != null ) &&
! ( inputState.get( fieldId + node.id ) != null ) ) {
! selected = "true";
! }
! ret.append( "AV( tm_" + id + ", \"" + node.label + "\", \"" + labelAbbrev + "\", '" + fieldId
! + "', '" + node.id + "', " + selected + ", " + wrap + " );\n" );
! }
! }
! return ret.toString();
! }
!
! /**
! * Description of the Method
! *
! *@param list
! *@param x
! *@param y
! *@param siteRoot
! *@param zindex
! */
! private String treeMenuDivs( VocabList list, int x, int y, String siteRoot, int zindex ) {
! String buff = null;
! if ( x > -1 ) {
! buff = (String)treeMenuDivsBuffer.get( list.jsVar + Integer.toString( x ) + Integer.toString( y ) + siteRoot );
! }
! if ( buff == null ) {
! StringBuffer ret = new StringBuffer();
! boolean isDropdown = false;
! if ( list.groupType > 0 ) {
! isDropdown = true;
! }
! if ( x > -1 ) {
! ret.append( "<div onMouseOver='moCount++' onMouseOut='moCount--' border='1' cellpadding='5' cellspacing='0' id='"
! + list.jsVar + "div' style='position: absolute; left: "
! + Integer.toString( x ) + "px; top: " + Integer.toString( y ) + "px; "
! + "display: block; visibility: hidden; z-index: " + Integer.toString( zindex ) + "' "
! + "class='vocabFlyout' onMouseOver='moCount++' onMouseOut='moCount--'>" );
! }
! else if ( list.groupType == 2 ) {
! ret.append( "<div onMouseOver='moCount++' onMouseOut='moCount--' border='0' cellpadding='3' cellspacing='0' id='"
! + list.jsVar + "div' style='position: relative; "
! + "display: block; visibility: visible; margin-left: 13px; z-index: " + Integer.toString( zindex ) + "' "
! + "onMouseOver='moCount++' onMouseOut='moCount--'>" );
! }
! else if ( isDropdown ) {
! ret.append( "<div onMouseOver='moCount++' onMouseOut='moCount--' border='0' cellpadding='3' cellspacing='0' id='"
! + list.jsVar + "div' style='position: relative; z-index: " + Integer.toString( zindex ) + " "
! + "display: block; visibility: hidden; margin-left: 13px;' "
! + "onMouseOver='moCount++' onMouseOut='moCount--'>" );
}
else {
! zindex++;
! ret.append( "<div onMouseOver='moCount++' onMouseOut='moCount--' border='1' cellpadding='5' cellspacing='0' id='"
! + list.jsVar + "div' style=' z-index: " + Integer.toString( zindex ) + " "
! + "display: block; visibility: hidden;' "
! + "class='vocabFlyout' onMouseOver='moCount++' onMouseOut='moCount--'>" );
! }
! ret.append( "<table onMouseOver='moCount++' onMouseOut='moCount--' border='0' cellpadding='0' cellspacing='0'><tr><td>" );
! if ( !isDropdown || ( x > -1 ) ) {
! ret.append( "<table width='100%' onMouseOver='moCount++' onMouseOut='moCount--' "
! + "border='0' cellpadding='0' cellspacing='0'>"
! + "<td align='left' valign='top' nowrap><a href='javascript:checkAll( " + list.jsVar + ", 1 )' "
! + "onMouseOver='window.status = \"Select all items in this list\"; return true;' "
! + "onMouseOut='window.status = \"\"; return true;' class='selectClearLinks'>Select all</a></td>"
! + "<td width='10'> </td><td align='center' valign='top' nowrap>"
! + "<a href='javascript:checkAll( " + list.jsVar + ", 0 )' class='selectClearLinks' "
! + "onMouseOver='window.status = \"Clear all items in this list\"; return true;' "
! + "onMouseOut='window.status = \"\"; return true;'>Clear all</a></td><td width='10'> </td>"
! + "<td align='right' valign='top' nowrap><a href='javascript:hideList( " + list.jsVar + " )' "
! + "onMouseOver='window.status = \"Close this list\"; return true;' "
! + "onMouseOut='window.status = \"\"; return true;' class='selectClearLinks'>X</a></td></table></td></tr>"
! + "<tr><td height='1' bgcolor='#999999'><img src='images/blank.gif' height='1'></td></tr><tr><td>" );
! }
! ret.append( "<table onMouseOver='moCount++' onMouseOut='moCount--' border='0' cellpadding='0' cellspacing='0'><tr>"
! + "<td align='left' valign='top' nowrap>" );
! ret.append( "<table width='100%' onMouseOver='moCount++' onMouseOut='moCount--' border='0' cellpadding='0' cellspacing='0'>" );
! int jsCount = 0;
! for ( int i = 0; i < list.item.size(); i++ ) {
! String rightLink = "";
! VocabNode node = (VocabNode)list.item.get( i );
! if ( !node.noDisplay ) {
! ret.append( "<tr><td width='1%' valign='top'>" );
! if ( node.list.item.size() > 0 ) {
! ret.append( "<a href='javascript:checkAll( " + node.list.jsVar + ", -1 );' "
! + "onMouseOver='window.status = \"\"; return true;' class='listToggleLink'>" );
! }
! else {
! ret.append( "<a href='javascript:toggleInput( " + list.jsVar + ", " + Integer.toString( jsCount ) + " );' "
! + "onMouseOver='window.status = \"\"; return true;' class='listToggleLink'>" );
! }
! ret.append( "<img id='" + list.jsVar + Integer.toString( jsCount )
! + "check' width='8' height='8' border='0' src='" + siteRoot + "/images/vocab/boxWhite.gif"
! + "' style='margin-top: 4px; margin-bottom: 0px;' alt='Click to select " + node.label + "'></a> " );
! if ( node.list.item.size() > 0 ) {
! if ( node.list.groupType == 2 ) {
! rightLink = "<a href='javascript:checkAll( " + node.list.jsVar + ", -1 );' "
! + "onMouseOver='window.status = \"\"; return true;' class='listToggleLink'>";
! }
! else {
! rightLink = "<a href='javascript:toggleInput( " + list.jsVar + ", " + Integer.toString( jsCount ) + " );' "
! + "onMouseOver='window.status = \"\"; return true;' class='listToggleLink'>";
! }
! }
! else {
! rightLink = "<a href='javascript:toggleInput( " + list.jsVar + ", " + Integer.toString( jsCount ) + " );' "
! + "onMouseOver='window.status = \"\"; return true;' class='listToggleLink'>";
! }
! ret.append( "</td><td nowrap valign='top' align='left'>" + rightLink );
! ret.append( " " + rightLink + wrappedLabel( node.label ) + "</a>" );
! if ( node.list.item.size() > 0 ) {
! if ( node.list.groupType == 0 ) {
! ret.append( "</td><td valign='top'> " + rightLink + "<img id='" + list.jsVar + i
! + "arrow' border='0' src='" + siteRoot + "/images/vocab/ArrowSideTransp.gif"
! + "' width='14' height='8' style='margin-top: 4px; margin-bottom: 0px;'></a></td><td width='1%'>" );
! }
! else if ( node.list.groupType == 1 ) {
! ret.append( "</td><td valign='top' width='99%'> " + rightLink + "<img id='" + list.jsVar + i
! + "arrow' border='0' src='" + siteRoot + "/images/vocab/ArrowDownTransp.gif"
! + "' width='8' height='8' style='margin-top: 4px; margin-bottom: 0px;'></a>" );
! }
! else {
! ret.append( ":</td><td valign='top'> " );
! }
! if ( node.list.groupType > 0 ) {
! ret.append( "</td></tr><tr><td colspan='3'>" );
! }
! ret.append( treeMenuDivs( node.list, -1, -1, siteRoot, zindex + 1 ) );
! }
! else {
! ret.append( " </td><td valign='top'> " );
! }
! ret.append( "</td></tr>" );
! if ( node.divider ) {
! ret.append( "<tr><td></td><td height='8' align='left' nowrap> "
! + "<img border='0' src='" + siteRoot + "/images/vocab/hr.gif' height='6' width='95%'>"
! + "</td><td></td></tr>" );
! }
! if ( node.wrap ) {
! ret.append( "</table></td><td width='1' bgcolor='#999999'><div style='font-size: 1px'> </div></td>"
! + "<td> </td><td align='left' valign='top' nowrap>"
! + "<table onMouseOver='moCount++' onMouseOut='moCount--' border='0' cellpadding='0' cellspacing='0'>" );
! }
! jsCount++;
! }
}
+ ret.append( "</table>" );
+ ret.append( "</td></tr></table>" );
+ ret.append( "</td></tr></table>" );
+ ret.append( "</div>" );
+ if ( x > -1 ) {
+ treeMenuDivsBuffer.put( list.jsVar + Integer.toString( x ) + Integer.toString( y ) + siteRoot, ret.toString() );
+ }
+ return ret.toString();
+ }
+ else {
+ return buff;
+ }
+ }
+
+ /**
+ * LIGHT (non-nested DIVs, no tables) version of vocab flyouts/dropdowns for
+ * slow browsers (Mac IE).
+ *
+ *@param list
+ *@param x
+ *@param y
+ */
+ private String treeMenuDivsLight( VocabList list, int x, int y ) {
+ StringBuffer ret = new StringBuffer();
+ boolean isDropdown = false;
+ if ( list.groupType > 0 ) {
+ isDropdown = true;
+ }
+ if ( x > -1 ) {
+ ret.append( "<div id='" + list.jsVar + "div' style='position: absolute; left: " + Integer.toString( x ) + "px; top: "
+ + Integer.toString( y ) + "px; display: block; visibility: hidden;' class='vocabFlyout' "
+ + "onMouseOver='moCount++' onMouseOut='moCount--'>" );
+ }
+ int jsCount = 0;
+ for ( int i = 0; i < list.item.size(); i++ ) {
+ String rightLink = "";
+ VocabNode node = (VocabNode)list.item.get( i );
+ if ( !node.noDisplay ) {
+ if ( node.list.item.size() > 0 ) {
+ ret.append( "<a href='javascript:checkAll( " + node.list.jsVar + ", -1 );' "
+ + "onMouseOver='window.status = \"\"; return true;' class='listToggleLink'>" );
+ }
+ else {
+ ret.append( "<a href='javascript:toggleInput( " + list.jsVar + ", " + i + " );' "
+ + "onMouseOver='window.status = \"\"; return true;' class='listToggleLink'>" );
+ }
+ ret.append( "<img id='" + list.jsVar + Integer.toString( jsCount ) + "check' border='0' src='images/blank.gif"
+ //+ CHECKBOX_IMG[ list.checkedState[ i ] ].src
+ + "' style='margin-top: 4px; margin-bottom: 0px;' alt='Click to select " + node.label + "'></a> " );
+ if ( node.list.item.size() > 0 ) {
+ if ( node.list.groupType == 2 ) {
+ rightLink = "<a href='javascript:checkAll( " + node.list.jsVar + ", -1 );' "
+ + "onMouseOver='window.status = \"\"; return true;' class='listToggleLink'>";
+ }
+ else {
+ rightLink = "<a href='javascript:toggleInput( " + list.jsVar + ", " + Integer.toString( jsCount ) + " );' "
+ + "onMouseOver='window.status = \"\"; return true;' class='listToggleLink'>";
+ }
+ }
+ else {
+ rightLink = "<a href='javascript:toggleInput( " + list.jsVar + ", " + Integer.toString( jsCount ) + " );' "
+ + "onMouseOver='window.status = \"\"; return true;' class='listToggleLink'>";
+ }
+ ret.append( rightLink );
+ ret.append( " " + rightLink + wrappedLabel( node.label ) + "</a>" );
+ if ( node.list.item.size() > 0 ) {
+ if ( node.list.groupType < 2 ) {
+ ret.append( " " + rightLink + "<img id='" + list.jsVar + i
+ + "arrow' border='0' src='images/blank.gif"
+ //+ ARROW_CLOSED.src
+ + "' style='margin-top: 4px; margin-bottom: 0px;'></a>" );
+ }
+ else {
+ ret.append( ": " );
+ }
+ ret.append( "<br> " );
+ ret.append( treeMenuDivsLight( node.list, -1, -1 ) );
+ }
+ else {
+ ret.append( " " );
+ }
+ jsCount++;
+ ret.append( "<br>" );
+ }
+ }
+ if ( x > -1 ) {
+ ret.append( "</div>" );
}
return ret.toString();
***************
*** 898,901 ****
--- 1183,1200 ----
/**
+ * Description of the Method
+ *
+ *@param label
+ */
+ private String wrappedLabel( String label ) {
+ int ind = label.indexOf( "||" );
+ while ( ind > -1 ) {
+ label = label.substring( 0, ind ) + "<br /> " + label.substring( ind + 2, label.length() );
+ ind = label.indexOf( "||" );
+ }
+ return label;
+ }
+
+ /**
* Generates HTML HIDDEN inputs of the specified part of the vocabulary.
*
***************
*** 911,915 ****
StringBuffer ret = new StringBuffer();
HttpSession session = page.getSession();
! String name = setTopName( system, group );
VocabList current = setCurrent( system, group );
HashMap inputState = getState( name, session );
--- 1210,1215 ----
StringBuffer ret = new StringBuffer();
HttpSession session = page.getSession();
! String name = "";
! name = setTopName( system, group );
VocabList current = setCurrent( system, group );
HashMap inputState = getState( name, session );
***************
*** 932,936 ****
for ( int i = 0; i < list.item.size(); i++ ) {
VocabNode node = (VocabNode)list.item.get( i );
! if ( ( inputState != null ) && ( inputState.get( name + node.name ) != null ) ) {
ret.append( "<input type='hidden' name='" )
.append( name )
--- 1232,1236 ----
for ( int i = 0; i < list.item.size(); i++ ) {
VocabNode node = (VocabNode)list.item.get( i );
! if ( ( inputState != null ) && ( inputState.get( name + node.id ) != null ) ) {
ret.append( "<input type='hidden' name='" )
.append( name )
***************
*** 955,958 ****
--- 1255,1259 ----
*/
private String setTopName( String system, String group ) {
+ //System.out.println( "setTopName = " + system + "/" + group );
group += ":";
int ind = 0;
***************
*** 1113,1116 ****
--- 1414,1418 ----
for ( int i = 0; i < list.item.size(); i++ ) {
VocabNode node = (VocabNode)list.item.get( i );
+ //System.out.println( "setUiLabelOfSystemIds: " + node.name + "=" + node.id );
if ( node.id == null ) {
String label = stringUtil.replace( node.label, " ", "_", false );
***************
*** 1152,1159 ****
public String name; // Metadata name
public String id; // System Id (indexed & used in search queries)
! private String label = ""; // User interface label(s)
! private String definition = ""; // Metadata definition(s)
public VocabList list = new VocabList(); // Sub-list, if this is a sub-header node
! private boolean noDisplay; // Don't display this value in this UI
/**
--- 1454,1464 ----
public String name; // Metadata name
public String id; // System Id (indexed & used in search queries)
! public String label = ""; // User interface label
! public String labelAbbrev = null; // Abbreviated interface label
! public String definition = ""; // Definition
public VocabList list = new VocabList(); // Sub-list, if this is a sub-header node
! public boolean noDisplay = false; // Don't display this value in this UI
! public boolean wrap = false; // Start a new column after displaying this item
! public boolean divider = false; // Render a divider line after displaying this item
/**
***************
*** 1167,1190 ****
this.noDisplay = noDisplay;
}
-
- public void setId( String id ) {
- this.id = id;
- }
-
- public String getLabel() {
- return label;
- }
-
- public void setLabel( String value ) {
- label = value;
- }
-
- public String getDefinition() {
- return definition;
- }
-
- public void setDefinition( String value ) {
- definition = value;
- }
}
--- 1472,1475 ----
***************
*** 1194,1197 ****
--- 1479,1484 ----
public VocabList parent; // Parent list of this list
public String definition; // Definition of this list (or sub-list)
+ public int groupType = 0; // 0 = flyout, 1 = drop-down, 2 = indented
+ public String jsVar; // treeMenu JS var name
}
***************
*** 1236,1240 ****
--- 1523,1565 ----
current = vocab;
outputXML.setLength( 0 );
+ outputXML.append( "\t" );
rewriteXML = false;
+ currentHeader = "";
+ currentFooter = "\n";
+ startSavingXML = false;
+ // Get header and footer of file in case of re-write:
+ if ( parsingDefinitions ) {
+ String filename = saxLocator.getSystemId().substring( 5, saxLocator.getSystemId().length() );
+ try {
+ BufferedReader in = new BufferedReader( new FileReader( filename ) );
+ String s = null;
+ boolean parsingHeader = true;
+ boolean parsingFooter = false;
+ while ( ( s = in.readLine() ) != null ) {
+ if ( parsingHeader ) {
+ if ( s.indexOf( "<field" ) > -1 ) {
+ parsingHeader = false;
+ }
+ else {
+ currentHeader = currentHeader + s + "\n";
+ }
+ }
+ else if ( parsingFooter ) {
+ currentFooter = currentFooter + s + "\n";
+ }
+ else if ( s.indexOf( "</termsRecord>" ) > -1 ) {
+ parsingFooter = true;
+ }
+ }
+ }
+ catch ( FileNotFoundException fnfe ) {
+ System.err.println( "Vocab file not found - " );
+ System.err.println( fnfe.getClass() + " " + fnfe.getMessage() );
+ }
+ catch ( IOException ioe ) {
+ System.err.println( "Exception occurred reading " + filename );
+ System.err.println( ioe.getClass() + " " + ioe.getMessage() );
+ }
+ }
}
***************
*** 1257,1262 ****
FileWriter file = new FileWriter( xmlFile );
String outStr = outputXML.toString();
! file.write( XML_HEAD, 0, XML_HEAD.length() );
file.write( outStr, 0, outStr.length() );
file.flush();
file.close();
--- 1582,1588 ----
FileWriter file = new FileWriter( xmlFile );
String outStr = outputXML.toString();
! file.write( currentHeader, 0, currentHeader.length() );
file.write( outStr, 0, outStr.length() );
+ file.write( currentFooter, 0, currentFooter.length() );
file.flush();
file.close();
***************
*** 1304,1308 ****
Attributes atts ) throws SAXException {
currentSAXElementName = new String( localName );
! outputXML.append( "<" + qName );
HashMap attributes = new HashMap();
for ( int i = 0; i < atts.getLength(); i++ ) {
--- 1630,1636 ----
Attributes atts ) throws SAXException {
currentSAXElementName = new String( localName );
! if ( !qName.equals( "termsRecord" ) ) {
! outputXML.append( "<" + qName );
! }
HashMap attributes = new HashMap();
for ( int i = 0; i < atts.getLength(); i++ ) {
***************
*** 1310,1313 ****
--- 1638,1642 ----
}
if ( localName.equals( "field" ) ) {
+ startSavingXML = true;
currentSAXElementLanguage = (String)attributes.get( "language" );
String testAtt = (String)attributes.get( "id" );
***************
*** 1385,1397 ****
// Assign the Id only if this system uses this vocab field (some systems might not):
if ( uiSystemFields.get( sys + "." + currentVocabFieldName ) != null ) {
! VocabNode node = findVocabNode( sys, currentVocabFieldName, (String)attributes.get( "name" ) );
if ( node == null ) {
! node = findVocabNode( sys, currentVocabFieldName, (String)attributes.get( "vocab" ) );
! if ( node == null ) {
! reportError( "Vocabulary UI for system " + sys + " is missing value "
! + (String)attributes.get( "name" ) );
! }
}
! if ( node != null ) {
node.id = newNodeId;
uiLabelOf.put( sys + currentVocabFieldName + newNodeName, node.label );
--- 1714,1728 ----
// Assign the Id only if this system uses this vocab field (some systems might not):
if ( uiSystemFields.get( sys + "." + currentVocabFieldName ) != null ) {
! VocabNode node = null;
! String nodeName = (String)attributes.get( "name" );
! if ( nodeName == null ) {
! nodeName = (String)attributes.get( "vocab" );
! }
! node = findVocabNode( sys, currentVocabFieldName, nodeName );
if ( node == null ) {
! reportError( "Vocabulary UI for system " + sys + " is missing value "
! + nodeName );
}
! else {
node.id = newNodeId;
uiLabelOf.put( sys + currentVocabFieldName + newNodeName, node.label );
***************
*** 1403,1408 ****
newNodeId = "";
}
! outputXML.append( " name=\"" + (String)attributes.get( "name" )
! + "\" vocab=\"" + (String)attributes.get( "vocab" ) + "\" id=\"" + newNodeId + "\"" );
}
else if ( localName.equals( "definition" ) ) {
--- 1734,1749 ----
newNodeId = "";
}
! if ( attributes.get( "name" ) != null ) {
! outputXML.append( " name=\"" + (String)attributes.get( "name" ) + "\"" );
! }
! if ( attributes.get( "vocab" ) != null ) {
! outputXML.append( " vocab=\"" + (String)attributes.get( "vocab" ) + "\"" );
! }
! outputXML.append( " id=\"" + newNodeId + "\"" );
! if ( attributes.get( "abbrev" ) != null ) {
! abbreviatedLabels.put( currentSAXElementLanguage + currentVocabFieldId + newNodeId,
! (String)attributes.get( "abbrev" ) );
! outputXML.append( " abbrev=\"" + (String)attributes.get( "abbrev" ) + "\"" );
! }
}
else if ( localName.equals( "definition" ) ) {
***************
*** 1410,1414 ****
+ (String)attributes.get( "interface" ) + "\"" );
}
! outputXML.append( ">" );
}
--- 1751,1757 ----
+ (String)attributes.get( "interface" ) + "\"" );
}
! if ( !qName.equals( "termsRecord" ) ) {
! outputXML.append( ">" );
! }
}
***************
*** 1480,1485 ****
attributes.put( atts.getLocalName( i ), atts.getValue( i ) );
}
! if ( localName.equals( "field" ) || localName.equals( "group" ) ) {
! if ( localName.equals( "field" ) ) {
currentSAXElementSystem = (String)attributes.get( "system" ) + "." + (String)attributes.get( "interface" )
+ "." + (String)attributes.get( "language" );
--- 1823,1828 ----
attributes.put( atts.getLocalName( i ), atts.getValue( i ) );
}
! if ( localName.equals( "concept" ) || localName.equals( "group" ) ) {
! if ( localName.equals( "concept" ) ) {
currentSAXElementSystem = (String)attributes.get( "system" ) + "." + (String)attributes.get( "interface" )
+ "." + (String)attributes.get( "language" );
***************
*** 1499,1507 ****
current.item.add( node );
currentNode = node;
! currentNode.setLabel( (String)attributes.get( "label" ) );
node.list.parent = current;
current = node.list;
}
! else if ( localName.equals( "value" ) ) {
boolean noDisplay = false;
String newNodeLabel;
--- 1842,1860 ----
current.item.add( node );
currentNode = node;
! currentNode.label = (String)attributes.get( "label" );
! currentNode.labelAbbrev = (String)attributes.get( "abbrev" );
node.list.parent = current;
+ String type = (String)attributes.get( "inline" );
+ if ( type != null ) {
+ if ( type.equals( "drop" ) ) {
+ node.list.groupType = 1;
+ }
+ else if ( type.equals( "indent" ) ) {
+ node.list.groupType = 2;
+ }
+ }
current = node.list;
}
! else if ( localName.equals( "item" ) ) {
boolean noDisplay = false;
String newNodeLabel;
***************
*** 1524,1528 ****
current.item.add( node );
currentNode = node;
! currentNode.setLabel( newNodeLabel );
}
}
--- 1877,1888 ----
current.item.add( node );
currentNode = node;
! currentNode.label = newNodeLabel;
! }
! else if ( localName.equals( "divider" ) ) {
! currentNode.divider = true;
! }
! String wrap = (String)attributes.get( "wrap" );
! if ( wrap != null ) {
! currentNode.wrap = true;
}
}
***************
*** 1544,1547 ****
--- 1904,1913 ----
endElementUI( namespaceURI, localName, qName );
}
+ // NOTE: The following ensures that the characters() methods will not populate node
+ // values, and this only works because node values only get populated with LEAF element
+ // character data! When using a DTD, ingorableWhitespace() returns the ignorable
+ // whitespace, but using a schema causes that whitespace to be returned in the
+ // characters() methods...
+ currentSAXElementName = "";
}
***************
*** 1569,1573 ****
public void endElementUI( String namespaceURI, String localName,
String qName ) throws SAXException {
! if ( localName.equals( "field" ) || localName.equals( "group" ) ) {
current = current.parent;
}
--- 1935,1939 ----
public void endElementUI( String namespaceURI, String localName,
String qName ) throws SAXException {
! if ( localName.equals( "concept" ) || localName.equals( "group" ) ) {
current = current.parent;
}
***************
*** 1604,1608 ****
setDefinitions( currentSAXElementSystem, newNodeId, charsValue );
}
! outputXML.append( charsValue );
}
--- 1970,1976 ----
setDefinitions( currentSAXElementSystem, newNodeId, charsValue );
}
! if ( startSavingXML ) {
! outputXML.append( charsValue );
! }
}
***************
*** 1628,1637 ****
String charsValue = new String( ch, start, length );
if ( charsValue.length() > 0 ) {
! if ( currentSAXElementName.equals( "value" ) ) {
! currentNode.setLabel( charsValue );
uiLabelOf.put( currentSAXElementSystem + currentVocabFieldName + newNodeName, charsValue );
}
else if ( currentSAXElementName.equals( "definition" ) ) {
! currentNode.setDefinition( charsValue );
}
}
--- 1996,2005 ----
String charsValue = new String( ch, start, length );
if ( charsValue.length() > 0 ) {
! if ( currentSAXElementName.equals( "item" ) ) {
! currentNode.label = charsValue;
uiLabelOf.put( currentSAXElementSystem + currentVocabFieldName + newNodeName, charsValue );
}
else if ( currentSAXElementName.equals( "definition" ) ) {
! currentNode.definition = charsValue;
}
}
|
|
From: C. R. D. <rya...@us...> - 2003-04-23 23:43:45
|
Update of /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/tags
In directory sc8-pr-cvs1:/tmp/cvs-serv7539/src/org/dlese/dpc/vocab/tags
Modified Files:
MetadataVocabHiddenInputsTag.java
MetadataVocabTreeMenuTag.java
Log Message:
Support for rendering vocab flyouts/dropdowns with label and list
wrapping, and optional abbreviated versions of labels
Index: MetadataVocabHiddenInputsTag.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/tags/MetadataVocabHiddenInputsTag.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** MetadataVocabHiddenInputsTag.java 7 Apr 2003 18:38:30 -0000 1.6
--- MetadataVocabHiddenInputsTag.java 23 Apr 2003 23:43:41 -0000 1.7
***************
*** 38,42 ****
try {
setupTag( pageContext );
! pageContext.getOut().print( vocab.getVocabHiddenInputs( group, pageContext ) );
}
catch ( java.io.IOException ex ) {
--- 38,42 ----
try {
setupTag( pageContext );
! pageContext.getOut().print( vocab.getVocabHiddenInputs( system, group, pageContext ) );
}
catch ( java.io.IOException ex ) {
Index: MetadataVocabTreeMenuTag.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/tags/MetadataVocabTreeMenuTag.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** MetadataVocabTreeMenuTag.java 7 Apr 2003 18:38:32 -0000 1.2
--- MetadataVocabTreeMenuTag.java 23 Apr 2003 23:43:41 -0000 1.3
***************
*** 30,33 ****
--- 30,53 ----
*/
public class MetadataVocabTreeMenuTag extends MetadataVocabTag {
+ String x;
+ String y;
+
+ /**
+ * Sets the x attribute of the MetadataVocabTreeMenuTag object
+ *
+ *@param x The new x value
+ */
+ public void setX( String x ) {
+ this.x = x;
+ }
+
+ /**
+ * Sets the y attribute of the MetadataVocabTreeMenuTag object
+ *
+ *@param y The new y value
+ */
+ public void setY( String y ) {
+ this.y = y;
+ }
/**
***************
*** 40,44 ****
try {
setupTag( pageContext );
! pageContext.getOut().print( vocab.getVocabTreeMenu( group ) );
}
catch ( java.io.IOException ex ) {
--- 60,64 ----
try {
setupTag( pageContext );
! pageContext.getOut().print( vocab.getVocabTreeMenu( system, language, group, x, y, pageContext ) );
}
catch ( java.io.IOException ex ) {
|
|
From: C. R. D. <rya...@us...> - 2003-04-07 18:41:06
|
Update of /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/tags
In directory sc8-pr-cvs1:/tmp/cvs-serv2629/src/org/dlese/dpc/vocab/tags
Added Files:
MetadataVocabTag.java
Log Message:
New base tag handler class, extended by all other vocab tag classes. It
sets system, interface, and group attributes.
--- NEW FILE ---
/**
* Copyright 2002, 2003 DLESE Program Center/University Corporation for
* Atmospheric Research (UCAR), P.O. Box 3000, Boulder, CO 80307,
* su...@dl.... This file is part of the DLESE Vocab Project. The DLESE
* Vocab Project is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version. The DLESE Vocab Project is distributed in the hope that
* it will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details. You should have received a copy of
* the GNU General Public License along with The DLESE System; if not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
* 02111-1307 USA
*/
package org.dlese.dpc.vocab.tags;
import org.dlese.dpc.vocab.MetadataVocab;
import org.dlese.dpc.util.strings.StringUtil;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.TagSupport;
import javax.servlet.jsp.PageContext;
/**
* Default tag handler for rendering controlled vocabularies. All other vocab
* tags should extend this!
*
*@author Ryan Deardorff
*/
public class MetadataVocabTag extends TagSupport {
protected String system;
protected String interfce;
protected String language;
protected String group;
protected MetadataVocab vocab;
protected StringUtil stringUtil = new StringUtil();
/**
* Sets the system attribute
*
*@param system The new system value
*/
public void setSystem( String system ) {
this.system = system;
}
/**
* Sets the interface attribute
*
*@param interfce The new interface value
*/
public void setInterface( String interfce ) {
this.interfce = interfce;
}
/**
* Sets the language attribute
*
*@param language The new language value
*/
public void setLanguage( String language ) {
this.language = language;
}
/**
* Sets the group attribute
*
*@param group The new group value
*/
public void setGroup( String group ) {
this.group = group;
}
/**
* Get the vocab object from the page context and construct the group as a
* concatenation of system, interface, language, and group
*
*@param pageContext
*@exception JspException
*/
public void setupTag( PageContext pageContext ) throws JspException {
vocab = (MetadataVocab)pageContext.findAttribute( "MetadataVocab" );
if ( vocab == null ) {
throw new JspException( "Vocabulary not found" );
}
else {
if ( group != null ) {
group = stringUtil.replace( group, " ", "_", false );
}
else {
group = "";
}
system = system + "." + interfce + "." + language;
}
}
}
|
|
From: C. R. D. <rya...@us...> - 2003-04-07 18:39:07
|
Update of /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab
In directory sc8-pr-cvs1:/tmp/cvs-serv653/src/org/dlese/dpc/vocab
Modified Files:
DLESEMetadataVocabTracker.java LoadMetadataVocabs.java
MetadataVocab.java MetadataVocabInputState.java
Log Message:
Complete revamp of XML parser, and changes to the internal data
structures. Every vocabulary field can now have an arbitrary number of
different user interfaces defined for it (groupings and labels).
Index: DLESEMetadataVocabTracker.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/DLESEMetadataVocabTracker.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** DLESEMetadataVocabTracker.java 26 Mar 2003 00:23:26 -0000 1.8
--- DLESEMetadataVocabTracker.java 7 Apr 2003 18:38:23 -0000 1.9
***************
*** 61,66 ****
usingDatabase = true;
try {
! System.out.println( "SQL Driver: " + sqlDriver );
! System.out.println( "SQL URL: " + sqlURL );
Class.forName( sqlDriver ).newInstance();
con = DriverManager.getConnection( sqlURL + "?user=" + sqlUser + "&password=" + sqlPassword );
--- 61,65 ----
usingDatabase = true;
try {
! System.out.println( "Database in use: URL = " + sqlURL );
Class.forName( sqlDriver ).newInstance();
con = DriverManager.getConnection( sqlURL + "?user=" + sqlUser + "&password=" + sqlPassword );
Index: LoadMetadataVocabs.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/LoadMetadataVocabs.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** LoadMetadataVocabs.java 21 Mar 2003 02:36:46 -0000 1.9
--- LoadMetadataVocabs.java 7 Apr 2003 18:38:24 -0000 1.10
***************
*** 28,32 ****
* configuration file
*
! * @author Ryan Deardorff
*/
public class LoadMetadataVocabs implements org.xml.sax.ContentHandler {
--- 28,32 ----
* configuration file
*
! *@author Ryan Deardorff
*/
public class LoadMetadataVocabs implements org.xml.sax.ContentHandler {
***************
*** 36,40 ****
private String configFile;
private ServletContext servletContext;
! private ArrayList filesToParse = new ArrayList();
private StringBuffer message = new StringBuffer();
private String sqlDriver = null;
--- 36,41 ----
private String configFile;
private ServletContext servletContext;
! private ArrayList uiFiles = new ArrayList();
! private ArrayList definitionFiles = new ArrayList();
private StringBuffer message = new StringBuffer();
private String sqlDriver = null;
***************
*** 42,56 ****
private String sqlUser = null;
private String sqlPassword = null;
/**
* Constructor for the LoadMetadataVocabs object
*
! * @param configFile
! * @param xmlParserClass
! * @param servletContext
! * @param sqlDriver
! * @param sqlURL
! * @param sqlUser
! * @param sqlPassword
*/
public LoadMetadataVocabs( String configFile,
--- 43,58 ----
private String sqlUser = null;
private String sqlPassword = null;
+ private boolean parsingDefinitions = true;
/**
* Constructor for the LoadMetadataVocabs object
*
! *@param configFile
! *@param xmlParserClass
! *@param servletContext
! *@param sqlDriver
! *@param sqlURL
! *@param sqlUser
! *@param sqlPassword
*/
public LoadMetadataVocabs( String configFile,
***************
*** 76,81 ****
*/
public void load() {
! filesToParse.clear();
message.setLength( 0 );
try {
InputSource inputSource = new InputSource( configFile );
--- 78,85 ----
*/
public void load() {
! uiFiles.clear();
! definitionFiles.clear();
message.setLength( 0 );
+ parsingDefinitions = true;
try {
InputSource inputSource = new InputSource( configFile );
***************
*** 83,97 ****
reader.setContentHandler( this );
reader.parse( inputSource );
! org.xml.sax.ContentHandler vocab = new MetadataVocab( sqlDriver, sqlURL, sqlUser, sqlPassword );
reader.setContentHandler( vocab );
! for ( int i = 0; i < filesToParse.size(); i++ ) {
! System.out.println( "Loading " + (String) filesToParse.get( i ) + "\n" );
! inputSource = new InputSource( (String) filesToParse.get( i ) );
reader.parse( inputSource );
! message.append( "Loaded " + (String) filesToParse.get( i ) + "\n" );
}
servletContext.setAttribute( "MetadataVocab", vocab );
! MetadataVocab done = (MetadataVocab) servletContext.getAttribute( "MetadataVocab" );
! done.doneLoading();
}
catch ( Exception e ) {
--- 87,107 ----
reader.setContentHandler( this );
reader.parse( inputSource );
! MetadataVocab vocab = new MetadataVocab( sqlDriver, sqlURL, sqlUser, sqlPassword );
reader.setContentHandler( vocab );
! for ( int i = 0; i < uiFiles.size(); i++ ) {
! System.out.println( "Loading UI file " + (String)uiFiles.get( i ) + "\n" );
! inputSource = new InputSource( (String)uiFiles.get( i ) );
reader.parse( inputSource );
! message.append( "Loaded UI file " + (String)uiFiles.get( i ) + "\n" );
! }
! vocab.setParsingDefinitions( true );
! for ( int i = 0; i < definitionFiles.size(); i++ ) {
! System.out.println( "Loading definition file " + (String)definitionFiles.get( i ) + "\n" );
! inputSource = new InputSource( (String)definitionFiles.get( i ) );
! reader.parse( inputSource );
! message.append( "Loaded definition file " + (String)definitionFiles.get( i ) + "\n" );
}
servletContext.setAttribute( "MetadataVocab", vocab );
! vocab.doneLoading();
}
catch ( Exception e ) {
***************
*** 104,108 ****
* Gets the message attribute of the LoadMetadataVocabs object
*
! * @return The message value
*/
public String getMessage() {
--- 114,118 ----
* Gets the message attribute of the LoadMetadataVocabs object
*
! *@return The message value
*/
public String getMessage() {
***************
*** 118,122 ****
* the spot where an error occured.
*
! * @param locator The new documentLocator value
*/
public void setDocumentLocator( Locator locator ) {
--- 128,132 ----
* the spot where an error occured.
*
! *@param locator The new documentLocator value
*/
public void setDocumentLocator( Locator locator ) {
***************
*** 127,131 ****
* Required by SAX, but not used here
*
! * @exception SAXException
*/
public void startDocument() throws SAXException {
--- 137,141 ----
* Required by SAX, but not used here
*
! *@exception SAXException
*/
public void startDocument() throws SAXException {
***************
*** 135,139 ****
* Required by SAX, but not used here
*
! * @exception SAXException
*/
public void endDocument() throws SAXException {
--- 145,149 ----
* Required by SAX, but not used here
*
! *@exception SAXException
*/
public void endDocument() throws SAXException {
***************
*** 143,149 ****
* Required by SAX, but not used here
*
! * @param prefix
! * @param uri
! * @exception SAXException
*/
public void startPrefixMapping( String prefix, String uri ) throws SAXException {
--- 153,159 ----
* Required by SAX, but not used here
*
! *@param prefix
! *@param uri
! *@exception SAXException
*/
public void startPrefixMapping( String prefix, String uri ) throws SAXException {
***************
*** 153,158 ****
* Required by SAX, but not used here
*
! * @param prefix
! * @exception SAXException
*/
public void endPrefixMapping( String prefix ) throws SAXException {
--- 163,168 ----
* Required by SAX, but not used here
*
! *@param prefix
! *@exception SAXException
*/
public void endPrefixMapping( String prefix ) throws SAXException {
***************
*** 162,170 ****
* Invoked upon opening tag of an XML element
*
! * @param namespaceURI XML namespace
! * @param localName local tag name
! * @param qName fully qualified tag name
! * @param atts tag attributes
! * @exception SAXException
*/
public void startElement( String namespaceURI,
--- 172,180 ----
* Invoked upon opening tag of an XML element
*
! *@param namespaceURI XML namespace
! *@param localName local tag name
! *@param qName fully qualified tag name
! *@param atts tag attributes
! *@exception SAXException
*/
public void startElement( String namespaceURI,
***************
*** 173,176 ****
--- 183,189 ----
Attributes atts ) throws SAXException {
currentSAXElementName = localName;
+ if ( localName.equals( "user_interfaces" ) ) {
+ parsingDefinitions = false;
+ }
}
***************
*** 178,185 ****
* Invoked upon closing tag of an XML element
*
! * @param namespaceURI XML namespace
! * @param localName local tag name
! * @param qName fully qualified tag name
! * @exception SAXException
*/
public void endElement( String namespaceURI, String localName,
--- 191,198 ----
* Invoked upon closing tag of an XML element
*
! *@param namespaceURI XML namespace
! *@param localName local tag name
! *@param qName fully qualified tag name
! *@exception SAXException
*/
public void endElement( String namespaceURI, String localName,
***************
*** 190,197 ****
* Element data (characters between tags)
*
! * @param ch character array
! * @param start starting index of character data
! * @param length length of character data
! * @exception SAXException
*/
public void characters( char ch[], int start, int length ) throws SAXException {
--- 203,210 ----
* Element data (characters between tags)
*
! *@param ch character array
! *@param start starting index of character data
! *@param length length of character data
! *@exception SAXException
*/
public void characters( char ch[], int start, int length ) throws SAXException {
***************
*** 199,206 ****
if ( currentSAXElementName.equals( "file" ) ) {
if ( charsValue.startsWith( "/" ) || ( charsValue.indexOf( ":" ) > -1 ) ) {
! filesToParse.add( charsValue );
}
else {
! filesToParse.add( servletContext.getRealPath( "/" ) + charsValue );
}
}
--- 212,229 ----
if ( currentSAXElementName.equals( "file" ) ) {
if ( charsValue.startsWith( "/" ) || ( charsValue.indexOf( ":" ) > -1 ) ) {
! if ( parsingDefinitions ) {
! definitionFiles.add( charsValue );
! }
! else {
! uiFiles.add( charsValue );
! }
}
else {
! if ( parsingDefinitions ) {
! definitionFiles.add( servletContext.getRealPath( "/" ) + charsValue );
! }
! else {
! uiFiles.add( servletContext.getRealPath( "/" ) + charsValue );
! }
}
}
***************
*** 212,219 ****
* intact, though.
*
! * @param ch
! * @param start
! * @param length
! * @exception SAXException
*/
public void ignorableWhitespace( char ch[], int start, int length ) throws SAXException {
--- 235,242 ----
* intact, though.
*
! *@param ch
! *@param start
! *@param length
! *@exception SAXException
*/
public void ignorableWhitespace( char ch[], int start, int length ) throws SAXException {
***************
*** 223,229 ****
* Required by SAX, but not used here
*
! * @param target
! * @param data
! * @exception SAXException
*/
public void processingInstruction( String target, String data ) throws SAXException {
--- 246,252 ----
* Required by SAX, but not used here
*
! *@param target
! *@param data
! *@exception SAXException
*/
public void processingInstruction( String target, String data ) throws SAXException {
***************
*** 233,238 ****
* Required by SAX, but not used here
*
! * @param name
! * @exception SAXException
*/
public void skippedEntity( String name ) throws SAXException {
--- 256,261 ----
* Required by SAX, but not used here
*
! *@param name
! *@exception SAXException
*/
public void skippedEntity( String name ) throws SAXException {
Index: MetadataVocab.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/MetadataVocab.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -r1.26 -r1.27
*** MetadataVocab.java 26 Mar 2003 00:23:26 -0000 1.26
--- MetadataVocab.java 7 Apr 2003 18:38:25 -0000 1.27
***************
*** 27,39 ****
/*
TO DO:
! -Error checking for FIELD Ids? Or track changes in their metadata names?
! -Add email notification to error handler
! -Check process of vocab/index updating (make sure vocab changes are reflected properly in index)
-Database indexing (for faster queries)
-XML Validation
- -Add support for rendering vocab definitions
-Test with Schema instead of DTD (SHOULDN'T make a difference)
-Improve single checkbox tag to not require explicit label and system name? Depends on new UI...
[...1406 lines suppressed...]
! *
! *@param prefix
! *@exception SAXException
! */
! public void endPrefixMapping( String prefix ) throws SAXException {
}
***************
*** 1455,1459 ****
public void reportError( String err ) {
errors.add( err );
! //System.out.println( "ERROR: " + err );
}
}
--- 1711,1715 ----
public void reportError( String err ) {
errors.add( err );
! System.out.println( "ERROR: " + err );
}
}
Index: MetadataVocabInputState.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/MetadataVocabInputState.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** MetadataVocabInputState.java 12 Mar 2003 23:09:44 -0000 1.6
--- MetadataVocabInputState.java 7 Apr 2003 18:38:28 -0000 1.7
***************
*** 23,27 ****
* Stores user state for selected controlled vocabularies.
*
! *@author ryandear
*/
public class MetadataVocabInputState {
--- 23,27 ----
* Stores user state for selected controlled vocabularies.
*
! *@author Ryan Deardorff
*/
public class MetadataVocabInputState {
***************
*** 87,90 ****
--- 87,94 ----
.append( vals[i] )
.append( "\" " );
+ //System.out.println( "setState: " + system + ", " + stateGroup + ", " + vals[i] );
+ if ( vocab == null ) {
+ System.out.println( "vocab is NULL" );
+ }
feedback.append( vocab.getUiLabelOfSystemIds( system, stateGroup, vals[i] ) )
.append( ", " );
|
|
From: C. R. D. <rya...@us...> - 2003-04-07 18:38:43
|
Update of /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/tags
In directory sc8-pr-cvs1:/tmp/cvs-serv653/src/org/dlese/dpc/vocab/tags
Modified Files:
MetadataVocabCheckboxesTag.java
MetadataVocabFieldValueUiLabelTag.java
MetadataVocabHiddenInputsTag.java
MetadataVocabHistogramTag.java MetadataVocabSelectListTag.java
MetadataVocabSetStateTag.java
MetadataVocabStateFeedbackTag.java
MetadataVocabTreeMenuTag.java
Log Message:
Complete revamp of XML parser, and changes to the internal data
structures. Every vocabulary field can now have an arbitrary number of
different user interfaces defined for it (groupings and labels).
Index: MetadataVocabCheckboxesTag.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/tags/MetadataVocabCheckboxesTag.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** MetadataVocabCheckboxesTag.java 11 Mar 2003 03:17:05 -0000 1.5
--- MetadataVocabCheckboxesTag.java 7 Apr 2003 18:38:29 -0000 1.6
***************
*** 18,21 ****
--- 18,22 ----
import org.dlese.dpc.vocab.MetadataVocab;
import org.dlese.dpc.vocab.MetadataVocabInputState;
+ import org.dlese.dpc.util.strings.StringUtil;
import java.util.*;
import javax.servlet.jsp.JspException;
***************
*** 26,34 ****
* Tag handler for rendering vocabulary checkboxes
*
! * @author ryandear
*/
! public class MetadataVocabCheckboxesTag extends TagSupport {
! private String system;
! private String group;
private String value = null;
private String label = null;
--- 27,33 ----
* Tag handler for rendering vocabulary checkboxes
*
! *@author Ryan Deardorff
*/
! public class MetadataVocabCheckboxesTag extends MetadataVocabTag {
private String value = null;
private String label = null;
***************
*** 40,64 ****
/**
- * Sets the system attribute of the MetadataVocabCheckboxesTag object
- *
- * @param system The new system value
- */
- public void setSystem( String system ) {
- this.system = system;
- }
-
- /**
- * Sets the group attribute of the MetadataVocabCheckboxesTag object
- *
- * @param group The new group value
- */
- public void setGroup( String group ) {
- this.group = group;
- }
-
- /**
* Sets the wrap attribute of the MetadataVocabCheckboxesTag object
*
! * @param wrap The new wrap value
*/
public void setWrap( String wrap ) {
--- 39,45 ----
/**
* Sets the wrap attribute of the MetadataVocabCheckboxesTag object
*
! *@param wrap The new wrap value
*/
public void setWrap( String wrap ) {
***************
*** 69,73 ****
* Sets the value attribute of the MetadataVocabCheckboxesTag object
*
! * @param value The new value value
*/
public void setValue( String value ) {
--- 50,54 ----
* Sets the value attribute of the MetadataVocabCheckboxesTag object
*
! *@param value The new value value
*/
public void setValue( String value ) {
***************
*** 78,82 ****
* Sets the label attribute of the MetadataVocabCheckboxesTag object
*
! * @param label The new label value
*/
public void setLabel( String label ) {
--- 59,63 ----
* Sets the label attribute of the MetadataVocabCheckboxesTag object
*
! *@param label The new label value
*/
public void setLabel( String label ) {
***************
*** 87,91 ****
* Sets the allClearLinks attribute of the MetadataVocabCheckboxesTag object
*
! * @param allClearLinks The new allClearLinks value
*/
public void setAllClearLinks( String allClearLinks ) {
--- 68,72 ----
* Sets the allClearLinks attribute of the MetadataVocabCheckboxesTag object
*
! *@param allClearLinks The new allClearLinks value
*/
public void setAllClearLinks( String allClearLinks ) {
***************
*** 96,100 ****
* Sets the skipTopRow attribute of the MetadataVocabCheckboxesTag object
*
! * @param skipTopRow The new skipTopRow value
*/
public void setSkipTopRow( String skipTopRow ) {
--- 77,81 ----
* Sets the skipTopRow attribute of the MetadataVocabCheckboxesTag object
*
! *@param skipTopRow The new skipTopRow value
*/
public void setSkipTopRow( String skipTopRow ) {
***************
*** 110,114 ****
* Sets the tdWidth attribute of the MetadataVocabCheckboxesTag object
*
! * @param tdWidth The new tdWidth value
*/
public void setTdWidth( String tdWidth ) {
--- 91,95 ----
* Sets the tdWidth attribute of the MetadataVocabCheckboxesTag object
*
! *@param tdWidth The new tdWidth value
*/
public void setTdWidth( String tdWidth ) {
***************
*** 119,132 ****
* Description of the Method
*
! * @return
! * @exception JspException
*/
public int doStartTag() throws JspException {
try {
! MetadataVocab vocab = (MetadataVocab) pageContext.findAttribute( "MetadataVocab" );
! if ( vocab == null ) {
! pageContext.getOut().print( "ERROR: Vocabulary not found" );
! }
! else if ( pageContext.getAttribute( "ResetJSCount" ) == null ) {
pageContext.getOut().print( vocab.resetJSCount( pageContext.getSession() ) );
pageContext.setAttribute( "ResetJSCount", new Object() );
--- 100,109 ----
* Description of the Method
*
! *@exception JspException
*/
public int doStartTag() throws JspException {
try {
! setupTag( pageContext );
! if ( pageContext.getAttribute( "ResetJSCount" ) == null ) {
pageContext.getOut().print( vocab.resetJSCount( pageContext.getSession() ) );
pageContext.setAttribute( "ResetJSCount", new Object() );
***************
*** 136,140 ****
}
else if ( allClearLinks > 0 ) {
! pageContext.getOut().print( vocab.getVocabCheckboxesAllClearLinks( group, allClearLinks, pageContext.getSession() ) );
}
else {
--- 113,117 ----
}
else if ( allClearLinks > 0 ) {
! pageContext.getOut().print( vocab.getVocabCheckboxesAllClearLinks( system, group, allClearLinks, pageContext.getSession() ) );
}
else {
Index: MetadataVocabFieldValueUiLabelTag.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/tags/MetadataVocabFieldValueUiLabelTag.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** MetadataVocabFieldValueUiLabelTag.java 14 Mar 2003 00:55:54 -0000 1.1
--- MetadataVocabFieldValueUiLabelTag.java 7 Apr 2003 18:38:30 -0000 1.2
***************
*** 26,46 ****
* LIST (space seperated) of IDs
*
! *@author ryandear
*/
! public class MetadataVocabFieldValueUiLabelTag extends TagSupport {
! String system = "";
String fieldId = "";
String valueIdList = "";
/**
- * Sets the system attribute of the MetadataVocabCheckboxesTag object
- *
- *@param system The new system value
- */
- public void setSystem( String system ) {
- this.system = system;
- }
-
- /**
* Sets the system attribute of the MetadataVocabGetFieldValueUiLabel object
*
--- 26,36 ----
* LIST (space seperated) of IDs
*
! *@author Ryan Deardorff
*/
! public class MetadataVocabFieldValueUiLabelTag extends MetadataVocabTag {
String fieldId = "";
String valueIdList = "";
/**
* Sets the system attribute of the MetadataVocabGetFieldValueUiLabel object
*
***************
*** 67,91 ****
public int doStartTag() throws JspException {
try {
! MetadataVocab vocab = (MetadataVocab)pageContext.findAttribute( "MetadataVocab" );
! if ( vocab == null ) {
! pageContext.getOut().print( "ERROR: Vocabulary not found" );
! }
! else {
! StringBuffer outStr = new StringBuffer();
! int ind1 = 0;
! int ind2 = valueIdList.indexOf( " " );
! // Indexed values should alwasy end with " "!
! while ( ind2 > -1 ) {
! outStr.append( vocab.getUiLabelOfSystemIds( system, fieldId,
! valueIdList.substring( ind1, ind2 ) ) + ", " );
! ind1 = ind2 + 1;
! ind2 = valueIdList.indexOf( " ", ind1 );
! }
! //ind2 = valueIdList.length();
! //outStr.append( vocab.getUiLabelOfSystemIds( system, fieldId,
! // valueIdList.substring( ind1, ind2 ) ) );
! outStr.setLength( outStr.length() - 2 );
! pageContext.getOut().print( outStr.toString() );
}
}
catch ( java.io.IOException ex ) {
--- 57,73 ----
public int doStartTag() throws JspException {
try {
! setupTag( pageContext );
! StringBuffer outStr = new StringBuffer();
! int ind1 = 0;
! int ind2 = valueIdList.indexOf( " " );
! // Indexed values should alwasy end with " "!
! while ( ind2 > -1 ) {
! outStr.append( vocab.getUiLabelOfSystemIds( system, fieldId,
! valueIdList.substring( ind1, ind2 ) ) + ", " );
! ind1 = ind2 + 1;
! ind2 = valueIdList.indexOf( " ", ind1 );
}
+ outStr.setLength( outStr.length() - 2 );
+ pageContext.getOut().print( outStr.toString() );
}
catch ( java.io.IOException ex ) {
Index: MetadataVocabHiddenInputsTag.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/tags/MetadataVocabHiddenInputsTag.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** MetadataVocabHiddenInputsTag.java 11 Mar 2003 03:17:05 -0000 1.5
--- MetadataVocabHiddenInputsTag.java 7 Apr 2003 18:38:30 -0000 1.6
***************
*** 26,61 ****
* Tag handler for rendering vocabulary hidden inputs
*
! * @author ryandear
*/
! public class MetadataVocabHiddenInputsTag extends TagSupport {
! private String group;
! private String value = null;
! private String label = null;
! private String tdWidth = "";
/**
! * Sets the group attribute of the MetadataVocabCheckboxesTag object
*
! * @param group The new group value
! */
! public void setGroup( String group ) {
! this.group = group;
! }
!
! /**
! * Description of the Method
! *
! * @return
! * @exception JspException
*/
public int doStartTag() throws JspException {
try {
! MetadataVocab vocab = (MetadataVocab) pageContext.findAttribute( "MetadataVocab" );
! if ( vocab == null ) {
! pageContext.getOut().print( "ERROR: Vocabulary not found" );
! }
! else {
! pageContext.getOut().print( vocab.getVocabHiddenInputs( group, pageContext ) );
! }
}
catch ( java.io.IOException ex ) {
--- 26,42 ----
* Tag handler for rendering vocabulary hidden inputs
*
! *@author Ryan Deardorff
*/
! public class MetadataVocabHiddenInputsTag extends MetadataVocabTag {
/**
! * Render hidden inputs
*
! *@exception JspException
*/
public int doStartTag() throws JspException {
try {
! setupTag( pageContext );
! pageContext.getOut().print( vocab.getVocabHiddenInputs( group, pageContext ) );
}
catch ( java.io.IOException ex ) {
Index: MetadataVocabHistogramTag.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/tags/MetadataVocabHistogramTag.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** MetadataVocabHistogramTag.java 11 Mar 2003 03:17:05 -0000 1.8
--- MetadataVocabHistogramTag.java 7 Apr 2003 18:38:30 -0000 1.9
***************
*** 27,36 ****
* Tag handler for rendering vocabulary histogram bars
*
! * @author ryandear
*/
! public class MetadataVocabHistogramTag extends TagSupport {
! // required:
! private String system;
! private String group;
// optional:
private String addQuery = "";
--- 27,33 ----
* Tag handler for rendering vocabulary histogram bars
*
! *@author Ryan Deardorff
*/
! public class MetadataVocabHistogramTag extends MetadataVocabTag {
// optional:
private String addQuery = "";
***************
*** 40,64 ****
/**
- * Sets the system attribute of the MetadataVocabHistogramTag object
- *
- * @param system The new system value
- */
- public void setSystem( String system ) {
- this.system = system;
- }
-
- /**
- * Sets the group attribute of the MetadataVocabHistogramTag object
- *
- * @param group The new group value
- */
- public void setGroup( String group ) {
- this.group = group;
- }
-
- /**
* Sets the addQuery attribute of the MetadataVocabHistogramTag object
*
! * @param addQuery The new addQuery value
*/
public void setAddQuery( String addQuery ) {
--- 37,43 ----
/**
* Sets the addQuery attribute of the MetadataVocabHistogramTag object
*
! *@param addQuery The new addQuery value
*/
public void setAddQuery( String addQuery ) {
***************
*** 69,73 ****
* Sets the imgPrefix attribute of the MetadataVocabHistogramTag object
*
! * @param imgPrefix The new imgPrefix value
*/
public void setImgPrefix( String imgPrefix ) {
--- 48,52 ----
* Sets the imgPrefix attribute of the MetadataVocabHistogramTag object
*
! *@param imgPrefix The new imgPrefix value
*/
public void setImgPrefix( String imgPrefix ) {
***************
*** 78,82 ****
* Sets the action attribute of the MetadataVocabHistogramTag object
*
! * @param action The new action value
*/
public void setAction( String action ) {
--- 57,61 ----
* Sets the action attribute of the MetadataVocabHistogramTag object
*
! *@param action The new action value
*/
public void setAction( String action ) {
***************
*** 88,92 ****
* object
*
! * @param anything The new totalsRelativeToOthers value
*/
public void setTotalsRelativeToOthers( String anything ) {
--- 67,71 ----
* object
*
! *@param anything The new totalsRelativeToOthers value
*/
public void setTotalsRelativeToOthers( String anything ) {
***************
*** 97,125 ****
* Description of the Method
*
! * @return
! * @exception JspException
*/
public int doStartTag() throws JspException {
try {
! MetadataVocab vocab = (MetadataVocab) pageContext.findAttribute( "MetadataVocab" );
! if ( vocab == null ) {
! pageContext.getOut().print( "ERROR: Vocabulary not found" );
}
else {
! LuceneIndex index = (LuceneIndex) pageContext.getAttribute( "index", pageContext.APPLICATION_SCOPE );
! if ( index == null ) {
! pageContext.getOut().print( "ERROR: index not found in application scope" );
}
else {
! if ( action.equals( "getTotals" ) ) {
! vocab.setVocabHistogramHighestCountFromGroup( group, index, addQuery, pageContext, totalsRelativeToOthers );
! }
! else {
! pageContext.getOut().print( vocab.getVocabHistogram( system, group, pageContext, addQuery, imgPrefix ) );
! }
}
}
}
! catch ( java.io.IOException ex ) {
throw new JspException( ex.getMessage() );
}
--- 76,98 ----
* Description of the Method
*
! *@exception JspException
*/
public int doStartTag() throws JspException {
try {
! setupTag( pageContext );
! LuceneIndex index = (LuceneIndex)pageContext.getAttribute( "index", pageContext.APPLICATION_SCOPE );
! if ( index == null ) {
! pageContext.getOut().print( "ERROR: index not found in application scope" );
}
else {
! if ( action.equals( "getTotals" ) ) {
! vocab.setVocabHistogramHighestCountFromGroup( system, group, index, addQuery, pageContext, totalsRelativeToOthers );
}
else {
! pageContext.getOut().print( vocab.getVocabHistogram( system, group, pageContext, addQuery, imgPrefix ) );
}
}
}
! catch ( Exception ex ) {
throw new JspException( ex.getMessage() );
}
Index: MetadataVocabSelectListTag.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/tags/MetadataVocabSelectListTag.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** MetadataVocabSelectListTag.java 12 Mar 2003 23:09:45 -0000 1.6
--- MetadataVocabSelectListTag.java 7 Apr 2003 18:38:31 -0000 1.7
***************
*** 26,54 ****
* Tag handler for rendering vocabulary select list inputs
*
! *@author ryandear
*/
! public class MetadataVocabSelectListTag extends TagSupport {
! private String system;
! private String group;
! private int size = 1;
! // Set default height of 1 for 'drop-down' list
!
! /**
! * Sets the system attribute of the MetadataVocabSelectListTag object
! *
! *@param system The new system value
! */
! public void setSystem( String system ) {
! this.system = system;
! }
!
! /**
! * Sets the group attribute of the MetadataVocabSelectListTag object
! *
! *@param group The new group value
! */
! public void setGroup( String group ) {
! this.group = group;
! }
/**
--- 26,33 ----
* Tag handler for rendering vocabulary select list inputs
*
! *@author Ryan Deardorff
*/
! public class MetadataVocabSelectListTag extends MetadataVocabTag {
! private int size = 1; // Set default height of 1 for 'drop-down' list
/**
***************
*** 65,79 ****
*
*@exception JspException
- *@return
*/
public int doStartTag() throws JspException {
try {
! MetadataVocab vocab = (MetadataVocab)pageContext.findAttribute( "MetadataVocab" );
! if ( vocab == null ) {
! pageContext.getOut().print( "ERROR: Vocabulary not found" );
! }
! else {
! pageContext.getOut().print( vocab.getVocabSelectList( system, group, size, pageContext ) );
! }
}
catch ( java.io.IOException ex ) {
--- 44,52 ----
*
*@exception JspException
*/
public int doStartTag() throws JspException {
try {
! setupTag( pageContext );
! pageContext.getOut().print( vocab.getVocabSelectList( group, size, pageContext ) );
}
catch ( java.io.IOException ex ) {
Index: MetadataVocabSetStateTag.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/tags/MetadataVocabSetStateTag.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** MetadataVocabSetStateTag.java 12 Mar 2003 23:09:45 -0000 1.6
--- MetadataVocabSetStateTag.java 7 Apr 2003 18:38:31 -0000 1.7
***************
*** 26,53 ****
* Tag handler for setting vocabulary state
*
! *@author ryandear
*/
! public class MetadataVocabSetStateTag extends TagSupport {
! String system = "";
/**
! * Sets the system attribute of the MetadataVocabCheckboxesTag object
*
! *@param system The new system value
*/
! public void setSystem( String system ) {
! this.system = system;
! }
!
! /**
! * Start tag
! */
! public int doStartTag() {
! MetadataVocabInputState state = (MetadataVocabInputState)pageContext.getSession().getAttribute( "MetadataVocabInputState" );
! if ( state == null ) {
! state = new MetadataVocabInputState( (MetadataVocab)pageContext.findAttribute( "MetadataVocab" ) );
! pageContext.getSession().setAttribute( "MetadataVocabInputState", state );
}
- state.setState( pageContext.getRequest(), system );
return SKIP_BODY;
}
--- 26,51 ----
* Tag handler for setting vocabulary state
*
! *@author Ryan Deardorff
*/
! public class MetadataVocabSetStateTag extends MetadataVocabTag {
/**
! * Set vocabulary selected state
*
! *@exception JspException
*/
! public int doStartTag() throws JspException {
! try {
! setupTag( pageContext );
! MetadataVocabInputState state = (MetadataVocabInputState)pageContext.getSession().getAttribute( "MetadataVocabInputState" );
! if ( state == null ) {
! state = new MetadataVocabInputState( vocab );
! pageContext.getSession().setAttribute( "MetadataVocabInputState", state );
! }
! state.setState( pageContext.getRequest(), system );
! }
! catch ( Exception ex ) {
! throw new JspException( ex.getMessage() );
}
return SKIP_BODY;
}
Index: MetadataVocabStateFeedbackTag.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/tags/MetadataVocabStateFeedbackTag.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** MetadataVocabStateFeedbackTag.java 21 Mar 2003 02:36:46 -0000 1.5
--- MetadataVocabStateFeedbackTag.java 7 Apr 2003 18:38:32 -0000 1.6
***************
*** 26,49 ****
* selected)
*
! * @author ryandear
*/
! public class MetadataVocabStateFeedbackTag extends TagSupport {
!
! String group = null;
String uiLabel = null;
/**
- * Sets the group attribute of the MetadataVocabStateFeedbackTag object
- *
- * @param group The new group value
- */
- public void setGroup( String group ) {
- this.group = group;
- }
-
- /**
* Sets the uiLabel attribute of the MetadataVocabStateFeedbackTag object
*
! * @param uiLabel The new uiLabel value
*/
public void setUiLabel( String uiLabel ) {
--- 26,38 ----
* selected)
*
! *@author Ryan Deardorff
*/
! public class MetadataVocabStateFeedbackTag extends MetadataVocabTag {
String uiLabel = null;
/**
* Sets the uiLabel attribute of the MetadataVocabStateFeedbackTag object
*
! *@param uiLabel The new uiLabel value
*/
public void setUiLabel( String uiLabel ) {
***************
*** 54,65 ****
* Start tag
*
! * @return
! * @exception JspException
*/
public int doStartTag() throws JspException {
try {
! MetadataVocabInputState state = (MetadataVocabInputState) pageContext.getSession().getAttribute( "MetadataVocabInputState" );
if ( state == null ) {
! state = new MetadataVocabInputState( (MetadataVocab) pageContext.findAttribute( "MetadataVocab" ) );
pageContext.getSession().setAttribute( "MetadataVocabInputState", state );
}
--- 43,54 ----
* Start tag
*
! *@exception JspException
*/
public int doStartTag() throws JspException {
try {
! setupTag( pageContext );
! MetadataVocabInputState state = (MetadataVocabInputState)pageContext.getSession().getAttribute( "MetadataVocabInputState" );
if ( state == null ) {
! state = new MetadataVocabInputState( vocab );
pageContext.getSession().setAttribute( "MetadataVocabInputState", state );
}
Index: MetadataVocabTreeMenuTag.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/tags/MetadataVocabTreeMenuTag.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** MetadataVocabTreeMenuTag.java 11 Mar 2003 03:19:01 -0000 1.1
--- MetadataVocabTreeMenuTag.java 7 Apr 2003 18:38:32 -0000 1.2
***************
*** 25,70 ****
/**
! * Description of the Class
*
! * @author Ryan Deardorff
! * @created February 18, 2003
*/
! public class MetadataVocabTreeMenuTag extends TagSupport {
! private String system;
! private String group;
/**
! * Sets the system attribute of the MetadataVocabTreeMenuTag object
*
! * @param system The new system value
! */
! public void setSystem( String system ) {
! this.system = system;
! }
!
! /**
! * Sets the group attribute of the MetadataVocabCheckboxesTag object
! *
! * @param group The new group value
! */
! public void setGroup( String group ) {
! this.group = group;
! }
!
! /**
! * Description of the Method
! *
! * @return
! * @exception JspException
*/
public int doStartTag() throws JspException {
try {
! MetadataVocab vocab = (MetadataVocab) pageContext.findAttribute( "MetadataVocab" );
! if ( vocab == null ) {
! pageContext.getOut().print( "ERROR: Vocabulary not found" );
! }
! else {
! pageContext.getOut().print( vocab.getVocabTreeMenu( system, group ) );
! }
}
catch ( java.io.IOException ex ) {
--- 25,44 ----
/**
! * Tag handler for rendering vocabulary as a collapsable tree menu
*
! *@author Ryan Deardorff
*/
! public class MetadataVocabTreeMenuTag extends MetadataVocabTag {
/**
! * Render vocab as collapsable tree menu
*
! *@exception JspException
! *@return
*/
public int doStartTag() throws JspException {
try {
! setupTag( pageContext );
! pageContext.getOut().print( vocab.getVocabTreeMenu( group ) );
}
catch ( java.io.IOException ex ) {
|
|
From: C. R. D. <rya...@us...> - 2003-03-26 00:23:30
|
Update of /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab
In directory sc8-pr-cvs1:/tmp/cvs-serv937/src/org/dlese/dpc/vocab
Modified Files:
DLESEMetadataVocabTracker.java MetadataVocab.java
MetadataVocabTracker.java
Log Message:
Added DB retiring of vocabs that get pulled from the XML. Also added a
new "adminOnly" attribute that causes certain values not to get displayed
in the UI (can be expanded later to allow viewing in admin UI), fixed the
ID lookup to not throw an exception when it sees empty values, and fleshed
out some of the comments.
Index: DLESEMetadataVocabTracker.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/DLESEMetadataVocabTracker.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** DLESEMetadataVocabTracker.java 25 Mar 2003 01:23:03 -0000 1.7
--- DLESEMetadataVocabTracker.java 26 Mar 2003 00:23:26 -0000 1.8
***************
*** 21,25 ****
/**
! * DLESE metadata vocabulary tracker (ID assignment, tracking of changes)
*
*@author Ryan Deardorff
--- 21,26 ----
/**
! * DLESE metadata vocabulary tracker (Id assignment, tracking of changes). This
! * implementation uses an SQL database.
*
*@author Ryan Deardorff
***************
*** 34,44 ****
/**
* Constructor for the DLESEMetadataVocabTracker object
*
! *@param sqlDriver
! *@param sqlURL
! *@param sqlUser
! *@param sqlPassword
! *@param vocab
*/
public DLESEMetadataVocabTracker( MetadataVocab vocab,
--- 35,53 ----
/**
+ * Is the system using this tracker connected to a database that handles
+ * ensuring Id consistency and UI label changes?
+ */
+ public boolean isUsingDatabase() {
+ return usingDatabase;
+ }
+
+ /**
* Constructor for the DLESEMetadataVocabTracker object
*
! *@param vocab MetadataVocab instance using this tracker
! *@param sqlDriver driver class for SQL DB
! *@param sqlURL URL of SQL DB
! *@param sqlUser SQL user
! *@param sqlPassword SQL user password
*/
public DLESEMetadataVocabTracker( MetadataVocab vocab,
***************
*** 116,120 ****
/**
! * Assign a unique system ID for a new vocabulary value. ALL IDs will start
* with 0, so that Lucene * queries will be possible.
*
--- 125,129 ----
/**
! * Assign a unique system Id for a new vocabulary value. ALL Ids will start
* with 0, so that Lucene * queries will be possible.
*
***************
*** 126,130 ****
if ( usingDatabase ) {
StringBuffer highestId = new StringBuffer( getHighestId( metadataFieldId ) );
! if ( highestId.toString().equals( "-1" ) ) { // No ID existed yet, so "00" was registered
insertNewIdIntoValuesTable( metadataFieldId, metadataValue, "00" );
return "00";
--- 135,139 ----
if ( usingDatabase ) {
StringBuffer highestId = new StringBuffer( getHighestId( metadataFieldId ) );
! if ( highestId.toString().equals( "-1" ) ) { // No Id existed yet, so "00" was registered
insertNewIdIntoValuesTable( metadataFieldId, metadataValue, "00" );
return "00";
***************
*** 149,153 ****
}
else {
! vocab.reportError( "No database in use to assign new system ID for metadata field/value pair: "
+ metadataFieldId + "/" + metadataValue );
return "-1";
--- 158,162 ----
}
else {
! vocab.reportError( "No database in use to assign new system Id for metadata field/value pair: "
+ metadataFieldId + "/" + metadataValue );
return "-1";
***************
*** 156,161 ****
/**
! * Does the current field/value pair already exist in the database? If so,
! * return the ID, if not, return "" (empty string)
*
*@param metadataFieldId
--- 165,170 ----
/**
! * Does the current fieldId/value pair already exist in the database? If so,
! * return the Id, if not, return "" (empty string)
*
*@param metadataFieldId
***************
*** 283,287 ****
/**
* Log the creation of a new metadata field/value pair with its associated new
! * system ID
*
*@param systemId
--- 292,296 ----
/**
* Log the creation of a new metadata field/value pair with its associated new
! * system Id
*
*@param systemId
***************
*** 328,331 ****
--- 337,347 ----
updateStmt.executeQuery( "UPDATE vocab_values SET uiLabels='" + stringUtil.escapeQuotes( xmlLabels )
+ "' WHERE id='" + sqlId + "'" );
+ updateStmt.close();
+ }
+ else if ( !vocab.getFieldValueIdPairExists( fieldId, valueId ) ) {
+ Statement updateStmt = con.createStatement();
+ // Retire value that no longer exists in the XML:
+ updateStmt.executeQuery( "UPDATE vocab_values SET retiredDate=NOW() WHERE id='" + sqlId + "'" );
+ updateStmt.close();
}
else if ( !xmlLabels.equals( dbLabels ) ) {
***************
*** 337,340 ****
--- 353,357 ----
+ "VALUES ('" + fieldId + "', '" + stringUtil.escapeQuotes( metaValue ) + "', '" + valueId + "', '" + stringUtil.escapeQuotes( xmlLabels )
+ "', NOW(), '')" );
+ updateStmt.close();
}
}
Index: MetadataVocab.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/MetadataVocab.java,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -r1.25 -r1.26
*** MetadataVocab.java 25 Mar 2003 01:23:03 -0000 1.25
--- MetadataVocab.java 26 Mar 2003 00:23:26 -0000 1.26
***************
*** 22,30 ****
import javax.servlet.jsp.PageContext;
import org.dlese.dpc.index.*;
import org.xml.sax.*;
/*
TO DO:
! -Retire values that disappear
-Add email notification to error handler
-Check process of vocab/index updating (make sure vocab changes are reflected properly in index)
--- 22,31 ----
import javax.servlet.jsp.PageContext;
import org.dlese.dpc.index.*;
+ import org.dlese.dpc.util.strings.StringUtil;
import org.xml.sax.*;
/*
TO DO:
! -Error checking for FIELD Ids? Or track changes in their metadata names?
-Add email notification to error handler
-Check process of vocab/index updating (make sure vocab changes are reflected properly in index)
***************
*** 34,37 ****
--- 35,39 ----
-Test with Schema instead of DTD (SHOULDN'T make a difference)
-Improve single checkbox tag to not require explicit label and system name? Depends on new UI...
+ -Improve "adminOnly" option to allow display in admin interface? Depends on admin needs...
*/
/**
***************
*** 55,73 ****
*/
public class MetadataVocab implements org.xml.sax.ContentHandler {
private VocabList vocab = new VocabList();
private VocabList current = vocab;
private VocabNode currentNode;
private HashMap luceneQuery = new HashMap();
- private Locator saxLocator;
private String newNodeName = "";
! private String newNodeID = "";
private String currentSAXElementName = "";
private String currentSAXElementSystem = "";
! private String currentVocabFieldID;
private String currentVocabFieldName;
private boolean processingUiGroup = false;
private boolean encounteredErrorInElement = false;
!
! // Store XML in case it needs to be re-written with new IDs:
private StringBuffer outputXML = new StringBuffer();
private String xmlFile;
--- 57,77 ----
*/
public class MetadataVocab implements org.xml.sax.ContentHandler {
+ // Base data structures:
private VocabList vocab = new VocabList();
private VocabList current = vocab;
private VocabNode currentNode;
private HashMap luceneQuery = new HashMap();
private String newNodeName = "";
! private String newNodeId = "";
!
! // XML parser variables:
! private Locator saxLocator;
private String currentSAXElementName = "";
private String currentSAXElementSystem = "";
! private String currentVocabFieldId;
private String currentVocabFieldName;
private boolean processingUiGroup = false;
private boolean encounteredErrorInElement = false;
! // Store XML in case it needs to be re-written with new Ids:
private StringBuffer outputXML = new StringBuffer();
private String xmlFile;
***************
*** 75,85 ****
private final String XML_HEAD = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<!DOCTYPE vocabulary SYSTEM \"ControlledVocab.dtd\">\n";
private MetadataVocabTracker tracker;
! private HashMap fieldSystemID = new HashMap();
! private HashMap fieldValueSystemID = new HashMap();
private HashMap uiSystems = new HashMap(); // keep track of all UI "system" attributes encountered
private HashMap uiLabelOf = new HashMap(); // metadata name -> UI label mapping
! private HashMap uiLabelOfSystemIds = new HashMap();// encoded IDs -> UI label mapping
private ArrayList messages = new ArrayList(); // messages displayed in admin
private ArrayList errors = new ArrayList(); // errors displayed in admin
--- 79,92 ----
private final String XML_HEAD = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<!DOCTYPE vocabulary SYSTEM \"ControlledVocab.dtd\">\n";
+ // For tracking changes via database (or other means):
private MetadataVocabTracker tracker;
! private HashMap fieldSystemId = new HashMap();
! private HashMap fieldValueSystemId = new HashMap();
private HashMap uiSystems = new HashMap(); // keep track of all UI "system" attributes encountered
private HashMap uiLabelOf = new HashMap(); // metadata name -> UI label mapping
! private HashMap uiLabelOfSystemIds = new HashMap();// encoded Ids -> UI label mapping
! private HashMap fieldValueIdPairExists = new HashMap();// does the given field/value Id pair exist in XML?
+ // Messages/errors
private ArrayList messages = new ArrayList(); // messages displayed in admin
private ArrayList errors = new ArrayList(); // errors displayed in admin
***************
*** 119,136 ****
/**
! * Gets the fieldValueSystemID attribute of the MetadataVocab object
*
- *@param field
*@param value
*@exception Exception
! *@return The fieldValueSystemID value
*/
! public String getFieldValueSystemID( String field,
String value ) throws Exception {
! String ret = (String)fieldValueSystemID.get( field + value );
! if ( ret == null ) {
! String err = "getFieldValueSystemID is NULL for field/value pair " + field + "/" + value;
! reportError( err );
! throw new Exception( err );
}
return ret;
--- 126,159 ----
/**
! * Gets the fieldValueIdPairExists attribute of the MetadataVocab object
! *
! *@param fieldId
! *@param valueId
! */
! public boolean getFieldValueIdPairExists( String fieldId, String valueId ) {
! if ( fieldValueIdPairExists.get( fieldId + "=" + valueId ) != null ) {
! return true;
! }
! return false;
! }
!
! /**
! * Gets the fieldValueSystemId attribute of the MetadataVocab object
*
*@param value
+ *@param field
*@exception Exception
! *@return The fieldValueSystemId value
*/
! public String getFieldValueSystemId( String field,
String value ) throws Exception {
! String ret = "";
! if ( ( value != null ) && !value.equals( "" ) ) {
! ret = (String)fieldValueSystemId.get( field + value );
! if ( ret == null ) {
! String err = "getFieldValueSystemId is NULL for field/value pair " + field + "=" + value;
! reportError( err );
! throw new Exception( err );
! }
}
return ret;
***************
*** 138,151 ****
/**
! * Gets the fieldSystemID attribute of the MetadataVocab object
*
*@param field
*@exception Exception
! *@return The fieldSystemID value
*/
! public String getFieldSystemID( String field ) throws Exception {
! String ret = (String)fieldSystemID.get( field );
if ( ret == null ) {
! String err = "getFieldSystemID is NULL for field " + field;
reportError( err );
throw new Exception( err );
--- 161,174 ----
/**
! * Gets the fieldSystemId attribute of the MetadataVocab object
*
*@param field
*@exception Exception
! *@return The fieldSystemId value
*/
! public String getFieldSystemId( String field ) throws Exception {
! String ret = (String)fieldSystemId.get( field );
if ( ret == null ) {
! String err = "getFieldSystemId is NULL for field " + field;
reportError( err );
throw new Exception( err );
***************
*** 175,186 ****
*
*@param system
! *@param systemFieldID
! *@param systemValueID
*@return The uiLabelOfSystemIds value
*/
! public String getUiLabelOfSystemIds( String system, String systemFieldID, String systemValueID ) {
! String ret = (String)uiLabelOfSystemIds.get( system + systemFieldID + systemValueID );
if ( ret == null ) {
! reportError( "getUiLabelOfSystemIds is NULL for (" + system + systemFieldID + systemValueID + ")" );
ret = " ";
}
--- 198,209 ----
*
*@param system
! *@param systemFieldId
! *@param systemValueId
*@return The uiLabelOfSystemIds value
*/
! public String getUiLabelOfSystemIds( String system, String systemFieldId, String systemValueId ) {
! String ret = (String)uiLabelOfSystemIds.get( system + systemFieldId + systemValueId );
if ( ret == null ) {
! reportError( "getUiLabelOfSystemIds is NULL for (" + system + systemFieldId + systemValueId + ")" );
ret = " ";
}
***************
*** 198,205 ****
*@return The vocabSelectList value
*/
! public String getVocabSelectList( String system,
! String group,
! int size,
! PageContext page ) {
HttpSession session = page.getSession();
StringBuffer ret = new StringBuffer();
--- 221,228 ----
*@return The vocabSelectList value
*/
! public synchronized String getVocabSelectList( String system,
! String group,
! int size,
! PageContext page ) {
HttpSession session = page.getSession();
StringBuffer ret = new StringBuffer();
***************
*** 232,240 ****
*@return
*/
! private String vocabSelectList( String system,
! VocabList list,
! int indent,
! HashMap inputState,
! String name ) {
StringBuffer ret = new StringBuffer();
for ( int i = 0; i < list.item.size(); i++ ) {
--- 255,263 ----
*@return
*/
! private synchronized String vocabSelectList( String system,
! VocabList list,
! int indent,
! HashMap inputState,
! String name ) {
StringBuffer ret = new StringBuffer();
for ( int i = 0; i < list.item.size(); i++ ) {
***************
*** 284,293 ****
*@return the HTML code
*/
! public String getVocabCheckboxes( String system,
! String group,
! int size,
! String tdWidth,
! boolean skipTopRow,
! PageContext page ) {
HttpSession session = page.getSession();
String name = setTopName( group );
--- 307,316 ----
*@return the HTML code
*/
! public synchronized String getVocabCheckboxes( String system,
! String group,
! int size,
! String tdWidth,
! boolean skipTopRow,
! PageContext page ) {
HttpSession session = page.getSession();
String name = setTopName( group );
***************
*** 337,349 ****
*@return
*/
! private String vocabCheckboxes( String system,
! VocabList list,
! int size,
! String tdWidth,
! HashMap inputState,
! String name,
! CBCount count,
! HashMap jsCount,
! boolean skipTopRow ) {
StringBuffer ret = new StringBuffer();
boolean isHeading = false;
--- 360,372 ----
*@return
*/
! private synchronized String vocabCheckboxes( String system,
! VocabList list,
! int size,
! String tdWidth,
! HashMap inputState,
! String name,
! CBCount count,
! HashMap jsCount,
! boolean skipTopRow ) {
StringBuffer ret = new StringBuffer();
boolean isHeading = false;
***************
*** 359,363 ****
VocabNode node = (VocabNode)list.item.get( i );
isHeading = ( node.list.item.size() > 0 ) ? true : false;
! if ( !isHeading ) {
// Tally output for construction of "All | Clear" links:
Integer rc = (Integer)jsCount.get( name );
--- 382,386 ----
VocabNode node = (VocabNode)list.item.get( i );
isHeading = ( node.list.item.size() > 0 ) ? true : false;
! if ( !isHeading && !node.adminOnly ) {
// Tally output for construction of "All | Clear" links:
Integer rc = (Integer)jsCount.get( name );
***************
*** 371,375 ****
ret.append( "<div class='subCatHeading'>" );
}
! else {
String chk = "";
if ( ( inputState != null ) &&
--- 394,398 ----
ret.append( "<div class='subCatHeading'>" );
}
! else if ( !node.adminOnly ) {
String chk = "";
if ( ( inputState != null ) &&
***************
*** 393,397 ****
.append( "</div>\n" );
}
! else {
ret.append( "<label for=\"" )
.append( name )
--- 416,420 ----
.append( "</div>\n" );
}
! else if ( !node.adminOnly ) {
ret.append( "<label for=\"" )
.append( name )
***************
*** 415,422 ****
*@return the HTML code
*/
! public String getVocabCheckbox( String groupTop,
! String value,
! String label,
! PageContext page ) {
HttpSession session = page.getSession();
StringBuffer ret = new StringBuffer();
--- 438,445 ----
*@return the HTML code
*/
! public synchronized String getVocabCheckbox( String groupTop,
! String value,
! String label,
! PageContext page ) {
HttpSession session = page.getSession();
StringBuffer ret = new StringBuffer();
***************
*** 432,441 ****
.append( groupTop )
.append( "' value=\"" )
! .append( escapedValue( value ) )
.append( "\" id=\"" )
! .append( escapedValue( value ) )
.append( "\">" )
.append( "<label for=\"" )
! .append( escapedValue( value ) )
.append( "\">" )
.append( label )
--- 455,464 ----
.append( groupTop )
.append( "' value=\"" )
! .append( value )
.append( "\" id=\"" )
! .append( value )
.append( "\">" )
.append( "<label for=\"" )
! .append( value )
.append( "\">" )
.append( label )
***************
*** 457,463 ****
*@return the HTML/Javascript code
*/
! public String getVocabCheckboxesAllClearLinks( String group,
! int numCheckboxes,
! HttpSession session ) {
StringBuffer ret = new StringBuffer( "" );
String name = setTopName( group );
--- 480,486 ----
*@return the HTML/Javascript code
*/
! public synchronized String getVocabCheckboxesAllClearLinks( String group,
! int numCheckboxes,
! HttpSession session ) {
StringBuffer ret = new StringBuffer( "" );
String name = setTopName( group );
***************
*** 504,508 ****
HashMap jsCount = getJSCount( session );
jsCount.clear();
! return "<script language=\"javascript\">\n<!--\nfunction CheckAll( name, start, stop, bool ) {\nwindow.status = '';\nfor ( var i = start; i <= stop; i++ )\neval( \"document.forms[0].\" + name + \"[i].checked = \" + bool );\n}\n\nfunction CheckAllID( name, start, stop, bool ) {\nwindow.status = '';\nfor ( var i = start; i <= stop; i++ )\neval( \"document.forms[0].\" + name + i.toString() + \".checked = \" + bool );\n}\n\nfunction CheckOne( name, bool ) {\nwindow.status = '';\neval( \"document.forms[ 0 ].\" + name + \".checked = \" + bool );\n}\n\nfunction AllOver() {\nwindow.status = 'Select all in this group';\n}\n\nfunction ClearOver() {\nwindow.status = 'Clear all in this group';\n}\n\nfunction MO() {window.status = '';\n}\n//-->\n</script>";
}
--- 527,531 ----
HashMap jsCount = getJSCount( session );
jsCount.clear();
! return "<script language=\"javascript\">\n<!--\nfunction CheckAll( name, start, stop, bool ) {\nwindow.status = '';\nfor ( var i = start; i <= stop; i++ )\neval( \"document.forms[0].\" + name + \"[i].checked = \" + bool );\n}\n\nfunction CheckAllId( name, start, stop, bool ) {\nwindow.status = '';\nfor ( var i = start; i <= stop; i++ )\neval( \"document.forms[0].\" + name + i.toString() + \".checked = \" + bool );\n}\n\nfunction CheckOne( name, bool ) {\nwindow.status = '';\neval( \"document.forms[ 0 ].\" + name + \".checked = \" + bool );\n}\n\nfunction AllOver() {\nwindow.status = 'Select all in this group';\n}\n\nfunction ClearOver() {\nwindow.status = 'Clear all in this group';\n}\n\nfunction MO() {window.status = '';\n}\n//-->\n</script>";
}
***************
*** 595,599 ****
String a_href = "";
try {
! a_href = "<a href='" + LINK_URL + "?" + getFieldSystemID( name ) + "=" + node.name + "'>";
}
catch ( Exception e ) {
--- 618,622 ----
String a_href = "";
try {
! a_href = "<a href='" + LINK_URL + "?" + getFieldSystemId( name ) + "=" + node.name + "'>";
}
catch ( Exception e ) {
***************
*** 613,617 ****
.append( "</b></span></td></tr>\n" );
}
! else {
if ( count.intValue() > 0 ) {
int perc = (int)( (float)count.intValue() / (float)getHistogramHighestCount( session ) * (float)84 );
--- 636,640 ----
.append( "</b></span></td></tr>\n" );
}
! else if ( !node.adminOnly ) {
if ( count.intValue() > 0 ) {
int perc = (int)( (float)count.intValue() / (float)getHistogramHighestCount( session ) * (float)84 );
***************
*** 621,625 ****
String a_href = "";
try {
! a_href = "<a href='" + LINK_URL + "?" + getFieldSystemID( name ) + "=" + node.id + "' class='histogramLabels'>";
}
catch ( Exception e ) {
--- 644,648 ----
String a_href = "";
try {
! a_href = "<a href='" + LINK_URL + "?" + getFieldSystemId( name ) + "=" + node.id + "' class='histogramLabels'>";
}
catch ( Exception e ) {
***************
*** 674,678 ****
if ( node.list.item.size() > 0 ) {
try {
! luceneQuery.put( getFieldSystemID( groupTop ) + "=" + node.name, subQuery( node.list, groupTop ) );
}
catch ( Exception e ) {
--- 697,701 ----
if ( node.list.item.size() > 0 ) {
try {
! luceneQuery.put( getFieldSystemId( groupTop ) + "=" + node.name, subQuery( node.list, groupTop ) );
}
catch ( Exception e ) {
***************
*** 683,689 ****
else {
try {
! luceneQuery.put( getFieldSystemID( groupTop ) + "=" + getFieldValueSystemID( groupTop, node.name ), " "
! + getFieldSystemID( groupTop ) + ":\""
! + getFieldValueSystemID( groupTop, node.name ) + "\"" );
}
catch ( Exception e ) {
--- 706,712 ----
else {
try {
! luceneQuery.put( getFieldSystemId( groupTop ) + "=" + getFieldValueSystemId( groupTop, node.name ), " "
! + getFieldSystemId( groupTop ) + ":\""
! + getFieldValueSystemId( groupTop, node.name ) + "\"" );
}
catch ( Exception e ) {
***************
*** 739,745 ****
try {
ret.append( " " )
! .append( getFieldSystemID( name ) )
.append( ":\"" )
! .append( getFieldValueSystemID( name, node.name ) )
.append( "\"" );
}
--- 762,768 ----
try {
ret.append( " " )
! .append( getFieldSystemId( name ) )
.append( ":\"" )
! .append( getFieldValueSystemId( name, node.name ) )
.append( "\"" );
}
***************
*** 803,807 ****
String subQuery = "";
try {
! subQuery = (String)luceneQuery.get( getFieldSystemID( name )
+ "=" + node.name );
}
--- 826,830 ----
String subQuery = "";
try {
! subQuery = (String)luceneQuery.get( getFieldSystemId( name )
+ "=" + node.name );
}
***************
*** 813,818 ****
else {
try {
! ret = browser.numDocs( addQuery + " +" + getFieldSystemID( name )
! + ":\"" + getFieldValueSystemID( name, node.name ) + "\"" );
}
catch ( Exception e ) {
--- 836,841 ----
else {
try {
! ret = browser.numDocs( addQuery + " +" + getFieldSystemId( name )
! + ":\"" + getFieldValueSystemId( name, node.name ) + "\"" );
}
catch ( Exception e ) {
***************
*** 1072,1107 ****
/**
! * Turn " into " within the given string
! *
! *@param str string to be modified
! *@return
! */
! private synchronized String escapedValue( String str ) {
! return stringReplace( str, "\"", """ );
! }
!
! /**
! * Replace a substring within the given string
! *
! *@param str string to be modified
! *@param find substring to find
! *@param replace string to replace substring with
! *@return modified string
! */
! protected static String stringReplace( String str, String find, String replace ) {
! StringBuffer ret = new StringBuffer();
! int ind1 = 0;
! int ind2 = str.indexOf( find );
! while ( ind2 > -1 ) {
! ret.append( str.substring( ind1, ind2 ) ).append( replace );
! ind1 = ind2 + find.length();
! ind2 = str.indexOf( find, ind1 );
! }
! ret.append( str.substring( ind1, str.length() ) );
! return ret.toString();
! }
!
! /**
! * When all vocabs are loaded, close any database connection
*/
public void doneLoading() {
--- 1095,1100 ----
/**
! * When all vocabs are loaded, close any database connection and generate the
! * Lucene queries
*/
public void doneLoading() {
***************
*** 1139,1156 ****
static class VocabNode {
public String name; // Metadata name
! public String id; // System ID (indexed & used in search queries)
private HashMap label = new HashMap(); // User interface label(s)
private HashMap definition = new HashMap(); // Metadata definition(s)
public VocabList list = new VocabList(); // Sub-list, if this is a sub-header node
/**
* Constructor for the VocabNode object
*
! *@param name metadata name
! *@param id system ID
*/
! public VocabNode( String name, String id ) {
this.name = name;
this.id = id;
}
--- 1132,1152 ----
static class VocabNode {
public String name; // Metadata name
! public String id; // System Id (indexed & used in search queries)
private HashMap label = new HashMap(); // User interface label(s)
private HashMap definition = new HashMap(); // Metadata definition(s)
public VocabList list = new VocabList(); // Sub-list, if this is a sub-header node
+ private boolean adminOnly; // Is this value for administrative purposes only? i.e. don't show in main UI
/**
* Constructor for the VocabNode object
*
! *@param name metadata name
! *@param id system Id
! *@param adminOnly
*/
! public VocabNode( String name, String id, boolean adminOnly ) {
this.name = name;
this.id = id;
+ this.adminOnly = adminOnly;
}
***************
*** 1213,1217 ****
/**
* Invoked at the end of parsing XML. Generate the lucene queries, and rewrite
! * the XML if new IDs have been assigned
*
*@exception SAXException
--- 1209,1213 ----
/**
* Invoked at the end of parsing XML. Generate the lucene queries, and rewrite
! * the XML if new Ids have been assigned
*
*@exception SAXException
***************
*** 1221,1225 ****
if ( rewriteXML ) {
try {
! reportMessage( "New vocabulary ID(s) assigned, rewriting file " + xmlFile );
FileWriter file = new FileWriter( xmlFile );
String outStr = outputXML.toString();
--- 1217,1221 ----
if ( rewriteXML ) {
try {
! reportMessage( "New vocabulary Id(s) assigned, rewriting file " + xmlFile );
FileWriter file = new FileWriter( xmlFile );
String outStr = outputXML.toString();
***************
*** 1281,1321 ****
testAtt = (String)attributes.get( "id" );
if ( testAtt != null ) {
! newNodeID = testAtt;
! if ( newNodeID.equals( "" ) ) {
if ( localName.equals( "vocabulary" ) ) {
encounteredErrorInElement = true;
! reportError( "Missing vocabulary system ID for " + newNodeName );
outputXML.append( " id=\"\"" );
}
else {
rewriteXML = true;
! String dbId = tracker.getId( currentVocabFieldID, newNodeName );
if ( dbId.equals( "" ) ) {
! newNodeID = tracker.assignNewSystemId( currentVocabFieldID, newNodeName );
}
else {
encounteredErrorInElement = true;
! reportError( "XML is missing ID for field/value pair already in the database: "
! + currentVocabFieldID + "/" + newNodeName + ", id='" + dbId + "'" );
}
! outputXML.append( " id=\"" + newNodeID + "\"" );
}
}
else {
! if ( !localName.equals( "vocabulary" ) ) {
! String dbId = tracker.getId( currentVocabFieldID, newNodeName );
if ( dbId.equals( "" ) ) {
encounteredErrorInElement = true;
! reportError( "Vocab value not found in database: " + currentVocabFieldID + "=" + newNodeName
! + "--if this is a new value, then make sure to empty its 'id' attribute!" );
}
! else if ( !dbId.equals( newNodeID ) ) {
encounteredErrorInElement = true;
! reportError( "Vocab ID found in database (" + dbId
! + ") does not match ID found in XML (" + newNodeID + ") for " + currentVocabFieldID
+ "=" + newNodeName );
}
}
! outputXML.append( " id=\"" + newNodeID + "\"" );
}
}
--- 1277,1317 ----
testAtt = (String)attributes.get( "id" );
if ( testAtt != null ) {
! newNodeId = testAtt;
! if ( newNodeId.equals( "" ) ) {
if ( localName.equals( "vocabulary" ) ) {
encounteredErrorInElement = true;
! reportError( "Missing vocabulary system Id for " + newNodeName );
outputXML.append( " id=\"\"" );
}
else {
rewriteXML = true;
! String dbId = tracker.getId( currentVocabFieldId, newNodeName );
if ( dbId.equals( "" ) ) {
! newNodeId = tracker.assignNewSystemId( currentVocabFieldId, newNodeName );
}
else {
encounteredErrorInElement = true;
! reportError( "XML is missing Id for field/value pair already in the database: "
! + currentVocabFieldId + "/" + newNodeName + ", id='" + dbId + "'" );
}
! outputXML.append( " id=\"" + newNodeId + "\"" );
}
}
else {
! if ( !localName.equals( "vocabulary" ) && tracker.isUsingDatabase() ) {
! String dbId = tracker.getId( currentVocabFieldId, newNodeName );
if ( dbId.equals( "" ) ) {
encounteredErrorInElement = true;
! reportError( "Vocab value not found in database: " + currentVocabFieldId + "=" + newNodeName
! + ". If this is a new value, then make sure to empty its 'id' attribute!" );
}
! else if ( !dbId.equals( newNodeId ) ) {
encounteredErrorInElement = true;
! reportError( "Vocab Id found in database (" + dbId
! + ") does not match Id found in XML (" + newNodeId + ") for " + currentVocabFieldId
+ "=" + newNodeName );
}
}
! outputXML.append( " id=\"" + newNodeId + "\"" );
}
}
***************
*** 1326,1333 ****
outputXML.append( " system=\"" + currentSAXElementSystem + "\"" );
}
if ( localName.equals( "vocabulary" ) ) {
! currentVocabFieldID = newNodeID;
currentVocabFieldName = newNodeName;
! fieldSystemID.put( newNodeName, newNodeID );
processingUiGroup = false;
}
--- 1322,1337 ----
outputXML.append( " system=\"" + currentSAXElementSystem + "\"" );
}
+ boolean adminOnly = false;
+ testAtt = (String)attributes.get( "adminOnly" );
+ if ( testAtt != null ) {
+ outputXML.append( " adminOnly=\"" + testAtt + "\"" );
+ if ( testAtt.equalsIgnoreCase( "yes" ) || testAtt.equalsIgnoreCase( "true" ) ) {
+ adminOnly = true;
+ }
+ }
if ( localName.equals( "vocabulary" ) ) {
! currentVocabFieldId = newNodeId;
currentVocabFieldName = newNodeName;
! fieldSystemId.put( newNodeName, newNodeId );
processingUiGroup = false;
}
***************
*** 1336,1340 ****
}
if ( localName.equals( "vocabulary" ) || localName.equals( "ui_group" ) ) {
! VocabNode node = new VocabNode( newNodeName, newNodeID );
current.map.put( newNodeName, node );
current.item.add( node );
--- 1340,1344 ----
}
if ( localName.equals( "vocabulary" ) || localName.equals( "ui_group" ) ) {
! VocabNode node = new VocabNode( newNodeName, newNodeId, adminOnly );
current.map.put( newNodeName, node );
current.item.add( node );
***************
*** 1345,1352 ****
else if ( localName.equals( "value" ) ) {
processingUiGroup = false;
! VocabNode node = new VocabNode( newNodeName, newNodeID );
current.item.add( node );
currentNode = node;
! fieldValueSystemID.put( currentVocabFieldName + newNodeName, newNodeID );
}
outputXML.append( ">" );
--- 1349,1357 ----
else if ( localName.equals( "value" ) ) {
processingUiGroup = false;
! VocabNode node = new VocabNode( newNodeName, newNodeId, adminOnly );
current.item.add( node );
currentNode = node;
! fieldValueSystemId.put( currentVocabFieldName + newNodeName, newNodeId );
! fieldValueIdPairExists.put( currentVocabFieldId + "=" + newNodeId, new Boolean( true ) );
}
outputXML.append( ">" );
***************
*** 1382,1391 ****
currentNode.setLabel( currentSAXElementSystem, charsValue );
uiLabelOf.put( currentSAXElementSystem + currentVocabFieldName + newNodeName, charsValue );
! if ( !encounteredErrorInElement ) { // don't register UI labels for a fault element!
if ( !processingUiGroup ) {
! uiLabelOfSystemIds.put( currentSAXElementSystem + currentVocabFieldID + newNodeID, charsValue );
}
else {
! uiLabelOfSystemIds.put( currentSAXElementSystem + currentVocabFieldID + newNodeName, charsValue );
}
}
--- 1387,1396 ----
currentNode.setLabel( currentSAXElementSystem, charsValue );
uiLabelOf.put( currentSAXElementSystem + currentVocabFieldName + newNodeName, charsValue );
! if ( !encounteredErrorInElement ) { // don't register UI labels for a faulty element!
if ( !processingUiGroup ) {
! uiLabelOfSystemIds.put( currentSAXElementSystem + currentVocabFieldId + newNodeId, charsValue );
}
else {
! uiLabelOfSystemIds.put( currentSAXElementSystem + currentVocabFieldId + newNodeName, charsValue );
}
}
Index: MetadataVocabTracker.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/MetadataVocabTracker.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** MetadataVocabTracker.java 25 Mar 2003 01:23:03 -0000 1.6
--- MetadataVocabTracker.java 26 Mar 2003 00:23:26 -0000 1.7
***************
*** 19,24 ****
/**
! * Interface for creation of controlled vocabulary system IDs, tracking changes
! * in metadata names and UI labels, and ensuring consistency of all three
*
*@author Ryan Deardorff
--- 19,32 ----
/**
! * Interface for creation of controlled vocabulary system Ids, tracking changes
! * in metadata names and UI labels, and ensuring consistency of all three.
! * Implementations should follow these rules:<p>
! *
! * 1) Error checking, encoded Id assignment, and UI label change tracking are
! * OPTIONAL, as reflected in the isUsingDatabase() method<br>
! * 2) Once an encoded Id has been assigned, it may never be re-used, but can
! * only be retired when/if its vocab value is removed<br>
! * 3) Only vocab VALUE encoded Ids are automatically assigned. FIELD Ids must
! * be assigned manually, so a tracker will assume that they already exist.
*
*@author Ryan Deardorff
***************
*** 27,52 ****
/**
! * Assign a unique system ID for a new vocabulary value
*
! *@param metadataName
! *@param metadataValue
*@return
*/
! public String assignNewSystemId( String metadataName, String metadataValue );
/**
! * Does the current field/value pair already exist in the database? If so,
! * return the ID, if not, return "" (empty string)
*
! *@param metadataFieldId
! *@param metadataValue
*/
public String getId( String metadataFieldId, String metadataValue );
/**
! * Register the current state of UI labels
*
! *@param uiSystems
! *@param uiLabelOfSystemIds
*/
public void registerUiLabels( HashMap uiSystems, HashMap uiLabelOfSystemIds );
--- 35,68 ----
/**
! * Is the system using this tracker connected to a database? If not, no error
! * checking will be performed, no new encoded system Ids can be assigned, and
! * changes in UI labels will not be registered.
! */
! public boolean isUsingDatabase();
!
! /**
! * Assign a unique system Id for a new vocabulary value. See rule #2 above.
*
! *@param metadataFieldId encoded field Id
! *@param metadataValue metadata value name
*@return
*/
! public String assignNewSystemId( String metadataFieldId, String metadataValue );
/**
! * Does the current fieldId/value pair already exist in the database? If so,
! * return the Id, if not, return "" (empty string)
*
! *@param metadataFieldId encoded field Id
! *@param metadataValue metadata value name
*/
public String getId( String metadataFieldId, String metadataValue );
/**
! * Register the current state of UI labels in the database
*
! *@param uiSystems map whose keys indicate all the current ui_label
! * "system" attributes
! *@param uiLabelOfSystemIds map encoded Ids to UI labels
*/
public void registerUiLabels( HashMap uiSystems, HashMap uiLabelOfSystemIds );
|
|
From: C. R. D. <rya...@us...> - 2003-03-25 01:23:10
|
Update of /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab
In directory sc8-pr-cvs1:/tmp/cvs-serv11897/src/org/dlese/dpc/vocab
Modified Files:
DLESEMetadataVocabTracker.java MetadataVocab.java
MetadataVocabTracker.java
Log Message:
Removed obsolete method
Index: DLESEMetadataVocabTracker.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/DLESEMetadataVocabTracker.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** DLESEMetadataVocabTracker.java 25 Mar 2003 01:18:50 -0000 1.6
--- DLESEMetadataVocabTracker.java 25 Mar 2003 01:23:03 -0000 1.7
***************
*** 374,408 ****
return ret.toString();
}
-
- /*
- public boolean checkVocabValue( String metadataFieldId,
- String metadataValue,
- String valueId ) {
- if ( usingDatabase ) {
- try {
- stmt = con.createStatement();
- rs = stmt.executeQuery( "SELECT systemId FROM vocab_values WHERE metadataFieldId = '" + metadataFieldId
- + "'" + " AND metadataValue = '" + stringUtil.escapeQuotes( metadataValue ) + "'" );
- if ( rs.next() ) {
- if ( !rs.getString( "systemId" ).equals( valueId ) ) {
- vocab.reportError( "Vocab ID found in database (" + rs.getString( "systemId" )
- + ") does not match ID found in XML (" + valueId + ") for " + metadataFieldId
- + "=" + metadataValue );
- }
- }
- else {
- vocab.reportError( "Vocab value not found in database: " + metadataFieldId + "=" + metadataValue
- + "--if this is a new value, then make sure to empty its 'id' attribute!" );
- }
- stmt.close();
- }
- catch ( Exception e ) {
- vocab.reportError( "SQL error" );
- e.printStackTrace();
- }
- }
- return true;
- }
- */
}
--- 374,377 ----
Index: MetadataVocab.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/MetadataVocab.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -r1.24 -r1.25
*** MetadataVocab.java 25 Mar 2003 01:18:50 -0000 1.24
--- MetadataVocab.java 25 Mar 2003 01:23:03 -0000 1.25
***************
*** 1316,1320 ****
+ "=" + newNodeName );
}
- //tracker.checkVocabValue( currentVocabFieldID, newNodeName, newNodeID );
}
outputXML.append( " id=\"" + newNodeID + "\"" );
--- 1316,1319 ----
Index: MetadataVocabTracker.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/MetadataVocabTracker.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** MetadataVocabTracker.java 25 Mar 2003 01:18:50 -0000 1.5
--- MetadataVocabTracker.java 25 Mar 2003 01:23:03 -0000 1.6
***************
*** 36,51 ****
/**
- * Check the values found in the current XML against a database for
- * consisitency (make sure that the id/metadataName pair match previously
- * registered values)
- *
- *@param metadataFieldId
- *@param metadataValue
- *@return
- */
- /*
- public boolean checkVocabValue( String metadataFieldId, String metadataValue, String valueId );
- */
- /**
* Does the current field/value pair already exist in the database? If so,
* return the ID, if not, return "" (empty string)
--- 36,39 ----
|
|
From: C. R. D. <rya...@us...> - 2003-03-25 01:18:58
|
Update of /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab
In directory sc8-pr-cvs1:/tmp/cvs-serv9629/src/org/dlese/dpc/vocab
Modified Files:
DLESEMetadataVocabTracker.java MetadataVocab.java
MetadataVocabTracker.java
Log Message:
Added database error-checking against vocab IDs to ensure consistency
with the XML (also ensures that no ID will ever get re-used). Also
improved the parsing of XML so that it doesn't matter what order tag
attributes are specified in.
Index: DLESEMetadataVocabTracker.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/DLESEMetadataVocabTracker.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** DLESEMetadataVocabTracker.java 24 Mar 2003 21:30:18 -0000 1.5
--- DLESEMetadataVocabTracker.java 25 Mar 2003 01:18:50 -0000 1.6
***************
*** 156,159 ****
--- 156,186 ----
/**
+ * Does the current field/value pair already exist in the database? If so,
+ * return the ID, if not, return "" (empty string)
+ *
+ *@param metadataFieldId
+ *@param metadataValue
+ */
+ public String getId( String metadataFieldId, String metadataValue ) {
+ String ret = "";
+ if ( usingDatabase ) {
+ try {
+ stmt = con.createStatement();
+ rs = stmt.executeQuery( "SELECT systemId FROM vocab_values WHERE metadataFieldId = '" + metadataFieldId + "' "
+ + "AND metadataValue = '" + stringUtil.escapeQuotes( metadataValue ) + "'" );
+ if ( rs.next() ) {
+ ret = rs.getString( "systemId" );
+ }
+ stmt.close();
+ }
+ catch ( Exception e ) {
+ vocab.reportError( "SQL error" );
+ e.printStackTrace();
+ }
+ }
+ return ret;
+ }
+
+ /**
* Gets the highestId attribute of the DLESEMetadataVocabTracker object
*
***************
*** 308,312 ****
// Insert new UI labels:
updateStmt.executeQuery( "INSERT INTO vocab_values (metadataFieldId, metadataValue, systemId, uiLabels, createdDate, retiredDate) "
! + "VALUES ('" + fieldId + "', '" + metaValue + "', '" + valueId + "', '" + stringUtil.escapeQuotes( xmlLabels )
+ "', NOW(), '')" );
}
--- 335,339 ----
// Insert new UI labels:
updateStmt.executeQuery( "INSERT INTO vocab_values (metadataFieldId, metadataValue, systemId, uiLabels, createdDate, retiredDate) "
! + "VALUES ('" + fieldId + "', '" + stringUtil.escapeQuotes( metaValue ) + "', '" + valueId + "', '" + stringUtil.escapeQuotes( xmlLabels )
+ "', NOW(), '')" );
}
***************
*** 348,374 ****
}
! /**
! * Check the values found in the current XML against a database for
! * consisitency (make sure that the id/metadataName pair match previously
! * registered values)
! *
! *@param id
! *@param metadataName
! *@return
! */
! public boolean checkVocabValue( String metadataName, String id ) {
! if ( usingDatabase ) {
! try {
! stmt = con.createStatement();
! rs = stmt.executeQuery( "SELECT id" );
! stmt.close();
! }
! catch ( Exception e ) {
! vocab.reportError( "SQL error" );
! e.printStackTrace();
! }
! }
! return true;
! }
}
--- 375,408 ----
}
! /*
! public boolean checkVocabValue( String metadataFieldId,
! String metadataValue,
! String valueId ) {
! if ( usingDatabase ) {
! try {
! stmt = con.createStatement();
! rs = stmt.executeQuery( "SELECT systemId FROM vocab_values WHERE metadataFieldId = '" + metadataFieldId
! + "'" + " AND metadataValue = '" + stringUtil.escapeQuotes( metadataValue ) + "'" );
! if ( rs.next() ) {
! if ( !rs.getString( "systemId" ).equals( valueId ) ) {
! vocab.reportError( "Vocab ID found in database (" + rs.getString( "systemId" )
! + ") does not match ID found in XML (" + valueId + ") for " + metadataFieldId
! + "=" + metadataValue );
! }
! }
! else {
! vocab.reportError( "Vocab value not found in database: " + metadataFieldId + "=" + metadataValue
! + "--if this is a new value, then make sure to empty its 'id' attribute!" );
! }
! stmt.close();
! }
! catch ( Exception e ) {
! vocab.reportError( "SQL error" );
! e.printStackTrace();
! }
! }
! return true;
! }
! */
}
Index: MetadataVocab.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/MetadataVocab.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -r1.23 -r1.24
*** MetadataVocab.java 24 Mar 2003 21:30:18 -0000 1.23
--- MetadataVocab.java 25 Mar 2003 01:18:50 -0000 1.24
***************
*** 25,40 ****
/*
! * TO DO:
! * -MySQL database error-checking of values
! * -Add email notification to error handler
! * -Database registration of UI values that have changed
! * -Check process of vocab/index updating (make sure vocab changes are reflected properly in index)
! * -Database indexing (for faster queries)
! * -Improve XML parsing of attributes so that their order doesn't matter
! * -XML Validation
! * -Add support for rendering vocab definitions
! * -Test with Schema instead of DTD (SHOULDN'T make a difference)
! * -Improve single checkbox tag to not require explicit label and system name? Depends on new UI...
! */
/**
* Facilitates interface representation of catalog metadata vocabulary. <p>
--- 25,38 ----
/*
! TO DO:
! -Retire values that disappear
! -Add email notification to error handler
! -Check process of vocab/index updating (make sure vocab changes are reflected properly in index)
! -Database indexing (for faster queries)
! -XML Validation
! -Add support for rendering vocab definitions
! -Test with Schema instead of DTD (SHOULDN'T make a difference)
! -Improve single checkbox tag to not require explicit label and system name? Depends on new UI...
! */
/**
* Facilitates interface representation of catalog metadata vocabulary. <p>
***************
*** 69,72 ****
--- 67,71 ----
private String currentVocabFieldName;
private boolean processingUiGroup = false;
+ private boolean encounteredErrorInElement = false;
// Store XML in case it needs to be re-written with new IDs:
***************
*** 1271,1288 ****
currentSAXElementName = new String( localName );
outputXML.append( "<" + qName );
for ( int i = 0; i < atts.getLength(); i++ ) {
! if ( atts.getLocalName( i ).equals( "name" ) ) {
! newNodeName = atts.getValue( i );
! }
! else if ( atts.getLocalName( i ).equals( "id" ) ) {
! newNodeID = atts.getValue( i );
! }
! else if ( atts.getLocalName( i ).equals( "system" ) ) {
! currentSAXElementSystem = atts.getValue( i );
! uiSystems.put( currentSAXElementSystem, new Boolean( true ) );
! }
! if ( atts.getLocalName( i ).equals( "id" ) && newNodeID.equals( "" ) ) {
if ( localName.equals( "vocabulary" ) ) {
! // Add proper error handling here!
reportError( "Missing vocabulary system ID for " + newNodeName );
outputXML.append( " id=\"\"" );
--- 1270,1288 ----
currentSAXElementName = new String( localName );
outputXML.append( "<" + qName );
+ HashMap attributes = new HashMap();
for ( int i = 0; i < atts.getLength(); i++ ) {
! attributes.put( atts.getLocalName( i ), atts.getValue( i ) );
! }
! String testAtt = (String)attributes.get( "name" );
! if ( testAtt != null ) {
! newNodeName = testAtt;
! outputXML.append( " name=\"" + newNodeName + "\"" );
! }
! testAtt = (String)attributes.get( "id" );
! if ( testAtt != null ) {
! newNodeID = testAtt;
! if ( newNodeID.equals( "" ) ) {
if ( localName.equals( "vocabulary" ) ) {
! encounteredErrorInElement = true;
reportError( "Missing vocabulary system ID for " + newNodeName );
outputXML.append( " id=\"\"" );
***************
*** 1290,1301 ****
else {
rewriteXML = true;
! newNodeID = tracker.assignNewSystemId( currentVocabFieldID, newNodeName );
outputXML.append( " id=\"" + newNodeID + "\"" );
}
}
else {
! outputXML.append( " " + atts.getQName( i ) + "=\"" + atts.getValue( i ) + "\"" );
}
}
if ( localName.equals( "vocabulary" ) ) {
currentVocabFieldID = newNodeID;
--- 1290,1330 ----
else {
rewriteXML = true;
! String dbId = tracker.getId( currentVocabFieldID, newNodeName );
! if ( dbId.equals( "" ) ) {
! newNodeID = tracker.assignNewSystemId( currentVocabFieldID, newNodeName );
! }
! else {
! encounteredErrorInElement = true;
! reportError( "XML is missing ID for field/value pair already in the database: "
! + currentVocabFieldID + "/" + newNodeName + ", id='" + dbId + "'" );
! }
outputXML.append( " id=\"" + newNodeID + "\"" );
}
}
else {
! if ( !localName.equals( "vocabulary" ) ) {
! String dbId = tracker.getId( currentVocabFieldID, newNodeName );
! if ( dbId.equals( "" ) ) {
! encounteredErrorInElement = true;
! reportError( "Vocab value not found in database: " + currentVocabFieldID + "=" + newNodeName
! + "--if this is a new value, then make sure to empty its 'id' attribute!" );
! }
! else if ( !dbId.equals( newNodeID ) ) {
! encounteredErrorInElement = true;
! reportError( "Vocab ID found in database (" + dbId
! + ") does not match ID found in XML (" + newNodeID + ") for " + currentVocabFieldID
! + "=" + newNodeName );
! }
! //tracker.checkVocabValue( currentVocabFieldID, newNodeName, newNodeID );
! }
! outputXML.append( " id=\"" + newNodeID + "\"" );
}
}
+ testAtt = (String)attributes.get( "system" );
+ if ( testAtt != null ) {
+ currentSAXElementSystem = testAtt;
+ uiSystems.put( currentSAXElementSystem, new Boolean( true ) );
+ outputXML.append( " system=\"" + currentSAXElementSystem + "\"" );
+ }
if ( localName.equals( "vocabulary" ) ) {
currentVocabFieldID = newNodeID;
***************
*** 1354,1362 ****
currentNode.setLabel( currentSAXElementSystem, charsValue );
uiLabelOf.put( currentSAXElementSystem + currentVocabFieldName + newNodeName, charsValue );
! if ( !processingUiGroup ) {
! uiLabelOfSystemIds.put( currentSAXElementSystem + currentVocabFieldID + newNodeID, charsValue );
! }
! else {
! uiLabelOfSystemIds.put( currentSAXElementSystem + currentVocabFieldID + newNodeName, charsValue );
}
}
--- 1383,1393 ----
currentNode.setLabel( currentSAXElementSystem, charsValue );
uiLabelOf.put( currentSAXElementSystem + currentVocabFieldName + newNodeName, charsValue );
! if ( !encounteredErrorInElement ) { // don't register UI labels for a fault element!
! if ( !processingUiGroup ) {
! uiLabelOfSystemIds.put( currentSAXElementSystem + currentVocabFieldID + newNodeID, charsValue );
! }
! else {
! uiLabelOfSystemIds.put( currentSAXElementSystem + currentVocabFieldID + newNodeName, charsValue );
! }
}
}
***************
*** 1365,1368 ****
--- 1396,1400 ----
}
outputXML.append( charsValue );
+ encounteredErrorInElement = false;
}
***************
*** 1419,1423 ****
public void reportError( String err ) {
errors.add( err );
! System.out.println( "ERROR: " + err );
}
}
--- 1451,1455 ----
public void reportError( String err ) {
errors.add( err );
! //System.out.println( "ERROR: " + err );
}
}
Index: MetadataVocabTracker.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/MetadataVocabTracker.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** MetadataVocabTracker.java 24 Mar 2003 21:30:18 -0000 1.4
--- MetadataVocabTracker.java 25 Mar 2003 01:18:50 -0000 1.5
***************
*** 40,48 ****
* registered values)
*
! *@param metadataName
! *@param id
*@return
*/
! public boolean checkVocabValue( String metadataName, String id );
/**
--- 40,58 ----
* registered values)
*
! *@param metadataFieldId
! *@param metadataValue
*@return
*/
! /*
! public boolean checkVocabValue( String metadataFieldId, String metadataValue, String valueId );
! */
! /**
! * Does the current field/value pair already exist in the database? If so,
! * return the ID, if not, return "" (empty string)
! *
! *@param metadataFieldId
! *@param metadataValue
! */
! public String getId( String metadataFieldId, String metadataValue );
/**
|
|
From: C. R. D. <rya...@us...> - 2003-03-24 21:30:27
|
Update of /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab
In directory sc8-pr-cvs1:/tmp/cvs-serv3810/src/org/dlese/dpc/vocab
Modified Files:
DLESEMetadataVocabTracker.java MetadataVocab.java
MetadataVocabTracker.java
Log Message:
Vocab label changes registerd in DB + improved error handling (exceptions
thrown when IDs not found)
Index: DLESEMetadataVocabTracker.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/DLESEMetadataVocabTracker.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** DLESEMetadataVocabTracker.java 21 Mar 2003 22:31:40 -0000 1.4
--- DLESEMetadataVocabTracker.java 24 Mar 2003 21:30:18 -0000 1.5
***************
*** 18,21 ****
--- 18,22 ----
import java.sql.*;
import java.util.*;
+ import org.dlese.dpc.util.strings.StringUtil;
/**
***************
*** 29,32 ****
--- 30,35 ----
private ResultSet rs;
private boolean usingDatabase = false;
+ private StringUtil stringUtil = new StringUtil();
+ MetadataVocab vocab;
/**
***************
*** 37,45 ****
*@param sqlUser
*@param sqlPassword
*/
! public DLESEMetadataVocabTracker( String sqlDriver,
String sqlURL,
String sqlUser,
String sqlPassword ) {
if ( ( sqlURL != null ) && !sqlURL.equals( "" ) ) {
boolean gotToSelect = false;
--- 40,51 ----
*@param sqlUser
*@param sqlPassword
+ *@param vocab
*/
! public DLESEMetadataVocabTracker( MetadataVocab vocab,
! String sqlDriver,
String sqlURL,
String sqlUser,
String sqlPassword ) {
+ this.vocab = vocab;
if ( ( sqlURL != null ) && !sqlURL.equals( "" ) ) {
boolean gotToSelect = false;
***************
*** 61,65 ****
}
else {
! System.out.println( "SQL error:\n" );
e.printStackTrace();
}
--- 67,71 ----
}
else {
! vocab.reportError( "SQL error" );
e.printStackTrace();
}
***************
*** 85,89 ****
}
catch ( Exception e ) {
! System.out.println( "SQL error:\n" );
e.printStackTrace();
}
--- 91,95 ----
}
catch ( Exception e ) {
! vocab.reportError( "SQL error" );
e.printStackTrace();
}
***************
*** 92,96 ****
/**
! * Create the vocabulary tables
*/
private void createVocabValuesTable() {
--- 98,102 ----
/**
! * Create the vocab_values tables
*/
private void createVocabValuesTable() {
***************
*** 100,108 ****
stmt.executeQuery( "CREATE TABLE vocab_values (id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, "
+ "metadataFieldId CHAR(16), metadataValue CHAR(255), systemId CHAR(6), uiLabels TEXT, "
! + "createdDate DATETIME, retiredDate DATETIME);" );
stmt.close();
}
catch ( Exception e ) {
! System.out.println( "SQL error:\n" );
e.printStackTrace();
}
--- 106,114 ----
stmt.executeQuery( "CREATE TABLE vocab_values (id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, "
+ "metadataFieldId CHAR(16), metadataValue CHAR(255), systemId CHAR(6), uiLabels TEXT, "
! + "createdDate DATETIME, retiredDate DATETIME)" );
stmt.close();
}
catch ( Exception e ) {
! vocab.reportError( "SQL error" );
e.printStackTrace();
}
***************
*** 121,124 ****
--- 127,131 ----
StringBuffer highestId = new StringBuffer( getHighestId( metadataFieldId ) );
if ( highestId.toString().equals( "-1" ) ) { // No ID existed yet, so "00" was registered
+ insertNewIdIntoValuesTable( metadataFieldId, metadataValue, "00" );
return "00";
}
***************
*** 142,146 ****
}
else {
! System.out.println( "WARNING: No database in use to assign new system ID for metadata field/value pair: "
+ metadataFieldId + "/" + metadataValue );
return "-1";
--- 149,153 ----
}
else {
! vocab.reportError( "No database in use to assign new system ID for metadata field/value pair: "
+ metadataFieldId + "/" + metadataValue );
return "-1";
***************
*** 160,164 ****
gotToFirstSelect = true;
stmt.executeQuery( "SELECT * FROM vocab_fields;" );
! rs = stmt.executeQuery( "SELECT * FROM vocab_fields WHERE metadataFieldId = '" + metadataFieldSystemId + "';" );
if ( rs.next() ) {
stmt.close();
--- 167,171 ----
gotToFirstSelect = true;
stmt.executeQuery( "SELECT * FROM vocab_fields;" );
! rs = stmt.executeQuery( "SELECT * FROM vocab_fields WHERE metadataFieldId = '" + metadataFieldSystemId + "'" );
if ( rs.next() ) {
stmt.close();
***************
*** 168,176 ****
try {
stmt.executeQuery( "INSERT INTO vocab_fields (metadataFieldId, highestValueId) "
! + "VALUES ('" + metadataFieldSystemId + "', '00');" );
return "-1";
}
catch ( Exception ex ) {
! System.out.println( "SQL error:\n" );
ex.printStackTrace();
}
--- 175,183 ----
try {
stmt.executeQuery( "INSERT INTO vocab_fields (metadataFieldId, highestValueId) "
! + "VALUES ('" + metadataFieldSystemId + "', '00')" );
return "-1";
}
catch ( Exception ex ) {
! vocab.reportError( "SQL error" );
ex.printStackTrace();
}
***************
*** 184,188 ****
}
else {
! System.out.println( "SQL error:\n" );
e.printStackTrace();
}
--- 191,195 ----
}
else {
! vocab.reportError( "SQL error" );
e.printStackTrace();
}
***************
*** 210,217 ****
stmt = con.createStatement();
stmt.executeQuery( "UPDATE vocab_fields SET highestValueId = '" + newHighest
! + "' WHERE metadataFieldId = '" + metadataFieldSystemId + "';" );
}
catch ( Exception e ) {
! System.out.println( "SQL error:\n" );
e.printStackTrace();
}
--- 217,224 ----
stmt = con.createStatement();
stmt.executeQuery( "UPDATE vocab_fields SET highestValueId = '" + newHighest
! + "' WHERE metadataFieldId = '" + metadataFieldSystemId + "'" );
}
catch ( Exception e ) {
! vocab.reportError( "SQL error" );
e.printStackTrace();
}
***************
*** 227,231 ****
/**
! * Description
*
*@param metadataFieldSystemId
--- 234,238 ----
/**
! * Create the vocab_fields table
*
*@param metadataFieldSystemId
***************
*** 236,246 ****
stmt = con.createStatement();
stmt.executeQuery( "CREATE TABLE vocab_fields (id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, "
! + "metadataFieldId CHAR(5), highestValueId CHAR(5));" );
stmt.executeQuery( "INSERT INTO vocab_fields (metadataFieldId, highestValueId) "
! + "VALUES ('" + metadataFieldSystemId + "', '00');" );
stmt.close();
}
catch ( Exception e ) {
! System.out.println( "SQL error:\n" );
e.printStackTrace();
}
--- 243,253 ----
stmt = con.createStatement();
stmt.executeQuery( "CREATE TABLE vocab_fields (id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, "
! + "metadataFieldId CHAR(5), highestValueId CHAR(5))" );
stmt.executeQuery( "INSERT INTO vocab_fields (metadataFieldId, highestValueId) "
! + "VALUES ('" + metadataFieldSystemId + "', '00')" );
stmt.close();
}
catch ( Exception e ) {
! vocab.reportError( "SQL error" );
e.printStackTrace();
}
***************
*** 258,267 ****
try {
stmt = con.createStatement();
! stmt.executeQuery( "INSERT INTO vocab_values (metadataFieldId, metadataValue, systemId, createdDate) "
! + "VALUES ('" + metadataField + "', '" + metadataValue + "', '" + systemId + "', NOW());" );
stmt.close();
}
catch ( Exception e ) {
! System.out.println( "SQL error:\n" );
e.printStackTrace();
}
--- 265,274 ----
try {
stmt = con.createStatement();
! stmt.executeQuery( "INSERT INTO vocab_values (metadataFieldId, metadataValue, systemId, createdDate, retiredDate) "
! + "VALUES ('" + metadataField + "', '" + stringUtil.escapeQuotes( metadataValue ) + "', '" + systemId + "', NOW(), '')" );
stmt.close();
}
catch ( Exception e ) {
! vocab.reportError( "SQL error" );
e.printStackTrace();
}
***************
*** 281,297 ****
try {
stmt = con.createStatement();
! System.out.println( "registerUiLabels" );
! rs = stmt.executeQuery( "SELECT metadataFieldId, systemId, uiLabels FROM vocab_values;" );
! // + "WHERE retiredDate = 'NULL';" );
while ( rs.next() ) {
String fieldId = rs.getString( "metadataFieldId" );
String valueId = rs.getString( "systemId" );
String dbLabels = rs.getString( "uiLabels" );
String xmlLabels = concatUiSystemLabels( fieldId, valueId, uiSystems, uiLabelOfSystemIds );
! System.out.println( "dbLabels = '" + dbLabels + "'" );
! if ( dbLabels == null || dbLabels.equals( "NULL" ) ) {
! System.out.println( xmlLabels );
}
else if ( !xmlLabels.equals( dbLabels ) ) {
}
}
--- 288,313 ----
try {
stmt = con.createStatement();
! rs = stmt.executeQuery( "SELECT id, metadataFieldId, metadataValue, systemId, uiLabels FROM vocab_values "
! + "WHERE retiredDate = '';" );
while ( rs.next() ) {
+ String sqlId = rs.getString( "id" );
String fieldId = rs.getString( "metadataFieldId" );
+ String metaValue = rs.getString( "metadataValue" );
String valueId = rs.getString( "systemId" );
String dbLabels = rs.getString( "uiLabels" );
String xmlLabels = concatUiSystemLabels( fieldId, valueId, uiSystems, uiLabelOfSystemIds );
! if ( dbLabels == null ) {
! Statement updateStmt = con.createStatement();
! updateStmt.executeQuery( "UPDATE vocab_values SET uiLabels='" + stringUtil.escapeQuotes( xmlLabels )
! + "' WHERE id='" + sqlId + "'" );
}
else if ( !xmlLabels.equals( dbLabels ) ) {
+ Statement updateStmt = con.createStatement();
+ // Retire old UI labels:
+ updateStmt.executeQuery( "UPDATE vocab_values SET retiredDate=NOW() WHERE id='" + sqlId + "'" );
+ // Insert new UI labels:
+ updateStmt.executeQuery( "INSERT INTO vocab_values (metadataFieldId, metadataValue, systemId, uiLabels, createdDate, retiredDate) "
+ + "VALUES ('" + fieldId + "', '" + metaValue + "', '" + valueId + "', '" + stringUtil.escapeQuotes( xmlLabels )
+ + "', NOW(), '')" );
}
}
***************
*** 299,303 ****
}
catch ( Exception e ) {
! System.out.println( "SQL error:\n" );
e.printStackTrace();
}
--- 315,319 ----
}
catch ( Exception e ) {
! vocab.reportError( "SQL error" );
e.printStackTrace();
}
***************
*** 306,310 ****
/**
! * Description of the Method
*
*@param fieldId
--- 322,327 ----
/**
! * Concatenate UI labels (system=label, seperated by \n, sorted alphabetically
! * by system name)
*
*@param fieldId
***************
*** 322,331 ****
Iterator i = s.iterator();
while ( i.hasNext() ) {
! String str = (String)i.next();
! ret.append( str + "=" + uiLabelOfSystemIds.get( str + fieldId + valueId ) + "\n" );
! //String[] keys = (String[])( s.toArray() );
! //for ( int i = 0; i < keys.length; i++ ) {
! // ret.append( keys[i] + "=" + uiLabelOfSystemIds.get( keys[i] + fieldId + valueId ) + "\n" );
! //}
}
return ret.toString();
--- 339,347 ----
Iterator i = s.iterator();
while ( i.hasNext() ) {
! String system = (String)i.next();
! String label = (String)uiLabelOfSystemIds.get( system + fieldId + valueId );
! if ( label != null ) {
! ret.append( system + "=" + label + "\n" );
! }
}
return ret.toString();
***************
*** 338,347 ****
*
*@param id
- *@param uiSystemLabels
*@param metadataName
*@return
*/
! public boolean checkVocabValue( String id, String metadataName, HashMap uiSystemLabels ) {
if ( usingDatabase ) {
}
return true;
--- 354,371 ----
*
*@param id
*@param metadataName
*@return
*/
! public boolean checkVocabValue( String metadataName, String id ) {
if ( usingDatabase ) {
+ try {
+ stmt = con.createStatement();
+ rs = stmt.executeQuery( "SELECT id" );
+ stmt.close();
+ }
+ catch ( Exception e ) {
+ vocab.reportError( "SQL error" );
+ e.printStackTrace();
+ }
}
return true;
Index: MetadataVocab.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/MetadataVocab.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -r1.22 -r1.23
*** MetadataVocab.java 21 Mar 2003 22:31:40 -0000 1.22
--- MetadataVocab.java 24 Mar 2003 21:30:18 -0000 1.23
***************
*** 31,34 ****
--- 31,36 ----
* -Check process of vocab/index updating (make sure vocab changes are reflected properly in index)
* -Database indexing (for faster queries)
+ * -Improve XML parsing of attributes so that their order doesn't matter
+ * -XML Validation
* -Add support for rendering vocab definitions
* -Test with Schema instead of DTD (SHOULDN'T make a difference)
***************
*** 96,100 ****
String sqlUser,
String sqlPassword ) {
! tracker = new DLESEMetadataVocabTracker( sqlDriver, sqlURL, sqlUser, sqlPassword );
}
--- 98,102 ----
String sqlUser,
String sqlPassword ) {
! tracker = new DLESEMetadataVocabTracker( this, sqlDriver, sqlURL, sqlUser, sqlPassword );
}
***************
*** 122,133 ****
*@param field
*@param value
! *@return The fieldValueSystemID value
*/
public String getFieldValueSystemID( String field,
! String value ) {
String ret = (String)fieldValueSystemID.get( field + value );
if ( ret == null ) {
! reportWarning( "getFieldValueSystemID is NULL for field/value pair " + field + "/" + value );
! ret = " ";
}
return ret;
--- 124,137 ----
*@param field
*@param value
! *@exception Exception
! *@return The fieldValueSystemID value
*/
public String getFieldValueSystemID( String field,
! String value ) throws Exception {
String ret = (String)fieldValueSystemID.get( field + value );
if ( ret == null ) {
! String err = "getFieldValueSystemID is NULL for field/value pair " + field + "/" + value;
! reportError( err );
! throw new Exception( err );
}
return ret;
***************
*** 138,148 ****
*
*@param field
! *@return The fieldSystemID value
*/
! public String getFieldSystemID( String field ) {
String ret = (String)fieldSystemID.get( field );
if ( ret == null ) {
! reportError( "getFieldSystemID is NULL for field " + field );
! ret = " ";
}
return ret;
--- 142,154 ----
*
*@param field
! *@exception Exception
! *@return The fieldSystemID value
*/
! public String getFieldSystemID( String field ) throws Exception {
String ret = (String)fieldSystemID.get( field );
if ( ret == null ) {
! String err = "getFieldSystemID is NULL for field " + field;
! reportError( err );
! throw new Exception( err );
}
return ret;
***************
*** 160,164 ****
String ret = (String)uiLabelOf.get( system + metadataField + metadataValue );
if ( ret == null ) {
! reportWarning( "getUiLabelOf is NULL for (" + system + metadataField + metadataValue + ")" );
ret = " ";
}
--- 166,170 ----
String ret = (String)uiLabelOf.get( system + metadataField + metadataValue );
if ( ret == null ) {
! reportError( "getUiLabelOf is NULL for (" + system + metadataField + metadataValue + ")" );
ret = " ";
}
***************
*** 177,181 ****
String ret = (String)uiLabelOfSystemIds.get( system + systemFieldID + systemValueID );
if ( ret == null ) {
! reportWarning( "getUiLabelOfSystemIds is NULL for (" + system + systemFieldID + systemValueID + ")" );
ret = " ";
}
--- 183,187 ----
String ret = (String)uiLabelOfSystemIds.get( system + systemFieldID + systemValueID );
if ( ret == null ) {
! reportError( "getUiLabelOfSystemIds is NULL for (" + system + systemFieldID + systemValueID + ")" );
ret = " ";
}
***************
*** 588,592 ****
ret.append( EMPTY_ROW );
}
! String a_href = "<a href='" + LINK_URL + "?" + getFieldSystemID( name ) + "=" + node.name + "'>";
ret.append( "<tr><td background='" + imgPrefix + "images/hist_back.gif' align='right' width='25%'><b><i>" )
.append( "<span class='histogramSubHeader'>" )
--- 594,604 ----
ret.append( EMPTY_ROW );
}
! String a_href = "";
! try {
! a_href = "<a href='" + LINK_URL + "?" + getFieldSystemID( name ) + "=" + node.name + "'>";
! }
! catch ( Exception e ) {
! reportError( e.getMessage() );
! }
ret.append( "<tr><td background='" + imgPrefix + "images/hist_back.gif' align='right' width='25%'><b><i>" )
.append( "<span class='histogramSubHeader'>" )
***************
*** 608,612 ****
perc++;
}
! String a_href = "<a href='" + LINK_URL + "?" + getFieldSystemID( name ) + "=" + node.id + "' class='histogramLabels'>";
ret.append( "<tr><td background='" + imgPrefix + "images/hist_back.gif' align='right' width='25%' height='8'>" )
.append( a_href )
--- 620,630 ----
perc++;
}
! String a_href = "";
! try {
! a_href = "<a href='" + LINK_URL + "?" + getFieldSystemID( name ) + "=" + node.id + "' class='histogramLabels'>";
! }
! catch ( Exception e ) {
! reportError( e.getMessage() );
! }
ret.append( "<tr><td background='" + imgPrefix + "images/hist_back.gif' align='right' width='25%' height='8'>" )
.append( a_href )
***************
*** 656,666 ****
VocabNode node = (VocabNode)list.item.get( i );
if ( node.list.item.size() > 0 ) {
! luceneQuery.put( getFieldSystemID( groupTop ) + "=" + node.name, subQuery( node.list, groupTop ) );
luceneQueries( node.list, groupTop );
}
else {
! luceneQuery.put( getFieldSystemID( groupTop ) + "=" + getFieldValueSystemID( groupTop, node.name ), " "
! + getFieldSystemID( groupTop ) + ":\""
! + getFieldValueSystemID( groupTop, node.name ) + "\"" );
}
}
--- 674,694 ----
VocabNode node = (VocabNode)list.item.get( i );
if ( node.list.item.size() > 0 ) {
! try {
! luceneQuery.put( getFieldSystemID( groupTop ) + "=" + node.name, subQuery( node.list, groupTop ) );
! }
! catch ( Exception e ) {
! reportError( e.getMessage() );
! }
luceneQueries( node.list, groupTop );
}
else {
! try {
! luceneQuery.put( getFieldSystemID( groupTop ) + "=" + getFieldValueSystemID( groupTop, node.name ), " "
! + getFieldSystemID( groupTop ) + ":\""
! + getFieldValueSystemID( groupTop, node.name ) + "\"" );
! }
! catch ( Exception e ) {
! reportError( e.getMessage() );
! }
}
}
***************
*** 710,718 ****
}
else {
! ret.append( " " )
! .append( getFieldSystemID( name ) )
! .append( ":\"" )
! .append( getFieldValueSystemID( name, node.name ) )
! .append( "\"" );
}
}
--- 738,751 ----
}
else {
! try {
! ret.append( " " )
! .append( getFieldSystemID( name ) )
! .append( ":\"" )
! .append( getFieldValueSystemID( name, node.name ) )
! .append( "\"" );
! }
! catch ( Exception e ) {
! reportError( e.getMessage() );
! }
}
}
***************
*** 769,779 ****
VocabNode node = (VocabNode)list.item.get( i );
if ( node.list.item.size() > 0 ) {
! String subQuery = (String)luceneQuery.get( getFieldSystemID( name )
! + "=" + node.name );
ret = browser.numDocs( addQuery + " +(" + subQuery + ")" );
}
else {
! ret = browser.numDocs( addQuery + " +" + getFieldSystemID( name )
! + ":\"" + getFieldValueSystemID( name, node.name ) + "\"" );
}
histogramTotals.put( name + node.name, new Integer( ret ) );
--- 802,823 ----
VocabNode node = (VocabNode)list.item.get( i );
if ( node.list.item.size() > 0 ) {
! String subQuery = "";
! try {
! subQuery = (String)luceneQuery.get( getFieldSystemID( name )
! + "=" + node.name );
! }
! catch ( Exception e ) {
! reportError( e.getMessage() );
! }
ret = browser.numDocs( addQuery + " +(" + subQuery + ")" );
}
else {
! try {
! ret = browser.numDocs( addQuery + " +" + getFieldSystemID( name )
! + ":\"" + getFieldValueSystemID( name, node.name ) + "\"" );
! }
! catch ( Exception e ) {
! reportError( e.getMessage() );
! }
}
histogramTotals.put( name + node.name, new Integer( ret ) );
***************
*** 1175,1179 ****
*/
public void endDocument() throws SAXException {
! reportMessage( "Vocabulary loaded: " + xmlFile );
if ( rewriteXML ) {
try {
--- 1219,1223 ----
*/
public void endDocument() throws SAXException {
! reportMessage( "Loaded file: " + xmlFile );
if ( rewriteXML ) {
try {
***************
*** 1366,1378 ****
public void reportMessage( String msg ) {
messages.add( msg );
- }
-
- /**
- * Log a warning
- *
- *@param warning
- */
- public void reportWarning( String warning ) {
- System.out.println( "Warning: " + warning );
}
--- 1410,1413 ----
Index: MetadataVocabTracker.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/MetadataVocabTracker.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** MetadataVocabTracker.java 21 Mar 2003 22:31:40 -0000 1.3
--- MetadataVocabTracker.java 24 Mar 2003 21:30:18 -0000 1.4
***************
*** 37,49 ****
/**
* Check the values found in the current XML against a database for
! * consisitency (make sure that the id/metadataName pari match previously
! * registered values) and register any changes found in the UI labels
*
- *@param id
- *@param uiSystemLabels
*@param metadataName
*@return
*/
! public boolean checkVocabValue( String id, String metadataName, HashMap uiSystemLabels );
/**
--- 37,48 ----
/**
* Check the values found in the current XML against a database for
! * consisitency (make sure that the id/metadataName pair match previously
! * registered values)
*
*@param metadataName
+ *@param id
*@return
*/
! public boolean checkVocabValue( String metadataName, String id );
/**
|
|
From: C. R. D. <rya...@us...> - 2003-03-24 21:30:24
|
Update of /cvsroot/dlese/vocab-project/build_lib In directory sc8-pr-cvs1:/tmp/cvs-serv3810/build_lib Modified Files: DLESETools.jar Log Message: Vocab label changes registerd in DB + improved error handling (exceptions thrown when IDs not found) Index: DLESETools.jar =================================================================== RCS file: /cvsroot/dlese/vocab-project/build_lib/DLESETools.jar,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 Binary files /tmp/cvsg8sskC and /tmp/cvsi284E7 differ |
|
From: C. R. D. <rya...@us...> - 2003-03-21 22:43:48
|
Update of /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab
In directory sc8-pr-cvs1:/tmp/cvs-serv29925/src/org/dlese/dpc/vocab
Modified Files:
DLESEMetadataVocabTracker.java MetadataVocab.java
MetadataVocabTracker.java
Log Message:
First steps toward registering UI label changes
Index: DLESEMetadataVocabTracker.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/DLESEMetadataVocabTracker.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** DLESEMetadataVocabTracker.java 21 Mar 2003 02:36:46 -0000 1.3
--- DLESEMetadataVocabTracker.java 21 Mar 2003 22:31:40 -0000 1.4
***************
*** 22,26 ****
* DLESE metadata vocabulary tracker (ID assignment, tracking of changes)
*
! * @author Ryan Deardorff
*/
public class DLESEMetadataVocabTracker implements MetadataVocabTracker {
--- 22,26 ----
* DLESE metadata vocabulary tracker (ID assignment, tracking of changes)
*
! *@author Ryan Deardorff
*/
public class DLESEMetadataVocabTracker implements MetadataVocabTracker {
***************
*** 33,40 ****
* Constructor for the DLESEMetadataVocabTracker object
*
! * @param sqlDriver
! * @param sqlURL
! * @param sqlUser
! * @param sqlPassword
*/
public DLESEMetadataVocabTracker( String sqlDriver,
--- 33,40 ----
* Constructor for the DLESEMetadataVocabTracker object
*
! *@param sqlDriver
! *@param sqlURL
! *@param sqlUser
! *@param sqlPassword
*/
public DLESEMetadataVocabTracker( String sqlDriver,
***************
*** 46,49 ****
--- 46,51 ----
usingDatabase = true;
try {
+ System.out.println( "SQL Driver: " + sqlDriver );
+ System.out.println( "SQL URL: " + sqlURL );
Class.forName( sqlDriver ).newInstance();
con = DriverManager.getConnection( sqlURL + "?user=" + sqlUser + "&password=" + sqlPassword );
***************
*** 97,101 ****
stmt = con.createStatement();
stmt.executeQuery( "CREATE TABLE vocab_values (id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, "
! + "metadataField CHAR(16), metadataValue CHAR(255), systemId CHAR(6));" );
stmt.close();
}
--- 99,104 ----
stmt = con.createStatement();
stmt.executeQuery( "CREATE TABLE vocab_values (id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, "
! + "metadataFieldId CHAR(16), metadataValue CHAR(255), systemId CHAR(6), uiLabels TEXT, "
! + "createdDate DATETIME, retiredDate DATETIME);" );
stmt.close();
}
***************
*** 110,121 ****
* with 0, so that Lucene * queries will be possible.
*
! * @param metadataValue
! * @param metadataFieldId
! * @return
*/
public String assignNewSystemId( String metadataFieldId, String metadataValue ) {
if ( usingDatabase ) {
StringBuffer highestId = new StringBuffer( getHighestId( metadataFieldId ) );
! if ( highestId.toString().equals( "-1" ) ) { // No ID existed yet, so "00" was registered
return "00";
}
--- 113,124 ----
* with 0, so that Lucene * queries will be possible.
*
! *@param metadataValue
! *@param metadataFieldId
! *@return
*/
public String assignNewSystemId( String metadataFieldId, String metadataValue ) {
if ( usingDatabase ) {
StringBuffer highestId = new StringBuffer( getHighestId( metadataFieldId ) );
! if ( highestId.toString().equals( "-1" ) ) { // No ID existed yet, so "00" was registered
return "00";
}
***************
*** 148,153 ****
* Gets the highestId attribute of the DLESEMetadataVocabTracker object
*
! * @param metadataFieldSystemId
! * @return The highestId value
*/
private String getHighestId( String metadataFieldSystemId ) {
--- 151,156 ----
* Gets the highestId attribute of the DLESEMetadataVocabTracker object
*
! *@param metadataFieldSystemId
! *@return The highestId value
*/
private String getHighestId( String metadataFieldSystemId ) {
***************
*** 200,205 ****
* Sets the highestId attribute of the DLESEMetadataVocabTracker object
*
! * @param metadataFieldSystemId The new highestId value
! * @param newHighest The new highestId value
*/
private void setHighestId( String metadataFieldSystemId, String newHighest ) {
--- 203,208 ----
* Sets the highestId attribute of the DLESEMetadataVocabTracker object
*
! *@param metadataFieldSystemId The new highestId value
! *@param newHighest The new highestId value
*/
private void setHighestId( String metadataFieldSystemId, String newHighest ) {
***************
*** 226,230 ****
* Description
*
! * @param metadataFieldSystemId
*/
private void createVocabFieldsTable( String metadataFieldSystemId ) {
--- 229,233 ----
* Description
*
! *@param metadataFieldSystemId
*/
private void createVocabFieldsTable( String metadataFieldSystemId ) {
***************
*** 248,260 ****
* system ID
*
! * @param systemId
! * @param metadataField
! * @param metadataValue
*/
private void insertNewIdIntoValuesTable( String metadataField, String metadataValue, String systemId ) {
try {
stmt = con.createStatement();
! stmt.executeQuery( "INSERT INTO vocab_values (metadataField, metadataValue, systemId) "
! + "VALUES ('" + metadataField + "', '" + metadataValue + "', '" + systemId + "');" );
stmt.close();
}
--- 251,263 ----
* system ID
*
! *@param systemId
! *@param metadataField
! *@param metadataValue
*/
private void insertNewIdIntoValuesTable( String metadataField, String metadataValue, String systemId ) {
try {
stmt = con.createStatement();
! stmt.executeQuery( "INSERT INTO vocab_values (metadataFieldId, metadataValue, systemId, createdDate) "
! + "VALUES ('" + metadataField + "', '" + metadataValue + "', '" + systemId + "', NOW());" );
stmt.close();
}
***************
*** 266,277 ****
/**
* Check the values found in the current XML against a database for
! * consisitency (make sure that the id/metadataName pari match previously
! * registered values) and register any changes found in the UI labels
*
! * @param id
! * @param uiSystemLabels
! * @param metadataName
! * @return
*/
public boolean checkVocabValue( String id, String metadataName, HashMap uiSystemLabels ) {
--- 269,344 ----
/**
+ * Step through all of the current (non-retired) values in the vocab_values
+ * table and examine the UI labels, comparing what is in the DB with what was
+ * just loaded from the XML
+ *
+ *@param uiSystems
+ *@param uiLabelOfSystemIds
+ */
+ public void registerUiLabels( HashMap uiSystems,
+ HashMap uiLabelOfSystemIds ) {
+ if ( usingDatabase ) {
+ try {
+ stmt = con.createStatement();
+ System.out.println( "registerUiLabels" );
+ rs = stmt.executeQuery( "SELECT metadataFieldId, systemId, uiLabels FROM vocab_values;" );
+ // + "WHERE retiredDate = 'NULL';" );
+ while ( rs.next() ) {
+ String fieldId = rs.getString( "metadataFieldId" );
+ String valueId = rs.getString( "systemId" );
+ String dbLabels = rs.getString( "uiLabels" );
+ String xmlLabels = concatUiSystemLabels( fieldId, valueId, uiSystems, uiLabelOfSystemIds );
+ System.out.println( "dbLabels = '" + dbLabels + "'" );
+ if ( dbLabels == null || dbLabels.equals( "NULL" ) ) {
+ System.out.println( xmlLabels );
+ }
+ else if ( !xmlLabels.equals( dbLabels ) ) {
+ }
+ }
+ stmt.close();
+ }
+ catch ( Exception e ) {
+ System.out.println( "SQL error:\n" );
+ e.printStackTrace();
+ }
+ }
+ }
+
+ /**
+ * Description of the Method
+ *
+ *@param fieldId
+ *@param valueId
+ *@param uiSystems
+ *@param uiLabelOfSystemIds
+ */
+ private String concatUiSystemLabels( String fieldId,
+ String valueId,
+ HashMap uiSystems,
+ HashMap uiLabelOfSystemIds ) {
+ StringBuffer ret = new StringBuffer();
+ TreeMap sortedUiSystems = new TreeMap( uiSystems );
+ Set s = sortedUiSystems.keySet();
+ Iterator i = s.iterator();
+ while ( i.hasNext() ) {
+ String str = (String)i.next();
+ ret.append( str + "=" + uiLabelOfSystemIds.get( str + fieldId + valueId ) + "\n" );
+ //String[] keys = (String[])( s.toArray() );
+ //for ( int i = 0; i < keys.length; i++ ) {
+ // ret.append( keys[i] + "=" + uiLabelOfSystemIds.get( keys[i] + fieldId + valueId ) + "\n" );
+ //}
+ }
+ return ret.toString();
+ }
+
+ /**
* Check the values found in the current XML against a database for
! * consisitency (make sure that the id/metadataName pair match previously
! * registered values)
*
! *@param id
! *@param uiSystemLabels
! *@param metadataName
! *@return
*/
public boolean checkVocabValue( String id, String metadataName, HashMap uiSystemLabels ) {
Index: MetadataVocab.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/MetadataVocab.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -r1.21 -r1.22
*** MetadataVocab.java 21 Mar 2003 02:36:46 -0000 1.21
--- MetadataVocab.java 21 Mar 2003 22:31:40 -0000 1.22
***************
*** 25,38 ****
/*
! TO DO:
! -MySQL database error-checking of values
! -Add email notification to error handler
! -Database registration of UI values that have changed
! -Check process of vocab/index updating (make sure vocab changes are reflected properly in index)
! -Database indexing (for faster queries)
! -Add support for rendering vocab definitions
! -Test with Schema instead of DTD (SHOULDN'T make a difference)
[...1361 lines suppressed...]
public void reportWarning( String warning ) {
--- 1371,1375 ----
* Log a warning
*
! *@param warning
*/
public void reportWarning( String warning ) {
***************
*** 1377,1381 ****
* Log an error
*
! * @param err
*/
public void reportError( String err ) {
--- 1380,1384 ----
* Log an error
*
! *@param err
*/
public void reportError( String err ) {
Index: MetadataVocabTracker.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/MetadataVocabTracker.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** MetadataVocabTracker.java 21 Mar 2003 02:36:46 -0000 1.2
--- MetadataVocabTracker.java 21 Mar 2003 22:31:40 -0000 1.3
***************
*** 22,26 ****
* in metadata names and UI labels, and ensuring consistency of all three
*
! * @author Ryan Deardorff
*/
public interface MetadataVocabTracker {
--- 22,26 ----
* in metadata names and UI labels, and ensuring consistency of all three
*
! *@author Ryan Deardorff
*/
public interface MetadataVocabTracker {
***************
*** 29,35 ****
* Assign a unique system ID for a new vocabulary value
*
! * @param metadataName
! * @param metadataValue
! * @return
*/
public String assignNewSystemId( String metadataName, String metadataValue );
--- 29,35 ----
* Assign a unique system ID for a new vocabulary value
*
! *@param metadataName
! *@param metadataValue
! *@return
*/
public String assignNewSystemId( String metadataName, String metadataValue );
***************
*** 40,49 ****
* registered values) and register any changes found in the UI labels
*
! * @param id
! * @param uiSystemLabels
! * @param metadataName
! * @return
*/
public boolean checkVocabValue( String id, String metadataName, HashMap uiSystemLabels );
/**
--- 40,57 ----
* registered values) and register any changes found in the UI labels
*
! *@param id
! *@param uiSystemLabels
! *@param metadataName
! *@return
*/
public boolean checkVocabValue( String id, String metadataName, HashMap uiSystemLabels );
+
+ /**
+ * Register the current state of UI labels
+ *
+ *@param uiSystems
+ *@param uiLabelOfSystemIds
+ */
+ public void registerUiLabels( HashMap uiSystems, HashMap uiLabelOfSystemIds );
/**
|
|
From: C. R. D. <rya...@us...> - 2003-03-21 02:38:28
|
Update of /cvsroot/dlese/vocab-project/build_lib
In directory sc8-pr-cvs1:/tmp/cvs-serv3105/build_lib
Added Files:
mm.mysql-2.0.2-bin.jar
Log Message:
Added MySQL JDBC driver
--- NEW FILE ---
PK
vÔ:âñÀ¦Íºáõ<ÙÒ1µ¢s·ÅqÝpµTÝC«jò\nj)/Ìùè.íoä*ÈàªH¼àøtÞâ®&=2º4ôҴ椰ÎF?o{°îèéÑ@S0./¡¹³=J»f7
Ì`Ë[é5éK2°ò«;[ZôØd©Û
htâRÌtbfËa¾¦cÜ]ªá)'Æ3NÔb¹urX+¸RPíĵXãÄj¹¼×o¶URγ,ND±ÅÍh<Ã29;$06}¦&Ò[¡±ÖÎv=O9-ذD`qå¾`/µê1_|S ì©
"ÛôæQ£%i÷uè±äi[±î´ø8çäð<Õ×(îĬøÛ4uâ^pâ83§8q N|N:q
mô¼ÿ¤yE9;
Þ
DáXkek[¼²½½²½»cK¨2>Ã_+Ûô&FÞxE
F*Wón£ÑH¾8Üi¦ÑÉôtwG\ogÌd¾5E¢fÈ¢gÕ@RFcA2fEEµL>{ eI(£É°yíaò~þ®#IæSAFãz«ôN~<²LïJgÜ
2ÄɦÚÉ6t
o¢:BT²iëù
¨² UÖ/³0/°óp
yµÈCDÞNäa"ýIôb=yrùûµ ïG±õ£ØûQ´~G/d¸@óº]
kÅ.WWÛºNRÜVn«ki6f#Íæ¶¹íæÚ®xìR[3i¢iJä9Í!e¹|]~ =.úµ~½~½¾¼Q{#l³¯ÇvÜ
éç©Ø=`æJ¤ûØú¬Ë&¨¸ÊT5\ÚïJúDÇ!ùrpÊaPÏ¡O±Qï&è=,¾÷RÉýØØ{¡ã!É>^
ëïVJt-ÿ>åßgü+VuDz FTs§çßξkgÖzÐált*wò½×`Xô8KãA|O°¢>Iô½´è)ñgqûêÿÏ
þÒ%hÑ)Zô"-:MôghÑYZô-ú>-Z²èǦE{.`Ñú,ÊÔ#\FyCþ×·ô
mz6½Æ@~iñ3Ò7°¿À-x6]Åä1l*æW¿z\G²Þ·Éº6ÅZËæûÈZ0¿fܳ6q¤$_ÍrÖqÄ_Ò@aZÊ(ÊÞ¥ÛþAxCð>Üø
û;TuX¢&M&.EIÓfÁÅù1ù&ª1O,"Ì!Ê%ld(K
¶(RíÒ´S(*ÀgA³2q,Y}¨¡
kŸZÆfq¡õ=t¿#Yr®!zO-2ér\ÐËÜ^üÀSeµTÙz¡t»¬j¥3í#í L²>IøD|¦ýÊÌ
E+,76¨Øa;lÂms9ö?J¶ÂÉ$Zªì½lTÝvùb9Ýþ8.J2{¨Ì×|)e-Ä»]øþó ¸xE{÷gá ´
¶¯ÉãyyÞmðKSånÃGIó<Ui[SöMMÎià¾z5áÖÇ
ÓWþ&rúCä;?ásü
Ͳ0¾Ê¢ø*ÄëX(Þ`eù9Ho¿DLü
]âר%ÞÂñ¿ÅÒ^¿Ãkñ¦ø=Þïàmñ¼/ÞÅGâBï1âÏb¼xGLéâ/b¿5â¯âJñ7±Fü]DÄGbøXìåúIñqH|ÂЧ»UÇ
ËÙL²EîMH¤âr&ݰz³<¥ér"0Jr´°ÊFÏ(§ÔJ©1Ó@¨*`µ´.ÛL<["´¡qKßQåÒTRñÖΤb;IúìàÄQS6uR§=2«Ê$¡7äÐÆñdkb*¡ö«¦Âs¢¯-¦ßÖ7®è)[à%S1Õ5Å
Îc<PßqÕf~_fjJÕê%*¨hD",¥·1R*¤OÓãñ£fëÌLëÌ,+áìß²"
%ßÊ75zÎÕõn¤ÑÍ.øÿHÇò&7¼ï®¿,ƼÉm+³³k:dRHªÅü?¶ÐÕ´¢«Å[ßxËjdæ°º¢ÆVÀâDsÁß±¡Õ
q~?ÃÈ ½õ2w«{ÄmÏå¤c§}µZÊ-%H¬|DÆL°Ãµ´ª ÕØérðe¨Ò¥SÒ-/ßêzÖopßì"Ì=¸£+árúå»ÎÛxÅã:¢E²9ꪬÈý³TdCÕÉpYϤ¸jÉZéTccÓÚÖtSÕ22e³lê³Ìbj²SiºGn$Ùmåm7·µmuÆmÎx5ÛøámÄ4§*vqÑ¿AÎÝ/Ù ÛÂÅS)tZ3ÕIªñ:ÔfS#=30åÓjJV2¦f¯wzFE¸yoA¿¥VuäNmxk
.láÐûBÒ!e)IFÏ5ºuÞÉÇI>QõÙ°<RO¥i«:)w©iÁO?¿¢× ùY$j\IÊT
Õ$6ÓKèV³ê²y¿bLìÂW÷id÷¢'Ar+&/Âotµ7õiFÞ5 ´óK±yä~%Ií7:ÔÇï¶½8¦ê'&'i9¤äm-7lkÙº]Ô
Q£1u%e(1Ç´drB
bÚäHÄAG¢Hs´Yc'âpw_wçLIS3Ü=RqrÍðþÁqy¬c(Ò±¯¯{¡sØ6§ÈÆ)%ÌPî:©Õ"û;X3MJè¹6£8¬eôÚHRxGF»©6ÒÒ5ëSO¨IúEÆ[9ëî&a+y¬¦4q¨©6É
s*¸/ë,xÞíPÉÑý4ê¢A¦ôÏÚ±¦ûCsemô@d 7Ú9Øßß1ÐÅL¨û9©éÔEm¥OytÔàýQöe§åK^MjÑL*³®F :OG)t3É9˲.-jæÚ4_4atZQ¤TR_¥ªT'£iµJ5V/jâ|6Æjàêòó(¹&g9hJ5£Vá&ÕTÜf¥Ù¼²ÁTô©f5:¥f4mùÊ£LÄÈ/J:¦HPÛoé°¼÷î%UEw:6v$$æø¥ºJå(BJ"e¼IåécªêIO½Ê?ú,?£ë4³I«Ï(I:HPO©1ºRÔVó,cª·ÙwÏg·Uì(
Hë}³&ÇÏOÓNʤ·ñV³KªÐ´`Ø*Zõ+§:ìpp¢Á{ûí¾ÜÞkcmIý¤Æ)Ò¦T(<£`ô9±à}ÎsKúÖÓÊα~娦;b >*Â7äñÃ¥¤Ú<)ò1ʪÔgÓ¼èæ/!y(ÖU`Íì¦Y!¬Þ»êå3ª©%k±Îþ1OµÕViNhÝ=ùONΡ¬§ªÌ \ÃÝü\`6×,û¸gaøê
ØHÊTãlÝÆ¥8]Ϥù¦+ Uï¡r®EµËûî%¨Ï׸÷ÌKyg
J÷%¨\º¯ZÒNr Êa610Å¡J¼ôYÌEdYëG+¾$¿ÓVí¬Zö1RȬvfùâãVÃ|)ʳªu[ë\ºb«HiÚ$e˺7hÖÈ¥¥¯·:áü^áY§WÝýQïR§È^|·}ù¾ÐXT·DêW5âLs¯IeÚþXÃ
ÅÛYm«IÛG75Fqò¤ù^yg¬*¦;]
¼ä"®e\Iøsßu;e´®ð|Ê¡Æû^)h^Ûç¡&ô<ì=ØthZ¿
Ì9ǧ߰
°k8w0Y¸;ìËë³#~²^§Öº£`ùKá
ç*èRÕÂ
°®U7<NÿwÂð|vÃϨÛÃMÖØKáä±è><§Úëå®!_ÒcóXów<mÿNIWòáy:O^íE»ê¼=Ç¡Rê»rÜ{ÞáZã¾G|%·å8ÞEwóÅbBÅ)~Á¡?I%¤Ô¸½ùÇLòù.W'çLTà\ÈsäÃyíÉ9Õc®äéÜÙuyË;¯ÏPè"°Koô#êµyåöâ(#!zë§xʸY©ÛÜx¸òp¯K½µZ
£ÔîJ³®·*ÎÿPK¸RÒ¥Å
¥
8P ë+Ú×Ò>ºÑRºï-¿sf¹ºZ.¸ð{<ïÌ|ç;gÎ9sf±ùôg?÷yâ +ѳ8à Oÿ2O8^sàÀ¿ðsÑQF£Æ3`tÑYF/ft7£{}9£¯`ô¾ÑW3úF/aôµ^Êèë}=£o`ô¾Ñ73úFßÊèÛ};£ï`ô¾Ñ˽Ñw3úFßÇèûý
x
x¶8[PÔÜK±b
ñ3Û¬xét~vâg~ò^úýªW;~ß«èw½ÚaZW[J·yµ#év¯v4ÝëÕ
fÚq4ëÕ§¼ÚIt³W[E§¼Újz¡W[Cwxµ>z~ÎÇOΫõÓ^íll1IǽZnôjâgMyµ<=?W»¼Z±Yüì¡^m/~^mß÷`³+è¤W»?W!öA¤|&½Ú±ÙµXüVÜLË^í.½À«=µOϹJh7%îîád"½;Ûetðñðé2JËG(Y¼lyôÂÌÅùLaÇÊĶ©Êúz8U)å
;
êM'#1PTO¤"éH"L@iÕc2<!Ãn
'A^22²PÞ855)_xK05>
7¶g (ÿ
÷L3è#eá=TûÀë1ª ùçÐðÐ$ÊL
°¿¶áÑZ''!|À£J¢²MSÂ1Ð`xTÖ¸ ^bßg fâa:V¹¬
çS²Q(#D#éâàëÓIMòV!nV(ÆÇ£QQÒGÃ`Ü@5`0øÊáVë±p8 ÆÂ-@
<£Ü·¥2,Ààov`n§2ùMR.³-o8èÖ ÚÀ¬Hl<¦LîQLôÕb4$FâVâÒX¦´«;©Tv»Ë'vÇö¦6F»J¹ak'@fWw<²qb±DPX7x!'fw¬-ؤX-ä.ÂØáÏæóà 'Õ>Ý
FÂà¯mcu2Vã(cµ2Vç(cÊQZ,íKF°¶ù¼.² ¢ùLƲöjY:OX(2¾¥ÂãCI¡7EÜ a§ÃJÂØ\©Õ«VÃTÒ
ð¤ ,A¼àD5ts·µÐÚÇîËêÆËR°Ô£bRa&-Ô'Ë<?xSÆE¹ü5ö`¯ÅÙÒ1ËÃĸä"h±Ûc5uk¡eÙ<PCS¶@±t$>!<OǬؽŲ\iôr¸ó´»P¬tg©Üö= [ìZ¿Úe'CiØøÆqhãÁX6}· ®í 47>ÇVüâSk×ô=©Ìì$ït2TØ[Á¥æÉd³á<¿±Srh&+§ìlÉ(JÆ
ÜÛr;r(Ź-_ܹm6Ï[À§vfpqMå¨KËTqz&S2ÒEÐkªdd*ùx@ÉñYP¢09aÑffËF9]ÊÊÓÓ9à[Ëì(KF6R°Pa,kÀ YC F%±MÏõ§3°FËr,³'YÜʽܦò³Yc
¼ÍÄEç>³lR:
ï)*Fö¬²PoÖØfüÔ
2ß&êä"3§¦vÓ+Q*mF
ûêð²Iåê[E,¶àÃ/5#ÁŤNbÕÄñÍ275<[PfÀ«hf^8É"ÈqëÉgEÅRm³BRÄ
²»XÊAXA4ðe9Â)Míþ.Oep£x©érxÍrò¸ µ $ßÌ[ÆÌÁ½e°vÈíj)m
Ä]¬,D§å©Ö5,rÐèÈ®®±ñ$!0SÆ Ø*sbù£·IÍMcwìÌc÷Ãf`nHº¸Ë@Î
åÇYó¢
|úeEÅØSAn÷~ÏHÏÞÄÌYàÕG¤,qí`48ÙågËpÜÇC~¤,úçç$¾*a<uÕ£ÒËüµøÜ©µ`´¸|µ Ü^r=¢äèÚÆ?¤#ï>K¿o[4TÄð{=n«Í+#fí,¾ÆàdS6ø¦êÆóBl´Èå58e$·ñÀR¨¿¼³¸»{JDîí¥â4Ü:8¸B³B¼áÇÕ2^ ÊpÖËs78¬îdÁºFiìS=Àºë*ùY![Cíc¹=Fv¾öfåüíÇá=oÿfeö-åÙme(ggðìRÁÅaÝp¡Gãb#Ï£]µµÃà]?¢ÇhUµq¬?ʬÏC
äs¡lV_T³)c¨TQcET#ôÂX¦UÇÂ&$¾Â«g{ð $s÷©!v7#ª=¦¿Ü´C®}%&%ÏeÊâ°X(Àº©ÔPKh¼Rfz/<[*J×Ȧf·]ÆÄµªz¨æ&*dëT{§Yfm7Mì]¦ÙrÛùé^ìÉJ âÞZ¶¨
§ið=Üd§ÈêոóÁ8,Ã4ÇΫOéìbïΪÂ<½.C½ÅBVΫ/H«QrªâÛj)WÙ.ìÌÀeópf*'ÞwM ÑÜ.Cóx¦Z÷G#kUÔ¬Snzvºé$6_ìÇ4T7]îá/77Ì@h5½ª¬m³ÜkÄüÉó¹Jpôrh
osê|ô¼d1ßÚerªëZAÇTeÎôËúÍ*éMþX±ÌÝßÈ;àM½IÕø¸Ä£§äfq¥ÓVoà4*G5áÕÆÞcÊ!&;üp±¤Æc5
¡?k½,T»6CGA`ÿÌk=ÄÊïÉ+5}Z*#
ùoÍ·Åk¹GÌ4Ì17»ïó-ÎþM8xLWðxA\NjÊ!<L9Å!Í)ÞjZ0)W2Ó3°Wr
½âl§coéMZ+EsóÆ¢:S;+%|íÂ'%þôïcróSk
ñÚ)9)ùù!ÄAø÷FsâAêÁ¿:ômÒ+h¾ÒR¢ýä'=½·_÷o'ÞBðªN'Æíøw=jyÕ(u-V
¦$k)t¬»Èý=·_ÏQº<rsCÖDkÚä5¶t¹Öë£&ëÉjí£WãFg#ý[B¯¶Å:Óyd9ü;Gû²<ÝÔ@M$ïh¤
5¡ÙHÑÒÌѸnÎ3ÐXçPuÏÚ²Â3¶X?°ÅºÓëv[¬ý¬&þð?¶d}ÎkÎë[¬&S«7NѶ²vAZo#mº -ØH+4¡½¬VjBl¤ílB»¦6ÜFi_°5ë_´Åº×ë#¶X÷ÙõûhF°´1_ûæÒO!Kû:|º8ðoh±Ò'!=Ò§dú4Ôß
é32}V¦0%bAß
YÖ°Q¦Nºdê©.S&S¯l¿ÊÐ79Dê´WÍßs8×|~ ]ÉuBW>-Ógdú¬LQ×ë¤× yê©S¦.ºeªËÉÔ+Ó2=W¦çu$×9otÀÿ¿yRGl71ÏÏÖÔY9êgBÊGK }ÜrÜëä¸×Éq¯ã^'ǽNê±Î©Zr¥ýzÙ~½l¿^¶_/Û¯í×ÿÛÇж²ý¨l?*ÛÊö£²ý¨l?*í0*í?*ìÁýÐêñ²µz¾aõß¶X?³µ´%ë;¶d}Û¬ïÙb=l«ÇÚõ#[¬l±¾fõM[ÚßmKÖçmɺÇë»¶X?·¥×·lÉú¾-YÛímzSöh§5¡}¬öj[ªÚDXW£°_Ù²Æol±³Åúµ-Ö£¶X_2Y}°!«GÛt_KºUö²Hdò-¹¸0Ò9źÿ²ÕçWm±¾lõ[¬_ØbýÒë·¶XÛbýÎ#þÞ¬?ØbýÑë~[¬¿ÚbýÍëǶX?±Åú©-Ö#¶X£p{¬M¦(fo¤ùºi&4_#mÌm£=ZÒ¤ù$ÍÙII#/Õ§5á¥MÞÁì;ÞD¹³itJ.iäMØêt³-VÔÞdmi2õ®FZÐÖR?ÇæáØýYò+=ÛÈÜjkçÚÃy6çþ|{®t-Ýþbkþ.eU6ë[²¾nu-Ö¶XY:-Y7Áå_ë|ìòp¿3àtÜEðSÿ+ýä©Ó)W)À%W*À-Û ×¬ð©6jôjÆ
PÃèW9³BT£Õj·®o"¼ÞÓ*KLÄ+]&ÒVkÄë¹Lv-ImµBºÉOû]½÷£{ýtüù*²â.òÀí'?ë#¿£]ý®}äPÑ*|Å}Äí÷ÄEoä;pÁßiô;É_5Òï¸ï$OP²ûÐÍòy{ï#ºcÑ{ç¨ÎG¨«I»ÜçcÖÕ¬]æóvSðn DMÂ¥²4K?£ý-ûÈhÀí¼<ÚxØWÉW
´8¡+àey¿Dç0Àð±ÐVJ®:pKO@0iõ~OÀÓhù4miRéq ¢½Ê
z§
zo«6kÐÛ«PúêÕõÉ*·SBç8ÝÖeѺϴÜIÛ(ù"¹¿ßîÉýh?Æ8/xQ5ÐH§Í¿ô·Úįâ:msäß}íûöùù:ët8Déa¦Ã
±ì´ùSsä)H?8GôûÀÕ;>¿wº´«IWÀç¥9º¨¿VÀ=ÐyõàX¹èäß½qà_¯!í2Içu£8ÿ]ä{¿ß¿ü¢£oñ>²¸kq`Ñmº²wPÖÇΫ<èð¹»=úón6áðJ§öiOP¿èhÙóò®8ìWp§¡Ô_¾ ·Oû ¶PV8¢V¦jìߧž9ºØÿWÿÄúö9Ø »Åùv£ÄÑgö+ö¸À®ØÑ=$°O[±/ì6Øgö)+vÀöY±7
ìV+VØ'%ÖØù»Î2^z¶À¾,±cëØÇ%v(bÇìnõ Ö.°{$v`äI}Â=*°Ï[ú ߨG9¶È¯Á%áÚ·Êe¥£¦ò¢ò&^y4¯Zâ?jüáCÄ+JûËR§õÖ'vÄ!Øgö·LT^o²X`sÓ«uŪwûYËH³t¡±l×ââU«ÓN^ßæ/â²öü÷,µ«yÇÓ㬶êÄ_Uû¯ÞOáþOÎÂzG}}άï>h=
Õy¬åQc¡È«{Åçn"êR쬿XâÉi¸ ÃÙªF¬Fs±¤,ìµ ùÒºC--eiAP©[Z°fgnÿy¸H`áÝK¶ÁÙËwÏ->÷s_äWÈ{<È8/¸²ï+UT½÷3]^ïÑǼ&' Ï;/Ìyi>ö¯n^ÊõÑ}¶>ºWê£{©>ºÇë£ûXCtO4D÷0sf¢®d6u#6u!ÛhÊñawßÿn 3èÅ@¬j Ëó2^o ½Þ@z½ôzéõÒ¤7Ho0Þ` ½Á@zôFéÏe ²z]òm¯K¾©>©#D¯2Ù½Ê:»åa¡WtÒÉ_zÕ8/e5ÊõJ¢i]R¤iSÄ{A¯i72 (Ã|H1]¢
Pf9IÊ*³_õб]õ«9¦ 9ÔSH¯ùºñvQêá
Ƥµãâ-"tøßÁ/èô=)÷Ø Ë,OÝå!ÕeÊüí<
û¢útÿ
"ÃÜ&ÖâÿÈxTe«B¼²7__ÛU¦Cöâó©L§ÿP̬B4®ª»JªûTUÝ#^<uW-TݬT÷骺K¥ºRÝV©.m¢î¨{Cº7(u³Uw[£ºf×/ÆÛªñêF½xê®^¨ºWHu©ª{̧îUwP×ùÜÚvØ\lÑvíBµÍm]Um'4ø^°¶fhÈ+mSÚ÷ü´Úº_m¶^ ¶[¶zUÛCçÑö?v·,Ôm¿xÚÕöB[VÕöOÛ·.TÛ7ýïÖ¶ªhR(ês?·ÏþVXRiºXizüó³ëT½$ad¡aÃKªî
ªûÚTÝ×.TÝHu½/ìð<wÞ,4&¤º[«ê>CãóT7´Puß#Õ=÷%Q÷=Uw@ª{Þs«Û¶puªî{_RußûÂÔíé]1ïC^$Ù±V¼¶jËý´ß}ð§O÷<Onó©ó-ê©ÓmyêÔåë"íÏ>,ÀtYý.k|Ðeê©âBñª`ê©b³|}aê©bzòeæûÆû«j6#ùÄqZ¤9V(Ùæ+ÇÉUzç¸Hý²/£UýÕ ¹É×ÎßqñO[êßq=â×ã
èþ+ùûÇ
ÙÂù×DÄÝ} §xÄiy0Îd[yþÑ
àï8rÎùÈ!óÈ.óâW¥ù+Ñ|.~, óçáDþ5ØAþöKÓ>Csò?öí-êÂ1q¢Óÿaô½t¤uñ?Ý$¤ÅÿNàÝJ~£þsþ¦tîÿPKÜô
[ÁztÐ)c§ìªÅ¼.Ý2º,Ç
}â¸_,Äñ qHÁa !£GAI¡ì»£2Éèq<~'dõ BÒf§dñ3
`X<Ümhù¼Ð×.i±1bµüzÿpOÁÖ/Kºf¦c½#ãzÊæ[eøMÍN
k!A:EóαwIð4·HðvçFu
©'ÙÝêq%ølKKQ65?ö¸meÌtpT²º=ívÇ+¿]évºÒHDª³t»`Qà÷v¼P¨ê<Ù|ZÂÆ ìåÎ1Çr<W°RúþÈ]Ù«Ò¢BóÜ»þý¹ºy[·Èj\SÑh#®DB
Uª¦âelT¨
#*Î#b㸡"Q KÊQï)?/>)+ý}]Ýûâañåv¦ÃÁlPÓfaͨÌÂò4YKHX8\$Ôp¥"vöA<ÜçTáè.ÆZÇÃÏDrI%¾¥ÇíX6˾¿hÄâÊJPY²§Jà×/4#_Ög¥²_kMý²í°-aqsKe²Ê¶1Å3Q ®íÏïRôjóR?¦å{rî|1ïL AÈiÝvõ|£¤[CJB.I-Ëní\z¿61¡¬l¤ÚTU¨ÜrwW_fîöS+sI·z4SK¾ LÐÎ6L¬á%¶àݧ^äNíëHv0¥h}®xZE)QúZ§!ÝáFBlÎhäø
ÚçL>ʳ3¨j
z¦áMÜ
¯'rßsþÖ` y)ÄfP;4
åꦰ¢5yuÑ"êo@;nRßpãñ_SPâÞÈ÷ç;üÚ"ð)aÙz®ëPÇÄ1½&¦µIm`:1&²è¶gæy
Ç"M¾Í¿b!¡Â¡ùË'QGå
×Cèæ¢U{\)ä5ÔäÌzGo>¾ýÛ"âPËѱj°úûàjWñÒGbýÑ!¿C¬ø5±ë~j`%Öäðv ÝèÁAEÇp}8ÇuÔZ8wùö1Ná:i¤Í-ã;Zy1Îòò{QüÁûïOÞ|Óëüï[X·~cú)¯<§ '_° kf©C=·_[Éøæ8¹Ä§ÄI¸¾Círò9y|@N®kääC²óñ ³ý|FïÏéqùme#ºù}ÁüݺR5¿ö'ù%£¥ì¢Áuhsò¨¼|JüèåSÞÊnRûÍá¿Eý74
N|n¨·YÂï!cû`'ÿáùÁzî¤{ðÁ¿"pü,Áb,Å2îù»N]
âÿPKqÌØu
¼MàïxÀ»Þ+ð~)3ø ÀYóø¬Àç¾'ðC üXàg?øÀßþ.ãó2¾ ã2¾$ãË2¾"ã«2¾&ãë2¾!ã2¾%ãÛ2¾#ã»2~!ã4áY\ÏC;<;8@á6¨~1$î'Èp
Ù
®F=Ö¡·Ò=¦çRïgð2×ûÉTÐ\ÝØ$óäxåiÏé9áJx¯u¤!
6Hó {ygp}lõ6Æ
éÃÍÓ¸±7â9gF¥gñ[gsë@·SPIGYÔØG§Åx%yÀÚfeËõ
|l äS®ÎsW7+«]®m®¬\ç®hVV(׸ÆEHغ
÷<cÊhÌ£\=]!¡ò"+ßñü¶_©ÍóëzE¸ü@(`óÊ2â×ó¨Þ'£X¢1r9#Ï¢12ÕøB~åP ÚQªù˸FÞªEnEVxýðù¼Ê<ïû¸wøÛËÙÍëèühnà]lÆÞ&eQ½<µqWSÇs[S}9Ä:¼MµZtÏ`SvÄ3m¾Sè·}9ìSª$+åVΡÊç}HþR¥ô>e!aÏÁHH0ið
ÝvLA§³ .[Uj§uÛVQU±Mb*â***¶«Ø¡¢GÅN±KE¯Ý*úT<¨â*ö¨xHÅ^?T±Ocý*~äÀ]xØ,G£0}D ´áQÊñc!~LlxÜ
¡³íüì¸}BOÛ§l8jÃÓë`8XI
JU$ ²ja½>ÙݪÇý!Øõx?ª7Ü[K[PÛåßî/
ùÃ¥
X0Üq[áõ"£º§M&p "Up?ÁòH2Ö¦¯
ä)ÕòÚX¤MÇ#±ùHÃݸ0õZÐÊd{»#P¯
Ïh8~÷É
qöÞî)÷ó
HLx¢"gÉ÷y¯âÉh4Kè¯giXPUV&øGºxõ·{·{±}%~Mzc-yUÃkxsîº,2¶O¨ÕðÎiø¹Øº¬ñ»ìoÛªáMüBÃ5Ç/5\ÀxkâÄËù%#Ó×´v1©«DfqýgM;'mº¬aöiä5âAZ®x{XïIr)¤/ãxÂKÄÎ pÖsyëáÀ¨ÕògÍM5
³¦y5I9ÔFvè±**?
Nzo¬!=Ü!8p;c§íñdk|rjAMMZ÷2Bþx¢&ØÌN¼³ËIÜ
nÁzg°?¿&Ræ¦J·E¥ÃVòÖ¢Cǹ~l*VªW96ªÌ%Ðä%Y×Îk9^»ãcJ4Fѧ8¤Ó·nKF¸î¸ÎÖÃÃgT
ÄOæ?·qjyËWn °Ì½ÁBVCX¨Ç>lYÕ
ÂgärªÔ2Ù§½-r*C°x-.t
6iEN«Ë2×ê²²ÌRtvjKÑ0ì>Û ârÛàð©nUfôËßðÌ:m
cwÅÅܰ?*!ßå'óü-¨D)Vñj,åf[ÁMv·Ù{ØrwѸö¢WºGÑãXÏïªð26â}lÆ'ØÂÚHB;e!HÓÑE³¢%S%"TmÔ8µ"Aû±cÀnz}ô
¤sØCa/³ß/åàG¤B<*-ÄcÒJü8"
ð´OK{ðô0IÐ/Åô,KgpÛöÒëxIâ·%öþ<oÉ¥¸$ûðk¹
¿×à·rïÊ}xO>÷å#ø@>åøHþs¤~'OiøTñâJ>Sêñg¥ w+ñ
¢ãK%¿(Ýø«Åßü]Ù(Oà+åU
ãʾVÞÁ¿ð
Ör´}&kñ+¢ydI`áWXP÷ó®ûjEIÌsºØü¶:y%ùAøE)XÜ»+úQ«B®¼rå-F±òJµÈÍgÎíX¨¬;Ð1'·8--fº#<ÎÑç
\~NöZ¸iÜáµ +ùdC´H{U¿B¹È7±J$3¨ù]-Äö}º¢äè©üµ³¾È^yMñÌpÛDj¯nfËA¦fcܹ,.ëéËlé*{¹nªÜ6=µ¼kÔì@\mjjæH _î³÷¿(Ë>;öjpÅ<µC%þÔ%
S)nNÙYbrbMÆ"Jrñã4Ô-MNÉ)<Ó7Ñ<ì£b¤<I¥üé[Ó´
^°°bÕÒèbÚ@ *øP,é2Ks©âúà/:¾ÔÑZ_ìuÆc½¼hQÿ$uüÎÙmhs)Ìþ~çüöû¾ó»eøó¿AF±¤¡AìǤ0S*Niðâ´Øæ¬0çæ¼¼ªqWqAC;&¹@BøYñfNERż¿mæ2åë
ïB:k*èJn¦o¦cv:¥ÊE+T\L¯Ú¦nØ×Ê[.µìÖÞF]ËÛq;¡ZJA»sÍʦí²rVù´èP£|c$H%¯2¥óùu*w&¹PÉ®Eá'"YviÝCÃͪSpjq¯Ø¶³Ó2mÛ¤Û°¶¡a¶Lc$u%¹(ëèyÑg+¤ö´Jùò¥%w
p«t¹È·Å9sp«´³nTL¹k·Jó»llgï·JÓv~'
XÉÊäÌu¹Y1ù¸%TX9ÊqYÎ;µÊWk&!b\qË´×ÇDtôcAG/ztBp}_âxJÇa"û4útFË:®à5ã)è©gOW66Ì¢yÆtÇ #$6_ÌÄ2åX6÷'&Óz,
K«æZY¶4¶÷6(ÉþÏìx§,ægÉt&âJ¡ùÓ
ãy#ÍdBN%xN7
0mÆ}x£»ðUáë¹V¾*FË ñW¡¯G¼? $È;ÐÇUã{xÂÿÜA8¢~T½2úïthÐëÇ£<K;0í1¦3 bèàH{9¯pQÄQLp7S88Î!XÁE¬bÌá&æ©ÔçÜÂÞ¡~ê uDy£MTG£íeg@£]|$»%fwÙ½¼Áìï
ó{ç1èf1F¯Ðw°xÿ@wO¹WÓíà_WàÇùtÖ¢Pñ!÷ß n$õ:E¶bÉ%2¸ÎÙn2z¤&1ûh_Þu²ØAgWFHÑí`_2º§¦I|w¥ÀÈPM©Ï-Ä'+¨Áý2X¡f¡í:軴ѦPO=ô}ڦжzè|FBµzèGr*1:ÊrE´Ð ÷½Ûðy·Qwzû1Gþ BøÑS}-¨·HýÔÏ=Úª¶ Þ&õKR¿bô¥Õp©bÁp ëÌïk^¦»¼\ã=Æ·8süoÈýÑWZpZpÙkTÉåçÆ«Û{¶÷'r&÷WFÇkÜËW5¸´ ÿÆ&ýÎ*þ`ôx»®úû7í zNþPKÁånã;
%íüpbxÔMärÜ$ü«nuÛmÇí5r¦XrÔ8`$²5èsók
5cvÞU ìPP?°ÅpAÃ1}ºVÊNSQôö:¬n`á8í|ZAt iïËg\¹hò½gìÄ.ºv}1Ô®ÏXwêÖ¶«D6ÛiºnHf,³w<7hæ÷YJêMw³mYfÊÍØm¾GyÏô=F·JcrpT¼ª »µüaå¼uÖãn&Kèöw3¦3£~q¦©ñÒÒÌêT,ÊOá=ejð3ÖLδÇ]/U,Jù.¯8âj·9dæM+ÅÍ«C ËÈ1X¢p×â5?}fà¬åyïî¤ïÑ/c~ES
,JÁt§ä[+¾B4ð;";äb/¦»FuN=«Þ)Å)7><m}*´M´ÏϧÌmiF¿ñ Üv [°UÇ:tëXulO
\"dK±YÇv0 Ê
=nríüá py±u|U|¤ãcqº°5JT}4ØNçu\ã«}ªã3cfBîu\Lì{ÐǺ§ÚCG¯Ü/(ì/ø\Ç8îëTZF
æMç¯0Áb_º{ÜrÙ:Ek6Ve»-YÛH·øZRYÖ¥e(
ZÊ
9åÇ´Oü2îǬsæ%,HxÊн¤9ZºP²2<×l{]38C µ¯jj^3sjÚ±t3ghKLÛÑLgWËhoV7ug¡9Ùeð$
YB;RºÉ×KÆ·¶µ½<!]9îlìíótù²á*Ƹ©¦fÐ~ª¤¢ý~t¾P-9z^]Õì÷Ø&¹êA^>Êð¢£SàI¯tEq
¬Ûùó¯h§`Ç×1Äp³`åb¹}'f1C¬Õqôc¡÷R[ü·¸)¬ÏP°å+\©¡º®Ô:WÁbÁr¬à¹UI¼`è¬/
RXS°
âln)ØÄ+
ø¡`el ]&Ó!·D&¤¢di»=Íæl[`#ÿì</b©daèÒÁí¢~n©rº/8ÕZPÔ5íG5´¼ÍÐÓ ["o¨ñÈ
C4|IÕWd1µÈg°N©ö2úpªÍÔu%ie[nÊ-'«§QIÉæÎ&jN"[°RhE« ×îiéj%é¾TSGܢѽAÑ$4¹Lߺ:Ð=¾¡ù+©Ôôm§ÁÓH@&ÉÈñm"â²ùI~=gÆòá
4áûÒOH¯Oáñuyû'¥7ÐR\Fëïh#Ä×#Ñò©£j*£ÓEºjt× Aé©AzC¾vR
z&"h
5WJ¬X'±^â*
a«%®¸Vâ:ë%n¸Qâ&$n`s
0¶h¢E»8c¤Zñ ÖF,Ú3Óvo¿À¸HÊ[ۿã©dKKJRF,*éE+lI(.9_Ú
[̤g@°)ét¨O*_)§$ #b/9^ëÒhÆbÊäWFºL"eÜM°ñbË
O5báV#ʹÓFÊ.$0>²(h0Ú2ô)W¹@
³M«µ3"f<¨9-3Ñ*Ò<éEÉUØ)L4vª§ìT®OÌÔÅÂLëM.X/nPª8Ïpg
W1ÖÉógò¼;
©>Wï×jS
$§3¸ïª¬«bØ*ÿëÝM¢µ.´cä?©Ú»¸53ñÑ·#
#ÕfGßí)üî½S4ws8Õ¶RnDì+TìÅ~g<¼¤-lIûFþ\ÇÐ]ÐÙÛ_(૬jf$Eú.ÌqÉXgo.1ÔÓ°²íÝÊÓ³zpe·ÕwnvUÖZÝO¿Ò¬bªM©uÑWÓíí¨Iç:{;j¿4Ý74°"Wß©FO«ÑÑÜEsUç .Fg
a;]]lg©ílg¬¨Teí\UçÙÎW%íª³=§dÁcØ¡]#i4!åí )G¦=´vYhm³ê±8´¶1´Ö°_m{ΰí<?Í\eªBûhçöÒβí4Û´ãUÂO
Þ
´xè}z>¦ðSúoÐÐÑ_±òÏßßäæòü6$X%Êp©aqVÃp+DÖ\)NÁZQu"õ¢kìCíuµèTUuÕÛQÔX]áÛÿ]ü¸§ª+m\, KÆ`ÀB9ǹãöjx¼U KË¡
Np`1áD·Z'ä¸ýå®;H\áâ¥Ä\¼x²OÑðTï'æâ}ÄÓ5|÷ÏÐÖé|Bá¡cpÖØv
}2¶ÈØ-cHưq·Èx«Ûeü·Kø¬_ðë~CÂç$<%áó~SÂoIøßð;~WÂïIø} _ð% á%ü¯Kø?ðM ßðm !á/%ü
.Ã6Á A að
\pÔy¦À1ä38úYAàé
îÄ
îÂM
Þ¼¯Wð»Yn^£àèWp/+xGûx´Á½¸PÁ±ÁU
ÄÁÛü|W)Ø^ÅY
~Ïû/38Äàq¼\Á¯ðèÿ°RÁÃx¾Gð\À
²¾~¼@Áð<ñ2ÆrOb_ÅB_fî+8]ÁWq?ÆÙ
þ?¥àOö3¼HÁ×xúk^öÖü[¶ïÞ÷w8MÁßcï±÷q¦à-ÿÈkÿÄà¼PÁ?3í/,òW\¡à¸RÁ¿agUÿÀzÿ¥
~5
~
þ/Vð^vÝðóqb0 G1iK RÀ`ÁKÄ#¢o°j :#±pf
5.CT8³v¿4. õÄc±êï09S¥³&$YA¨³´2èF:q¡N"ç9é,íÜ+íî.íÞ½:XZïèP#ó«\`*¹¾QÛÇh5/¯6µÜD\±²ff¥h¥PfK2ÐÓTÕð~BëÙÜÂÌjÌÌÐ$i@»/)¬-7æÏä
Sá2Ö\P¸¬&Xcj$.[6Z¢2
©m±@8iôõ3wwf;ó.,L;i}ëÚl^F'93 ®N>>Zï(
IzÍôe#LNÒ3\|V©XeÜìþï¢q
)«ÌÄÈdæÕ·ÿ%.ʸÅÒñ.Ͱê,£5ãìÒ&
g%)Ü]tv¢5Bz.Ík\Y[½¥MíIíâÂÿªäai]56ûßxûÌá3®ÝV"¬u·Âõ£,¨ÁvÝ#ñX XºÔ#ÿSæà,Ú~ö¥³gÏÑqÀb>æ³IÆ`ð ÈóÛP ¶Úï|}#d·µ©ÑhA»
¨íD£>¾²¶¦º®ÉWY¿|ECuc#YRWW]Ùäk®iZê«"ѱ¸~U]¯¡¾'è´%uõ
Õ¾ÆåÕZ[_Y^ë[\S[M¢ö±noqmùºÓI+Êëª$ëê}K«#dé¤úªJÖOÖúVWU7øj«ë4-¥k¡2Ü®Òá+ÃÝÝþPûjÆC6?»¸ ÃÆ#jA{´ ¢]þê¬hA¬K%¿ ªF6©H<b!ZFé6\ùvcR»;ÂùC±Õþ`,°¥r<JÌV"5á©©«CËJµ}ø£âQüOWJ Êó_<eoÄBG¦&£Cj¬´1ܶQäsXÑ6û#!MvrZZ_è)R;þ(ʬP5®6Üæ®öGþÖ å]ÜSÏX'3WeyùUåÌ«©Åf½A
ýõæÆÙ³çÎe<GÍF-ämáPG 3Ñ,j$Zà×*&.h'oDÃñH¸Q4¶*´1Þ*hùcñ()jW:"án=èüI¶p0Þ¢, ËÜÀï'£xE}|B«/éO¦-
GcLK:
Ã'Îä#_ùDÔ)xi$-ØT,:MSªè3}A¶>M
çøV¨¡vnÊÔ|
j<ʱZáç`$Y}Ï|Ôe¼¬G4ªWÇÕûÉìë GÄòH8¦ãó§Os¯Û¿!ñÑ(J.O§BétW·äÙüííÕAµ[
Ñ6OIRÈA>
Ûu¡Ic\"?g¸BÈ'£¸Ujk¼3ªH@tðÑKÄ+®ÛQÑ^©Sü'gfÖÔS§Åb÷F"ì1ç(Þ*r(½Çª5Üé¬b¨¥±'L{ï¡èR:S5QFMWǹ¼dJðö1¢Xy¸8n%òXè²G4G³Ly$â'f¶NJf-¡PÛZÐE+&ÃVd#B×ZjoH7EE«Îb¤¿ÙôYªOÛ£Üȶ¤g½5º1У«É5+ãjV"¢¬tWDu[äX8i!ÞJ®"c|máîÝíZwÚÄiÉÝi~³,WÕXºZ ;NÝÁ¼9Xs¦,ÆZ4ÄPsV&·ÏIÕ
ë(&úT
6s®æ;ÿ@+:Ãk´
ðaôJ'írñ)°S*Qn[Ì-T6Ç`Ýó0I4
§%½_¬súáJæ' ÐÁÝ`çÙZÊ`KK?ÜÆ¼»ÐgÞòäý0.ÏnÙrå
/'À§@qAöº]ÔU¯èËÙÔvCÙ³Üe:üzRÝÏÃT`©OéXa¸ÉpÓ°N9ÿ16èãËtý#üìDøJû7ä¶ uÅ=^Ù%sÚ)]Ô4wYsÖ]{àv·ÅK/Ð!qkICF÷q¥ºÙë\Y°¹LÉUH÷®}°,W)3õA¥¦Ì¤!KÌõf¡¬aGÖâäÎ5åZJ°ñ°;×kÓÑfÃup#pøa?Âý°*pá+e¾Ì]\Òf¤§h%mVÒ}`*èuäù¾SÀ~]mýxd1¨¿|úþé}È¥ºNý)buå`öe^¬¿H¶f>A«àȵÈ!GFrICØr®ÌÙ>Kqk
efF÷ym.Ì¥finVEÙ,3sXlcÅ),ÓsͨEENF¥¶Âµ#¢bâ_ëç| lâÏMÛþ4ÌñÊõC]诤!Ñý«Ä{`x2ìwz²Câ2;©æ¬uIÔ;¬N3Ë©ÀâÆmtZn¶ëÁÓ5ýÇ¡xí
G|@?JR»XCÌ'`¥£SøïTtîd:-ó){ÁJáÒrhJRê ¬Ð¥ÚHó¥ÞM=>8
5vûQ¨·
¥öEGaEÜxjÉGáS"à¤å³â[ÿPK"êïÚ«
>«ã«øÿdð×ñû:Áïêh&?¡71x/ÏéÂ×ëÂïÒ
Óº°EBcà`P]8ñ=º(Æët¡ã .Jð³º'uQÇ×Å$¼Fq·.<Ì6ßÁ`XSñ]LÃkuáÅ>]Cº(ãåtÜ£rf;ðÒèbÞ¢q¯..b0Á,Vòb|7Oêb6WàͺhâÙ:&ifQmøy_ÐÅfÞØéb~\[YÀ6VíJ6¡ûuƺطë¢é"ºè¢@nü¢.vàÇtÅèb'~PWãºQTEÅWÄñ6]$xÖ˸]x.x·.R,9wê"wéb¾]{Y><¢kðCº¸]²¾ÁÛYµý®Ç{|Á§|ÁQ]ÜÀÝ7êâ&JqÃx3kz3Þ°Ðéôû}+74Öøü~§Ó·1Êôö&éH§¯cG8îHG¾H¼#Ñwûf# Áâ[Ap/ð
Ö7øÒ}½_2²+IÙÙ³ûè¿ªÆÆªÎÎÙ°Ìî0ͰbNu®0(áZIsvw«cáxwum,J-E<
»nûÎHGz:Nb¢S»bÕ"©L,0½×ÜȤ£±êúx¦'§£øRy|HÂMnF°VÌÙ²U+«¨ØªLWW$¹jâ´UÔÙHOE]AÔ«Aód`A[ËFãÇdQ¶à*5Ö©Q1¥"X{©$0×òx^EÐ &ªñÞL(#á¥A%e¼f¼1µÐdVp§4¥Ñ(zÂéÕ«¢ÝuhO8&7'Ûºp:2Ûí1°ÓÆbSépOïReoHy´W·¬2!ýà(èçÞ#þà(Æut' ½¸¢û
EÅSpÓYðÇàMOÇhâóPuÌöXõ«c0'áì7 ÆÓn3ß²!!-}#
s.©üs÷áÇË»/3ç,#G/(§HvWwïLW÷ôT÷ô-.kñgQ*¾°B.¬êò³R¦#{ÓÕÍád*ÒHEe+àB'm.3ïÍki[ÞfÓá#¢ÏFIÖèÇrRݦLÏöHru"Ù#óÍW1ÞMµx_C/<7Ia§Õ½Y¦Âb¬"bÜ}9nâÛ´eU®
¬êKGV&á¾Qå hMn¬` æÌ£ÂFßè¦u-¾Ps}mpu°¾¾Ô jÙP¿²ÑW·²e¥ÄÙæ/Í_Äã¥óç/ öúJ;uÄ¢ñhzU¸ejRZÇi_G"¾;Lµ6ÑA(!P
§7
cZ_PL&ômËÏW2ÑãË+xÄè¬ßÛée¥HgòÀ´`|w8íô
Ýôq§}»Y«ôq·5-îB©1íìi0=o+íéE8ÃrÛîñ9E=m
'£aªq¤÷¬w¡üépáøýúTG¸7ÒLtDR©DRjyÎ+=£)axÃê¥ZWº¬.òo/5Z=î´ÎoÎ-¢ñÎÈ^_"ö%º|IòTÄWAÍæd"¡4y=<m'éÆQ)
W:+Ù)?ê}ëÚ(l¡óçÏWãe¤p¨¾Å·®¹%¸®[¹öP}C}mK»Òrn(IvDVGcb#uG6Ư'öÄ}-Ôô¥kèþ}#}¤;§l)øí$Ñ[
5=£°¹L[H£½6ÇÝdO;ÁÕn|ÐÄ ÊMÚ)ã8½½rI¹îS{ÎïÅ8bi9âöP$ÞÙî¸:¦ÔÚcEZBu«Ye)E(Çjiß%¶w&ÚéâuÓ|B$?q;©öX´'nï
3)òoi;uÁéöh<E×µ=Úɦô÷¶'{HpI{¦·N"±8Iu;;ëc25èÒ{{IM2x{"ãêjÛ9L+ '
ië
rT©sÖ§äN5)îþUôEããPs"¶Ó[ Kñ¾428ùöX¢ãj-²7Ò!ñrI4]ÍÖg"É>2K-7Jãh»+L¥s9»¸#1ïeR;èä.xÒ¦;æºKJ8iKÆË'Õrá¶°Y&%P1!ëUÚRòѪ1¼we,ØÉ
e4b{Iy6iMt¦¬'
xwÔÈHYȲ®v°e:aH`
¨\Ñ̰µÖcq¤R)¥Ec"©Ï¹Yb]iÍìÒhª!ÂÆ¬KÖE»£$fú¸ïPÞ½£ÂwÎÏù Àm¥N ×âÊ:er¡þ7m\
ôUá[9ÓDç3¹¯ùr¤¬22ÙÔÍx'U\0æõH·qlÃ;5ï<VÙð:Vu;©ÑMì(ùF¸G¡ÚAf"2|Bå±pC;JátñÃÒÉ
IcÑ9ÅKF½(iÇ¿©#Î!é~æùfÙÈW÷¨µ|X®Hþ@ÈïöÈÛ4sÜ:¢³4®fÊì
_þ&3ämbÅL¯í´!Îk#5É}
(ôEÕ£`¯zô¤ß0õÞ!ºs<;NúËlê=KïÍx^sp«¨Çå¤÷¨´PNj´ûÌÿçä¿Ø¤ò°ÆêµR&ÚÏö1×n<û°×Jѧ:ôèɪ,dû¡ÏwOs²ü»g®µ¸^;~ÛÝàtÕѵ·ÒFJÎõh^jlÀàãR£?l¤LýúD¹Ï//mxHÑ+Úþ²éýàpS}´¹
2uâûsL6éÌo>³ðãLI¼ûÍ3År¦¼ ¦8Þc²V1-hó
ÃYøIA¦øÁB'U·Í,ü¨ S? ¼ÄÄ'øËÃÎ,|¤ C*ÊÝÊÇ(Òe)_;æ/£t|¢ c
ûcØèQb,6ãÊù<ÍMU®ÙY¸®ÕÂù³ ÒcåºÍcã/õDf'
³Êµ)«<6XÑcão)þ²*y'
(Á¥plöù2®×ÙpQ[å0DHDåÃY81^ÂüP¥$ÌP¶¨õqPë#Edá£ÕHSîB*d~%d«áMyË5ãÿtÔE/ -w)iËH«4_IÛf¨¤dÑL±JyòXË2¯ÂÛL2s²©«xtÏîÿ&ßö_Dåc[~`ʬA/-Ð=P«Sɪ2*ÞnJ
ýrÅmîód¢ò\fí¬qÕ¦µeüáîW/"
g[
(Ã
Gh|Uÿ¤âb_Sãëj<Cã\>J¬â¤F«mj´«QS£CºâßBcÆ4¾Hã6cmm%¿>d§ZÒëûaW-+UA(æ©
¦5ÔNßCûá£Ò$èÿ"eSHÙÔ®t½IézÒ5¤t
)]÷(]¯Vºî¡Ã?
0NÏ˳õÄãËilæT¿21ÓÈb4|®a¾&
)ÿqùuå0ÜìæpªÊo³jºëÞT[©i+²[¹Ýü]Õ9KU=ôúÂÑ4i\AòªÄ}.#r4rZÉ8îLÞ&J+çz¬øtÜüvxªÒEeý©AYèéT¤høåô|8>sRZ
¿·ÄBsº=7R4ãøÌAhôh#;0Ù£¹B Ä[ì-'èÞ+í<~kÓî_«m
}ÎVÃÜRjÈÄR©·´³T<oØI¶}PÙ#OªqyéO>k¥ }g®óÀ_£·¸Q#fÉ'=JC÷pø~ØyvRÉ%ßcFáB|_søËÿPK\ÜØÍX
K
ü5Oð^ò7¸ØÀß²A¿cø=
üÃy?a¯àÝH»¹bO,ìijX¿rÃSïA¸ÀÓ ÷z:ÃÁþÞ @h´YHͨ'Üó»=¨Çòl,«ðÕÒï¢
Ç<ÝáþP͵
¯A_Ö±zJËìÊôîñX¡.y^HþöD¥¿þ.zND(ð\xFcïY@{;®)NÎ4cùÌ4r¡wN×êïÝLFeì©óð ,M·}Z£?ĹÎphEÝ;üÁ~1ÃÙî²(êqIB»Úê²v}nÑ2³ìî@n.B@Ùmàu(¿®ÜÕiõñFD)Ô²TAÊRHÄÉK(ò3<#<fí·zûGzDdib®d^Ðam¸ÓÜàü<ûU¹Bn´ú{ÉlϺp4À"«ËÓÞ×Å;ÊAö÷õ
#1ïMë"Ä(éxáh"Àd«ÜRÖ7·¬äìúÎ@l§Çq£¨ØNº¤¬Ì<
OѶ¾¡eÝù̳àê~+²:CVÌí"{=ÝnaKâ:0'QçëÜ Ú×ÉÅÊÓföú)n EUË5á>W×ëóqIÇÈkñv,w·
û#Öª@³¯«¯ßÞD!Ô?{¢tìi©q§c/vöPb'<[ü§:¹á.qYÛç¹n3iG7k#]
2&ºmäüëºi}[=c³ý}}¨Âë4Pør;·XÛÈ¢ñ½3hù#£K¸:i÷ý§®®@OfKIZ9VÐê¥^Ï´¶÷ûÑæáF¿î¦3¦NmíwC´3PÏfZ£a´CþÈî¸%á0YFã5nìqìíZTUå6«¦kìDõC¬Ï¬äZ¸3ïa.ÕWÚñUÃWÃ~öªÍ¡·6̽¬¿õÒ5[áõ»ûìéÕB<½ºF(é°+½mí®ÒQAdB¨)ä¡R³= ã¬x8hêÜ6Òõ>¦lRæ&ÕÝ3M2ÚUÝ´r ¸ô@T\¤j0¼2Pü®ÄQlDü».Mô²ï^G'¤óâÒ$ÒÆ#HF3aCy¯t&õOíOlíÄ$ìð¤wø± {¡Jâ44iÕ¤¡ö~'ÙAÛnõðIv($ Zè²B¯F£Öþ`p]dEº8Yl*¯'i$Ùg9þéA»ôʱº»£1vfjºÛ1Lz%?æ1<Zq5/õñѸ)òh}¨ÑmmT¼ÎZI«ÏÌü0ϸ°Æ½Oz6«V¨÷Æ¢Ièñþ*Fº}¤ô6E;8°ÓÒgR²0¥CÒ@ÕM×ôrõ±³tú¥´Ô%Ó8ú8©:û"Ör5âï
ìZo
èÿØÎgq¥ÎµÃ`p·ø±zÃ;¬`p¥ÊÁ<nJÉÎN¤v+%±©: Úè"Av8£Ù´hÿæ¨Í¹ÜXxmx§QÉ[
ãdÌíONAz"ÿ¸û£±(ýÈÓ¶ÓåãA#íÚª æ²þ+ki)ëêò¬^]×Û[:ÖÂ
ðJÉ0ô²uÖKaã2ËyYÜñÂcPÎ=#P×7}:f
A0Ï1!éåCð^5¤YÎ.ßYÈ-q§`rCÊkEÀ¦
ÿí~ïã¬B¿+ø¯rvÛ°Ë,ÊC£,7×¶¨¦ff«v«jÙ¦®uÎXÞAYvÿd-ØE[µßÙUà¤b®´çrË¥*1õèL8Kò gÚJÃawÚ[;¶cvÞÜäøîc°ìuO6¶º96 ¦nºÏ#¶£g$?a
3Ù
%Êsôé5#kTãÝI\dó®XBOȬ:ÇrG½£ÚsuÙÙwðOKµ¯ÉcvÍ+æÒuv{n¼,påÓvwåk][;
ïYÎ.[PÏ T³²É5 º©v|XÙÁý¾D .ÖרËú¬×Pêto=FI~
¶`6·È#ðwãôU¹æQ'fÂs²9%îMbíç±¶X[ãµánY[µß(Q×Ã*EKªÒÒ¼`fËYQ¶gë Ëy
# 9`ïÁ<j;qyGáì|:Mmu.^Uß8w&X¦eÍϲA,W,s<G#9Þeß2
\¥vþ"ù2;KQsªõ²Ê`YT_ÖUiøÁp½Íº3òX[§×ÛÎY2+;òæÃ§`ËhµwÕe@Coã½Ã°¡õ XQt®&SK/äÙõÒtP/½ÏŹÔ|¬KǤ9j'eP¥tì³Àm¶@SÃht¶»ÌN(3ûÙýÌýLÒýaX?¨¬q%[϶1£Æ¹Æ=Þ8m¼q [þãv¼Ú²¤%/`#ÒGÕáp¼Rí;ÏÆtf¤´Iý¯¸<°lÌ vÀØO?M°>M?tÂ{{RNôA,²/SÓì{µ[.Ë´èÍ)Wëg.Hûáö¥d¿¼Äµoã÷Rc:JaÓ ¦~K9ì¥JÁNJ7©Úà´oI÷Z»,ö©Ú'°9öÛÒ½Ö]I{Oº7»Ë3iï=¢ý8ÖgÒ~Kº÷ å´ï8¢ý¶ØÚÓíÍÊUÚtßðø6Óä·¥jôoOÕ>«2iߪ=WdÒ~{ªöAlȤ½+ß3j¿#ß3j§9Ïâ¬4ßÀ¶¦*îO|_Ë£IY1»é>úYí(Ø3ì/¼îäͤ0FßøÎ¤QÉ3<
Åö5rzsÄ¿½Ê»Õóz·RqF_²ÜòNEWQ~Ç¢,w·¼òÜÏýsçÎýÊcTþÊTþ/ÏSùÒ¹ÊÚå¿ìòky»ä°~vɯNÌv]Ò} ¯WRÒEN¬ºðøTÞNå
Tî¥òF*ß6¥òuèa¸I²87öÃÕÔX,½ÃÐ>xÉÞ¤^²Íäìÿ·lÊ#àUß2ë¨áÆÃÐÊW°@äXe<¨DÒx ÑÕº]ð>Á·ÛãÍØR>/<
+2ñü®TúH$Ä=ö7Ä]åÐÊú
n¹ã
O÷Öä(ï_ï¢NRwhun~îÃü×1v!ËfæçÆö6u>ºi9¦Ó¢Ï4-?w¯?uX
*ÒØà<
±±ªXÕB¬!Ö!VË+ĪH"V¥k±«JU-Īb-bÕ
±¼B¬
!/X
XUB¬j!Vk«VåbU±|B¬Ê$bU ±ª
X5B¬%B¬Z!WU!Äò ±*
XU-Īb-bÕ
±¼B¬
!OU)ÄZ,ĪJ"Vk«VåbU±|B¬J!Öb!V«:XKXµB,¯«BåbU
±±ªXÕB¬$bÕ
±¼B¬
!OU)ÄZ,ĪbU±jXKÄz(~Wz¿eàÿPKÑ%ÉUÅ
!þA¡®TÄ@ w§Cº½7»sNÖ!º³ôÞ73ß{óÞ¼7ë7~þÃxpn
˵¡Ãm
à<ll`[;_,\ FrüF( ElT°<Çα£À1Îapl縣ÈQâ(sT8vpìä¨rÔ8L:Ç.Ý{8&ÕKûr\Æñ»
éU=oÔ(*òl/kh¦V¬¦¶Úù²äXÎMì ýîì¡à2º6.H7U
Ót¾QêÛÄÅéÅ©iáß¾.Ѭ>WàóFI+:ÞÙJ½×7ÂÊÂ^«Í¬n&uSRý"5
Vá*ý)X¤1èÇÕ
®Áj×â:×vP£(¸{ `kÜ$¦ãØ«àf¬fðGcx2 [ËÅSZ³Ó©têlR7$ÒaR}Ñôð@"Fó©áínËűl.¤pÅVg»'Øh8³-&Ip¡É¡ð1HP¨ÉX4>tÛ3ô:Â?ÎD63¢¼K
'ÉA6FüésSéM) Sk¨vìºÙÍ%%ÎÐé\g·QÓ÷tWêfwe[wÊKïѼrå*Ò[qO3naÞTy¦G·S{ÚmEm¸ðo"Õ8pn¸¥b^±q[ì¦s¥ö&ôrÁ§ iìàüà/vÅÚ Ë§ævRøuÎÌéÁRzÔNÐBDEñ£º"¾s
ñSI;
vxHvô>Ö{â~´ôöíç)b8¸
/ñ³¯GÂhÇ
osw¸gþq?èB¬£;Éû¸}ûÐêo·Óò4æàÌÅ~õ
ÇaMØf}ÀuÇØ .&
ÈZiñHé²UJ~)¹"¥2¥yðïßû(¼IÏôwÚ^!þ*úuã êx»ñg×áÃ,9h9àÍÉûÒ@¤QÐ×Ûõ,Ú¬&Ô?]¨hÕì.Ðd.`¬ì·ëQç4C» ¡
ɲ^>u/ÏC¹i4÷^HpïØ¤3rÈVÀÇÇz°õb ëÃ2ÖïrtvÃÑZéhQ#.M7m?[G¦Ï"Óë±
]&76Â].M:yJN: òÀÉHÆÏäöæ¹sf-Ö¦b`;]ÀsÿëUåqÀùühÓ ÔF°Kc¿lçe;¼ Ûále;¼"Ûá5Ùo½%[ê Ñ¢w!>Õ
¾'ú袿"úè_DýHô Ñ¿>#úèqn¢¯Ôyz¥ªz¤¥Î·ÔºÐRYêbK=ÊR;-µËR¶Ôc,u¥k©ÝºÔR³Ôez¼¥.Jó(Óð
´±«ð"»/±ëðGvþÄöâuv3Þd·âmvÞa·ã=vÞgwâCv>fûð)»³{ñ%»_³ð-{cà;öþÁÇl?²']7øß¯ ;àB$>yéhäîF«ëŶ@ö8{vÐe#Õ°ázV4{þdªEüû¨Í Ô².ïýPºì¯ÜCèxÁÍjJ_Í_s]Þ±UVÓ¾A;ûì/ÓLwÿkòÛkÊOg®óq»ø>|HRz
ÍBéÙhæ÷Â`lÆ.îì
³9IìlNðÎæ@U)W%ùIUªò|ä'_©ÊòʯÊí7¯¤§TåCê3çÛ}ûÞÛWßþçî/Äv¼Û8ÛãøX3a6b¢ùf4 H©ÈIb#¦<ËaqL+x£ÄQæ°9
Ç3.ÇásUó3³8>Îñ Or|ãYÏq<Ïñǧ9>ÃñYÏq|ã8.s|ãK/r|ã+_åøÇ×9^âøÇ79¾Åñm+ßáø.Ç÷8^æx
ãû?àø!Ç8~Ìñ*ÇO8~Êqã5×9Þàx³o5âmäWdh6«f*ðRêéMùæDI(«YaX<hÙ¿>vvdX4ä$Cë¨eËcAyBºãJNæ¢ô6wÖ6+v1ó]Ë.tÅ)ò¬÷LiÜ9}¼"m¡3» æKÑùÍ9'póò¥N[{|tÄuwrjÁ8lÁãx¢§ñÃCó·bX^§²¶/ÒU^×ZS^×q¡!×N§ÚÈYÓdÍÐÞÃwl[æ}CªZp·"{òaÓ7
ß
ì¼éËBdØEw<áZU¾(
Ûñ
WVs=§Ýµ«fÉ*Ñîc^½aú´N¾Ô=Àðúe®s>¢{:9ð RPǤ)ÈôïD!ns\iøS¦m8¶Túÿ!ßVGur
ÂËm8FÅtÍ2i\OúCñ¤òdø_ÁÊ
.RÕ/Hñ¶QümØT°=B+®ïG &!Å,=U"Ë*KÛWñÕ¹îfØôÀƦU
(
Ì®ï¶gÖõa~;r9°-*¢r¡.<§ýH©¡;k{Òõ
ª[ IãùFÁ^yÙôóSJ)(Û¡I¹eÒµ"eéZùÈÏ Â¨)¢D;£µaÝYúVY,Q
ªÒ,
5'EO#«§¢5.H×Q¦þô2ÊqµÛx·&£»º/ªÜ¬í3µ¶V`æóÒóªå´ZUÝ|ÝAÓ£b%'aÕç
³äJ³0kȺi)¾hUf&À.ÔÌ=´Õ¬]3z«ÛµÖÌó3äØ>TKîBÈ>ß*ÐNϤ 'Í ¤LnT&+¥-]³TKA4è¨Õc²ì¸³tTÉ:¢Þ¹Ú`h¯¿ßÚ±á{ì{VÞ¯
[ÂV
Ë
TúÅ0
za*Þ¼YÆN®g\[Ç©T§Èåªç¹Úq©â´*Sá4Mé¡8g
÷Mõm
5¡5£-ÁZ¶¶ü°·¡-É¿ßCó;Xr F´¥·±ìâ!
¡aX¡a»X©á*ñ
W
?(>¤á±VÃ
¡á:±^Ã
b£Äf
·N
ȀV
·n
·×áÒ0-z4Ì^
ûÄN
wÝö=îG4Ü'ökx@<ªáA1¤aÖpDÒð°8¢aV<¦áQ1ªá8¦àýü7R%U}/Ta±¥¦¨¶8µ*NíSíÊÌ¡*jdµ,Nu*ªoÕ§VTveÄ©uqjCÚ§6Å©ÍqjKÚ§¶Å©î8µ=NíS©8S=q*§zãÔÞ85§ãÔzEuÍ¡Ö*ê¢î%¶&
èF3RhGf\¶!]èÅ£èÃ(vn&°eôc{ðöâEà
ñ*Á5ìÃ]ìÇop
§à¥Uâ@Úªüldä3Ih´iÝN·tf/»ÒX$!
ZÒ¦û¾ïíÏÓÓýQzïÌh,{q[£{ß½ï¾ûîýÞ}w_ù÷/Áõøß÷¯<èàúõëaäÂxgï
ãÝa¼?
ñHãaü5k!¼Â·Bøv¯ð¾Â÷CøA?áG!ü8ðÓ~A:#XĤ]4àµX7Õ"»ÜͤI^&}Lv2ÙÅd74~vµÉÞ`»¿'yØÏ£,À½LÞÌä-LÞÊv&oc;uYÌòhGý
òìë¯;AУ"ãaar?wÈø(Þ+ã> ã4>$ãÓø°Gñ1yñ>%ãI¼OÆSlü4Ï09úÏÁdr\ÆÙó0&cGeåÑñv_Åç1,ãkÈ˸Ã2®2ù&Éø/û9¿à¨~düWüÉ_`Hð+m
ÑxcÊ¢wIXoìVªÍyUjî;8,²æÖê´iä´!R/*«GòÍíº¦uN×hæÊÝ¢PÌiaÎ\ÞÕ½O54Û°×¢$â÷RL±xÊ»ïâà 0¶²QW,{#fÓôNÈèÚjújÙ%ge迱ùLª63²RÙXEOÈèÆPóаÙ<2Ò<r|æëª¬©¾«÷zª8L6¹íæ&ÕýâI$[6¦[nPÓÓrfeÔ®j¦JAÊ:¦æD~@)äîT¬PóyýPFÕìaan¡:
´ëBÂ\Ú¸`ª¹WÍIteÅ(ÇQ Íè%ªã`wª'Õ/!Zí`Þ ëºõ¬ß«9õ`^·e7ÍZÂJï|g!«
Îu±ôæçTÓ³ý{º$¬°µÅfÑÐ(õAÝPöììØÞß©ôõvïgÓ[Z6Ïtg¿Ò·³?Õ׫P
tgwg{ÆJzAÖFVtåòO]ÚTM1"4s§MøPE
3íª©æõ!òáXeÇN}AÎô1ÓgÜamÆÆó3¢2YRJÉ«3Ó
 6À:Íu¼>^öÁC?f¹6s#B/t®âè
,ÍëÚ(< SjYÕ#E5Ï Ø1hBbLd§FEÖÈÎÈq]w
qvrÄ=V¤Æ0] ç²àáCr 79£¬Ëº´Å<» °
Wª
5º6dïÐnCÑ@Êul»}%vZ7Â^LÚ.Öv±5»-hëXÐ
1u¬ àÇì¥VJýeô90·,©MWbÑ0%ê+gú
{§iñÎqKSÊib¬oðº)ÍC\yõ3[ù4}éëR½ PU¾F©· S¨ìn¡dFl
æªazù<\¨¨àØoT¨L}P1øX6(öâé56õr
Ì1õ=Ô3vA¤X®Wß ßôödø}Ư8~YüQÓÍâô$³8=×,NO9?åèv8½Ú,þ¤ÃéñGt9íõ0$úöÑkÚOüîÄ,M&±.ñI4&|H$`û$6'&±2qö_À²I¬J$'±"ñ,V^C]y ¯£çÍ$Ç}ðñ&R%ES©
ÖLlUS ·u7Eå6û@¸é9´t~Í5DÐl{¼£'yEÚ°
×[QÂÆÓXä(ì[ÝjëÞp
÷;£!Û÷-VlMD%Ü>5ãÐXx
O\DýþhänJ%¬/¡ÍGVûƱ|Ú¤½Ú¶]úl×;R,Pã¨÷ÌÊîlòê8jW/%ì$_ϰòp«ÙlãáeDÏ$²=I¿
¶RgïzÂ3xC<3ð´ÒèI:- ÒüzNfýÕKɶ¼hØ
G°üRt¨tümd\öGGmÔ×6ZVlcÎ~Ù¥ÓÆ<IÒ¿N+KÄ&$BÉJ&k¬:ïYø
óIâ
UãÇðw(:]T |¶Øõ<×)gʮöØÒ3XÆéYõPCõ°Ô.hlÌ-ûJïÝ08aÔÙuôOðÀÏïÝxz)ñ±¨tIwï9´wöúKØ`UlÊjJì4¾Vȹ[¼qý9»Dó.5¼`×ò¥ª@6yÿ£ø4M^ãî¡Îµºý¼FßÀh}×ó~ÁõuJ¤Æ*¯Ë_áþ}}Õ÷ý
N8-k£}¤eÿUËú_/Õ´F*VCeÏêÇÿ»c¹wyÜ®n[¨~¡Ë3y
aîòkÊ÷¾í§¹|u7ãïø§ÈKд×9³Zh#EíbN¹ÉIÞc½âÖÝÒñaÝÁÖ/SmO¸hìoµ¥Mn¡ö+;º1o¡>ÃÎ/á̶ç}ãκ¾ËRò¬ó1»à®ï¬ã3§_áÜêL·Ìø_íô®ÕöÔ¼©L~o¨¿qïÔM*vÒEªÎÚWÅÕogãª4+WgeõõYY}v6wòó³içèbÕ;ûü/F¼
õ,4ÇncæÊ¾ù^ÛOX1}ò?PK¶ÐïA¹
:"æÓB;ÎÆ¤JÐ
«bUª,TU©JÊd?TeE6ÙeeYî?,Ò÷î»}îíwνïõoÿþü.ìÃ=hU@ÝhÁ§s}}Ý6ø¸ÊF£ÔÕéXR×c(8c2:¬ðN'0ÒÊÓUª°¡æËÙ6-£³VXwÙíÄ/2^FO%zѧ Çá5qJF¿
89=_×ãY=§Ìb&nÕ}ÕÅ,
ìd)̧ô¹)Úù¢ãí@B[AP>9xeÚ`Æh 477ææ³fÊ0ÛûßåFãN3f¦a%JæÆÅÕ;bf²û("úð6NûG³3>Å ê·c!|8>Ãya)¾Ù7 5ôñBF}8>\D,Åt<=mÆs¹xnÁ¢amä
¹Önº6°Y#6§ìb²¶þMÐÝrW³
BUôEû¸÷ZE&¦ôb·iùû£½¯ÊÈHfO&¯ê"emÉò9~íÖ«-_XS#[DÈævæn ûX@°Äçãj;g³{
%¶{º¿÷!\mbÌ%î¤]ñ°ä/kòlÒÝ\¹Uå^F=Ûª\ ÿ*º4¯
)£Uê6RóÒRá±WwEW
QÊ5¾ðßþìX¸*䯿3rÓ/üV²o×þï,NW"°æ \n©¿³Ä\!prýý±pÕTßßPâ]¼Æ1JJVEO- c?Þ`ß6¡m8´àc L",àc´bþÛ¼|¾Ä1|üN<E7~aÄïÿDÞ_VÿPáZÎwUÔ$e®í¦ÊµI÷ͽhMµ¦¤¤T¨¹¤§¤n+\E&ÙºP â$M¢eëÂGV4e¥Ðê«ó½ o® C~ªBAGG¶*5/¨2 =<µÕäêu:ÏvJa'Ï`#äeéq¼/ç8ß^ÆûxjúÞ£:¨Nxø2Uh]*êzTlK®w±w
õÕ;¾FwÉô~ij°î8nÜJÊ
*¶/6²þjϾܥH«aYO¬÷Üô
!oÌæöø¤²M +.F5,
·&¬M²ü
âKRPJA"åÚ8«ÈQbgSà_Hü
ýÍWS´ Ͱè!QtLÞ(q×â ~ît\S¼µÄG>
+æ([Á5]AÕò^|)Ñb£QQ¼&ä°@ÆÉGz¯~åq!,N¨×oøvÛ·¾i)ë?CrRí55%æù¶¦H'$ó6r!D}a ÁT ç4Z£F¢Ñ=ÉnäÁd(îbþÔñ.EèÊ!yI$û> ÞC¤ÉüÄ\ñïà룡~âD³åLv@$¼Ä.îzS)b× `ãX¥ºG{ÐÊÙLÑ«ruRO$«äý1"¡>Ø+CìýPK@à{F
èbËĺM
K0-X® ÊGÍAìÑXÛ=yLîÝÂPøZF¡3ó{n+ì¡e8rZ.ÃMó:_ÕBóTKe»¤ÅÎú/~½IªôPháüÿи¥cJ}Â`ô¢@0T)hj«üú)×Üã¸g÷¬uöàÛL&a¨
"+Ç{JPÀFiì¾T$QóR©Å
Û½¾3ìæÎsörqàù?0w~a.£Ï°DÈ¥×'¬·NYs¿Ý¢øì¶æäåWWíNwÒÓİ6S[ýPK¥íuD
7`ÁEr,°lBÆLL]'`:$u"-T«Å&]Ì5é·i»£h·K»½AËÒó\[qéYÅ0zâö¡®²ljv˨`^6Ͻ¶Uù½!N½,\9Ü5h(.hÒ·þbïðÿ¡íØ÷¸Ú#)KÇ%0xO1O5ðÝÜ¿·ÝkMï0*õM=@²&m&Ìç¬%\Ì|Û=àEsghú««y¬l8½vÒfû湤úp&tÿVo×¾ÝgBv¤c¥CBPÇiÙ[Tc+?`CKWL?:âvÁÌ`ÂûæøZ)·ñÆSÂCÁLb¥Ùó¸¡=þ
ÑóÒ:
â}A²0ñECi³©IùÕg
8å
ÓPK̳T>
#Sù(3¥À2"ew+räØÅqü,&$~
qéÐ%aÁÖÙ¾wïÞùìïÏ/l`q
âJX\Çuâ5ÆÄ!!1^¡!C
âòVhâøPÆS0ã4ýÛósÚNß?^ÞÄ.
+V5¬iX×°¡5¦# 5+'R2ÃJf¤Ìư|Y¤2Æf©Éo¹Ù¹q̲ètYò\H~Ì%/0bq³Ê°g|q]i;fUXÒk®J^»a6ÒlµÌÖJqj§^ø
øÕíϤÎþà'<×%í¹ýlÛµå!CèÈ« òw$we;]Zë'÷¸Vxà~$üâ%ÏâN·m^sQñáEí)j½;²ë¯Û¶Ä©íP
_OÃmîú
q<DBæ³(£WÒ5[§c°/O/÷z±Îs¿W/No¬qéâ"VÜÙÂòR¡¿ò©Q¯|Q1«å=\¿%æ¸
È'äb*-íãôÑTµãáÃtOL󦽤m}]&fcÔ8kGjúvp
óÎpÿ@³¥»ä¶BÉrQ´G¶"÷¡DSùé5ÎåÕõ'ú@Eþ
Vèp¯Ã#w=AnIä+×#jÁ\
_òXµbÐÄH8¤1õÚÆÔdÞ{\¥Ë³'²ÛÖ¬!Cñÿ.ÍP»ê¯dõwQ@7¥eÈ
>ù41ÔH¢ï¾ú%ü
öÜñB3ôoèy¾uKrcOKfÉâOòy2õB^%AnhGÕòe×4ô|&¦VL¦UvB¦ÎK±VaKÁÈ(SÉåÜqéUVY5ô#nÄDTòÚ/³KPx)k&ß5iÈñ<Es!ªødÝc(¼¨víBÈmôNHÛ½ôf¸¹ÉMmU35qûaÂÔJ¼¶-Ôð¶økuAi¨Pë}7ŨnÇ$<d ªjEÛùSÿvjâZ6û.LÔÝîB¦ìù¦Vd¬¥Àª5 d:ö:î_×EGõÇë5/¤>á¼1Â0Ñt2mäÁGx,8C°¸%B¿Ê0ÛAﬤ¯1:ÈÕm!X÷ac>ã2ÃtéVÁTsŬO3LvÐ52Â0Ú¢±ï5Je³7æÙFý©©jÛ¬=/j7¦rµ6ÃR°µK¶yE¥þÚÞY´³¿F°ØöýtÐ>&é-9J^©#i¦ã43=á2ØGZÐ;F¯e\¦ú]4>?¸·®#H Ï ìèG}Tõ0mÙ¾S¸áð'¸Ëð|pú² ¦þ«Â3ðXøOáM#ZrÒoè+h=º»vt~gÝ´«UxvÔBNDÆ(U½Nô}²®|üº¬üÀç>;®:]
ÄÝB ÏIýh¢f0[¥&ªT÷)ü2ú¿9¸M\!ÇÎà~5qaDl\Wg¾vî:»0÷PKnpÌ
¹TKUë&¯ºÎóB5ôdfWyªÈ¢åuaªz1Ë2VgȨ:_«rÜÜPryF¬J¹lºÏ&ֹبɦc«Ïó¼l[-á4u¾b\ÏWÑt
ÏôÍrAܺiò¬j©µÉlwk¼;[dÝ£Øá¦ÕF§>ÒFª>ÒFm¨âè¤Ê^ gÁhpªýÏ9Zø-Eäwê91ø£ör¥"©
ê¯E[÷ßg;;tÚ§éìm¡¯XÛâúéÒ£
ÇÎЫ¨ZÁaF·[+å¶ÊµB=P59K<¶¦:ä^7*fßVk
RS,~Åþ_¶^ô a®E}·Ë'ä5C¤Ke¸N»l_êÅe\an³Hé:NV¶ÄUùqÍ92Ì´D¶Æ9¹´8cë÷2Îe©]»à#;{©c·áÎÿ;ª,fÐEÏdé¨í£ÞYzrüd¥
Åø>Ø;ú¥º¡Ö~|@`³ä ÌWæÈÚ#}þï{¯ð¿q°Y Ajô?Dß0"u8NÖ-Bð=ôOúuÒXui8 SÏNÀ×Bd]ÄIĶõ@<v§<ó@1 Ä1éxé"¦<¯]Äii X[â¦ò;$¦ÉÉvÀ·µÿç&>âgêZxÀß6q?¸
Ï5g
±´gsö¬pùnP-rÿÀ*:Ñ7®Kü\áj51ôáØ9^çòHȳwUc8Mm
îØæ»¦@
Ç(P[Ï7ÎÖûaç¶%9XKnmý¥¶÷¿Ä7
º½Ù[PÊ[ ¡a<ĬØÅÒâ'_á!?3{ý¡Ü²*xðW=CÏ[TóûÙ/ñíÿ9mAÍn¦ 4Щ'JݼiÄègSÃó÷`wäÓÀȪU »fòâôßVB·¡0=EU»ùãÔÞÖÄéÖÐÎÂ$E]Æ&îûOí¢3Ä+PKÑq
ÙGK#u
NÜ£#P¦úheâØ´®ìÃñ¸ÊuqµwÁãÞ£:^5¼Öcx_ÖñÂx¦Ì&x§CÁïÑFjgRc¦_QQ¿®óð,&Oxò7u¼xî¼:Þóxáý¥w /6_f°
8ãHp6N»s{ÒuØNLñÓd²xX:~æÂyæÁëÀëÂ-ÖeÖ-Ö
ÖÕåÚ·àÕPK{Ã%3À
]I4éå*Ráj]C/?àÙµ<»g×óì<»g7òì&ýg»y¶g7óìRóV*nãØí»c{Ø;Ööù¼Q©mMܦ-ÞmÞª7Ø]Õ
ûÝiDÔöO0"
£ò¯bÃÜM¡pwU÷hUooUï@dk josgMÕê°Ôç
K¾¶(ìQ(¨Bȫұױ:ìïõVJ Ïßé" ú£þ@ÕRg4uê'fïæÄm`Ù᡺J3Á2;BÁ¿LÓÏ »£Kvötøüaâèa¡6GüßBQÝR´YzP6S\e
9M§Uô¢mÉ~TÃRò!*«ÉZú{7KávE%{ãöN©Xh(´¾Çövâ4Ѭ·'ëò¨Âý!íõI4¯©®á+0°q(±ÎßÝ u¢½&%õz£=UÉ.ëN-rø`KPÚe`v¡MÇù#uRW(,-ó#Øá,íÂ)4yéóGÔv?¢4elÖG!gâZ{kÒc ȯ6E+-
Äà½#¡@ÍgÁù |X
x£þmØÂ÷
¥mþP?3'"EÑ5$W
|Y äU.£VQimõËÍ
Ô* ñBgd?ÐQAA|¬ÎJÐÄpml.ÏÆ:¸O$Ù×ûj´û{C¨Iz{ûL4ÛåÁ9Êà¥N¿?¾ËSÄÝã öõG
²Qsã& bÌ#òÆaû5_#IÝVmÞÇ`ÎNJ«2°`¤êÈiÊáíRuÔ¥êhKÕáIÕ±"UDzT²ÐÚ½f¤m4ÃF*>6R°ÁÏFðµ²KºZê¹ägÓGõ%×èFÑzÓIì§q/A9å@«¥î\·¥®°é_²;½ÁN)Ð~¸³zCÛ¤ö'))[i©£¥ÒD5qÊ£hOÝéãâÛej|SÈÇ{³·/~4ig¡RîñÄA§É]^mÆ
ë¥6µ»~îz¥Çî¥á°w@{$S¿Ü椴ôè:ON}î&u2ú u
'¥ÎdÜA;²§ë_ï
HA7¬ÅÈ{ÁÜÑM0
R>^å
9~cÎÂò®î<ÜÆöÈ@°SÙÔh-D©*k¶¼ÅÔWÉìm¡þp'¦sÔèIĬR$üÃòdÝ ×ì.¶OdyìnÓR [BQOo_@ÖVòá`8 Âõp×Qq'Ü%²{à ÈöÃ
"»¹EvÝéãÆux&ͦDúÍ ´Þ¢ÎxvéìEüÔåÇ9«Ñjm³ª«çãG"Ü<0HÅ}¤À½T<;P'º½ç6o _rb¾ë/ÎĽBÂ
h3å½ý¨s³ÿ/IAgµÓô9éáÝa3â*áFü
§éîO¬ÃQ$pr
E-¾TªÎEÉóPòBdLUÉ]ª f¦\±8£åÛô2bò*J°L«+cMȲ
òØjÈÚ`2k)l¸ØYPÉ6èô¾{·Ê>û$ì»!ÏV«0x¬ö
~T!*ô¢
}¨ÂV¤C
ê&¬ýªYèµ&Nªb&juÓgÄ`ÜÓzX
¶ø.*²ÙìRTär(aWÀTv5±k`!»V§Ì`BUe
lħ§Ô^t;Q©»Ñ:÷ RP©ûP©`ÞWêñ¦¢] à ªÔru\$þfph|î.gôFË&£û=<ÏC);¦4^Ðùl¶ÑN½A+ʱ²@ÖúÜìÜ!È}*;°¼AI©t¨öïù(ì(QÛ,Ý*÷ ÆE10¸p;NfÄ.Õ?¢£?lö ±¿¢þT±ÏáTöOϾ%ì_hЯ`9ûÚØ Xgb°ÞdsL6ðxè5 °ÕS&ráS\b×
tF:7O2ÃhoyBÊ4ªæ¢
/e¦Sc0#NJu#éHú¾¤¯"éëHú&¾#} ^ËL]1pÅI©n$=¤!éô$ÅÍü7$ý\Gú
¼:VÄ ,NJu©
ÇULò,"L°dÁK.TXÆëH_Ô!uI§#é$u!©I+´Ikt¤¯Ãc$-×It¤$mBÒUHºFGús¼U´BCZa$õ!©¤]HÚ¤ç!iIût¤oÁÛc$ÔVIw"é÷t^¤W éÕHúé;ðîIgjHgI÷!éÝHzÞ¤÷#éA$Õç´¿_jN'KêÓÉ¢¿ÿ*mÜ{:ܯá¿ÒÄéwÙ{ðqNºµÑ UãTc³Lk&äY³a5¦X Â:Ñ@úÛ1®È¨¤åHZ¤HZ
¤5H:IçÎý÷UÒéê¹ow»ËcPYIvê±z@°®0à¨èªÊ
Ï#ü\°[;Gñ§Ï6ÂÃÕߥjïBø¥ãñ÷)ásð=¿ÙpÐ}+á_
ã1VkDø#ë#³ã4×áÏ?ÌGË<#ü¿k8FÌ4ßÿáRÂá'ÀnChÿSJøBÜðñ ýqJø"#Ü
ð2C¸ý$%|±¾áKóÏ)áKðV·Bà_ÒI6¿!¦»Øÿ&î&C4úT3Mn§§ù Nó!üRZiü9?¯ÿ-ñuêJÕ½X8N¾5>KéDiêÖÑçß'9úfóýSAwéÒâ4´í4³bÇÞÒȲ$ÿLÈ@þ7³½9¶waíPbû5Lµ½e¶ßÀ©ø\dû
m_Õ¶¯aí>kÀÅ6ÜdlòA±ÒªÏJÛrµÍsLþàºâpx¢¬¤/dá1h~ZAS1jmÁªÝò7'¬¦5(rq娧³ü¹¦5mKÊAÞh§ïòbqͬÅI¾Á,$Ú2É"g´dËIHqBH¥£ò-\M,®üb˦IVD+]´÷ÄcÚ²éÕIëö»æ~Ö£ÛoÈݳթ`-÷,bp.ÙåÚÔG¿ÆÂYêlB
©^äÆxö&Òäþ5zgçBlèPç0Líà
v©p9Ì7µÂé¦ ù7d]óU]¯UÓ¨FÔuÿ7U*.À
ª°"÷|ªM²¨Okâ¹]i×ÉZWq2<ËçåÃbïwü(À®rù-,*¡¹ßÆ¢R©cI«~A|ø
XP:'¿^¬êËwâ¨êâ8Ê(xErÕ/µþOÀñCÿpðÂtþo0ÿjùÏá4þï°ÿ'¬ä¿þ+hç¿/ÿoØÊm¸ÌfØ!Ø` ÀÁBÄLxBÈlxUÈ·
ñð¡ÏlüW,OÈêB¶](b7Åh᤿/UsìWÑ1aÍE)éóCú¼%(©¿oÉ}-_U¬ø(ÔV6WÄÓæJwÄ9S}¥__ÔkÎa51¯µä[05_®OÍkÚ¬Új̪
Mþ¸46f£ÖºfPc¾Õ²FØ|«ÃV¾Óʰ-ß²ÉâÛ{â-L¹ÒO¹MfÓ)·ü3¯àN(LÁ
¹B%LªÁ-ÔÀ,áT-ÔÂba.4
`
°ÚEp¾p:ìêáZlÛ-w
¸WX
+á7BüYX l¼°MÎbMö!þSc¯«GIT^ÀÛ`i2>XðWT~ò¨©Ð/¦ûº>ÀvìøîàÌø|ÿÇ`à-öCò,DóS÷
ÌeAè^ðáü·Àá<(z¡ëó
Ð a°
¢
¾«a£p #ìMø.
>á2W ÈB8¨Î®1MfïÂ
ÍÔÃþPKÅ8ì
Ç_g2*¡0=ÌÑT©x
¿L±ô µ4fy¬ÚùPKpB°¿t
Z
|
|
From: C. R. D. <rya...@us...> - 2003-03-21 02:36:50
|
Update of /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/tags
In directory sc8-pr-cvs1:/tmp/cvs-serv2295/src/org/dlese/dpc/vocab/tags
Modified Files:
MetadataVocabStateFeedbackTag.java
Log Message:
Added optional SQL database functionality for tracking vocabulary
values. Encoded IDs now assigned from highest values registered
in the DB, if used.
Index: MetadataVocabStateFeedbackTag.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/tags/MetadataVocabStateFeedbackTag.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** MetadataVocabStateFeedbackTag.java 7 Mar 2003 02:35:55 -0000 1.4
--- MetadataVocabStateFeedbackTag.java 21 Mar 2003 02:36:46 -0000 1.5
***************
*** 26,30 ****
* selected)
*
! *@author ryandear
*/
public class MetadataVocabStateFeedbackTag extends TagSupport {
--- 26,30 ----
* selected)
*
! * @author ryandear
*/
public class MetadataVocabStateFeedbackTag extends TagSupport {
***************
*** 36,40 ****
* Sets the group attribute of the MetadataVocabStateFeedbackTag object
*
! *@param group The new group value
*/
public void setGroup( String group ) {
--- 36,40 ----
* Sets the group attribute of the MetadataVocabStateFeedbackTag object
*
! * @param group The new group value
*/
public void setGroup( String group ) {
***************
*** 45,49 ****
* Sets the uiLabel attribute of the MetadataVocabStateFeedbackTag object
*
! *@param uiLabel The new uiLabel value
*/
public void setUiLabel( String uiLabel ) {
--- 45,49 ----
* Sets the uiLabel attribute of the MetadataVocabStateFeedbackTag object
*
! * @param uiLabel The new uiLabel value
*/
public void setUiLabel( String uiLabel ) {
***************
*** 54,64 ****
* Start tag
*
! *@exception JspException
*/
public int doStartTag() throws JspException {
try {
! MetadataVocabInputState state = (MetadataVocabInputState)pageContext.getSession().getAttribute( "MetadataVocabInputState" );
if ( state == null ) {
! state = new MetadataVocabInputState();
pageContext.getSession().setAttribute( "MetadataVocabInputState", state );
}
--- 54,65 ----
* Start tag
*
! * @return
! * @exception JspException
*/
public int doStartTag() throws JspException {
try {
! MetadataVocabInputState state = (MetadataVocabInputState) pageContext.getSession().getAttribute( "MetadataVocabInputState" );
if ( state == null ) {
! state = new MetadataVocabInputState( (MetadataVocab) pageContext.findAttribute( "MetadataVocab" ) );
pageContext.getSession().setAttribute( "MetadataVocabInputState", state );
}
|
|
From: C. R. D. <rya...@us...> - 2003-03-21 02:36:49
|
Update of /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab
In directory sc8-pr-cvs1:/tmp/cvs-serv2295/src/org/dlese/dpc/vocab
Modified Files:
DLESEMetadataVocabTracker.java LoadMetadataVocabs.java
MetadataVocab.java MetadataVocabTracker.java
Log Message:
Added optional SQL database functionality for tracking vocabulary
values. Encoded IDs now assigned from highest values registered
in the DB, if used.
Index: DLESEMetadataVocabTracker.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/DLESEMetadataVocabTracker.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** DLESEMetadataVocabTracker.java 18 Mar 2003 00:14:30 -0000 1.2
--- DLESEMetadataVocabTracker.java 21 Mar 2003 02:36:46 -0000 1.3
***************
*** 16,19 ****
--- 16,20 ----
package org.dlese.dpc.vocab;
+ import java.sql.*;
import java.util.*;
***************
*** 21,28 ****
* DLESE metadata vocabulary tracker (ID assignment, tracking of changes)
*
! *@author rya...@uc...
*/
public class DLESEMetadataVocabTracker implements MetadataVocabTracker {
! private HashMap highestIDs = new HashMap();
/**
--- 22,108 ----
* DLESE metadata vocabulary tracker (ID assignment, tracking of changes)
*
! * @author Ryan Deardorff
*/
public class DLESEMetadataVocabTracker implements MetadataVocabTracker {
! private Connection con = null;
! private Statement stmt;
! private ResultSet rs;
! private boolean usingDatabase = false;
!
! /**
! * Constructor for the DLESEMetadataVocabTracker object
! *
! * @param sqlDriver
! * @param sqlURL
! * @param sqlUser
! * @param sqlPassword
! */
! public DLESEMetadataVocabTracker( String sqlDriver,
! String sqlURL,
! String sqlUser,
! String sqlPassword ) {
! if ( ( sqlURL != null ) && !sqlURL.equals( "" ) ) {
! boolean gotToSelect = false;
! usingDatabase = true;
! try {
! Class.forName( sqlDriver ).newInstance();
! con = DriverManager.getConnection( sqlURL + "?user=" + sqlUser + "&password=" + sqlPassword );
! stmt = con.createStatement();
! gotToSelect = true;
! rs = stmt.executeQuery( "SELECT * FROM vocab_values WHERE id = '1'" );
! stmt.close();
! }
! catch ( Exception e ) {
! if ( gotToSelect ) {
! // Exception must be from SELECT statement, so it is assumed the vocab table doesn't exist yet:
! createVocabValuesTable();
! }
! else {
! System.out.println( "SQL error:\n" );
! e.printStackTrace();
! }
! }
! finally {
! if ( stmt != null ) {
! try {
! stmt.close();
! }
! catch ( Exception e ) {}
! }
! }
! }
! }
!
! /**
! * Close the connection to SQL database
! */
! public void closeConnection() {
! if ( con != null ) {
! try {
! con.close();
! }
! catch ( Exception e ) {
! System.out.println( "SQL error:\n" );
! e.printStackTrace();
! }
! }
! }
!
! /**
! * Create the vocabulary tables
! */
! private void createVocabValuesTable() {
! try {
! System.out.println( "Creating SQL table vocab_values" );
! stmt = con.createStatement();
! stmt.executeQuery( "CREATE TABLE vocab_values (id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, "
! + "metadataField CHAR(16), metadataValue CHAR(255), systemId CHAR(6));" );
! stmt.close();
! }
! catch ( Exception e ) {
! System.out.println( "SQL error:\n" );
! e.printStackTrace();
! }
! }
/**
***************
*** 30,57 ****
* with 0, so that Lucene * queries will be possible.
*
! *@param metadataName
! *@return
*/
! public String assignNewSystemId( String metadataName ) {
! StringBuffer highestID = (StringBuffer)highestIDs.get( metadataName );
! if ( highestID == null ) {
! highestIDs.put( metadataName, new StringBuffer( "00" ) );
! return "00";
! }
! for ( int i = highestID.length() - 1; i >= 1; i-- ) {
! int charInt = Character.getNumericValue( highestID.charAt( i ) );
! if ( charInt < 35 ) {
! char newChar = Character.forDigit( charInt + 1, 36 );
! highestID.setCharAt( i, newChar );
! highestIDs.put( metadataName, highestID );
! return highestID.toString();
}
else {
! highestID.setCharAt( i, '0' );
}
}
! highestID.append( '0' );
! highestIDs.put( metadataName, highestID );
! return highestID.toString();
}
--- 110,266 ----
* with 0, so that Lucene * queries will be possible.
*
! * @param metadataValue
! * @param metadataFieldId
! * @return
! */
! public String assignNewSystemId( String metadataFieldId, String metadataValue ) {
! if ( usingDatabase ) {
! StringBuffer highestId = new StringBuffer( getHighestId( metadataFieldId ) );
! if ( highestId.toString().equals( "-1" ) ) { // No ID existed yet, so "00" was registered
! return "00";
! }
! for ( int i = highestId.length() - 1; i >= 1; i-- ) {
! int charInt = Character.getNumericValue( highestId.charAt( i ) );
! if ( charInt < 35 ) {
! char newChar = Character.forDigit( charInt + 1, 36 );
! highestId.setCharAt( i, newChar );
! setHighestId( metadataFieldId, highestId.toString() );
! insertNewIdIntoValuesTable( metadataFieldId, metadataValue, highestId.toString() );
! return highestId.toString();
! }
! else {
! highestId.setCharAt( i, '0' );
! }
! }
! highestId.append( '0' );
! setHighestId( metadataFieldId, highestId.toString() );
! insertNewIdIntoValuesTable( metadataFieldId, metadataValue, highestId.toString() );
! return highestId.toString();
! }
! else {
! System.out.println( "WARNING: No database in use to assign new system ID for metadata field/value pair: "
! + metadataFieldId + "/" + metadataValue );
! return "-1";
! }
! }
!
! /**
! * Gets the highestId attribute of the DLESEMetadataVocabTracker object
! *
! * @param metadataFieldSystemId
! * @return The highestId value
*/
! private String getHighestId( String metadataFieldSystemId ) {
! boolean gotToFirstSelect = false;
! try {
! stmt = con.createStatement();
! gotToFirstSelect = true;
! stmt.executeQuery( "SELECT * FROM vocab_fields;" );
! rs = stmt.executeQuery( "SELECT * FROM vocab_fields WHERE metadataFieldId = '" + metadataFieldSystemId + "';" );
! if ( rs.next() ) {
! stmt.close();
! return rs.getString( "highestValueId" );
}
else {
! try {
! stmt.executeQuery( "INSERT INTO vocab_fields (metadataFieldId, highestValueId) "
! + "VALUES ('" + metadataFieldSystemId + "', '00');" );
! return "-1";
! }
! catch ( Exception ex ) {
! System.out.println( "SQL error:\n" );
! ex.printStackTrace();
! }
! }
! }
! catch ( Exception e ) {
! // Table doesn't exist yet:
! if ( gotToFirstSelect ) {
! createVocabFieldsTable( metadataFieldSystemId );
! return "-1";
! }
! else {
! System.out.println( "SQL error:\n" );
! e.printStackTrace();
! }
! }
! finally {
! if ( stmt != null ) {
! try {
! stmt.close();
! }
! catch ( Exception e ) {}
! }
! }
! // Shouldn't get here:
! return "NULL";
! }
!
! /**
! * Sets the highestId attribute of the DLESEMetadataVocabTracker object
! *
! * @param metadataFieldSystemId The new highestId value
! * @param newHighest The new highestId value
! */
! private void setHighestId( String metadataFieldSystemId, String newHighest ) {
! try {
! stmt = con.createStatement();
! stmt.executeQuery( "UPDATE vocab_fields SET highestValueId = '" + newHighest
! + "' WHERE metadataFieldId = '" + metadataFieldSystemId + "';" );
! }
! catch ( Exception e ) {
! System.out.println( "SQL error:\n" );
! e.printStackTrace();
! }
! finally {
! if ( stmt != null ) {
! try {
! stmt.close();
! }
! catch ( Exception e ) {}
}
}
! }
!
! /**
! * Description
! *
! * @param metadataFieldSystemId
! */
! private void createVocabFieldsTable( String metadataFieldSystemId ) {
! try {
! System.out.println( "Creating SQL table vocab_fields" );
! stmt = con.createStatement();
! stmt.executeQuery( "CREATE TABLE vocab_fields (id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, "
! + "metadataFieldId CHAR(5), highestValueId CHAR(5));" );
! stmt.executeQuery( "INSERT INTO vocab_fields (metadataFieldId, highestValueId) "
! + "VALUES ('" + metadataFieldSystemId + "', '00');" );
! stmt.close();
! }
! catch ( Exception e ) {
! System.out.println( "SQL error:\n" );
! e.printStackTrace();
! }
! }
!
! /**
! * Log the creation of a new metadata field/value pair with its associated new
! * system ID
! *
! * @param systemId
! * @param metadataField
! * @param metadataValue
! */
! private void insertNewIdIntoValuesTable( String metadataField, String metadataValue, String systemId ) {
! try {
! stmt = con.createStatement();
! stmt.executeQuery( "INSERT INTO vocab_values (metadataField, metadataValue, systemId) "
! + "VALUES ('" + metadataField + "', '" + metadataValue + "', '" + systemId + "');" );
! stmt.close();
! }
! catch ( Exception e ) {
! System.out.println( "SQL error:\n" );
! e.printStackTrace();
! }
}
***************
*** 61,70 ****
* registered values) and register any changes found in the UI labels
*
! *@param id
! *@param uiSystemLabels
! *@param metadataName
! *@return
*/
public boolean checkVocabValue( String id, String metadataName, HashMap uiSystemLabels ) {
return true;
}
--- 270,281 ----
* registered values) and register any changes found in the UI labels
*
! * @param id
! * @param uiSystemLabels
! * @param metadataName
! * @return
*/
public boolean checkVocabValue( String id, String metadataName, HashMap uiSystemLabels ) {
+ if ( usingDatabase ) {
+ }
return true;
}
Index: LoadMetadataVocabs.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/LoadMetadataVocabs.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** LoadMetadataVocabs.java 18 Mar 2003 00:14:30 -0000 1.8
--- LoadMetadataVocabs.java 21 Mar 2003 02:36:46 -0000 1.9
***************
*** 28,35 ****
* configuration file
*
! *@author ryandear
*/
public class LoadMetadataVocabs implements org.xml.sax.ContentHandler {
-
private Locator saxLocator;
private String xmlParserClass;
--- 28,34 ----
* configuration file
*
! * @author Ryan Deardorff
*/
public class LoadMetadataVocabs implements org.xml.sax.ContentHandler {
private Locator saxLocator;
private String xmlParserClass;
***************
*** 39,56 ****
private ArrayList filesToParse = new ArrayList();
private StringBuffer message = new StringBuffer();
/**
* Constructor for the LoadMetadataVocabs object
*
! *@param configFile
! *@param xmlParserClass
! *@param servletContext
*/
public LoadMetadataVocabs( String configFile,
String xmlParserClass,
! ServletContext servletContext ) {
this.servletContext = servletContext;
this.xmlParserClass = xmlParserClass;
this.configFile = configFile;
load();
servletContext.setAttribute( "LoadMetadataVocabs", this );
--- 38,71 ----
private ArrayList filesToParse = new ArrayList();
private StringBuffer message = new StringBuffer();
+ private String sqlDriver = null;
+ private String sqlURL = null;
+ private String sqlUser = null;
+ private String sqlPassword = null;
/**
* Constructor for the LoadMetadataVocabs object
*
! * @param configFile
! * @param xmlParserClass
! * @param servletContext
! * @param sqlDriver
! * @param sqlURL
! * @param sqlUser
! * @param sqlPassword
*/
public LoadMetadataVocabs( String configFile,
String xmlParserClass,
! ServletContext servletContext,
! String sqlDriver,
! String sqlURL,
! String sqlUser,
! String sqlPassword ) {
this.servletContext = servletContext;
this.xmlParserClass = xmlParserClass;
this.configFile = configFile;
+ this.sqlDriver = sqlDriver;
+ this.sqlURL = sqlURL;
+ this.sqlUser = sqlUser;
+ this.sqlPassword = sqlPassword;
load();
servletContext.setAttribute( "LoadMetadataVocabs", this );
***************
*** 68,79 ****
reader.setContentHandler( this );
reader.parse( inputSource );
! org.xml.sax.ContentHandler vocab = new MetadataVocab();
reader.setContentHandler( vocab );
for ( int i = 0; i < filesToParse.size(); i++ ) {
! inputSource = new InputSource( (String)filesToParse.get( i ) );
reader.parse( inputSource );
! message.append( "Loaded " + (String)filesToParse.get( i ) + "\n" );
}
servletContext.setAttribute( "MetadataVocab", vocab );
}
catch ( Exception e ) {
--- 83,97 ----
reader.setContentHandler( this );
reader.parse( inputSource );
! org.xml.sax.ContentHandler vocab = new MetadataVocab( sqlDriver, sqlURL, sqlUser, sqlPassword );
reader.setContentHandler( vocab );
for ( int i = 0; i < filesToParse.size(); i++ ) {
! System.out.println( "Loading " + (String) filesToParse.get( i ) + "\n" );
! inputSource = new InputSource( (String) filesToParse.get( i ) );
reader.parse( inputSource );
! message.append( "Loaded " + (String) filesToParse.get( i ) + "\n" );
}
servletContext.setAttribute( "MetadataVocab", vocab );
+ MetadataVocab done = (MetadataVocab) servletContext.getAttribute( "MetadataVocab" );
+ done.doneLoading();
}
catch ( Exception e ) {
***************
*** 85,88 ****
--- 103,108 ----
/**
* Gets the message attribute of the LoadMetadataVocabs object
+ *
+ * @return The message value
*/
public String getMessage() {
***************
*** 98,102 ****
* the spot where an error occured.
*
! *@param locator The new documentLocator value
*/
public void setDocumentLocator( Locator locator ) {
--- 118,122 ----
* the spot where an error occured.
*
! * @param locator The new documentLocator value
*/
public void setDocumentLocator( Locator locator ) {
***************
*** 107,111 ****
* Required by SAX, but not used here
*
! *@exception SAXException
*/
public void startDocument() throws SAXException {
--- 127,131 ----
* Required by SAX, but not used here
*
! * @exception SAXException
*/
public void startDocument() throws SAXException {
***************
*** 115,119 ****
* Required by SAX, but not used here
*
! *@exception SAXException
*/
public void endDocument() throws SAXException {
--- 135,139 ----
* Required by SAX, but not used here
*
! * @exception SAXException
*/
public void endDocument() throws SAXException {
***************
*** 123,129 ****
* Required by SAX, but not used here
*
! *@param prefix
! *@param uri
! *@exception SAXException
*/
public void startPrefixMapping( String prefix, String uri ) throws SAXException {
--- 143,149 ----
* Required by SAX, but not used here
*
! * @param prefix
! * @param uri
! * @exception SAXException
*/
public void startPrefixMapping( String prefix, String uri ) throws SAXException {
***************
*** 133,138 ****
* Required by SAX, but not used here
*
! *@param prefix
! *@exception SAXException
*/
public void endPrefixMapping( String prefix ) throws SAXException {
--- 153,158 ----
* Required by SAX, but not used here
*
! * @param prefix
! * @exception SAXException
*/
public void endPrefixMapping( String prefix ) throws SAXException {
***************
*** 142,150 ****
* Invoked upon opening tag of an XML element
*
! *@param namespaceURI XML namespace
! *@param localName local tag name
! *@param qName fully qualified tag name
! *@param atts tag attributes
! *@exception SAXException
*/
public void startElement( String namespaceURI,
--- 162,170 ----
* Invoked upon opening tag of an XML element
*
! * @param namespaceURI XML namespace
! * @param localName local tag name
! * @param qName fully qualified tag name
! * @param atts tag attributes
! * @exception SAXException
*/
public void startElement( String namespaceURI,
***************
*** 158,165 ****
* Invoked upon closing tag of an XML element
*
! *@param namespaceURI XML namespace
! *@param localName local tag name
! *@param qName fully qualified tag name
! *@exception SAXException
*/
public void endElement( String namespaceURI, String localName,
--- 178,185 ----
* Invoked upon closing tag of an XML element
*
! * @param namespaceURI XML namespace
! * @param localName local tag name
! * @param qName fully qualified tag name
! * @exception SAXException
*/
public void endElement( String namespaceURI, String localName,
***************
*** 170,182 ****
* Element data (characters between tags)
*
! *@param ch character array
! *@param start starting index of character data
! *@param length length of character data
! *@exception SAXException
*/
public void characters( char ch[], int start, int length ) throws SAXException {
String charsValue = new String( ch, start, length );
if ( currentSAXElementName.equals( "file" ) ) {
! filesToParse.add( servletContext.getRealPath( "/" ) + charsValue );
}
}
--- 190,207 ----
* Element data (characters between tags)
*
! * @param ch character array
! * @param start starting index of character data
! * @param length length of character data
! * @exception SAXException
*/
public void characters( char ch[], int start, int length ) throws SAXException {
String charsValue = new String( ch, start, length );
if ( currentSAXElementName.equals( "file" ) ) {
! if ( charsValue.startsWith( "/" ) || ( charsValue.indexOf( ":" ) > -1 ) ) {
! filesToParse.add( charsValue );
! }
! else {
! filesToParse.add( servletContext.getRealPath( "/" ) + charsValue );
! }
}
}
***************
*** 187,194 ****
* intact, though.
*
! *@param ch
! *@param start
! *@param length
! *@exception SAXException
*/
public void ignorableWhitespace( char ch[], int start, int length ) throws SAXException {
--- 212,219 ----
* intact, though.
*
! * @param ch
! * @param start
! * @param length
! * @exception SAXException
*/
public void ignorableWhitespace( char ch[], int start, int length ) throws SAXException {
***************
*** 198,204 ****
* Required by SAX, but not used here
*
! *@param target
! *@param data
! *@exception SAXException
*/
public void processingInstruction( String target, String data ) throws SAXException {
--- 223,229 ----
* Required by SAX, but not used here
*
! * @param target
! * @param data
! * @exception SAXException
*/
public void processingInstruction( String target, String data ) throws SAXException {
***************
*** 208,213 ****
* Required by SAX, but not used here
*
! *@param name
! *@exception SAXException
*/
public void skippedEntity( String name ) throws SAXException {
--- 233,238 ----
* Required by SAX, but not used here
*
! * @param name
! * @exception SAXException
*/
public void skippedEntity( String name ) throws SAXException {
Index: MetadataVocab.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/MetadataVocab.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -r1.20 -r1.21
*** MetadataVocab.java 18 Mar 2003 00:14:30 -0000 1.20
--- MetadataVocab.java 21 Mar 2003 02:36:46 -0000 1.21
***************
*** 25,39 ****
/*
! * TO DO:
! * -System ID assignment from database
! * -MySQL database error-checking of values
! * -Proper error handling for missing/incorrect IDs (email notification + JSP error bean)
! * -Database registration of values that have changed
! * -Remove XML files from CVS tree (so they don't get overwritten on a build)
! * -Add support for rendering vocab definitions
! * -Test with Schema instead of DTD (SHOULDN'T make a difference)
[...1425 lines suppressed...]
+
+ /**
+ * Log a warning
+ *
+ * @param warning
+ */
+ public void reportWarning( String warning ) {
+ System.out.println( "Warning: " + warning );
+ }
+
+ /**
+ * Log an error
+ *
+ * @param err
+ */
+ public void reportError( String err ) {
+ errors.add( err );
+ System.out.println( "ERROR: " + err );
}
}
Index: MetadataVocabTracker.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/MetadataVocabTracker.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** MetadataVocabTracker.java 11 Mar 2003 03:19:01 -0000 1.1
--- MetadataVocabTracker.java 21 Mar 2003 02:36:46 -0000 1.2
***************
*** 22,26 ****
* in metadata names and UI labels, and ensuring consistency of all three
*
! * @author rya...@uc...
*/
public interface MetadataVocabTracker {
--- 22,26 ----
* in metadata names and UI labels, and ensuring consistency of all three
*
! * @author Ryan Deardorff
*/
public interface MetadataVocabTracker {
***************
*** 30,36 ****
*
* @param metadataName
* @return
*/
! public String assignNewSystemId( String metadataName );
/**
--- 30,37 ----
*
* @param metadataName
+ * @param metadataValue
* @return
*/
! public String assignNewSystemId( String metadataName, String metadataValue );
/**
***************
*** 45,48 ****
--- 46,55 ----
*/
public boolean checkVocabValue( String id, String metadataName, HashMap uiSystemLabels );
+
+ /**
+ * If a relational database is being used, this should be used to close its
+ * connection once the vocabulary has been loaded
+ */
+ public void closeConnection();
}
|
|
From: C. R. D. <rya...@us...> - 2003-03-18 00:14:33
|
Update of /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab
In directory sc8-pr-cvs1:/tmp/cvs-serv29433/src/org/dlese/dpc/vocab
Modified Files:
DLESEMetadataVocabTracker.java LoadMetadataVocabs.java
MetadataVocab.java
Log Message:
Added a prefix of '0' to assignment of all encoded IDs (so that Lucene *
queries can be applied to vocabs)
Index: DLESEMetadataVocabTracker.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/DLESEMetadataVocabTracker.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** DLESEMetadataVocabTracker.java 11 Mar 2003 03:18:59 -0000 1.1
--- DLESEMetadataVocabTracker.java 18 Mar 2003 00:14:30 -0000 1.2
***************
*** 21,25 ****
* DLESE metadata vocabulary tracker (ID assignment, tracking of changes)
*
! * @author rya...@uc...
*/
public class DLESEMetadataVocabTracker implements MetadataVocabTracker {
--- 21,25 ----
* DLESE metadata vocabulary tracker (ID assignment, tracking of changes)
*
! *@author rya...@uc...
*/
public class DLESEMetadataVocabTracker implements MetadataVocabTracker {
***************
*** 27,42 ****
/**
! * Assign a unique system ID for a new vocabulary value
*
! * @param metadataName
! * @return
*/
public String assignNewSystemId( String metadataName ) {
! StringBuffer highestID = (StringBuffer) highestIDs.get( metadataName );
if ( highestID == null ) {
! highestIDs.put( metadataName, new StringBuffer( "0" ) );
! return "0";
}
! for ( int i = highestID.length() - 1; i >= 0; i-- ) {
int charInt = Character.getNumericValue( highestID.charAt( i ) );
if ( charInt < 35 ) {
--- 27,43 ----
/**
! * Assign a unique system ID for a new vocabulary value. ALL IDs will start
! * with 0, so that Lucene * queries will be possible.
*
! *@param metadataName
! *@return
*/
public String assignNewSystemId( String metadataName ) {
! StringBuffer highestID = (StringBuffer)highestIDs.get( metadataName );
if ( highestID == null ) {
! highestIDs.put( metadataName, new StringBuffer( "00" ) );
! return "00";
}
! for ( int i = highestID.length() - 1; i >= 1; i-- ) {
int charInt = Character.getNumericValue( highestID.charAt( i ) );
if ( charInt < 35 ) {
***************
*** 60,67 ****
* registered values) and register any changes found in the UI labels
*
! * @param id
! * @param uiSystemLabels
! * @param metadataName
! * @return
*/
public boolean checkVocabValue( String id, String metadataName, HashMap uiSystemLabels ) {
--- 61,68 ----
* registered values) and register any changes found in the UI labels
*
! *@param id
! *@param uiSystemLabels
! *@param metadataName
! *@return
*/
public boolean checkVocabValue( String id, String metadataName, HashMap uiSystemLabels ) {
Index: LoadMetadataVocabs.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/LoadMetadataVocabs.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** LoadMetadataVocabs.java 12 Mar 2003 01:33:36 -0000 1.7
--- LoadMetadataVocabs.java 18 Mar 2003 00:14:30 -0000 1.8
***************
*** 35,40 ****
--- 35,42 ----
private String xmlParserClass;
private String currentSAXElementName = "";
+ private String configFile;
private ServletContext servletContext;
private ArrayList filesToParse = new ArrayList();
+ private StringBuffer message = new StringBuffer();
/**
***************
*** 50,53 ****
--- 52,66 ----
this.servletContext = servletContext;
this.xmlParserClass = xmlParserClass;
+ this.configFile = configFile;
+ load();
+ servletContext.setAttribute( "LoadMetadataVocabs", this );
+ }
+
+ /**
+ * Load (or reload) the vocabulary
+ */
+ public void load() {
+ filesToParse.clear();
+ message.setLength( 0 );
try {
InputSource inputSource = new InputSource( configFile );
***************
*** 60,63 ****
--- 73,77 ----
inputSource = new InputSource( (String)filesToParse.get( i ) );
reader.parse( inputSource );
+ message.append( "Loaded " + (String)filesToParse.get( i ) + "\n" );
}
servletContext.setAttribute( "MetadataVocab", vocab );
***************
*** 67,70 ****
--- 81,91 ----
e.printStackTrace();
}
+ }
+
+ /**
+ * Gets the message attribute of the LoadMetadataVocabs object
+ */
+ public String getMessage() {
+ return message.toString();
}
Index: MetadataVocab.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/MetadataVocab.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -r1.19 -r1.20
*** MetadataVocab.java 14 Mar 2003 00:55:12 -0000 1.19
--- MetadataVocab.java 18 Mar 2003 00:14:30 -0000 1.20
***************
*** 26,34 ****
/*
* TO DO:
- * -Prefix added to IDs (for Lucene * query capability)
- * -Reload mechanism
* -System ID assignment from database
* -MySQL database error-checking of values
! * -Proper error handling for missing/incorrect IDs (email notification + thrown exception)
* -Database registration of values that have changed
* -Remove XML files from CVS tree (so they don't get overwritten on a build)
--- 26,32 ----
/*
* TO DO:
* -System ID assignment from database
* -MySQL database error-checking of values
! * -Proper error handling for missing/incorrect IDs (email notification + JSP error bean)
* -Database registration of values that have changed
* -Remove XML files from CVS tree (so they don't get overwritten on a build)
***************
*** 83,86 ****
--- 81,93 ----
private HashMap uiLabelOfSystemIds = new HashMap();// encoded IDs -> ui label mapping
+ private ArrayList messages = new ArrayList();
+
+ /**
+ * Gets the messages attribute of the MetadataVocab object
+ */
+ public ArrayList getMessages() {
+ return messages;
+ }
+
/**
* Gets the fieldValueSystemID attribute of the MetadataVocab object
***************
*** 94,98 ****
String ret = (String)fieldValueSystemID.get( field + value );
if ( ret == null ) {
! System.out.println( "ERROR: getFieldValueSystemID is NULL for field/value pair " + field + "/" + value );
ret = " ";
}
--- 101,105 ----
String ret = (String)fieldValueSystemID.get( field + value );
if ( ret == null ) {
! System.out.println( "Warning: getFieldValueSystemID is NULL for field/value pair " + field + "/" + value );
ret = " ";
}
***************
*** 1115,1119 ****
xmlFile = '/' + xmlFile;
}
! System.out.println( "Loading vocabulary: " + xmlFile );
}
--- 1122,1126 ----
xmlFile = '/' + xmlFile;
}
! messages.add( "Loading file: " + xmlFile );
}
***************
*** 1139,1143 ****
if ( rewriteXML ) {
try {
! System.out.println( "New vocab ID(s) assigned, rewriting file " + xmlFile );
FileWriter file = new FileWriter( xmlFile );
String outStr = outputXML.toString();
--- 1146,1150 ----
if ( rewriteXML ) {
try {
! messages.add( "New vocab ID(s) assigned, rewriting file " + xmlFile );
FileWriter file = new FileWriter( xmlFile );
String outStr = outputXML.toString();
|
|
From: C. R. D. <rya...@us...> - 2003-03-14 00:55:57
|
Update of /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/tags
In directory sc8-pr-cvs1:/tmp/cvs-serv19553/src/org/dlese/dpc/vocab/tags
Added Files:
MetadataVocabFieldValueUiLabelTag.java
Log Message:
New tag handler for converting system IDs to UI labels
--- NEW FILE ---
/**
* Copyright 2002, 2003 DLESE Program Center/University Corporation for
* Atmospheric Research (UCAR), P.O. Box 3000, Boulder, CO 80307,
* su...@dl.... This file is part of the DLESE Vocab Project. The DLESE
* Vocab Project is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version. The DLESE Vocab Project is distributed in the hope that
* it will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details. You should have received a copy of
* the GNU General Public License along with The DLESE System; if not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
* 02111-1307 USA
*/
package org.dlese.dpc.vocab.tags;
import org.dlese.dpc.vocab.MetadataVocab;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.TagSupport;
import javax.servlet.http.*;
/**
* Tag handler for retreiving a UI label from the given field id, and value
* LIST (space seperated) of IDs
*
*@author ryandear
*/
public class MetadataVocabFieldValueUiLabelTag extends TagSupport {
String system = "";
String fieldId = "";
String valueIdList = "";
/**
* Sets the system attribute of the MetadataVocabCheckboxesTag object
*
*@param system The new system value
*/
public void setSystem( String system ) {
this.system = system;
}
/**
* Sets the system attribute of the MetadataVocabGetFieldValueUiLabel object
*
*@param fieldId The new fieldId value
*/
public void setFieldId( String fieldId ) {
this.fieldId = fieldId;
}
/**
* Sets the system attribute of the MetadataVocabGetFieldValueUiLabel object
*
*@param valueIdList The new valueIdList value
*/
public void setValueIdList( String valueIdList ) {
this.valueIdList = valueIdList;
}
/**
* Start tag
*
*@exception JspException
*/
public int doStartTag() throws JspException {
try {
MetadataVocab vocab = (MetadataVocab)pageContext.findAttribute( "MetadataVocab" );
if ( vocab == null ) {
pageContext.getOut().print( "ERROR: Vocabulary not found" );
}
else {
StringBuffer outStr = new StringBuffer();
int ind1 = 0;
int ind2 = valueIdList.indexOf( " " );
// Indexed values should alwasy end with " "!
while ( ind2 > -1 ) {
outStr.append( vocab.getUiLabelOfSystemIds( system, fieldId,
valueIdList.substring( ind1, ind2 ) ) + ", " );
ind1 = ind2 + 1;
ind2 = valueIdList.indexOf( " ", ind1 );
}
//ind2 = valueIdList.length();
//outStr.append( vocab.getUiLabelOfSystemIds( system, fieldId,
// valueIdList.substring( ind1, ind2 ) ) );
outStr.setLength( outStr.length() - 2 );
pageContext.getOut().print( outStr.toString() );
}
}
catch ( java.io.IOException ex ) {
throw new JspException( ex.getMessage() );
}
return SKIP_BODY;
}
}
|
|
From: C. R. D. <rya...@us...> - 2003-03-14 00:55:16
|
Update of /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab
In directory sc8-pr-cvs1:/tmp/cvs-serv19120/src/org/dlese/dpc/vocab
Modified Files:
MetadataVocab.java
Log Message:
New tag handler for converting system IDs to UI labels
Index: MetadataVocab.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/MetadataVocab.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -r1.18 -r1.19
*** MetadataVocab.java 12 Mar 2003 23:09:42 -0000 1.18
--- MetadataVocab.java 14 Mar 2003 00:55:12 -0000 1.19
***************
*** 26,29 ****
--- 26,31 ----
/*
* TO DO:
+ * -Prefix added to IDs (for Lucene * query capability)
+ * -Reload mechanism
* -System ID assignment from database
* -MySQL database error-checking of values
***************
*** 53,57 ****
* ALL metadata entries in the "topic" category.
*
! *@author Ryan Deardorff
*/
public class MetadataVocab implements org.xml.sax.ContentHandler {
--- 55,59 ----
* ALL metadata entries in the "topic" category.
*
! *@author ryandear
*/
public class MetadataVocab implements org.xml.sax.ContentHandler {
|
|
From: C. R. D. <rya...@us...> - 2003-03-14 00:55:15
|
Update of /cvsroot/dlese/vocab-project/build_lib In directory sc8-pr-cvs1:/tmp/cvs-serv19120/build_lib Modified Files: DLESETools.jar Log Message: New tag handler for converting system IDs to UI labels Index: DLESETools.jar =================================================================== RCS file: /cvsroot/dlese/vocab-project/build_lib/DLESETools.jar,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 Binary files /tmp/cvshivZfR and /tmp/cvsIKvBzx differ |
|
From: C. R. D. <rya...@us...> - 2003-03-12 23:09:47
|
Update of /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/tags
In directory sc8-pr-cvs1:/tmp/cvs-serv10235/src/org/dlese/dpc/vocab/tags
Modified Files:
MetadataVocabSelectListTag.java MetadataVocabSetStateTag.java
Log Message:
Ironed out a number of kinks in the use of encoded IDs--it all seems to
be working now, including the histogram search.
Index: MetadataVocabSelectListTag.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/tags/MetadataVocabSelectListTag.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** MetadataVocabSelectListTag.java 11 Mar 2003 03:17:05 -0000 1.5
--- MetadataVocabSelectListTag.java 12 Mar 2003 23:09:45 -0000 1.6
***************
*** 26,30 ****
* Tag handler for rendering vocabulary select list inputs
*
! * @author ryandear
*/
public class MetadataVocabSelectListTag extends TagSupport {
--- 26,30 ----
* Tag handler for rendering vocabulary select list inputs
*
! *@author ryandear
*/
public class MetadataVocabSelectListTag extends TagSupport {
***************
*** 37,41 ****
* Sets the system attribute of the MetadataVocabSelectListTag object
*
! * @param system The new system value
*/
public void setSystem( String system ) {
--- 37,41 ----
* Sets the system attribute of the MetadataVocabSelectListTag object
*
! *@param system The new system value
*/
public void setSystem( String system ) {
***************
*** 46,50 ****
* Sets the group attribute of the MetadataVocabSelectListTag object
*
! * @param group The new group value
*/
public void setGroup( String group ) {
--- 46,50 ----
* Sets the group attribute of the MetadataVocabSelectListTag object
*
! *@param group The new group value
*/
public void setGroup( String group ) {
***************
*** 55,59 ****
* Sets the size attribute of the MetadataVocabSelectListTag object
*
! * @param size The new size value
*/
public void setSize( String size ) {
--- 55,59 ----
* Sets the size attribute of the MetadataVocabSelectListTag object
*
! *@param size The new size value
*/
public void setSize( String size ) {
***************
*** 64,73 ****
* Description of the Method
*
! * @return
! * @exception JspException
*/
public int doStartTag() throws JspException {
try {
! MetadataVocab vocab = (MetadataVocab) pageContext.findAttribute( "MetadataVocab" );
if ( vocab == null ) {
pageContext.getOut().print( "ERROR: Vocabulary not found" );
--- 64,73 ----
* Description of the Method
*
! *@exception JspException
! *@return
*/
public int doStartTag() throws JspException {
try {
! MetadataVocab vocab = (MetadataVocab)pageContext.findAttribute( "MetadataVocab" );
if ( vocab == null ) {
pageContext.getOut().print( "ERROR: Vocabulary not found" );
Index: MetadataVocabSetStateTag.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/tags/MetadataVocabSetStateTag.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** MetadataVocabSetStateTag.java 12 Mar 2003 01:33:39 -0000 1.5
--- MetadataVocabSetStateTag.java 12 Mar 2003 23:09:45 -0000 1.6
***************
*** 29,32 ****
--- 29,42 ----
*/
public class MetadataVocabSetStateTag extends TagSupport {
+ String system = "";
+
+ /**
+ * Sets the system attribute of the MetadataVocabCheckboxesTag object
+ *
+ *@param system The new system value
+ */
+ public void setSystem( String system ) {
+ this.system = system;
+ }
/**
***************
*** 39,43 ****
pageContext.getSession().setAttribute( "MetadataVocabInputState", state );
}
! state.setState( pageContext.getRequest() );
return SKIP_BODY;
}
--- 49,53 ----
pageContext.getSession().setAttribute( "MetadataVocabInputState", state );
}
! state.setState( pageContext.getRequest(), system );
return SKIP_BODY;
}
|
|
From: C. R. D. <rya...@us...> - 2003-03-12 23:09:47
|
Update of /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab
In directory sc8-pr-cvs1:/tmp/cvs-serv10235/src/org/dlese/dpc/vocab
Modified Files:
MetadataVocab.java MetadataVocabInputState.java
Log Message:
Ironed out a number of kinks in the use of encoded IDs--it all seems to
be working now, including the histogram search.
Index: MetadataVocab.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/MetadataVocab.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** MetadataVocab.java 12 Mar 2003 01:33:36 -0000 1.17
--- MetadataVocab.java 12 Mar 2003 23:09:42 -0000 1.18
***************
*** 26,30 ****
/*
* TO DO:
- * -Update histogram results page with regard to encoded vals
* -System ID assignment from database
* -MySQL database error-checking of values
--- 26,29 ----
***************
*** 68,71 ****
--- 67,71 ----
private String currentVocabFieldID;
private String currentVocabFieldName;
+ private boolean processingUiGroup = false;
// Store XML in case it needs to be re-written with new IDs:
***************
*** 200,211 ****
VocabNode node = (VocabNode)list.item.get( i );
if ( ( inputState != null ) &&
! ( inputState.get( name + node.name ) != null ) ) {
ret.append( "<option selected value=\"" )
! .append( escapedValue( node.name ) )
.append( "\">\n" );
}
else {
ret.append( "<option value=\"" )
! .append( escapedValue( node.name ) )
.append( "\">\n" );
}
--- 200,211 ----
VocabNode node = (VocabNode)list.item.get( i );
if ( ( inputState != null ) &&
! ( inputState.get( name + node.id ) != null ) ) {
ret.append( "<option selected value=\"" )
! .append( node.id )
.append( "\">\n" );
}
else {
ret.append( "<option value=\"" )
! .append( node.id )
.append( "\">\n" );
}
***************
*** 550,557 ****
String subQuery = (String)luceneQuery.get( name + "=" + node.name );
int perc = (int)( (float)count.intValue() / (float)getHistogramHighestCount( session ) * (float)84 );
if ( !isFirst ) {
ret.append( EMPTY_ROW );
}
! String a_href = "<a href='" + LINK_URL + "?" + getFieldSystemID( name ) + "=" + node.id + "'>";
ret.append( "<tr><td background='" + imgPrefix + "images/hist_back.gif' align='right' width='25%'><b><i>" )
.append( "<span class='histogramSubHeader'>" )
--- 550,560 ----
String subQuery = (String)luceneQuery.get( name + "=" + node.name );
int perc = (int)( (float)count.intValue() / (float)getHistogramHighestCount( session ) * (float)84 );
+ if ( perc == 0 ) {
+ perc++;
+ }
if ( !isFirst ) {
ret.append( EMPTY_ROW );
}
! String a_href = "<a href='" + LINK_URL + "?" + getFieldSystemID( name ) + "=" + node.name + "'>";
ret.append( "<tr><td background='" + imgPrefix + "images/hist_back.gif' align='right' width='25%'><b><i>" )
.append( "<span class='histogramSubHeader'>" )
***************
*** 570,573 ****
--- 573,579 ----
if ( count.intValue() > 0 ) {
int perc = (int)( (float)count.intValue() / (float)getHistogramHighestCount( session ) * (float)84 );
+ if ( perc == 0 ) {
+ perc++;
+ }
String a_href = "<a href='" + LINK_URL + "?" + getFieldSystemID( name ) + "=" + node.id + "' class='histogramLabels'>";
ret.append( "<tr><td background='" + imgPrefix + "images/hist_back.gif' align='right' width='25%' height='8'>" )
***************
*** 618,626 ****
VocabNode node = (VocabNode)list.item.get( i );
if ( node.list.item.size() > 0 ) {
! luceneQuery.put( groupTop + "=" + node.name, subQuery( node.list, groupTop ) );
luceneQueries( node.list, groupTop );
}
else {
! luceneQuery.put( groupTop + "=" + node.name, " "
+ getFieldSystemID( groupTop ) + ":\""
+ getFieldValueSystemID( groupTop, node.name ) + "\"" );
--- 624,632 ----
VocabNode node = (VocabNode)list.item.get( i );
if ( node.list.item.size() > 0 ) {
! luceneQuery.put( getFieldSystemID( groupTop ) + "=" + node.name, subQuery( node.list, groupTop ) );
luceneQueries( node.list, groupTop );
}
else {
! luceneQuery.put( getFieldSystemID( groupTop ) + "=" + getFieldValueSystemID( groupTop, node.name ), " "
+ getFieldSystemID( groupTop ) + ":\""
+ getFieldValueSystemID( groupTop, node.name ) + "\"" );
***************
*** 673,679 ****
else {
ret.append( " " )
! .append( name )
.append( ":\"" )
! .append( node.name )
.append( "\"" );
}
--- 679,685 ----
else {
ret.append( " " )
! .append( getFieldSystemID( name ) )
.append( ":\"" )
! .append( getFieldValueSystemID( name, node.name ) )
.append( "\"" );
}
***************
*** 731,735 ****
VocabNode node = (VocabNode)list.item.get( i );
if ( node.list.item.size() > 0 ) {
! String subQuery = (String)luceneQuery.get( name
+ "=" + node.name );
ret = browser.numDocs( addQuery + " +(" + subQuery + ")" );
--- 737,741 ----
VocabNode node = (VocabNode)list.item.get( i );
if ( node.list.item.size() > 0 ) {
! String subQuery = (String)luceneQuery.get( getFieldSystemID( name )
+ "=" + node.name );
ret = browser.numDocs( addQuery + " +(" + subQuery + ")" );
***************
*** 1210,1213 ****
--- 1216,1223 ----
currentVocabFieldName = newNodeName;
fieldSystemID.put( newNodeName, newNodeID );
+ processingUiGroup = false;
+ }
+ else if ( localName.equals( "ui_group" ) ) {
+ processingUiGroup = true;
}
if ( localName.equals( "vocabulary" ) || localName.equals( "ui_group" ) ) {
***************
*** 1220,1223 ****
--- 1230,1234 ----
}
else if ( localName.equals( "value" ) ) {
+ processingUiGroup = false;
VocabNode node = new VocabNode( newNodeName, newNodeID );
current.item.add( node );
***************
*** 1257,1261 ****
currentNode.setLabel( currentSAXElementSystem, charsValue );
uiLabelOf.put( currentSAXElementSystem + currentVocabFieldName + newNodeName, charsValue );
! uiLabelOfSystemIds.put( currentSAXElementSystem + currentVocabFieldID + newNodeID, charsValue );
}
else if ( currentSAXElementName.equals( "definition" ) ) {
--- 1268,1277 ----
currentNode.setLabel( currentSAXElementSystem, charsValue );
uiLabelOf.put( currentSAXElementSystem + currentVocabFieldName + newNodeName, charsValue );
! if ( !processingUiGroup ) {
! uiLabelOfSystemIds.put( currentSAXElementSystem + currentVocabFieldID + newNodeID, charsValue );
! }
! else {
! uiLabelOfSystemIds.put( currentSAXElementSystem + currentVocabFieldID + newNodeName, charsValue );
! }
}
else if ( currentSAXElementName.equals( "definition" ) ) {
Index: MetadataVocabInputState.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/MetadataVocabInputState.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** MetadataVocabInputState.java 12 Mar 2003 01:33:36 -0000 1.5
--- MetadataVocabInputState.java 12 Mar 2003 23:09:44 -0000 1.6
***************
*** 51,60 ****
*
*@param request The new state value
*/
! public void setState( ServletRequest request ) {
if ( request.getParameter( "SetMetadataVocabInputState" ) != null ) {
String[] vals = request.getParameterValues( "SetMetadataVocabInputState" );
for ( int i = 0; i < vals.length; i++ ) {
! setState( request, vals[i] );
}
}
--- 51,62 ----
*
*@param request The new state value
+ *@param system The new state value
*/
! public void setState( ServletRequest request,
! String system ) {
if ( request.getParameter( "SetMetadataVocabInputState" ) != null ) {
String[] vals = request.getParameterValues( "SetMetadataVocabInputState" );
for ( int i = 0; i < vals.length; i++ ) {
! setState( request, system, vals[i] );
}
}
***************
*** 66,71 ****
--- 68,75 ----
*@param request HTTP request
*@param stateGroup vocab field
+ *@param system The new state value
*/
public void setState( ServletRequest request,
+ String system,
String stateGroup ) {
HashMap currentState = getState( stateGroup );
***************
*** 83,87 ****
.append( vals[i] )
.append( "\" " );
! feedback.append( vocab.getUiLabelOfSystemIds( "dds_english", stateGroup, vals[i] ) )
.append( ", " );
hasFeedback = true;
--- 87,91 ----
.append( vals[i] )
.append( "\" " );
! feedback.append( vocab.getUiLabelOfSystemIds( system, stateGroup, vals[i] ) )
.append( ", " );
hasFeedback = true;
|
|
From: C. R. D. <rya...@us...> - 2003-03-12 01:33:43
|
Update of /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab
In directory sc8-pr-cvs1:/tmp/cvs-serv13424/src/org/dlese/dpc/vocab
Modified Files:
LoadMetadataVocabs.java MetadataVocab.java
MetadataVocabInputState.java
Log Message:
Update of state feedback and histogram display to use encoded IDs
Index: LoadMetadataVocabs.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/LoadMetadataVocabs.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** LoadMetadataVocabs.java 11 Mar 2003 03:17:04 -0000 1.6
--- LoadMetadataVocabs.java 12 Mar 2003 01:33:36 -0000 1.7
***************
*** 28,32 ****
* configuration file
*
! * @author ryandear
*/
public class LoadMetadataVocabs implements org.xml.sax.ContentHandler {
--- 28,32 ----
* configuration file
*
! *@author ryandear
*/
public class LoadMetadataVocabs implements org.xml.sax.ContentHandler {
***************
*** 41,47 ****
* Constructor for the LoadMetadataVocabs object
*
! * @param configFile
! * @param xmlParserClass
! * @param servletContext
*/
public LoadMetadataVocabs( String configFile,
--- 41,47 ----
* Constructor for the LoadMetadataVocabs object
*
! *@param configFile
! *@param xmlParserClass
! *@param servletContext
*/
public LoadMetadataVocabs( String configFile,
***************
*** 58,62 ****
reader.setContentHandler( vocab );
for ( int i = 0; i < filesToParse.size(); i++ ) {
! inputSource = new InputSource( (String) filesToParse.get( i ) );
reader.parse( inputSource );
}
--- 58,62 ----
reader.setContentHandler( vocab );
for ( int i = 0; i < filesToParse.size(); i++ ) {
! inputSource = new InputSource( (String)filesToParse.get( i ) );
reader.parse( inputSource );
}
***************
*** 77,81 ****
* the spot where an error occured.
*
! * @param locator The new documentLocator value
*/
public void setDocumentLocator( Locator locator ) {
--- 77,81 ----
* the spot where an error occured.
*
! *@param locator The new documentLocator value
*/
public void setDocumentLocator( Locator locator ) {
***************
*** 86,90 ****
* Required by SAX, but not used here
*
! * @exception SAXException
*/
public void startDocument() throws SAXException {
--- 86,90 ----
* Required by SAX, but not used here
*
! *@exception SAXException
*/
public void startDocument() throws SAXException {
***************
*** 94,98 ****
* Required by SAX, but not used here
*
! * @exception SAXException
*/
public void endDocument() throws SAXException {
--- 94,98 ----
* Required by SAX, but not used here
*
! *@exception SAXException
*/
public void endDocument() throws SAXException {
***************
*** 102,108 ****
* Required by SAX, but not used here
*
! * @param prefix
! * @param uri
! * @exception SAXException
*/
public void startPrefixMapping( String prefix, String uri ) throws SAXException {
--- 102,108 ----
* Required by SAX, but not used here
*
! *@param prefix
! *@param uri
! *@exception SAXException
*/
public void startPrefixMapping( String prefix, String uri ) throws SAXException {
***************
*** 112,117 ****
* Required by SAX, but not used here
*
! * @param prefix
! * @exception SAXException
*/
public void endPrefixMapping( String prefix ) throws SAXException {
--- 112,117 ----
* Required by SAX, but not used here
*
! *@param prefix
! *@exception SAXException
*/
public void endPrefixMapping( String prefix ) throws SAXException {
***************
*** 121,129 ****
* Invoked upon opening tag of an XML element
*
! * @param namespaceURI XML namespace
! * @param localName local tag name
! * @param qName fully qualified tag name
! * @param atts tag attributes
! * @exception SAXException
*/
public void startElement( String namespaceURI,
--- 121,129 ----
* Invoked upon opening tag of an XML element
*
! *@param namespaceURI XML namespace
! *@param localName local tag name
! *@param qName fully qualified tag name
! *@param atts tag attributes
! *@exception SAXException
*/
public void startElement( String namespaceURI,
***************
*** 137,144 ****
* Invoked upon closing tag of an XML element
*
! * @param namespaceURI XML namespace
! * @param localName local tag name
! * @param qName fully qualified tag name
! * @exception SAXException
*/
public void endElement( String namespaceURI, String localName,
--- 137,144 ----
* Invoked upon closing tag of an XML element
*
! *@param namespaceURI XML namespace
! *@param localName local tag name
! *@param qName fully qualified tag name
! *@exception SAXException
*/
public void endElement( String namespaceURI, String localName,
***************
*** 149,156 ****
* Element data (characters between tags)
*
! * @param ch character array
! * @param start starting index of character data
! * @param length length of character data
! * @exception SAXException
*/
public void characters( char ch[], int start, int length ) throws SAXException {
--- 149,156 ----
* Element data (characters between tags)
*
! *@param ch character array
! *@param start starting index of character data
! *@param length length of character data
! *@exception SAXException
*/
public void characters( char ch[], int start, int length ) throws SAXException {
***************
*** 166,173 ****
* intact, though.
*
! * @param ch
! * @param start
! * @param length
! * @exception SAXException
*/
public void ignorableWhitespace( char ch[], int start, int length ) throws SAXException {
--- 166,173 ----
* intact, though.
*
! *@param ch
! *@param start
! *@param length
! *@exception SAXException
*/
public void ignorableWhitespace( char ch[], int start, int length ) throws SAXException {
***************
*** 177,183 ****
* Required by SAX, but not used here
*
! * @param target
! * @param data
! * @exception SAXException
*/
public void processingInstruction( String target, String data ) throws SAXException {
--- 177,183 ----
* Required by SAX, but not used here
*
! *@param target
! *@param data
! *@exception SAXException
*/
public void processingInstruction( String target, String data ) throws SAXException {
***************
*** 187,192 ****
* Required by SAX, but not used here
*
! * @param name
! * @exception SAXException
*/
public void skippedEntity( String name ) throws SAXException {
--- 187,192 ----
* Required by SAX, but not used here
*
! *@param name
! *@exception SAXException
*/
public void skippedEntity( String name ) throws SAXException {
Index: MetadataVocab.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/MetadataVocab.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** MetadataVocab.java 11 Mar 2003 22:50:59 -0000 1.16
--- MetadataVocab.java 12 Mar 2003 01:33:36 -0000 1.17
***************
*** 26,30 ****
/*
* TO DO:
! * -Improve feedback tag to use UI labels instead of system names
* -System ID assignment from database
* -MySQL database error-checking of values
--- 26,30 ----
/*
* TO DO:
! * -Update histogram results page with regard to encoded vals
* -System ID assignment from database
* -MySQL database error-checking of values
***************
*** 57,61 ****
*/
public class MetadataVocab implements org.xml.sax.ContentHandler {
-
private VocabList vocab = new VocabList();
private VocabList current = vocab;
--- 57,60 ----
***************
*** 64,67 ****
--- 63,67 ----
private Locator saxLocator;
private String newNodeName = "";
+ private String newNodeID = "";
private String currentSAXElementName = "";
private String currentSAXElementSystem = "";
***************
*** 79,82 ****
--- 79,83 ----
private HashMap fieldValueSystemID = new HashMap();
private HashMap uiLabelOf = new HashMap(); // metadata name -> ui label mapping
+ private HashMap uiLabelOfSystemIds = new HashMap();// encoded IDs -> ui label mapping
/**
***************
*** 116,127 ****
*
*@param system
- *@param metadataName
*@param metadataValue
*/
! public String getUiLabelOf( String system, String metadataName, String metadataValue ) {
! String ret = (String)uiLabelOf.get( system + metadataName + metadataValue );
if ( ret == null ) {
System.out.println( "Warning: getUiLabelOf is NULL for ("
! + system + metadataName + metadataValue + ")" );
ret = " ";
}
--- 117,145 ----
*
*@param system
*@param metadataValue
+ *@param metadataField
*/
! public String getUiLabelOf( String system, String metadataField, String metadataValue ) {
! String ret = (String)uiLabelOf.get( system + metadataField + metadataValue );
if ( ret == null ) {
System.out.println( "Warning: getUiLabelOf is NULL for ("
! + system + metadataField + metadataValue + ")" );
! ret = " ";
! }
! return ret;
! }
!
! /**
! * Gets the uiLabelOfSystemIds attribute of the MetadataVocab object
! *
! *@param system
! *@param systemFieldID
! *@param systemValueID
! */
! public String getUiLabelOfSystemIds( String system, String systemFieldID, String systemValueID ) {
! String ret = (String)uiLabelOfSystemIds.get( system + systemFieldID + systemValueID );
! if ( ret == null ) {
! System.out.println( "Warning: getUiLabelOfSystemIds is NULL for ("
! + system + systemFieldID + systemValueID + ")" );
ret = " ";
}
***************
*** 491,495 ****
HashMap histogramTotals = getHistogramState( session );
StringBuffer ret = new StringBuffer( "<table width='100%' border='0' cellpadding='0' cellspacing='0'><tr><td><table width='100%' border='0' cellpadding='0' cellspacing='0'>" );
! String name = setTopName( group );
VocabList current = setCurrent( group );
ret.append( vocabHistogram( system, current, name, true, histogramTotals, session, addQuery, imgPrefix ) )
--- 509,513 ----
HashMap histogramTotals = getHistogramState( session );
StringBuffer ret = new StringBuffer( "<table width='100%' border='0' cellpadding='0' cellspacing='0'><tr><td><table width='100%' border='0' cellpadding='0' cellspacing='0'>" );
! String name = setTopMetaName( group );
VocabList current = setCurrent( group );
ret.append( vocabHistogram( system, current, name, true, histogramTotals, session, addQuery, imgPrefix ) )
***************
*** 529,537 ****
count = new Integer( 0 );
}
- String urlEncodedNodeName = node.name;
- try {
- urlEncodedNodeName = URLEncoder.encode( urlEncodedNodeName, "UTF-8" );
- }
- catch ( Exception e ) {}
if ( node.list.item.size() > 0 ) {
String subQuery = (String)luceneQuery.get( name + "=" + node.name );
--- 547,550 ----
***************
*** 540,544 ****
ret.append( EMPTY_ROW );
}
! String a_href = "<a href='" + LINK_URL + "?" + name + "=" + urlEncodedNodeName + "'>";
ret.append( "<tr><td background='" + imgPrefix + "images/hist_back.gif' align='right' width='25%'><b><i>" )
.append( "<span class='histogramSubHeader'>" )
--- 553,557 ----
ret.append( EMPTY_ROW );
}
! String a_href = "<a href='" + LINK_URL + "?" + getFieldSystemID( name ) + "=" + node.id + "'>";
ret.append( "<tr><td background='" + imgPrefix + "images/hist_back.gif' align='right' width='25%'><b><i>" )
.append( "<span class='histogramSubHeader'>" )
***************
*** 557,561 ****
if ( count.intValue() > 0 ) {
int perc = (int)( (float)count.intValue() / (float)getHistogramHighestCount( session ) * (float)84 );
! String a_href = "<a href='" + LINK_URL + "?" + name + "=" + urlEncodedNodeName + "' class='histogramLabels'>";
ret.append( "<tr><td background='" + imgPrefix + "images/hist_back.gif' align='right' width='25%' height='8'>" )
.append( a_href )
--- 570,574 ----
if ( count.intValue() > 0 ) {
int perc = (int)( (float)count.intValue() / (float)getHistogramHighestCount( session ) * (float)84 );
! String a_href = "<a href='" + LINK_URL + "?" + getFieldSystemID( name ) + "=" + node.id + "' class='histogramLabels'>";
ret.append( "<tr><td background='" + imgPrefix + "images/hist_back.gif' align='right' width='25%' height='8'>" )
.append( a_href )
***************
*** 609,613 ****
}
else {
! luceneQuery.put( groupTop + "=" + node.name, " " + groupTop + ":\"" + node.name + "\"" );
}
}
--- 622,628 ----
}
else {
! luceneQuery.put( groupTop + "=" + node.name, " "
! + getFieldSystemID( groupTop ) + ":\""
! + getFieldValueSystemID( groupTop, node.name ) + "\"" );
}
}
***************
*** 636,640 ****
*/
public synchronized String getSubQuery( String group ) {
! String name = setTopName( group );
VocabList current = setCurrent( group );
return subQuery( current, name );
--- 651,655 ----
*/
public synchronized String getSubQuery( String group ) {
! String name = setTopMetaName( group );
VocabList current = setCurrent( group );
return subQuery( current, name );
***************
*** 687,691 ****
HttpSession session = page.getSession();
HashMap histogramTotals = getHistogramState( session );
! String name = setTopName( group );
VocabList current = setCurrent( group );
int ret = vocabHistogramHighestCountFromGroup( current, name, browser, 0, histogramTotals, addQuery );
--- 702,706 ----
HttpSession session = page.getSession();
HashMap histogramTotals = getHistogramState( session );
! String name = setTopMetaName( group );
VocabList current = setCurrent( group );
int ret = vocabHistogramHighestCountFromGroup( current, name, browser, 0, histogramTotals, addQuery );
***************
*** 716,724 ****
VocabNode node = (VocabNode)list.item.get( i );
if ( node.list.item.size() > 0 ) {
! String subQuery = (String)luceneQuery.get( name + "=" + node.name );
ret = browser.numDocs( addQuery + " +(" + subQuery + ")" );
}
else {
! ret = browser.numDocs( addQuery + " +" + name + ":\"" + node.name + "\"" );
}
histogramTotals.put( name + node.name, new Integer( ret ) );
--- 731,741 ----
VocabNode node = (VocabNode)list.item.get( i );
if ( node.list.item.size() > 0 ) {
! String subQuery = (String)luceneQuery.get( name
! + "=" + node.name );
ret = browser.numDocs( addQuery + " +(" + subQuery + ")" );
}
else {
! ret = browser.numDocs( addQuery + " +" + getFieldSystemID( name )
! + ":\"" + getFieldValueSystemID( name, node.name ) + "\"" );
}
histogramTotals.put( name + node.name, new Integer( ret ) );
***************
*** 850,853 ****
--- 867,882 ----
/**
+ * Sets the topMetaName attribute of the MetadataVocab object
+ *
+ *@param group The new topMetaName value
+ */
+ private String setTopMetaName( String group ) {
+ group += ":";
+ int ind = 0;
+ int ind2 = group.indexOf( ":" );
+ return group.substring( 0, ind2 );
+ }
+
+ /**
* Sets the current VocabList pointer to the specified spot in the vocab
* hierarchy
***************
*** 937,941 ****
MetadataVocabInputState state = (MetadataVocabInputState)session.getAttribute( "MetadataVocabInputState" );
if ( state == null ) {
! state = new MetadataVocabInputState();
session.setAttribute( "MetadataVocabInputState", state );
}
--- 966,970 ----
MetadataVocabInputState state = (MetadataVocabInputState)session.getAttribute( "MetadataVocabInputState" );
if ( state == null ) {
! state = new MetadataVocabInputState( this );
session.setAttribute( "MetadataVocabInputState", state );
}
***************
*** 1093,1097 ****
/**
! * Required by SAX, but not used here
*
*@exception SAXException
--- 1122,1127 ----
/**
! * Invoked at the end of parsing XML. Generate the lucene queries, and rewrite
! * the XML if new IDs have been assigned
*
*@exception SAXException
***************
*** 1101,1104 ****
--- 1131,1135 ----
if ( rewriteXML ) {
try {
+ System.out.println( "New vocab ID(s) assigned, rewriting file " + xmlFile );
FileWriter file = new FileWriter( xmlFile );
String outStr = outputXML.toString();
***************
*** 1107,1111 ****
file.flush();
file.close();
- System.out.println( "New vocab ID(s) assigned, rewriting file " + xmlFile );
}
catch ( Exception e ) {
--- 1138,1141 ----
***************
*** 1149,1153 ****
Attributes atts ) throws SAXException {
currentSAXElementName = new String( localName );
- String newNodeID = "";
outputXML.append( "<" + qName );
for ( int i = 0; i < atts.getLength(); i++ ) {
--- 1179,1182 ----
***************
*** 1228,1231 ****
--- 1257,1261 ----
currentNode.setLabel( currentSAXElementSystem, charsValue );
uiLabelOf.put( currentSAXElementSystem + currentVocabFieldName + newNodeName, charsValue );
+ uiLabelOfSystemIds.put( currentSAXElementSystem + currentVocabFieldID + newNodeID, charsValue );
}
else if ( currentSAXElementName.equals( "definition" ) ) {
Index: MetadataVocabInputState.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/MetadataVocabInputState.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** MetadataVocabInputState.java 6 Mar 2003 01:31:12 -0000 1.4
--- MetadataVocabInputState.java 12 Mar 2003 01:33:36 -0000 1.5
***************
*** 21,25 ****
/**
! * Description of the Class
*
*@author ryandear
--- 21,25 ----
/**
! * Stores user state for selected controlled vocabularies.
*
*@author ryandear
***************
*** 35,38 ****
--- 35,50 ----
int histogramHighestCount = 0;
+ MetadataVocab vocab;
+
+ /**
+ * Constructor for the MetadataVocabInputState object
+ *
+ *@param vocab controlled vocabulary manager (for metadata -> UI label
+ * mappings)
+ */
+ public MetadataVocabInputState( MetadataVocab vocab ) {
+ this.vocab = vocab;
+ }
+
/**
* Sets the state attribute of the MetadataVocabInputState object
***************
*** 52,57 ****
* Sets the state attribute of the MetadataVocabInputState object
*
! *@param request The new state value
! *@param stateGroup The new state value
*/
public void setState( ServletRequest request,
--- 64,69 ----
* Sets the state attribute of the MetadataVocabInputState object
*
! *@param request HTTP request
! *@param stateGroup vocab field
*/
public void setState( ServletRequest request,
***************
*** 71,75 ****
.append( vals[i] )
.append( "\" " );
! feedback.append( vals[i] )
.append( ", " );
hasFeedback = true;
--- 83,87 ----
.append( vals[i] )
.append( "\" " );
! feedback.append( vocab.getUiLabelOfSystemIds( "dds_english", stateGroup, vals[i] ) )
.append( ", " );
hasFeedback = true;
|
|
From: C. R. D. <rya...@us...> - 2003-03-12 01:33:43
|
Update of /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/tags
In directory sc8-pr-cvs1:/tmp/cvs-serv13424/src/org/dlese/dpc/vocab/tags
Modified Files:
MetadataVocabSetStateTag.java
Log Message:
Update of state feedback and histogram display to use encoded IDs
Index: MetadataVocabSetStateTag.java
===================================================================
RCS file: /cvsroot/dlese/vocab-project/src/org/dlese/dpc/vocab/tags/MetadataVocabSetStateTag.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** MetadataVocabSetStateTag.java 7 Mar 2003 02:35:55 -0000 1.4
--- MetadataVocabSetStateTag.java 12 Mar 2003 01:33:39 -0000 1.5
***************
*** 36,40 ****
MetadataVocabInputState state = (MetadataVocabInputState)pageContext.getSession().getAttribute( "MetadataVocabInputState" );
if ( state == null ) {
! state = new MetadataVocabInputState();
pageContext.getSession().setAttribute( "MetadataVocabInputState", state );
}
--- 36,40 ----
MetadataVocabInputState state = (MetadataVocabInputState)pageContext.getSession().getAttribute( "MetadataVocabInputState" );
if ( state == null ) {
! state = new MetadataVocabInputState( (MetadataVocab)pageContext.findAttribute( "MetadataVocab" ) );
pageContext.getSession().setAttribute( "MetadataVocabInputState", state );
}
|