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

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


    final String contentBasePath = String.valueOf(contentBasePathRaw);
    final ResourceManager resourceManager = state.getMasterReport().getResourceManager();

    final ElementType type = element.getElementType();
    final ElementMetaData data = type.getMetaData();
    final AttributeMetaData[] datas = data.getAttributeDescriptions();
    for (int i = 0; i < datas.length; i++)
    {
      final AttributeMetaData attributeMetaData = datas[i];
      if (attributeMetaData.isTransient())
      {
View Full Code Here


    if (attList == null)
    {
      throw new NullPointerException();
    }

    final ElementMetaData metaData = element.getElementType().getMetaData();
    final String[] attributeNamespaces = element.getAttributeNamespaces();
    for (int i = 0; i < attributeNamespaces.length; i++)
    {
      final String namespace = attributeNamespaces[i];
      final String[] attributeNames = element.getAttributeNames(namespace);
      for (int j = 0; j < attributeNames.length; j++)
      {
        final String name = attributeNames[j];
        final Object value = element.getAttribute(namespace, name);
        if (value == null)
        {
          continue;
        }

        final AttributeMetaData attrMeta = metaData.getAttributeDescription(namespace, name);
        if (attrMeta == null)
        {
          if (value instanceof String)
          {
            ensureNamespaceDefined(writer, attList, namespace);
View Full Code Here

  private void writeBulkAttributes(final WriteableDocumentBundle bundle,
                                   final BundleWriterState state,
                                   final Element element,
                                   final XmlWriter writer) throws IOException,BundleWriterException
  {
    final ElementMetaData metaData = element.getElementType().getMetaData();
    final String[] attributeNamespaces = element.getAttributeNamespaces();
    for (int i = 0; i < attributeNamespaces.length; i++)
    {
      final String namespace = attributeNamespaces[i];
      final String[] attributeNames = element.getAttributeNames(namespace);
      for (int j = 0; j < attributeNames.length; j++)
      {
        final String name = attributeNames[j];
        final Object value = element.getAttribute(namespace, name);
        if (value == null)
        {
          continue;
        }

        final AttributeMetaData attrMeta = metaData.getAttributeDescription(namespace, name);
        if (attrMeta == null)
        {
          continue;
        }
View Full Code Here

    ElementTypeRegistry registry = ElementTypeRegistry.getInstance();
    final ElementMetaData[] elementMetaDatas = registry.getAllElementTypes();
    for (int i = 0; i < elementMetaDatas.length; i++)
    {
      final ElementMetaData metaData = elementMetaDatas[i];
      final String grouping = metaData.getGrouping(locale);
      expressionsByGroup.add(grouping, metaData);
    }

    final Object[] keys = expressionsByGroup.keySet().toArray();
    Arrays.sort(keys);
    for (int i = 0; i < keys.length; i++)
    {
      final Object key = keys[i];
      System.out.println("Group: '" + key + "' Size: " + expressionsByGroup.getValueCount(key));
      final Object[] objects = expressionsByGroup.toArray(key);
      for (int j = 0; j < objects.length; j++)
      {
        ElementMetaData metaData = (ElementMetaData) objects[j];
        System.out.println("   " + metaData.getName());
        final StyleMetaData[] styleDescriptions = metaData.getStyleDescriptions();
        Arrays.sort(styleDescriptions, new GroupedMetaDataComparator());
        System.out.println("     Styles:");
        for (int k = 0; k < styleDescriptions.length; k++)
        {
          final StyleMetaData styleMetaData = styleDescriptions[k];
View Full Code Here

    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);
      }
View Full Code Here

    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);
View Full Code Here

    ClassicEngineBoot.getInstance().start();
    final ElementMetaData[] elementMetaDatas = ElementTypeRegistry.getInstance().getAllElementTypes();
    for (int i = 0; i < elementMetaDatas.length; i++)
    {
      final ElementMetaData elementMetaData = elementMetaDatas[i];
      final StyleMetaData[] styleMetaDatas = elementMetaData.getStyleDescriptions();
      for (int j = 0; j < styleMetaDatas.length; j++)
      {
        final StyleMetaData styleMetaData = styleMetaDatas[j];
        styles.put(styleMetaData.getName(), styleMetaData);
      }
View Full Code Here

    {
      // A legacy element. Cannot handle that this way.
      return null;
    }

    final ElementMetaData metaData = type.getMetaData();
    final String configKey = ELEMENT_PREFIX + metaData.getName();
    final Configuration globalConfig = ClassicEngineBoot.getInstance().getGlobalConfig();
    final String value = globalConfig.getConfigProperty(configKey);
    if (value != null)
    {
      return (BundleDataFactoryWriterHandler) ObjectUtilities.loadAndInstantiate
          (value, metaData.getClass(), BundleDataFactoryWriterHandler.class);
    }
    return null;
  }
View Full Code Here

          processSection(documentBundle, report, subReport);
        }
      }

      // Process the attributes if they are a resource key
      final ElementMetaData metaData = element.getMetaData();
      final AttributeMetaData[] attributeDescriptions = metaData.getAttributeDescriptions();
      for (int j = 0; j < attributeDescriptions.length; j++)
      {
        final AttributeMetaData attributeDescription = attributeDescriptions[j];
        if ("Resource".equals(attributeDescription.getValueRole()) == false)
        {
View Full Code Here

  {
    final ElementMetaData[] datas = ElementTypeRegistry.getInstance().getAllElementTypes();
    final String[] tags = new String[datas.length];
    for (int i = 0; i < datas.length; i++)
    {
      final ElementMetaData data = datas[i];
      tags[i] = data.getName();
    }
    return tags;
  }
View Full Code Here

TOP

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

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.