Class CollapseUtils

java.lang.Object
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 Details

    • CollapseUtils

      public CollapseUtils()
  • Method Details

    • 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
      invalid reference
      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
      invalid reference
      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