Package org.pentaho.reporting.engine.classic.core.modules.parser.ext.factory.base

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


      throw new ParseException
          ("Required attribute 'name' is missing.", getLocator());
    }

    final ClassFactory fact = getClassFactory();
    final ObjectDescription currentOd = getObjectDescription();
    final Class paramDesc = currentOd.getParameterDefinition(name);
    if (paramDesc == null)
    {
      currentOd.getParameterDefinition(name);
      throw new ParseException
          ("The parameter type for '" + name + "' is not known.", getLocator());
    }
    final ObjectDescription objectDescription =
        ObjectFactoryUtility.findDescription(fact, paramDesc, getLocator());

    final BasicObjectReadHandler readHandler =
        new BasicObjectReadHandler(objectDescription);
    basicObjects.put(name, readHandler);
View Full Code Here

      throw new ParseException
          ("Required attribute 'name' is missing.", getLocator());
    }

    final ClassFactory fact = getClassFactory();
    final ObjectDescription currentObjDesc = getObjectDescription();
    final Class parameterDefinition =
        currentObjDesc.getParameterDefinition(name);
    if (parameterDefinition == null)
    {
      throw new ParseException("No such parameter description: " + name, getLocator());
    }
    final ObjectDescription objectDescription =
        ObjectFactoryUtility.findDescription(fact,
            parameterDefinition, getLocator());

    final CompoundObjectReadHandler readHandler =
        new CompoundObjectReadHandler(objectDescription);
View Full Code Here

    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

  }

  public void testObjectQuery()
  {
    final DefaultClassFactory fact = new DefaultClassFactory();
    final ObjectDescription line2DDescr = fact.getDescriptionForClass(Line2D.class);
    assertNotNull(line2DDescr);
    final ObjectDescription od = fact.getSuperClassObjectDescription(Line2D.Float.class, null);
    assertEquals(line2DDescr.getClass(), od.getClass());
  }
View Full Code Here

    it = factories.iterator();

    while (it.hasNext())
    {
      final String keyName = (String) it.next();
      final ObjectDescription od = cf.getDataSourceDescription(keyName);
      rows.add(new DataSourceDescriptionRow(cf, keyName, od.getObjectClass()));
    }
  }
View Full Code Here

TOP

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

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.