@Override public CreationRequest<T> information ( final String description, final String unit, final String system ) { this.itemInformation.setDescription ( description ); this.itemInformation.setUnit ( unit ); this.itemInformation.setSystem ( system ); return this; }
@Override public CreationRequest<T> information ( final String description, final String unit, final String system ) { this.itemInformation.setDescription ( description ); this.itemInformation.setUnit ( unit ); this.itemInformation.setSystem ( system ); return this; }
protected void processGroup ( final MasterServer app, final SummaryGroup group, final AbstractComponentItemCreator creator ) { final SummaryItem item = OsgiFactory.eINSTANCE.createSummaryItem (); item.setGroup ( group ); item.setInformation ( OsgiFactory.eINSTANCE.createItemInformation () ); item.getInformation ().setDescription ( String.format ( "Summary group information: %s", Names.makeId ( group ) ) ); item.getInformation ().getHierarchy ().addAll ( Names.makeHierarchy ( group ) ); item.getInformation ().setSystem ( "SCADA" ); final CreationRequest<SummaryItem> c = creator.addItem ( item ); c.localTags ( "SUMMARY" ); c.customizationTags ( "summary" ); final SummaryItem sumItem = c.create (); /* * FIXME: next thing is a bit wonky * actually the summary group should be used for generating sub items * but since the customization process can rename the item, the generator * cannot create a name for this later on. So for now all items * that are SummaryItem will be treated as sub-summary items. */ if ( group.eContainer () instanceof SummaryGroup ) { ( (SummaryGroup)group.eContainer () ).getItems ().add ( sumItem ); } }
private void createInternalItem ( final MasterContext masterContext, final String dataSourceId, final String description ) { final WeakReferenceDataSourceItem item = OsgiFactory.eINSTANCE.createWeakReferenceDataSourceItem (); item.setDataSourceId ( dataSourceId ); item.setName ( dataSourceId ); item.setInformation ( OsgiFactory.eINSTANCE.createItemInformation () ); item.getInformation ().setDescription ( description ); item.getInformation ().setSystem ( "SCADA" ); Items.addItem ( masterContext.getImplementation (), item ); }
@Override public CreationRequest<T> request ( final CustomizationRequest request ) { customizationTags ( request.getCustomizationTags () ); localTags ( request.getLocalTags () ); this.globalizationLevel = request.getGlobalizationLevel (); if ( request.getItem ().getInformation () != null ) { this.itemInformation.setDataType ( request.getItem ().getInformation ().getDataType () ); this.itemInformation.setDescription ( request.getItem ().getInformation ().getDescription () ); this.itemInformation.setSystem ( request.getItem ().getInformation ().getSystem () ); } return this; }
@Override public CreationRequest<T> request ( final CustomizationRequest request ) { customizationTags ( request.getCustomizationTags () ); localTags ( request.getLocalTags () ); this.globalizationLevel = request.getGlobalizationLevel (); if ( request.getItem ().getInformation () != null ) { this.itemInformation.setDataType ( request.getItem ().getInformation ().getDataType () ); this.itemInformation.setDescription ( request.getItem ().getInformation ().getDescription () ); this.itemInformation.setSystem ( request.getItem ().getInformation ().getSystem () ); } return this; }