Revision 55603
Added by Enrico Ottonello almost 5 years ago
modules/dnet-patcheditor-ui/trunk/src/main/java/eu/dnetlib/functionality/modular/ui/patcheditor/PatchEditorController.java | ||
---|---|---|
162 | 162 |
} |
163 | 163 |
|
164 | 164 |
/** |
165 |
* @return all terms belonging to specific type. Invoked by AngularJS |
|
166 |
* @throws Exception |
|
167 |
*/ |
|
168 |
@RequestMapping(path = "/ui/patcheditor/specificType", method = RequestMethod.GET) |
|
169 |
public @ResponseBody List<Term> getSpecificType() throws Exception { |
|
170 |
final List<Term> terms = getVocabularies("SpecificType"); |
|
171 |
return terms; |
|
172 |
} |
|
173 |
|
|
174 |
/** |
|
165 | 175 |
* @return all terms belonging to LSCH keywords, collection is loaded from LSCH.csv file inside project folder. Invoked by AngularJS |
166 | 176 |
* @throws Exception |
167 | 177 |
*/ |
... | ... | |
322 | 332 |
|
323 | 333 |
/** |
324 | 334 |
* Searches from index client the record identified by recordId and converts it in a structured object |
325 |
*
|
|
335 |
* |
|
326 | 336 |
* @param recordId |
327 | 337 |
* @return an object containing all structured data of a record |
328 | 338 |
* @throws PatchEditorException |
modules/dnet-patcheditor-ui/trunk/src/main/java/eu/dnetlib/functionality/modular/ui/patcheditor/converters/EfgNonAvCreationConverter.java | ||
---|---|---|
105 | 105 |
coll.setType(((Node) o).valueOf("./@type")); |
106 | 106 |
collections.add(coll); |
107 | 107 |
} |
108 |
|
|
109 |
// Specific Type |
|
110 |
record.setSpecificType(element.valueOf("//*[local-name() = 'specificType']").trim()); |
|
111 |
|
|
108 | 112 |
record.getCollections().addAll(collections); |
109 | 113 |
|
110 | 114 |
return record; |
modules/dnet-patcheditor-ui/trunk/src/main/java/eu/dnetlib/functionality/modular/ui/patcheditor/record/model/Record.java | ||
---|---|---|
29 | 29 |
String productionYear; |
30 | 30 |
String duration; |
31 | 31 |
String provenance; |
32 |
String specificType; |
|
32 | 33 |
|
33 | 34 |
public Color getColour() { |
34 | 35 |
return colour; |
... | ... | |
138 | 139 |
return collections; |
139 | 140 |
} |
140 | 141 |
|
142 |
public String getSpecificType() { |
|
143 |
return specificType; |
|
144 |
} |
|
145 |
|
|
146 |
public void setSpecificType(String specificType) { |
|
147 |
this.specificType = specificType; |
|
148 |
} |
|
149 |
|
|
141 | 150 |
} |
modules/dnet-patcheditor-ui/trunk/src/main/java/eu/dnetlib/functionality/modular/ui/patcheditor/record/UIAction.java | ||
---|---|---|
28 | 28 |
* The Enum FieldTypes. |
29 | 29 |
*/ |
30 | 30 |
public enum FieldTypes { |
31 |
isShownAt, isShownBy, aggregator, thumbnail, title, rightsStatus, rightsholderUrl, keyword, description, duration, provenance, language, colour, sound, gauge, countryOfReference, productionYear |
|
31 |
isShownAt, isShownBy, aggregator, thumbnail, title, rightsStatus, rightsholderUrl, keyword, description, duration, provenance, language, colour, sound, gauge, countryOfReference, productionYear, specificType
|
|
32 | 32 |
} |
33 | 33 |
|
34 | 34 |
public enum EntityTypes { |
... | ... | |
41 | 41 |
* sh85147437::-::Women and war::-::http://id.loc.gov/authorities/subjects/sh85147437::-::LCSH::-::EN description { |
42 | 42 |
* operation="ADDSUBTREE", fieldType="description", value="TEXT::-::TYPE::-::LANG"} language { operation="ADDSUBTREE", |
43 | 43 |
* fieldType="language", value="LANG::-::USAGE"} isShownAt,isShownBy, aggregator, thumbnail, countryOfReference, productionYear, |
44 |
* rightsStatus,rightholderUrl, duration, provenance, gauge { operation="EDIT/DELETENODE", fieldType="type", value="value"} colour,
|
|
45 |
* sound { operation="EDIT/DELETENODE", fieldType="type", value="colour::-::hascolour"} |
|
44 |
* rightsStatus,rightholderUrl, duration, provenance, gauge, specificType { operation="EDIT/DELETENODE", fieldType="type",
|
|
45 |
* value="value"} colour, sound { operation="EDIT/DELETENODE", fieldType="type", value="colour::-::hascolour"}
|
|
46 | 46 |
*/ |
47 | 47 |
|
48 | 48 |
/** The operation. */ |
... | ... | |
178 | 178 |
case rightsStatus: |
179 | 179 |
case duration: |
180 | 180 |
case provenance: |
181 |
case specificType: |
|
181 | 182 |
processAvManifestationField(out); |
182 | 183 |
break; |
183 | 184 |
case rightsholderUrl: |
modules/dnet-patcheditor-ui/trunk/src/main/resources/eu/dnetlib/web/resources/html/PatchRecord.html | ||
---|---|---|
340 | 340 |
</div> |
341 | 341 |
<div class="spacer25"></div> |
342 | 342 |
</form> |
343 |
</div> |
|
343 |
</div> |
|
344 |
<div class="col-md-offset-3 col-md-7 well" ng-if="entityType=='nonavcreation'"> |
|
345 |
<form class="form-horizontal"> |
|
346 |
<legend>Specific Type</legend> |
|
347 |
<div class="form-group"> |
|
348 |
<label class="control-label col-sm-3">Specific Type</label> |
|
349 |
<div class="col-sm-9"> |
|
350 |
<select class="form-control" ng-model="patchedRecord.specificType" ng-options="st.englishName as st.englishName for st in specificType" style="width:600px" placeholder="Choose a Specific Type..."> |
|
351 |
<option value=""></option> |
|
352 |
</select> |
|
353 |
</div> |
|
354 |
</div> |
|
355 |
<div class="spacer25"></div> |
|
356 |
</form> |
|
357 |
</div> |
|
344 | 358 |
|
345 | 359 |
|
346 | 360 |
</div> |
modules/dnet-patcheditor-ui/trunk/src/main/resources/eu/dnetlib/web/resources/js/patcheditor_controllers.js | ||
---|---|---|
69 | 69 |
"digitalObject":{"isShownAt":$scope.patchedRecord.digitalObject.isShownAt,"aggregator":$scope.patchedRecord.digitalObject.aggregator,"thumbnail":$scope.patchedRecord.digitalObject.thumbnail,"isShownBy":$scope.patchedRecord.digitalObject.isShownBy}, |
70 | 70 |
"colour":{"text":$scope.patchedRecord.colour.text,"hasColor":$scope.patchedRecord.colour.hasColor}, |
71 | 71 |
"provenance":$scope.patchedRecord.provenance, |
72 |
"gauge":$scope.patchedRecord.gauge |
|
72 |
"gauge":$scope.patchedRecord.gauge, |
|
73 |
"specificType":$scope.patchedRecord.specificType |
|
73 | 74 |
}; |
74 | 75 |
} |
75 | 76 |
$scope.searchPatchNotIndexed(); |
... | ... | |
230 | 231 |
} |
231 | 232 |
$scope.loadGauge(); |
232 | 233 |
|
234 |
$scope.loadSpecificType = function() { |
|
235 |
$http.get('patcheditor/specificType').success(function (data) { |
|
236 |
$scope.specificType = data; |
|
237 |
}).error(function () { |
|
238 |
show_notification('error', 'Error getting SpecificType '); |
|
239 |
}); |
|
240 |
|
|
241 |
} |
|
242 |
$scope.loadSpecificType(); |
|
243 |
|
|
233 | 244 |
$scope.addTitle=function() |
234 | 245 |
{ |
235 | 246 |
var NewRecord=[{"text":"","language":"","type":"", "edited":"true"}]; |
... | ... | |
571 | 582 |
tmp.value= $scope.patchedRecord.provenance; |
572 | 583 |
patches.push(tmp); |
573 | 584 |
} |
585 |
if ($scope.entityType=='nonavcreation') { |
|
586 |
if ($scope.originalRecords.specificType != $scope.patchedRecord.specificType) |
|
587 |
{ |
|
588 |
var tmp= new Patch(); |
|
589 |
tmp.fieldType="specificType"; |
|
590 |
if($scope.patchedRecord.specificType==null) |
|
591 |
tmp.operation="DELETENODE" |
|
592 |
else |
|
593 |
tmp.operation="EDIT"; |
|
594 |
tmp.value= $scope.patchedRecord.specificType; |
|
595 |
patches.push(tmp); |
|
596 |
} |
|
597 |
} |
|
574 | 598 |
return patches; |
575 | 599 |
} |
576 | 600 |
|
Also available in: Unified diff
Added the element specificType for nonAVmanifestation elements