From 71aebdae7d10a349dc2ee86c9539c1376758d5dd Mon Sep 17 00:00:00 2001 From: annabakouli Date: Wed, 3 Jan 2018 15:43:21 +0200 Subject: [PATCH] no message --- dmp-admin/src/app/app.module.ts | 49 ++++++++++++------- .../autocomplete/autocomplete-component.html | 13 +++++ .../autocomplete/autocomplete-component.ts | 7 ++- .../booleanDecision-component.html} | 4 +- .../booleanDecision-component.ts | 19 +++++++ .../checkbox/checkbox-component.html | 9 ++++ .../components/checkbox/checkbox-component.ts | 20 ++++++++ .../combobox/combobox-component.html | 0 .../combobox/combobox-component.ts | 4 +- .../freetext/freetext-component.html | 9 ++++ .../components/freetext/freetext-component.ts | 21 ++++++++ .../radiobox/radiobox-component.html | 28 +++++++++++ .../radiobox/radiobox-component.ts | 8 +-- .../textarea/textarea-component.html | 9 ++++ .../components/textarea/textarea-component.ts | 22 +++++++++ .../wordlist/wordlist-component.html | 4 ++ .../wordlist/wordlist-component.ts | 8 +-- .../field-form/field-form.component.html | 12 +++++ .../field-form/field-form.component.ts | 11 ++--- .../app/models/DataField/AutocompleteData.ts | 2 + .../models/DataField/BooleanDecisionData.ts | 16 ++++++ .../src/app/models/DataField/CheckBoxData.ts | 16 ++++++ .../src/app/models/DataField/DataField.ts | 1 + .../src/app/models/DataField/FreeTextData.ts | 16 ++++++ .../src/app/models/DataField/RadioBoxData.ts | 5 +- .../src/app/models/DataField/TextArea.ts | 16 ++++++ .../src/app/models/DataField/WordListData.ts | 4 +- .../src/app/radiobox/radiobox-component.html | 24 --------- .../commons/datafield/AutoCompleteData.java | 3 -- .../datafield/BooleanDecisionData.java | 11 +++-- .../commons/datafield/CheckBoxData.java | 16 ++---- .../commons/datafield/ComboBoxData.java | 4 +- .../commons/datafield/FieldData.java | 10 ++++ .../commons/datafield/FreeTextData.java | 39 +++++++++++++++ .../commons/datafield/RadioBoxData.java | 17 +++++-- .../commons/datafield/TextAreaData.java | 37 ++++++++++++++ .../utilities/builders/ModelBuilder.java | 11 ++--- 37 files changed, 405 insertions(+), 100 deletions(-) create mode 100644 dmp-admin/src/app/components/autocomplete/autocomplete-component.html rename dmp-admin/src/app/{ => components}/autocomplete/autocomplete-component.ts (76%) rename dmp-admin/src/app/{autocomplete/autocomplete-component.html => components/booleanDecision/booleanDecision-component.html} (79%) create mode 100644 dmp-admin/src/app/components/booleanDecision/booleanDecision-component.ts create mode 100644 dmp-admin/src/app/components/checkbox/checkbox-component.html create mode 100644 dmp-admin/src/app/components/checkbox/checkbox-component.ts rename dmp-admin/src/app/{ => components}/combobox/combobox-component.html (100%) rename dmp-admin/src/app/{ => components}/combobox/combobox-component.ts (85%) create mode 100644 dmp-admin/src/app/components/freetext/freetext-component.html create mode 100644 dmp-admin/src/app/components/freetext/freetext-component.ts create mode 100644 dmp-admin/src/app/components/radiobox/radiobox-component.html rename dmp-admin/src/app/{ => components}/radiobox/radiobox-component.ts (80%) create mode 100644 dmp-admin/src/app/components/textarea/textarea-component.html create mode 100644 dmp-admin/src/app/components/textarea/textarea-component.ts rename dmp-admin/src/app/{ => components}/wordlist/wordlist-component.html (82%) rename dmp-admin/src/app/{ => components}/wordlist/wordlist-component.ts (81%) create mode 100644 dmp-admin/src/app/models/DataField/BooleanDecisionData.ts create mode 100644 dmp-admin/src/app/models/DataField/CheckBoxData.ts create mode 100644 dmp-admin/src/app/models/DataField/FreeTextData.ts create mode 100644 dmp-admin/src/app/models/DataField/TextArea.ts delete mode 100644 dmp-admin/src/app/radiobox/radiobox-component.html create mode 100644 dmp-backend/src/main/java/eu/eudat/models/components/commons/datafield/FreeTextData.java create mode 100644 dmp-backend/src/main/java/eu/eudat/models/components/commons/datafield/TextAreaData.java diff --git a/dmp-admin/src/app/app.module.ts b/dmp-admin/src/app/app.module.ts index 1d56beb33..6f798be24 100644 --- a/dmp-admin/src/app/app.module.ts +++ b/dmp-admin/src/app/app.module.ts @@ -1,9 +1,19 @@ -import { BrowserModule } from '@angular/platform-browser'; +import { CheckBoxComponent } from './components/checkbox/checkbox-component'; +import { FreeTextData } from './models/DataField/FreeTextData'; +import { BooleanDecisionComponent } from './components/booleanDecision/booleanDecision-component'; +import { FreeTextComponent } from './components/freetext/freetext-component'; +import { TextAreaComponent } from './components/textarea/textarea-component'; +import { RadioBoxComponent } from './components/radiobox/radiobox-component'; +import { WordlistComponent } from './components/wordlist/wordlist-component'; +import { AutocompleteComponent } from './components/autocomplete/autocomplete-component'; +import { ComboboxComponent } from './components/combobox/combobox-component'; + + +import { BrowserModule } from '@angular/platform-browser'; import { RouterModule, Routes } from '@angular/router'; import { NgModule } from '@angular/core'; -//import { HttpModule, Http, Response, RequestOptions, RequestMethod, Headers, URLSearchParams } from '@angular/http'; import { HttpClientModule, HttpClient, HTTP_INTERCEPTORS } from '@angular/common/http'; -import { HttpModule} from '@angular/http'; +import { HttpModule } from '@angular/http'; import { DataTableModule } from "angular2-datatable"; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { DialogService } from "ng2-bootstrap-modal"; @@ -27,7 +37,7 @@ import { DatarepoService } from './services/datarepo-service'; import { GlobalInterceptor } from './services/interceptor'; import { Toolbox } from './services/toolbox'; -import { DataFilterPipe } from './pipes/data-filter.pipe'; +import { DataFilterPipe } from './pipes/data-filter.pipe'; import { DatasetProfileTableFilterPipe } from './pipes/datasetprofile-table-filter.pipe'; import { DmpTableFilterPipe } from './pipes/dmp-table-filter.pipe'; import { ServiceTableFilterPipe } from './pipes/service-table-filter.pipe'; @@ -68,10 +78,7 @@ import { RuleFormComponent } from './dataset-profile-form/rule-component/rule.co import { SectionFormComponent } from './dataset-profile-form/section-form/section-form.component'; import { PageFormComponent } from './dataset-profile-form/page-form/page-component'; import { CompositeFieldFormComponent } from './dataset-profile-form/compositefield-form/compositefield-form.component'; -import { ComboboxComponent } from './combobox/combobox-component'; -import { AutocompleteComponent } from './autocomplete/autocomplete-component'; -import { WordlistComponent } from './wordlist/wordlist-component'; -import { RadioBoxComponent } from './radiobox/radiobox-component'; + @@ -87,15 +94,15 @@ import { RadioBoxComponent } from './radiobox/radiobox-component'; ServiceTableFilterPipe, ResearcherTableFilterPipe, DatarepoTableFilterPipe, - + AppComponent, GooggleSignInComponent, FieldFormComponent, FormComponent, GroupFieldFormComponent, RuleFormComponent, - SectionFormComponent, - PageFormComponent, + SectionFormComponent, + PageFormComponent, CompositeFieldFormComponent, ComboboxComponent, AutocompleteComponent, @@ -117,7 +124,11 @@ import { RadioBoxComponent } from './radiobox/radiobox-component'; ResearcherEditorComponent, DatareposEditorComponent, DatasetprofileEditorComponent, - DatasetProfileGUIEditorComponent + DatasetProfileGUIEditorComponent, + TextAreaComponent, + CheckBoxComponent, + BooleanDecisionComponent, + FreeTextComponent ], imports: [ BrowserModule, @@ -132,13 +143,13 @@ import { RadioBoxComponent } from './radiobox/radiobox-component'; AppRouting ], providers: [{ - provide: HTTP_INTERCEPTORS, - useClass: GlobalInterceptor, - multi: true, - }, - DatasetsServiceService, TokenService, DmpsServiceService, ResearcherService, - DialogService, DatasetProfileService, ProjectService, OrganisationService, DatarepoService, - DmpProfileService, RegistryService, ServiceService, NativeLoginService, HttpModule, Toolbox, HttpClient, RestBase], + provide: HTTP_INTERCEPTORS, + useClass: GlobalInterceptor, + multi: true, + }, + DatasetsServiceService, TokenService, DmpsServiceService, ResearcherService, + DialogService, DatasetProfileService, ProjectService, OrganisationService, DatarepoService, + DmpProfileService, RegistryService, ServiceService, NativeLoginService, HttpModule, Toolbox, HttpClient, RestBase], bootstrap: [AppComponent] }) export class AppModule { } diff --git a/dmp-admin/src/app/components/autocomplete/autocomplete-component.html b/dmp-admin/src/app/components/autocomplete/autocomplete-component.html new file mode 100644 index 000000000..aa75c0aff --- /dev/null +++ b/dmp-admin/src/app/components/autocomplete/autocomplete-component.html @@ -0,0 +1,13 @@ +
+
+
+ + +
+
+ + +
+
+ +
\ No newline at end of file diff --git a/dmp-admin/src/app/autocomplete/autocomplete-component.ts b/dmp-admin/src/app/components/autocomplete/autocomplete-component.ts similarity index 76% rename from dmp-admin/src/app/autocomplete/autocomplete-component.ts rename to dmp-admin/src/app/components/autocomplete/autocomplete-component.ts index c4021147e..28fbcb69e 100644 --- a/dmp-admin/src/app/autocomplete/autocomplete-component.ts +++ b/dmp-admin/src/app/components/autocomplete/autocomplete-component.ts @@ -1,9 +1,8 @@ -import { FormGroup } from '@angular/forms'; -import { Field } from 'app/models/DataSetProfile/Field'; +import { AutocompleteData } from '../../models/DataField/AutocompleteData'; +import { Field } from '../../models/DataSetProfile/Field'; +import { FormGroup } from '@angular/forms'; import { Component, Input, OnInit } from '@angular/core'; -import { AutocompleteData } from 'app/models/DataField/AutocompleteData'; import { FormArray } from '@angular/forms/src/model'; -import { JsonSerializer } from 'app/utilities/JsonSerializer'; @Component({ selector: 'autocomplete-component', diff --git a/dmp-admin/src/app/autocomplete/autocomplete-component.html b/dmp-admin/src/app/components/booleanDecision/booleanDecision-component.html similarity index 79% rename from dmp-admin/src/app/autocomplete/autocomplete-component.html rename to dmp-admin/src/app/components/booleanDecision/booleanDecision-component.html index f210ba7f7..2411edac1 100644 --- a/dmp-admin/src/app/autocomplete/autocomplete-component.html +++ b/dmp-admin/src/app/components/booleanDecision/booleanDecision-component.html @@ -1,8 +1,8 @@
- - + +
diff --git a/dmp-admin/src/app/components/booleanDecision/booleanDecision-component.ts b/dmp-admin/src/app/components/booleanDecision/booleanDecision-component.ts new file mode 100644 index 000000000..c5f844075 --- /dev/null +++ b/dmp-admin/src/app/components/booleanDecision/booleanDecision-component.ts @@ -0,0 +1,19 @@ +import { Field } from '../../models/DataSetProfile/Field'; +import { BooleanDecisionData } from '../../models/DataField/BooleanDecisionData'; +import { FormGroup } from '@angular/forms'; +import { Component, Input, OnInit } from '@angular/core'; +import { FormArray } from '@angular/forms/src/model'; + +@Component({ + selector: 'booleanDecision-component', + templateUrl: './booleanDecision-component.html' +}) +export class BooleanDecisionComponent implements OnInit{ + @Input() dataModel: Field; + @Input() form: FormGroup; + private data:BooleanDecisionData = new BooleanDecisionData(); + + ngOnInit(){ + this.form.addControl("data", this.data.buildForm()); + } +} \ No newline at end of file diff --git a/dmp-admin/src/app/components/checkbox/checkbox-component.html b/dmp-admin/src/app/components/checkbox/checkbox-component.html new file mode 100644 index 000000000..2411edac1 --- /dev/null +++ b/dmp-admin/src/app/components/checkbox/checkbox-component.html @@ -0,0 +1,9 @@ +
+
+
+ + +
+
+ +
\ No newline at end of file diff --git a/dmp-admin/src/app/components/checkbox/checkbox-component.ts b/dmp-admin/src/app/components/checkbox/checkbox-component.ts new file mode 100644 index 000000000..d8553c086 --- /dev/null +++ b/dmp-admin/src/app/components/checkbox/checkbox-component.ts @@ -0,0 +1,20 @@ +import { Field } from '../../models/DataSetProfile/Field'; +import { CheckBoxData } from '../../models/DataField/CheckBoxData'; +import { BooleanDecisionData } from '../../models/DataField/BooleanDecisionData'; +import { FormGroup } from '@angular/forms'; +import { Component, Input, OnInit } from '@angular/core'; +import { FormArray } from '@angular/forms/src/model'; + +@Component({ + selector: 'checkbox-component', + templateUrl: './checkbox-component.html' +}) +export class CheckBoxComponent implements OnInit{ + @Input() dataModel: Field; + @Input() form: FormGroup; + private data:CheckBoxData = new CheckBoxData(); + + ngOnInit(){ + this.form.addControl("data", this.data.buildForm()); + } +} \ No newline at end of file diff --git a/dmp-admin/src/app/combobox/combobox-component.html b/dmp-admin/src/app/components/combobox/combobox-component.html similarity index 100% rename from dmp-admin/src/app/combobox/combobox-component.html rename to dmp-admin/src/app/components/combobox/combobox-component.html diff --git a/dmp-admin/src/app/combobox/combobox-component.ts b/dmp-admin/src/app/components/combobox/combobox-component.ts similarity index 85% rename from dmp-admin/src/app/combobox/combobox-component.ts rename to dmp-admin/src/app/components/combobox/combobox-component.ts index 2a1a99000..661018b15 100644 --- a/dmp-admin/src/app/combobox/combobox-component.ts +++ b/dmp-admin/src/app/components/combobox/combobox-component.ts @@ -1,5 +1,5 @@ -import { FormGroup } from '@angular/forms'; -import { Field } from 'app/models/DataSetProfile/Field'; +import { Field } from '../../models/DataSetProfile/Field'; +import { FormGroup } from '@angular/forms'; import { Component, Input, OnInit } from '@angular/core'; @Component({ diff --git a/dmp-admin/src/app/components/freetext/freetext-component.html b/dmp-admin/src/app/components/freetext/freetext-component.html new file mode 100644 index 000000000..2411edac1 --- /dev/null +++ b/dmp-admin/src/app/components/freetext/freetext-component.html @@ -0,0 +1,9 @@ +
+
+
+ + +
+
+ +
\ No newline at end of file diff --git a/dmp-admin/src/app/components/freetext/freetext-component.ts b/dmp-admin/src/app/components/freetext/freetext-component.ts new file mode 100644 index 000000000..0e1077469 --- /dev/null +++ b/dmp-admin/src/app/components/freetext/freetext-component.ts @@ -0,0 +1,21 @@ +import { Field } from '../../models/DataSetProfile/Field'; +import { FreeTextData } from '../../models/DataField/FreeTextData'; +import { CheckBoxData } from '../../models/DataField/CheckBoxData'; +import { BooleanDecisionData } from '../../models/DataField/BooleanDecisionData'; +import { FormGroup } from '@angular/forms'; +import { Component, Input, OnInit } from '@angular/core'; +import { FormArray } from '@angular/forms/src/model'; + +@Component({ + selector: 'freetext-component', + templateUrl: './freetext-component.html' +}) +export class FreeTextComponent implements OnInit{ + @Input() dataModel: Field; + @Input() form: FormGroup; + private data:FreeTextData = new FreeTextData(); + + ngOnInit(){ + this.form.addControl("data", this.data.buildForm()); + } +} \ No newline at end of file diff --git a/dmp-admin/src/app/components/radiobox/radiobox-component.html b/dmp-admin/src/app/components/radiobox/radiobox-component.html new file mode 100644 index 000000000..7e309f987 --- /dev/null +++ b/dmp-admin/src/app/components/radiobox/radiobox-component.html @@ -0,0 +1,28 @@ +
+
+ + +
+
+
+
+
+
+ + +
+
+ + +
+
+
+
+
+
+ + Add + + +
+ +
\ No newline at end of file diff --git a/dmp-admin/src/app/radiobox/radiobox-component.ts b/dmp-admin/src/app/components/radiobox/radiobox-component.ts similarity index 80% rename from dmp-admin/src/app/radiobox/radiobox-component.ts rename to dmp-admin/src/app/components/radiobox/radiobox-component.ts index 16416990a..e7064d84c 100644 --- a/dmp-admin/src/app/radiobox/radiobox-component.ts +++ b/dmp-admin/src/app/components/radiobox/radiobox-component.ts @@ -1,10 +1,10 @@ import { FormGroup } from '@angular/forms'; -import { Field } from '../models/DataSetProfile/Field'; +import { Field } from '../../models/DataSetProfile/Field'; import { Component, Input, OnInit } from '@angular/core'; -import { RadioBoxData } from '../models/DataField/RadioBoxData'; +import { RadioBoxData } from '../../models/DataField/RadioBoxData'; import { FormArray } from '@angular/forms/src/model'; -import { ListingItem } from '../models/Commons/ListingItem'; -import { JsonSerializer } from '../utilities/JsonSerializer'; +import { ListingItem } from '../../models/Commons/ListingItem'; +import { JsonSerializer } from '../../utilities/JsonSerializer'; @Component({ selector: 'radiobox-component', diff --git a/dmp-admin/src/app/components/textarea/textarea-component.html b/dmp-admin/src/app/components/textarea/textarea-component.html new file mode 100644 index 000000000..2411edac1 --- /dev/null +++ b/dmp-admin/src/app/components/textarea/textarea-component.html @@ -0,0 +1,9 @@ +
+
+
+ + +
+
+ +
\ No newline at end of file diff --git a/dmp-admin/src/app/components/textarea/textarea-component.ts b/dmp-admin/src/app/components/textarea/textarea-component.ts new file mode 100644 index 000000000..2a04a5566 --- /dev/null +++ b/dmp-admin/src/app/components/textarea/textarea-component.ts @@ -0,0 +1,22 @@ +import { Field } from '../../models/DataSetProfile/Field'; +import { TextArea } from '../../models/DataField/TextArea'; +import { FreeTextData } from '../../models/DataField/FreeTextData'; +import { CheckBoxData } from '../../models/DataField/CheckBoxData'; +import { BooleanDecisionData } from '../../models/DataField/BooleanDecisionData'; +import { FormGroup } from '@angular/forms'; +import { Component, Input, OnInit } from '@angular/core'; +import { FormArray } from '@angular/forms/src/model'; + +@Component({ + selector: 'textarea-component', + templateUrl: './textarea-component.html' +}) +export class TextAreaComponent implements OnInit{ + @Input() dataModel: Field; + @Input() form: FormGroup; + private data:TextArea = new TextArea(); + + ngOnInit(){ + this.form.addControl("data", this.data.buildForm()); + } +} \ No newline at end of file diff --git a/dmp-admin/src/app/wordlist/wordlist-component.html b/dmp-admin/src/app/components/wordlist/wordlist-component.html similarity index 82% rename from dmp-admin/src/app/wordlist/wordlist-component.html rename to dmp-admin/src/app/components/wordlist/wordlist-component.html index 64b6b89e7..73da25ad7 100644 --- a/dmp-admin/src/app/wordlist/wordlist-component.html +++ b/dmp-admin/src/app/components/wordlist/wordlist-component.html @@ -1,5 +1,9 @@
+
+ + +
diff --git a/dmp-admin/src/app/wordlist/wordlist-component.ts b/dmp-admin/src/app/components/wordlist/wordlist-component.ts similarity index 81% rename from dmp-admin/src/app/wordlist/wordlist-component.ts rename to dmp-admin/src/app/components/wordlist/wordlist-component.ts index a5deb7c5f..00c33f8b9 100644 --- a/dmp-admin/src/app/wordlist/wordlist-component.ts +++ b/dmp-admin/src/app/components/wordlist/wordlist-component.ts @@ -1,10 +1,10 @@ import { FormGroup } from '@angular/forms'; -import { Field } from '../models/DataSetProfile/Field'; +import { Field } from '../../models/DataSetProfile/Field'; import { Component, Input, OnInit } from '@angular/core'; -import { WordListData } from '../models/DataField/WordListData'; +import { WordListData } from '../../models/DataField/WordListData'; import { FormArray } from '@angular/forms/src/model'; -import { ListingItem } from '../models/Commons/ListingItem'; -import { JsonSerializer } from '../utilities/JsonSerializer'; +import { ListingItem } from '../../models/Commons/ListingItem'; +import { JsonSerializer } from '../../utilities/JsonSerializer'; @Component({ selector: 'wordlist-component', diff --git a/dmp-admin/src/app/dataset-profile-form/field-form/field-form.component.html b/dmp-admin/src/app/dataset-profile-form/field-form/field-form.component.html index 75d7128d5..3a3db98a7 100644 --- a/dmp-admin/src/app/dataset-profile-form/field-form/field-form.component.html +++ b/dmp-admin/src/app/dataset-profile-form/field-form/field-form.component.html @@ -32,6 +32,18 @@
+
+ +
+
+ +
+
+ +
+
+ +