}
// 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 ) {
throw new ThingReadException( "While obtaining a reader for a dashboard.", ex );
}
// 3. Read it
IThingReadContext readContext = new CdfdeJsReadContext( thingReaderFactory, wcdf, metaModel );
Dashboard.Builder dashBuilder = (Dashboard.Builder) reader.read( readContext, cdfdeDoc, cdeFilePath );
// 4. Build it
try {
return dashBuilder.build( metaModel );
} catch ( ValidationException ex ) {