Package pt.webdetails.cdf.dd.model.meta

Examples of pt.webdetails.cdf.dd.model.meta.MetaModel


    }
    builder.setSourcePath( ROOT + TEST_FOLDER + DASHBOARD + ".wcdf");
    builder.setWcdf( wcdf );
    builder.setMeta( dashboardType );
    MetaModel.Builder metaBuilder = new MetaModel.Builder();
    MetaModel model;
    Dashboard dashboard = null;
    try {
      model = metaBuilder.build();
      dashboard = builder.build( model );
View Full Code Here


    }

    builder.setWcdf( wcdf );
    builder.setMeta( dashboardType );
    MetaModel.Builder metaBuilder = new MetaModel.Builder();
    MetaModel model;
    Dashboard dashboard = null;
    try {
      model = metaBuilder.build();
      dashboard = builder.build( model );
View Full Code Here

  protected static final Log _logger = LogFactory.getLog(CdeRunJsModelWriter.class);

  public void write(java.lang.Object output, IThingWriteContext context, Thing t)
      throws ThingWriteException
  {
    MetaModel model = (MetaModel)t;
    StringBuilder out = (StringBuilder)output;

    IThingWriterFactory factory = context.getFactory();
    assert factory != null;

    // GLOBAL PROPERTIES
    for(PropertyType prop : model.getPropertyTypes())
    {
      IThingWriter propWriter;
      try
      {
        propWriter = factory.getWriter(prop);
        assert propWriter != null;
      }
      catch(UnsupportedThingException ex)
      {
        ThingWriteException ex2 = new ThingWriteException(ex);
        if(context.getBreakOnError()) { throw ex2; }
        _logger.error(ex2);
        continue;
      }

      propWriter.write(out, context, prop);
    }

    // COMPONENTS
    // Components output their own properties
    for(ComponentType comp : model.getComponentTypes())
    {
      IThingWriter compWriter;
      try
      {
        compWriter = factory.getWriter(comp);
View Full Code Here

      // And use it
      builder.useProperty( null, paramName );
    }

    // Use the current global meta-model to build the component in.
    MetaModel model = MetaModelManager.getInstance().getModel();
    IPropertyTypeSource propSource = model.getPropertyTypeSource();
    try {
      return (WidgetComponentType) builder.build( propSource );
    } catch ( ValidationException ex ) {
      logger.error( ex );
      return null;
View Full Code Here

    } catch ( IOException ex ) {
      throw new ThingReadException( "While accessing the CDFDE dashboard file.", ex );
    }

    // 2. Obtain a reader to read the dashboard file
    MetaModel metaModel = MetaModelManager.getInstance().getModel();
    CdfdeJsThingReaderFactory thingReaderFactory = new CdfdeJsThingReaderFactory( metaModel );
    IThingReader reader;
    try {
      reader = thingReaderFactory.getReader( KnownThingKind.Dashboard, null, null );
    } catch ( UnsupportedThingException ex ) {
View Full Code Here

    if ( refreshDatasources ) {
      CdeEnvironment.getDataSourceManager().refresh();
    }

    MetaModel model = this.readModel();
    if ( model != null ) {

      // Switch current model.
      synchronized ( lock ) {
        this.model = model;
View Full Code Here

TOP

Related Classes of pt.webdetails.cdf.dd.model.meta.MetaModel

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.