viewstyle , visibility etc save-get

This commit is contained in:
annampak 2017-12-01 16:00:37 +02:00
parent 62557fdf58
commit 3de767319d
20 changed files with 667 additions and 122 deletions

View File

@ -62,7 +62,7 @@ import { DatasetprofileEditorComponent } from './managers/datasetprofile-editor/
import { DatasetProfileGUIEditorComponent } from './dataset-profile-gui-editor/dataset-profile-gui-editor.component';
import { FieldFormComponent } from './field-form/field-form.component';
import { FormComponent } from './formBuilder/form.component';
import { FormComponent } from './form/form.component';
import { GroupFieldFormComponent } from './groupfield-form/groupfield-form.component';
import { RuleFormComponent } from './rule-component/rule.component';
import { SectionFormComponent } from './section-form/section-form.component';

View File

@ -2,9 +2,19 @@
<div [formGroup]="form">
<div class="form-row">
<div class="form-group col-md-12">
<div class="form-group col-md-4">
<label>Multiplicity</label>
<input type="nymber" class="form-control" formControlName="multiplicity">
<div formGroupName="multiplicity">
<div class="form-group">
<h5 style="margin-left:15px; font-weight:bold;">Multiplicity</h5>
<div class="col-md-2">
<label>Min</label>
<input type="number" class="form-control" formControlName="min">
</div>
<div class="col-md-2">
<label>Max</label>
<input type="number" class="form-control" formControlName="max">
</div>
</div>
</div>
<div class="form-group col-md-4">
<label>Ordinal</label>

View File

@ -1,4 +1,4 @@
<div>
<div>
<div [formGroup]="form">
<div class="form-row">
<div class="form-group col-md-6">
@ -10,16 +10,19 @@
<input type="text" class="form-control" formControlName="id">
</div>
<div class="form-row col-md-3">
<div class="form-group">
<label>View style</label>
<select class="form-control" formControlName="viewStyle">
<option>textarea</option>
<option>booleanDesicion</option>
<option>combobox</option>
<option>checkBox</option>
<option>freetext</option>
</select>
<div formGroupName="viewStyle">
<div class="form-group">
<label>View style</label>
<select class="form-control" formControlName="renderStyle">
<option>textarea</option>
<option>booleanDesicion</option>
<option>combobox</option>
<option>checkBox</option>
<option>freetext</option>
</select>
</div>
</div>
</div>
</div>
@ -31,52 +34,56 @@
<div class="form-group col-md-6">
<label>extendedDescription</label>
<input type="text" class="form-control" formControlName="extendedDescription">
</div>
</div>
</div>
<div class="form-row">
<div formGroupName="multiplicity">
<div class="form-group">
<h5 style="margin-left:15px; font-weight:bold;">Multiplicity</h5>
<div class="col-md-2">
<label>Multiplicity</label>
<input type="number" class="form-control" formControlName="min" placeholder="Min">
<label>Min</label>
<input type="number" class="form-control" formControlName="min">
</div>
<div class="col-md-2">
<!-- <label>Multiplicity</label> -->
<input type="number" class="form-control" formControlName="max" placeholder="Max">
<label>Max</label>
<input type="number" class="form-control" formControlName="max">
</div>
</div>
</div>
<div class="form-group col-md-2">
<label>Ordinal</label>
<input type="number" class="form-control" formControlName="ordinal">
</div>
<div class="form-group col-md-4">
<label>Default Value</label>
<input type="text" class="form-control" formControlName="value">
<label>Ordinal</label>
<input type="number" class="form-control" formControlName="ordinal">
</div>
<div class="form-group col-md-2">
<div formGroupName="defaultValue">
<div class="form-group col-md-4">
<label>Default Value</label>
<input type="text" class="form-control" formControlName="value">
</div>
</div>
<div class="form-group col-md-2">
<label class="radio control-label">Default Visibility</label>
<label class="radio-inline">
<input type="radio" name="defaultVisibility" id="inlineRadio1" value="true" formControlName="defaultVisibility"> true
<input type="radio" [value]="true" formControlName="defaultVisibility"> true
</label>
<label class="radio-inline">
<input type="radio" name="defaultVisibility" id="inlineRadio2" value="false" formControlName="defaultVisibility"> false
<input type="radio" [value]="false" formControlName="defaultVisibility"> false
</label>
</div>
</div>
</div>
<!-- <div *ngFor="let rule of dataModel.rules let i=index;">
<!-- <div *ngFor="let rule of dataModel.visible.rules let i=index;">
<h4 style="text-decoration: underline;">Rules <button type="button" class="btn btn-sm" style="margin-left:5px;" (click)="DeleteRule(i);"><span class="glyphicon glyphicon-erase"></span></button></h4>
<rule-form [form]="form.get('rules').get(''+i)" [dataModel]="rule"></rule-form>
<rule-form [form]="form.get('visible').get('rules').get(''+i)" [dataModel]="rule"></rule-form>
<div>
<a (click)="addNewRule(form)" style="cursor: pointer">
Add another rule +
</a>
</div>
</div>
<div *ngIf="dataModel.rules.length == 0;">
<div *ngIf="dataModel.visible.rules.length == 0;">
<a (click)="addNewRule(form)" style="cursor: pointer">
Add another rule +
</a>

