Package pt.webdetails.cdf.dd.model.inst

Examples of pt.webdetails.cdf.dd.model.inst.DataSourceComponent


public class CdfRunJsJFreeChartDataSourcePropertyBindingWriter extends CdfRunJsDataSourcePropertyBindingWriter
{
  @Override
  protected DataSourceComponent getDataSourceComponent(CdfRunJsDashboardWriteContext context, PropertyBinding propBind)
  {
    DataSourceComponent ds = super.getDataSourceComponent(context, propBind);
    if(ds == null)
    {
      // TODO: ? Is this some kind of backward compatibility HACK?
      // Maybe works because for most components,
      // only «expected» properties are rendered...
View Full Code Here


  {
    Dashboard dash = context.getDashboard();
    String dataSourceName = comp.tryGetPropertyValue("dataSource", null);
    if(StringUtils.isNotEmpty(dataSourceName))
    {
      DataSourceComponent dsComp = dash.getDataSource(dataSourceName);

      IThingWriterFactory factory = context.getFactory();
      IThingWriter dsWriter;
      try
      {
View Full Code Here

    return value;
  }

  public void write( StringBuilder out, CdfRunJsDashboardWriteContext context, PropertyBinding propBind )
    throws ThingWriteException {
    DataSourceComponent dataSourceComp = this.getDataSourceComponent( context, propBind );
    if ( dataSourceComp == null ) {
      return;
    }

    String dataAccessId = dataSourceComp.tryGetPropertyValue( PropertyName.DATA_ACCESS_ID, null );
    if ( dataAccessId != null ) {
      renderCdaDatasource( out, context, dataSourceComp, dataAccessId );
    } else {
      // "meta" attribute has the value "CDA", "CPK" ?
      // See DataSourceModelReader#readDataSourceComponent
      String metaType = dataSourceComp.getMeta().tryGetAttributeValue( "", "" );
      if ( StringUtils.isEmpty( metaType ) ) {
        renderDatasource( out, context, dataSourceComp );
      } else if ( metaType.equals( META_TYPE_CDA ) ) {
        renderBuiltinCdaDatasource( out, context, dataSourceComp );
      } else if ( metaType.equals( META_TYPE_CPK ) ) {
View Full Code Here

{
  @Override
  public void write(StringBuilder out, CdfRunJsDashboardWriteContext context, PropertyBinding propBind) throws ThingWriteException
  {
    String dataSourceName = propBind.getValue();
    DataSourceComponent dataSourceComp = context.getDashboard().tryGetDataSource(dataSourceName);
    if(dataSourceComp != null)
    {
      String dataAccessId = dataSourceComp.tryGetPropertyValue("dataAccessId", null);

      String indent = context.getIndent();

      addJsProperty(out, "dataAccessId", buildJsStringValue(dataAccessId), indent, context.isFirstInList());

      context.setIsFirstInList(false);

      addJsProperty(out, "solution", buildJsStringValue(dataSourceComp.tryGetPropertyValue("solution", "")), indent, false);
      addJsProperty(out, "path",     buildJsStringValue(dataSourceComp.tryGetPropertyValue("path",     "")), indent, false);
      addJsProperty(out, "file",     buildJsStringValue(dataSourceComp.tryGetPropertyValue("file",     "")), indent, false);
    }
  }
View Full Code Here

TOP

Related Classes of pt.webdetails.cdf.dd.model.inst.DataSourceComponent

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.