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

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


                                       final ReportElementEditorContext dragContext,
                                       final ElementMetaData elementMetaData,
                                       final Point2D point)
  {
    final Element rootBand = findRootBand(dragContext, point);
    final ElementMetaData metaData = rootBand.getElementType().getMetaData();
    final ElementMetaData.TypeClassification reportElementType = metaData.getReportElementType();
    if (reportElementType == ElementMetaData.TypeClassification.HEADER ||
        reportElementType == ElementMetaData.TypeClassification.FOOTER)
    {
      return true;
    }
View Full Code Here


    final Locale locale = Locale.getDefault();
    String group = null;
    for (int i = 0; i < datas.length; i++)
    {
      final ElementMetaData data = datas[i];
      if (data.isHidden())
      {
        continue;
      }
      if (ObjectUtilities.equal(data.getGrouping(locale), group) == false)
      {
        group = data.getGrouping(locale);
        System.out.println();
        System.out.println("h2. " + group);
      }
      printElementInfo(locale, data);
    }
View Full Code Here

    Arrays.sort(datas, comp);

    final Locale locale = Locale.getDefault();
    for (int i = 0; i < datas.length; i++)
    {
      final ElementMetaData elementMetaData = datas[i];
      if (elementMetaData.isHidden())
      {
        continue;
      }
      printMetaData(locale, elementMetaData);
    }
View Full Code Here

    {
      return false;
    }

    final ConverterRegistry instance = ConverterRegistry.getInstance();
    final ElementMetaData metaData = e.getMetaData();
    boolean retval = false;

    for (int namespaceIdx = 0; namespaceIdx < namespaces.length; namespaceIdx++)
    {
      final String namespace = namespaces[namespaceIdx];
      final String[] names = e.getAttributeExpressionNames(namespace);
      for (int nameIdx = 0; nameIdx < names.length; nameIdx++)
      {
        final String name = names[nameIdx];
        final Expression ex = e.getAttributeExpression(namespace, name);
        if (ex == null)
        {
          continue;
        }

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

  protected void autoInit() throws ParseException
  {
    String tagName = getTagName();
    String uri = getUri();
    ElementMetaData elementType = ElementTypeRegistry.getInstance().getElementType(tagName);
    if (ObjectUtilities.equal(uri, elementType.getNamespace()) == false)
    {
      throw new ParseException("Metadata not registered, and auto-registration does not match namespace");
    }
    this.metaData = elementType;
    this.element = createElement();
View Full Code Here

    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

    final BundleWriterState subReportState = new BundleWriterState(state, subReport, dirRelative + '/');
    state.getBundleWriter().writeSubReport(bundle, subReportState);

    final ParameterMapping[] inputMappings = subReport.getInputMappings();
    final ParameterMapping[] outputMappings = subReport.getExportMappings();
    ElementMetaData metaData = subReport.getMetaData();
    final String tagName = metaData.getName();
    final String namespace = metaData.getNamespace();
    if (inputMappings.length == 0 && outputMappings.length == 0)
    {
      xmlWriter.writeTag(namespace, tagName, "href",
          '/' + subReportState.getFileName() + "content.xml", XmlWriterSupport.CLOSE);
    }
View Full Code Here

  }

  public void registerReader(final ElementType elementType,
                             final Class<? extends ElementReadHandler> readHandler)
  {
    ElementMetaData metaData = elementType.getMetaData();
    register(metaData.getNamespace(), metaData.getName(), readHandler);
  }
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.