View File

@ -24,13 +24,13 @@ ngOnInit(){
addNewRule(){
let rule: Rule = new Rule();
this.dataModel.rules.push(rule);
(<FormArray>this.form.get("rules")).push(rule.buildForm());
this.dataModel.visible.rules.push(rule);
(<FormArray>this.form.get("visible").get("rules")).push(rule.buildForm());
}
DeleteRule(index){
this.dataModel.rules.splice(index);
(<FormArray>this.form.get("rules")).removeAt(index);
this.dataModel.visible.rules.splice(index);
(<FormArray>this.form.get("visible").get("rules")).removeAt(index);
}
}

View File

@ -43,6 +43,9 @@ export class FormComponent {
this.addSection();
}
// this.dataModel = new JsonSerializer<DatasetProfileModel>().fromJSONObject(TestModel, DatasetProfileModel);
// this.form = this.dataModel.buildForm();
}
addSection() {
@ -57,12 +60,12 @@ export class FormComponent {
}
updateForm(data) {
return this.restBase.post("", data);
return this.restBase.post("/admin/addDmp", data);
}
onSubmit() {
debugger;
let data = JSON.stringify(this.form.value);
let data = this.form.value;
this.updateForm(data).subscribe();
}

View File

@ -15,12 +15,12 @@
<input type="text" class="form-control" formControlName="ordinal">
</div>
<div class="form-group col-md-3">
<label class="radio control-label">DefaultVisibility</label>
<label class="radio control-label">Default Visibility</label>
<label class="radio-inline">
<input type="radio" id="defaultVisibility" value="true" formControlName="defaultVisibility"> true
<input type="radio" [value]="true" formControlName="defaultVisibility"> true
</label>
<label class="radio-inline">
<input type="radio" id="defaultVisibility" value="false" formControlName="defaultVisibility"> false
<input type="radio" [value]="false" formControlName="defaultVisibility"> false
</label>
</div>
</div>
@ -44,7 +44,7 @@
<compositefield-form [form]="form.get('compositeFields').get(''+i)" [dataModel]="field"></compositefield-form>
<div>
<a (click)="addNewField()" style="cursor: pointer">
<a (click)="addNewFieldSet()" style="cursor: pointer">
Add another field Set (CompositeField) +
</a>
</div>
@ -52,7 +52,7 @@
</div>
<div *ngIf="dataModel.compositeFields.length == 0;">
<a (click)="addNewField()" style="cursor: pointer">
<a (click)="addNewFieldSet()" style="cursor: pointer">
Add another field Set (CompositeField) +
</a>
</div>

View File

@ -3,6 +3,7 @@ import { FormGroup } from '@angular/forms';
import { FieldGroup } from '../models/FieldGroup';
import { CompositeField } from '../models/CompositeField';
import { FormArray } from '@angular/forms/src/model';
import { Field } from '../models/Field';
@Component({
selector: 'groupfield-form',
@ -21,10 +22,17 @@ export class GroupFieldFormComponent {
//this.addNewField();
}
addNewField(){
addNewFieldSet(){
let compositeField: CompositeField = new CompositeField();
let field: Field = new Field(); //create field at the same time
compositeField.fields.push(field);
//(<FormArray>this.form.get("compositeFields").get("fields")).push(field.buildForm());
this.dataModel.compositeFields.push(compositeField);
(<FormArray>this.form.get("compositeFields")).push(compositeField.buildForm());
}
DeleteFieldSet(index){

View File

@ -3,16 +3,18 @@ import { JsonSerializer } from '../utilities/JsonSerializer';
import { Serializable } from './interfaces/Serializable';
import { BaseModel } from './BaseModel';
import {Field} from './Field'
import {Multiplicity} from './Multiplicity'
export class CompositeField extends BaseModel implements Serializable<CompositeField> {
public fields:Array<Field> = new Array<Field>();
public multiplicity:number;
public id:string;
public ordinal:number;
public multiplicity: Multiplicity = new Multiplicity();
fromJSONObject(item:any):CompositeField{
this.fields = new JsonSerializer<Field>().fromJSONArray(item.fields,Field);
this.multiplicity = item.multiplicity;
this.multiplicity = new JsonSerializer<Multiplicity>().fromJSONObject(item.multiplicity, Multiplicity);
this.id = item.id;
this.ordinal = item.ordinal;
return this;
@ -20,7 +22,6 @@ export class CompositeField extends BaseModel implements Serializable<CompositeF
buildForm():FormGroup{
let formGroup = this.formBuilder.group({
multiplicity:[this.multiplicity],
id:[this.id],
ordinal:[this.ordinal]
});
@ -31,6 +32,8 @@ export class CompositeField extends BaseModel implements Serializable<CompositeF
fieldsFormArray.push(form)
})
formGroup.addControl('fields', this.formBuilder.array(fieldsFormArray));
formGroup.addControl("multiplicity", this.multiplicity.buildForm());
return formGroup;
}
}

View File

@ -0,0 +1,24 @@
import { BaseModel } from './BaseModel';
import { FormGroup } from '@angular/forms';
import { FormGenerator } from './interfaces/FormGenerator';
import { Serializable } from './interfaces/Serializable';
export class DefaultValue extends BaseModel implements Serializable<DefaultValue>,FormGenerator<FormGroup>{
public type:string;
public value:string;
fromJSONObject(item:any):DefaultValue{
this.type = item.type;
this.value = item.value;
return this;
}
buildForm():FormGroup{
let formGroup = this.formBuilder.group({
type: [this.type],
value: [this.value]
});
return formGroup;
}
}

View File

@ -3,35 +3,38 @@ import { FormGroup } from '@angular/forms';
import { FormGenerator } from './interfaces/FormGenerator';
import { JsonSerializer } from '../utilities/JsonSerializer';
import { Serializable } from './interfaces/Serializable';
import {Rule} from './Rule'
import {Multiplicity} from './Multiplicity'
import {Rule} from './Rule';
import {Multiplicity} from './Multiplicity';
import {DefaultValue} from './DefaultValue';
import {ViewStyle} from './ViewStyle';
import {Visibility} from './Visibility';
export class Field extends BaseModel implements Serializable<Field>,FormGenerator<FormGroup>{
public id:string;
public title:string;
public value:string;
public defaultValue:DefaultValue = new DefaultValue;
public description:string;
public extendedDescription:string;
public viewStyle:string;
public viewStyle:ViewStyle = new ViewStyle();
public defaultVisibility:boolean;
public page:number;
public multiplicity: Multiplicity = new Multiplicity();
public ordinal: number;
public rules: Array<Rule> = new Array<Rule>();
public visible: Visibility = new Visibility();
fromJSONObject(item:any):Field{
this.id = item.id;
this.title = item.title;
this.value = item.value;
this.defaultValue = new JsonSerializer<DefaultValue>().fromJSONObject(item.defaultValue, DefaultValue);
this.description = item.description;
this.extendedDescription = item.extendedDescription;
this.viewStyle = item.viewStyle;
this.extendedDescription = item.extendedDescription;
this.defaultVisibility = item.defaultVisibility;
this.page = item.page;
this.multiplicity = new JsonSerializer<Multiplicity>().fromJSONObject(item.multiplicity, Multiplicity);
this.ordinal = item.ordinal;
this.rules = new JsonSerializer<Rule>().fromJSONArray(item.rule, Rule);
this.viewStyle = new JsonSerializer<ViewStyle>().fromJSONObject(item.viewStyle, ViewStyle);
this.visible = new JsonSerializer<Visibility>().fromJSONObject(item.visible, Visibility);
return this;
}
@ -39,27 +42,18 @@ export class Field extends BaseModel implements Serializable<Field>,FormGenerato
let formGroup = this.formBuilder.group({
id: [this.id],
title: [this.title],
value: [this.value],
description: [this.description],
extendedDescription:[this.extendedDescription],
viewStyle: [this.viewStyle],
defaultVisibility:[this.defaultVisibility],
page:[this.page] ,
ordinal:[this.ordinal]
});
let rulesFormArray = new Array<FormGroup>();
if (this.rules){
this.rules.forEach(rule =>{
let form:FormGroup = rule.buildForm();
rulesFormArray.push(form);
});
}
});
formGroup.addControl("multiplicity", this.multiplicity.buildForm());
formGroup.addControl("rules", this.formBuilder.array(rulesFormArray));
formGroup.addControl("multiplicity", this.multiplicity.buildForm());
formGroup.addControl("defaultValue", this.defaultValue.buildForm());
formGroup.addControl("viewStyle", this.viewStyle.buildForm());
//formGroup.addControl("visible", this.visible.buildForm());
return formGroup;
}

View File

@ -4,25 +4,30 @@ import { FormGenerator } from './interfaces/FormGenerator';
import { Serializable } from './interfaces/Serializable';
export class Rule extends BaseModel implements Serializable<Rule>,FormGenerator<FormGroup>{
public sourceField:string;
public targetField:string;
public requiredValue;
public type: string;
public target:string;
public value: string;
public ruleType: string;
public ruleStyle: string;
public valueType: string;
fromJSONObject(item:any):Rule{
this.sourceField = item.sourceField;
this.targetField = item.targetField;
this.requiredValue = item.requiredValue;
this.type = item.type;
this.target = item.target;
this.value = item.value;
this.ruleType = item.ruleType;
this.ruleStyle = item.ruleStyle;
this.valueType = item.valueType;
return this;
}
buildForm():FormGroup{
let formGroup = this.formBuilder.group({
sourceField: [this.sourceField],
targetField: [this.targetField],
requiredValue: [this.requiredValue],
type: [this.type]
target: [this.target],
ruleStyle: [this.ruleStyle],
value: [this.value],
ruleType: [this.ruleType],
valueType: [this.valueType]
});
return formGroup;
}

View File

@ -0,0 +1,24 @@
import { BaseModel } from './BaseModel';
import { FormGroup } from '@angular/forms';
import { FormGenerator } from './interfaces/FormGenerator';
import { Serializable } from './interfaces/Serializable';
export class ViewStyle extends BaseModel implements Serializable<ViewStyle>,FormGenerator<FormGroup>{
public cssClass:string;
public renderStyle:string;
fromJSONObject(item:any):ViewStyle{
this.cssClass = item.cssClass;
this.renderStyle = item.renderStyle;
return this;
}
buildForm():FormGroup{
let formGroup = this.formBuilder.group({
cssClass: [this.cssClass],
renderStyle: [this.renderStyle]
});
return formGroup;
}
}

View File

@ -0,0 +1,37 @@
import { BaseModel } from './BaseModel';
import { Rule } from "./Rule";
import { FormGenerator } from "./interfaces/FormGenerator";
import { FormGroup } from '@angular/forms';
import { Serializable } from './interfaces/Serializable';
import { JsonSerializer } from '../utilities/JsonSerializer';
export class Visibility extends BaseModel implements Serializable<Visibility>, FormGenerator<FormGroup>{
public rules: Array<Rule> = new Array<Rule>();
public style:string;
fromJSONObject(item:any):Visibility{
this.rules = new JsonSerializer<Rule>().fromJSONArray(item.rules, Rule);
this.style = item.style;
return this;
}
buildForm():FormGroup{
let formGroup = this.formBuilder.group({
style:[this.style]
})
let rulesFormArray = new Array<FormGroup>();
if (this.rules){
this.rules.forEach(rule =>{
let form:FormGroup = rule.buildForm();
rulesFormArray.push(form);
});
}
formGroup.addControl("rules", this.formBuilder.array(rulesFormArray));
return formGroup;
}
}

View File

@ -0,0 +1,24 @@
import { BaseModel } from './BaseModel';
import { FormGroup } from '@angular/forms';
import { FormGenerator } from './interfaces/FormGenerator';
import { Serializable } from './interfaces/Serializable';
export class Data extends BaseModel implements Serializable<Data>,FormGenerator<FormGroup>{
public type:string;
public url:string;
fromJSONObject(item:any):Data{
this.type = item.type;
this.url = item.url;
return this;
}
buildForm():FormGroup{
let formGroup = this.formBuilder.group({
type: [this.type],
url: [this.url]
});
return formGroup;
}
}

View File

@ -1,4 +1,4 @@
import { FormComponent } from './formBuilder/form.component';
import { FormComponent } from './form/form.component';
import { ModuleWithProviders } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
@ -79,9 +79,14 @@ export const routes: Routes = [
{
path: 'form/:id',
component: FormComponent
},
{
path: 'form',
component: FormComponent
}
];

View File

@ -3,13 +3,13 @@
<div class="form-row">
<div class="form-group col-md-4">
<label>Rule Type</label>
<select class="form-control" formControlName="type">
<select class="form-control" formControlName="ruleType">
<option>field value</option>
</select>
</div>
<div class="form-group col-md-4">
<label>Target</label>
<input type="text" class="form-control" placeholder="field id" formControlName="targetField">
<input type="text" class="form-control" placeholder="field id" formControlName="target">
</div>
<div class="form-group col-md-4">
<label>Rule style</label>
@ -22,11 +22,11 @@
</div>
<div class="form-group col-md-6">
<label>Value Type</label>
<input type="text" class="form-control">
<input type="text" class="form-control" formControlName="valueType">
</div>
<div class="form-group col-md-6">
<label>Value</label>
<input type="text" class="form-control" formControlName="requiredValue">
<input type="text" class="form-control" formControlName="value">
</div>
</div>
</div>

View File

@ -15,12 +15,12 @@
<input type="text" class="form-control" formControlName="ordinal">
</div>
<div class="form-group col-md-3">
<label class="radio control-label">defaultVisibility</label>
<label class="radio control-label">Default Visibility</label>
<label class="radio-inline">
<input type="radio" name="defaultVisibility" id="inlineRadio1" value="true" formControlName="defaultVisibility"> true
<input type="radio" [value]="true" formControlName="defaultVisibility"> true
</label>
<label class="radio-inline">
<input type="radio" name="defaultVisibility" id="inlineRadio2" value="false" formControlName="defaultVisibility"> false
<input type="radio" [value]="false" formControlName="defaultVisibility"> false
</label>
</div>
</div>
@ -48,5 +48,11 @@
</div>
</div>
<div>
<a (click)="addGroupField()" style="cursor: pointer">
Add another group +
</a>
</div>
</div>

View File

@ -18,7 +18,7 @@ export class RestBase {
/*
*/
protocol: string = "http";
hostname: string = "dionysus.di.uoa.gr";
hostname: string = "192.168.32.103";
port: number = 8080;
webappname: string = "dmp-backend";
restpath: string = "rest";

View File

@ -6,6 +6,8 @@ export const TestModel = {
"page": "1",
"title": "1 Data Summary",
"description": " Fill in the fields to describe your data model ",
"ordinal": "1",
"extendedDescription": "",
"sections": [],
"fieldGroups":
[
@ -16,11 +18,15 @@ export const TestModel = {
"title": "Data Summary",
"description": "",
"extendedDescription": "",
"multiplicity":{
"min":"1",
"max":"1"
},
"compositeFields": [
{
"multiplicity":{
"min":0,
"max":3
"min":"1",
"max":"1"
},
"fields":
[
@ -30,11 +36,46 @@ export const TestModel = {
"title": "",
"description": "",
"extendedDescription": "",
"viewStyle": "checkBox",
"rule":[],
"viewStyle": {
"renderStyle": "checkBox",
"cssClass": ""
},
"defaultValue":{
"type":"any",
"value":""
},
"multiplicity":{
"min":0,
"max":1
"min":"1",
"max":"1"
},
"data": {
}
},
{
"id": "radioChoices",
"defaultVisibility": "true",
"title": "",
"description": "",
"extendedDescription": "",
"viewStyle": {
"renderStyle": "radiobox",
"cssClass": ""
},
"defaultValue":{
"type":"any",
"value":""
},
"multiplicity":{
"min":"1",
"max":"1"
},
"data": {
"options": [
{ "label": "Over 18", "value": "over18" },
{ "label": "Under 15", "value": "under15" },
{ "label": "Between 15 - 18", "value": "between15and18" }
]
}
}
]
@ -48,12 +89,14 @@ export const TestModel = {
"ordinal": "2",
"defaultVisibility": "true",
"page": "1",
"extendedDescription": "",
"title": "2 Fair Data",
"sections": [
{
"id": "dataMetadata",
"defaultVisibility": "true",
"page": "1",
"ordinal": 1,
"title": "2.1 Making data findable, including provisions for metadata",
"sections": [],
"fieldGroups": [
@ -65,8 +108,16 @@ export const TestModel = {
"title": "Making data findable, including provisions for metadata",
"description": "Making data findable, including provisions for metadata",
"extendedDescription": "FieldGroup Description",
"multiplicity":{
"min":"1",
"max":"1"
},
"compositeFields": [
{
"multiplicity":{
"min":"1",
"max":"1"
},
"fields":
[
{
@ -75,33 +126,60 @@ export const TestModel = {
"title": "Q2.1.1 Will you use metadata to describe the data?",
"description": "User can select from a list of metadata standards. If they cannot find the standard in the list provided then they should choose \"not listed\". Selecting this will result in a field in which the user can insert the URL to the description of the metadata scheme used. A \"comments\" box should exist to allow users to add comments. They may select more than one metadata standard. They may specify more than one URL when selecting \"not listed\". They are also presented with a field in which to specify the location of the metadata service. Users can select the \"no metadata\" button to specify no metadata will be used to describe the data.",
"extendedDescription": "FieldGroup Description",
"viewStyle": "booleanDesicion",
"rule":[],
"viewStyle": {
"renderStyle": "booleanDecision",
"cssClass": ""
},
"defaultValue":{
"type":"any",
"value":""
},
"multiplicity":{
"min":0,
"max":1
"min":"1",
"max":"1"
},
"data": {
}
}
]
},
{
"multiplicity":{
"min":"1",
"max":"1"
},
"fields":
[
{
"id": "metadataStandarsA211",
"defaultVisibility": "false",
"defaultVisibility": "true",
"title": "Metadata standards",
"description": "The data will be described by metadata that follows the metadata standards described in <url1>, <url2>, ? The data will be described by metadata that follows the metadata schema described in <not-listed-url1>, <not-listed-url2>. The metadata will be stored in the service located at <metadata-repo-url>",
"extendedDescription": "",
"viewStyle": "combobox",
"rule":[],
"viewStyle": {
"renderStyle": "combobox",
"cssClass": ""
},
"defaultValue":{
"type":"any",
"value":""
},
"multiplicity":{
"min":0,
"max":1
"min":"1",
"max":"1"
},
"data": {
"type": "autocomplete",
"url": "http://dionysus.di.uoa.gr:8080/dmp-backend/rest/external/datarepos?query=gree"
}
}]
},
{
"multiplicity":{
"min":"1",
"max":"1"
},
"fields":
[
{
@ -110,15 +188,29 @@ export const TestModel = {
"title": "Not listed",
"description": "",
"extendedDescription": "",
"viewStyle": "checkBox",
"rule":[],
"viewStyle": {
"renderStyle": "checkBox",
"cssClass": ""
},
"defaultValue":{
"type":"any",
"value":""
},
"multiplicity":{
"min":0,
"max":1
"min":"1",
"max":"1"
},
"data": {
}
}]
}
]
},
{
"multiplicity":{
"min":"1",
"max":"1"
},
"fields":
[
{
@ -127,15 +219,28 @@ export const TestModel = {
"title": "Url",
"description": "URL to the description of the metadata scheme used",
"extendedDescription": "",
"viewStyle": "freetext",
"rule":[],
"viewStyle": {
"renderStyle": "freetext",
"cssClass": ""
},
"defaultValue":{
"type":"any",
"value":""
},
"multiplicity":{
"min":0,
"max":1
"min":"1",
"max":"1"
},
"data": {
}
}]
},
{
"multiplicity":{
"min":"1",
"max":"1"
},
"fields":
[
{
@ -144,15 +249,28 @@ export const TestModel = {
"title": "Comments",
"description": "",
"extendedDescription": "",
"viewStyle": "freetext",
"rule":[],
"viewStyle": {
"renderStyle": "freetext",
"cssClass": ""
},
"defaultValue":{
"type":"any",
"value":""
},
"multiplicity":{
"min":0,
"max":1
"min":"1",
"max":"1"
},
"data": {
}
}]
},
{
"multiplicity":{
"min":"1",
"max":"1"
},
"fields":
[
{
@ -161,18 +279,295 @@ export const TestModel = {
"title": "The data will not be described by any metadata.",
"description": "",
"extendedDescription": "",
"viewStyle": "checkBox",
"rule":[],
"viewStyle": {
"renderStyle": "checkBox",
"cssClass": ""
},
"defaultValue":{
"type":"any",
"value":""
},
"multiplicity":{
"min":0,
"max":1
"min":"1",
"max":"1"
},
"data": {
}
}
]
}
]
},
{
"id": "VocabulariesGroup",
"defaultVisibility": "true",
"page": "1",
"ordinal": 1,
"title": "Vocabularies",
"description": "Vocabularies",
"extendedDescription": "FieldGroup Description",
"multiplicity":{
"min":"1",
"max":"1"
},
"compositeFields": [
{
"multiplicity":{
"min":"1",
"max":"1"
},
"fields": [
{
"id": "useVocabulariesQ212",
"defaultVisibility": "true",
"title": "Q2.1.2 Will your metadata use standardised vocabularies?",
"description": "User selects from a drop-down list of existing standardised vocabularies or \"not listed\" or \"none\". There should be a \"comments\" fields for additional information. If \"not listed\" is selected the user is presented with two additional fields in which the user can put the URL to the new vocabulary along with a short description. The user should be allowed to select more than one option.",
"extendedDescription": "FieldGroup Description",
"viewStyle": {
"renderStyle": "booleanDesicion",
"cssClass": ""
},
"defaultValue":{
"type":"any",
"value":""
},
"multiplicity":{
"min":"1",
"max":"1"
},
"data": {
}
}]
},
{
"multiplicity":{
"min":"1",
"max":"1"
},
"fields": [
{
"id": "standardisedVocabulariesA212",
"defaultVisibility": "false",
"title": "Existing standardised vocabularies",
"description": "The metadata will make use of the standardised vocabulary <url>",
"extendedDescription": "",
"viewStyle": {
"renderStyle": "combobox",
"cssClass": ""
},
"defaultValue":{
"type":"any",
"value":""
},
"multiplicity":{
"min":"1",
"max":"1"
},
"data": {
"type": "wordlist",
"values": [
{ "label": "Mitsos", "value": "mitsakos" },
{ "label": "Kitsos", "value": "kitsakos" },
{ "label": "Panagiotis", "value": "mpotis" }
]
}
}]
},
{
"multiplicity":{
"min":"1",
"max":"1"
},
"fields": [
{
"id": "notlistedVocabularyA212",
"defaultVisibility": "false",
"title": "Not listed vocabulary",
"description": "",
"extendedDescription": "",
"viewStyle": {
"renderStyle": "checkBox",
"cssClass": ""
},
"defaultValue":{
"type":"any",
"value":""
},
"multiplicity":{
"min":"1",
"max":"1"
},
"data": {
}
}]
},
{
"multiplicity":{
"min":"1",
"max":"1"
},
"fields": [
{
"id": "notlistedVocUrlA212",
"defaultVisibility": "false",
"title": "Vocabulary Url",
"description": "The user can put the URL to the new vocabulary",
"extendedDescription": "",
"viewStyle": {
"renderStyle": "freetext",
"cssClass": ""
},
"defaultValue":{
"type":"any",
"value":""
},
"multiplicity":{
"min":"1",
"max":"1"
},
"data": {
}
}]
},
{
"multiplicity":{
"min":"1",
"max":"1"
},
"fields": [
{
"id": "notlistedVocCommentA212",
"defaultVisibility": "false",
"title": "Comments",
"description": "Vocabulary short description",
"extendedDescription": "",
"viewStyle": {
"renderStyle": "freetext",
"cssClass": ""
},
"defaultValue":{
"type":"any",
"value":""
},
"multiplicity":{
"min":"1",
"max":"1"
},
"data": {
}
}]
},
{
"multiplicity":{
"min":"1",
"max":"1"
},
"fields": [
{
"id": "noMetadataVocabularyA212",
"defaultVisibility": "false",
"title": "The metadata will not make use of any vocabulary",
"description": "",
"extendedDescription": "",
"viewStyle": {
"renderStyle": "checkBox",
"cssClass": ""
},
"defaultValue":{
"type":"any",
"value":""
},
"multiplicity":{
"min":"1",
"max":"1"
},
"data": {
}
}
]
}
]
},
{
"id": "FreeOfChargeGroup",
"defaultVisibility": "true",
"page": "1",
"ordinal": 1,
"title": "Metadata Available",
"description": "Metadata Available",
"extendedDescription": "FieldGroup Description",
"multiplicity":{
"min":"1",
"max":"1"
},
"compositeFields": [
{
"multiplicity":{
"min":"1",
"max":"1"
},
"fields": [
{
"id": "freeOfChargeGroupQ213",
"defaultVisibility": "true",
"title": "Q2.1.3 Will you use standardised formats for some or all of your data.",
"description": "User is presented with a choice of ?yes?, ?no?. There should be a ?comments? field for additional information.",
"extendedDescription": "Field Description",
"viewStyle": {
"renderStyle": "booleanDesicion",
"cssClass": ""
},
"defaultValue":{
"type":"any",
"value":""
},
"multiplicity":{
"min":"1",
"max":"1"
},
"data": {
}
}]
},
{
"multiplicity":{
"min":"1",
"max":"1"
},
"fields": [
{
"id": "freeOfChargeGroupCommentA213",
"defaultVisibility": "true",
"title": "Comments",
"description": "",
"extendedDescription": "",
"viewStyle": {
"renderStyle": "freetext",
"cssClass": ""
},
"defaultValue":{
"type":"any",
"value":""
},
"multiplicity":{
"min":"1",
"max":"1"
},
"data": {
}
}
]
}
]
}
]
}
]