Package org.pentaho.reporting.engine.classic.core.metadata

Examples of org.pentaho.reporting.engine.classic.core.metadata.AbstractMetaData


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

      final AttributeMetaData attribute = (AttributeMetaData) o.getValue();
      final AbstractMetaData aamd = (AbstractMetaData) attribute;
      final String akeyPrefix = aamd.getKeyPrefix();
      final String abundle = aamd.getBundleLocation();
      final String aname = attribute.getName();

      System.out.println(akeyPrefix + aname + ".display-name=" + aname);
      System.out.println(akeyPrefix + aname + ".grouping=" + filter(aamd.getGrouping(Locale.ENGLISH), "Group"));
      System.out.println(akeyPrefix + aname + ".description=" + filter(aamd.getDescription(Locale.ENGLISH), ""));
      System.out.println(akeyPrefix + aname + ".deprecated=" + filter(aamd.getDeprecationMessage(Locale.ENGLISH), ""));
    }
  }
View Full Code Here


  }

  private static void printMetaBundle(final ElementMetaData data, Map globalAttributes)
  {
    System.out.println("-----------------------------------------------------");
    final AbstractMetaData amd = (AbstractMetaData) data;
    final String keyPrefix = amd.getKeyPrefix();
    final String ename = amd.getName();
    final String ebundle = amd.getBundleLocation();

    System.out.println(keyPrefix + ename + ".display-name=" + ename);
    System.out.println(keyPrefix + ename + ".grouping=" + filter(amd.getGrouping(Locale.ENGLISH), "Group"));
    System.out.println(keyPrefix + ename + ".description=" + filter(amd.getDescription(Locale.ENGLISH), ""));
    System.out.println(keyPrefix + ename + ".deprecated=" + filter(amd.getDeprecationMessage(Locale.ENGLISH), ""));

    final AttributeMetaData[] attributes = data.getAttributeDescriptions();

    for (int j = 0; j < attributes.length; j++)
    {
      final AttributeMetaData attribute = attributes[j];
      final AbstractMetaData aamd = (AbstractMetaData) attribute;
      final String akeyPrefix = aamd.getKeyPrefix();
      final String abundle = aamd.getBundleLocation();
      final String aname = attribute.getName();
      if (abundle.equals(GLOBAL_BUNDLE) && akeyPrefix.startsWith("attribute."))
      {
        globalAttributes.put (aname, attribute);
        continue;
      }
      System.out.println(akeyPrefix + aname + ".display-name=" + aname);
      System.out.println(akeyPrefix + aname + ".grouping=" + filter(aamd.getGrouping(Locale.ENGLISH), "Group"));
      System.out.println(akeyPrefix + aname + ".description=" + filter(aamd.getDescription(Locale.ENGLISH), ""));
      System.out.println(akeyPrefix + aname + ".deprecated=" + filter(aamd.getDeprecationMessage(Locale.ENGLISH), ""));
    }

    System.out.println("-----------------------------------------------------");
  }
View Full Code Here

    Arrays.sort(propertyMetaDatas, new GroupedMetaDataComparator(locale));
  }

  public String printBundleText(final Locale locale)
  {
    final AbstractMetaData backend = getBackend();
    final String[] properties =
        {"display-name", "short-name", "icon", "selected-icon", "grouping", "grouping.ordinal",
            "ordinal", "description", "deprecated"};

    final StringWriter writer = new StringWriter();
    PrintWriter p = new PrintWriter(writer);
    for (int i = 0; i < properties.length; i++)
    {
      final String property = properties[i];
      final String attribute = getMetaAttribute(property, locale);
      if (StringUtils.isEmpty(attribute))
      {
        if ("icon".equals(property) ||
            "selected-icon".equals(property) ||
            "short-name".equals(property))
        {
          continue;
        }
      }
      PropertyHelper.saveConvert(backend.getKeyPrefix(), PropertyHelper.ESCAPE_KEY, p);
      PropertyHelper.saveConvert(backend.getName(), PropertyHelper.ESCAPE_KEY, p);
      p.print('.');
      PropertyHelper.saveConvert(property, PropertyHelper.ESCAPE_KEY, p);
      p.print('=');
      PropertyHelper.saveConvert(attribute, PropertyHelper.ESCAPE_VALUE, p);
      p.println();
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.engine.classic.core.metadata.AbstractMetaData

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.