DLESE Tools
v1.6.0

org.dlese.dpc.schemedit.display
Class CollapseUtils

java.lang.Object
  extended by org.dlese.dpc.schemedit.display.CollapseUtils

public class CollapseUtils
extends Object

Maintains the state of collapsible nodes in the metadata Editor. States are OPENED and CLOSED, and the default is controlled by setDefaultState.

Author:
ostwald $Id: CollapseUtils.java,v 1.4 2005/01/28 00:15:38 ostwald Exp $

Constructor Summary
CollapseUtils()
           
 
Method Summary
static String decodeId(String s)
           
static String encodeId(String s)
           
static String idToPath(String id)
          Converts an ID like that generated by org.dlese.dpc.schemedit.SchemEditUtils#pathToId to an xpath that will identify the xml element associated with the id.
static String pairToId(String paramName, String fieldLabel)
          Converts a paramName and fieldLabel to an ID that can be used in javascript.
static String pathToId(String s)
          Converts an xpath to an ID that can be used in javascript.
protected  void prtln(String s)
          Description of the Method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollapseUtils

public CollapseUtils()
Method Detail

pairToId

public static String pairToId(String paramName,
                              String fieldLabel)
Converts a paramName and fieldLabel to an ID that can be used in javascript. Used to support collapsible field display in metadata editor.

Parameters:
paramName - Identifier used in metadata editor jsp (e.g., ValueOf(/itemRecord/general))
fieldLabel - MetadataVocab Field label that identifies a field grouping within a list of controlled vocab values
Returns:
ID suitable for use in jsp/javascript

idToPath

public static String idToPath(String id)
Converts an ID like that generated by org.dlese.dpc.schemedit.SchemEditUtils#pathToId to an xpath that will identify the xml element associated with the id.

Parameters:
id - Description of the Parameter
Returns:
Description of the Return Value

encodeId

public static String encodeId(String s)

decodeId

public static String decodeId(String s)

pathToId

public static String pathToId(String s)
Converts an xpath to an ID that can be used in javascript. Used to support collapsible field display in metadata editor. The ID that is generated here can be converted back into an xpath by org.dlese.dpc.schemedit.SchemEditUtils#idToPath

Parameters:
s - An xpath or a paramName containing an xpath (e.g., ValueOf(/itemRecord/general))
Returns:
ID suitable for use in jsp/javascript

prtln

protected final void prtln(String s)
Description of the Method

Parameters:
s - Description of the Parameter

DLESE Tools
v1.6.0