Package java.util

Examples of java.util.TreeMap$DescendingMap


  }

  public static void main(final String[] args)
  {
    ClassicEngineBoot.getInstance().start();
    final TreeMap globalAttributes = new TreeMap();
    final ExpressionMetaData[] datas = ExpressionRegistry.getInstance().getAllExpressionMetaDatas();
    for (int i = 0; i < datas.length; i++)
    {
      final ExpressionMetaData data = datas[i];
      if (data instanceof AbstractMetaData == false)
View Full Code Here


public class ElementMetaGenerator
{
  public static void main(String[] args)
  {
    ClassicEngineBoot.getInstance().start();
    final TreeMap allStyles = new TreeMap();
    final ElementMetaData[] allTypes = ElementTypeRegistry.getInstance().getAllElementTypes();
    for (int i = 0; i < allTypes.length; i++)
    {
      final ElementMetaData type = allTypes[i];
      final String prefix = "element." + type.getName();
      System.out.println(prefix + ".display-name=" + type.getName());
      System.out.println(prefix + ".description="+ type.getName());
      System.out.println(prefix + ".grouping=Group");

      final AttributeMetaData[] attributes = type.getAttributeDescriptions();
      for (int j = 0; j < attributes.length; j++)
      {
        final AttributeMetaData attribute = attributes[j];
        final String attrNsPrefix = ElementTypeRegistry.getInstance().getNamespacePrefix(attribute.getNameSpace());
        final String attrPrefix = "element." + type.getName() + ".attribute." +
            attrNsPrefix + "." + attribute.getName();
        System.out.println(attrPrefix + ".display-name=" + attribute.getName());
        System.out.println(attrPrefix + ".description=" + attribute.getName());
        System.out.println(attrPrefix + ".grouping=" + attrNsPrefix);
      }

      final StyleMetaData[] styles = type.getStyleDescriptions();
      for (int j = 0; j < styles.length; j++)
      {
        final StyleMetaData style = styles[j];
        allStyles.put(style.getName(), style);
      }
    }

    final Iterator styleIt = allStyles.values().iterator();
    while (styleIt.hasNext())
    {
      StyleMetaData style = (StyleMetaData) styleIt.next();
      final String attrPrefix = "style." + style.getName();
      System.out.println(attrPrefix + ".display-name=" + style.getName());
View Full Code Here

  public static final String GLOBAL_BUNDLE = "org.pentaho.reporting.engine.classic.core.metadata.messages";

  public static void main(String[] args)
  {
    ClassicEngineBoot.getInstance().start();
    final TreeMap globalAttributes = new TreeMap();
    final ElementMetaData[] datas = ElementTypeRegistry.getInstance().getAllElementTypes();
    for (int i = 0; i < datas.length; i++)
    {
      final ElementMetaData data = datas[i];
      if (data instanceof AbstractMetaData == false)
      {
        continue;
      }
      printMetaBundle(data, globalAttributes);
    }
    System.out.println("-----------------------------------------------------");

    final Iterator iterator = globalAttributes.entrySet().iterator();
    while (iterator.hasNext())
    {
      final Map.Entry o = (Map.Entry) iterator.next();

      final AttributeMetaData attribute = (AttributeMetaData) o.getValue();
View Full Code Here

           
            if ( listener != null ){
             
                // sort for consistent order
             
              Iterator it = new TreeMap( jsonEntry ).entrySet().iterator();
             
              String[]  groups = new String[ jsonEntry.size()];
             
              int  pos = 0;
             
View Full Code Here

  /**
   * Default constructor - builds a sample data source.
   */
  public HugeLetterAndColorTableModel()
  {
    colors = new TreeMap();
    colors.put("AliceBlue", new Color(0xF0F8FF));
    colors.put("AntiqueWhite", new Color(0xFAEBD7));
    colors.put("Aqua", new Color(0x00FFFF));
    colors.put("Aquamarine", new Color(0x7FFFD4));
    colors.put("Azure", new Color(0xF0FFFF));
View Full Code Here

                    }
                }

                pc.getProperties(componentProperties);

                TreeMap orderedProperties = new TreeMap(componentProperties);

                if (componentProperties.size() > 0) {
                    componentPropsString.append("####\n");
                    for (Iterator keys = orderedProperties.keySet().iterator(); keys.hasNext();) {
                        String key = (String) keys.next();
                        String value = componentProperties.getProperty(key);

                        if (value != null) {
                            componentPropsString.append(key + "=" + value
View Full Code Here

            layers[i].getProperties(layerProperties);
            layerPropertiesString.append("### -" + markerName
                    + "- layer properties\n");

            TreeMap orderedProperties = new TreeMap(layerProperties);
            for (Iterator keys = orderedProperties.keySet().iterator(); keys.hasNext();) {
                String key = (String) keys.next();
                // Could add .replace("\\", "/") to the end of this
                // line to prevent \\ from appearing in the properties
                // file.
                String value = layerProperties.getProperty(key);
View Full Code Here

        for (Iterator i = ct.getFeatureClasses().values().iterator(); i.hasNext();) {
            FeatureClassInfo fci = (FeatureClassInfo) i.next();
            fci.close();
        }

        Map ftypeinfo = new TreeMap(ct.getFeatureTypeInfo());
        if (ftypeinfo.size() == 0) {
            list.addElement("No Feature Types in FCA");
        } else {
            HtmlListElement flist = new HtmlListElement("Feature Types (from "
                    + buildURL(request, response, pathPrefix, "fca") + ")");
            list.addElement(flist);
            for (Iterator i = ftypeinfo.values().iterator(); i.hasNext();) {
                CoverageTable.FeatureClassRec fcr = (CoverageTable.FeatureClassRec) i.next();
                String name = fcr.feature_class.toLowerCase();
//                char t = fcr.type;
                String desc = fcr.description;
                String tstring = "[unknown] ";
                String suffix = "";
                switch (fcr.type) {
                case CoverageTable.TEXT_FEATURETYPE:
                    tstring = "[text feature] ";
                    suffix = ".tft";
                    break;
                case CoverageTable.EDGE_FEATURETYPE:
                    tstring = "[edge feature] ";
                    suffix = ".lft";
                    break;
                case CoverageTable.AREA_FEATURETYPE:
                    tstring = "[area feature] ";
                    suffix = ".aft";
                    break;
                case CoverageTable.UPOINT_FEATURETYPE:
                    FeatureClassInfo fci = ct.getFeatureClassInfo(name);
                    char type = (fci != null) ? fci.getFeatureType()
                            : CoverageTable.SKIP_FEATURETYPE;
                    if (type == CoverageTable.EPOINT_FEATURETYPE) {
                        tstring = "[entity point feature] ";
                    } else if (type == CoverageTable.CPOINT_FEATURETYPE) {
                        tstring = "[connected point feature] ";
                    } else {
                        tstring = "[missing point feature] ";
                    }
                    suffix = ".pft";
                    break;
                case CoverageTable.COMPLEX_FEATURETYPE:
                    tstring = "[complex feature] ";
                    suffix = ".cft";
                    break;
                default:
                    tstring = "[unknown] ";
                    suffix = "";
                }
                String url = buildURL(request, response, pathPrefix, name
                        + suffix, name);
                flist.addElement(url + ": " + tstring + desc);
            }
        }
        try {
            HtmlListElement flist = new HtmlListElement("Feature Types (from "
                    + fcsURL + ")");
            boolean generateflist = false;
            DcwRecordFile fcs = new DcwRecordFile(ct.getDataPath()
                    + File.separator + "fcs" + (ct.appendDot ? "." : ""));
            int featureClassColumn = fcs.whatColumn("feature_class");
            int table1Column = fcs.whatColumn("table1");
//            int table1_keyColumn = fcs.whatColumn("table1_key");
//            int table2Column = fcs.whatColumn("table2");
//            int table2_keyColumn = fcs.whatColumn("table2_key");

            List fcsl = new ArrayList(fcs.getColumnCount());
            while (fcs.parseRow(fcsl)) {
                String featureclass = ((String) fcsl.get(featureClassColumn)).toLowerCase();
                String table1 = ((String) fcsl.get(table1Column)).toLowerCase();
                if (!ftypeinfo.containsKey(featureclass)) {
                    ftypeinfo.put(featureclass, null);
                    String type = null;
                    if (table1.endsWith(".cft")) {
                        type = "complex feature";
                    } else if (table1.endsWith(".pft")) {
                        type = "point feature";
View Full Code Here

            String[] tableNames = getTablesForSchema(TABLE_PREFIX_WITH_SEP, conn, tableToWatch);
            for (int i=0; i < tableNames.length; i++)
               ownInfo.put(tableNames[i], "");
         }

         TreeMap map = new TreeMap();
         int count = 0;
         iter = ownInfo.getKeys().iterator();
         while (iter.hasNext()) {
            String key = ((String)iter.next()).trim();
            if (!key.startsWith(TABLE_PREFIX_WITH_SEP))
               continue;
            count++;
            String val = ownInfo.get(key, null);
            TableToWatchInfo tableToWatch = new TableToWatchInfo();
            tableToWatch.assignFromInfoPair(key, val);
            Long mapKey = new Long(tableToWatch.getReplKey());
            ArrayList list = (ArrayList)map.get(mapKey);
            if (list == null) {
               list = new ArrayList();
               map.put(mapKey, list);
            }
            list.add(tableToWatch);
         }

         // handle here allt tables which have been assigned as default: for example
         // <attribute id='table.XMLBLASTER.*'></attribute>
        
         TableToWatchInfo[] tables = new TableToWatchInfo[count];
         count = 0;
         iter = map.keySet().iterator();
         while (iter.hasNext()) {
            Object mapKey = iter.next();
            ArrayList list = (ArrayList)map.get(mapKey);
            for (int i=0; i < list.size(); i++) {
               TableToWatchInfo obj = (TableToWatchInfo)list.get(i);
               tables[count] = obj;
               count++;
            }
View Full Code Here

  private ServletContext getContext(HttpServletRequest aRequest){
    return getExistingSession().getServletContext();
  }
 
  private Map sortMap(Map aInput){
    Map result = new TreeMap(String.CASE_INSENSITIVE_ORDER);
    result.putAll(aInput);
    return result;
  }
View Full Code Here

TOP

Related Classes of java.util.TreeMap$DescendingMap

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.