Examples of ObjectDescription


Examples of org.pentaho.reporting.engine.classic.core.modules.parser.ext.factory.base.ObjectDescription

   * @param name the data source name.
   * @return The object description.
   */
  public ObjectDescription getDataSourceDescription(final String name)
  {
    final ObjectDescription od = (ObjectDescription) dataSources.get(name);
    if (od != null)
    {
      return od.getInstance();
    }
    return null;
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.modules.parser.ext.factory.base.ObjectDescription

  {
    final Iterator keys = dataSources.keySet().iterator();
    while (keys.hasNext())
    {
      final String key = (String) keys.next();
      final ObjectDescription ds = (ObjectDescription) dataSources.get(key);
      if (ds.getObjectClass().equals(od.getObjectClass()))
      {
        return key;
      }
    }
    return null;
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.modules.parser.ext.factory.base.ObjectDescription

  public ObjectDescription getDataSourceDescription(final String name)
  {
    for (int i = 0; i < factories.size(); i++)
    {
      final DataSourceFactory fact = (DataSourceFactory) factories.get(i);
      final ObjectDescription o = fact.getDataSourceDescription(name);
      if (o != null)
      {
        return o.getInstance();
      }
    }
    return null;
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.modules.parser.ext.factory.base.ObjectDescription

  public ObjectDescription getDescriptionForClass(final Class c)
  {
    for (int i = 0; i < factories.size(); i++)
    {
      final DataSourceFactory fact = (DataSourceFactory) factories.get(i);
      final ObjectDescription o = fact.getDescriptionForClass(c);
      if (o != null)
      {
        return o.getInstance();
      }
    }
    return null;
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.modules.parser.ext.factory.base.ObjectDescription

    if (fc == null)
    {
      throw new NullPointerException("Class " + getClass());
    }

    ObjectDescription od = fc.getDescriptionForClass(c);
    if (od == null)
    {
      od = fc.getSuperClassObjectDescription(c, null);
      if (od == null)
      {
        return null;
      }
    }
    od.setParameter("value", value);
    return od.createObject();
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.modules.parser.ext.factory.base.ObjectDescription

      (final Class d, ObjectDescription knownSuperClass)
  {
    for (int i = 0; i < factories.size(); i++)
    {
      final DataSourceFactory fact = (DataSourceFactory) factories.get(i);
      final ObjectDescription od = fact.getSuperClassObjectDescription(d, knownSuperClass);
      if (od == null)
      {
        continue;
      }
      if (knownSuperClass == null)
      {
        knownSuperClass = od;
      }
      else
      {
        if (comparator.isComparable(knownSuperClass.getObjectClass(), od.getObjectClass())
            && (comparator.compare(knownSuperClass.getObjectClass(), od.getObjectClass()) < 0))
        {
          knownSuperClass = od;
        }
      }
    }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.modules.parser.ext.factory.base.ObjectDescription

    it = factories.iterator();

    while (it.hasNext())
    {
      final Class c = (Class) it.next();
      final ObjectDescription od = cf.getDescriptionForClass(c);
      Iterator itNames = od.getParameterNames();
      final ArrayList nameList = new ArrayList();
      while (itNames.hasNext())
      {
        nameList.add(itNames.next());
      }
      // sort the parameter names
      Collections.sort(nameList);
      itNames = nameList.iterator();
      while (itNames.hasNext())
      {
        final String name = (String) itNames.next();
        rows.add(new ObjectDescriptionRow(cf, c, name, od.getParameterDefinition(name)));
      }
    }
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.modules.parser.ext.factory.base.ObjectDescription

          getRootHandler().getDocumentLocator());
    }

    final DataSourceCollector fc = (DataSourceCollector) getRootHandler()
        .getHelperObject(ReportDefinitionReadHandler.DATASOURCE_FACTORY_KEY);
    final ObjectDescription od = fc.getDataSourceDescription(typeName);
    if (od == null)
    {
      throw new ParseException("The specified DataSource type is not defined", getLocator());
    }
    setObjectDescription(od);
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.modules.parser.ext.factory.base.ObjectDescription

      throws IOException, ReportWriterException
  {
    final ReportWriterContext reportWriter = getReportWriter();
    final ClassFactoryCollector classFactoryCollector =
        reportWriter.getClassFactoryCollector();
    ObjectDescription od =
        classFactoryCollector.getDescriptionForClass(datasource.getClass());
    if (od == null)
    {
      od = classFactoryCollector.
          getSuperClassObjectDescription(datasource.getClass(), null);
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.modules.parser.ext.factory.base.ObjectDescription

   * @throws org.xml.sax.SAXException if there is a parsing error.
   */
  protected void doneParsing()
      throws SAXException
  {
    final ObjectDescription objectDescription = getObjectDescription();
    final Iterator basicObjectsEntries = basicObjects.entrySet().iterator();
    while (basicObjectsEntries.hasNext())
    {
      final Map.Entry entry = (Map.Entry) basicObjectsEntries.next();
      final String name = (String) entry.getKey();
      final BasicObjectReadHandler readHandler = (BasicObjectReadHandler) entry.getValue();
      objectDescription.setParameter(name, readHandler.getObject());
    }

    final Iterator compoundObjectsEntries = compoundObjects.entrySet().iterator();
    while (compoundObjectsEntries.hasNext())
    {
      final Map.Entry entry = (Map.Entry) compoundObjectsEntries.next();
      final String name = (String) entry.getKey();
      final CompoundObjectReadHandler readHandler = (CompoundObjectReadHandler) entry.getValue();
      objectDescription.setParameter(name, readHandler.getObject());
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.