Commit 61510c338438e652efaf1de85adf5b0f27d769fe

Authored by Fernando Ribeiro
1 parent dd14aa5088
Exists in master

Changed validator.xml to replace the preCondition to thesis. Added only one preC…

…ondition that only matches the endWith Thesis
Showing 1 changed file with 22 additions and 2 deletions   Show diff stats
config/validator.xml
@@ -99,8 +99,12 @@ @@ -99,8 +99,12 @@
99 <translation element="description" lang="pt">Valida o conteúdo do repositório de acordo com depósito legal de teses e dissertações</translation> 99 <translation element="description" lang="pt">Valida o conteúdo do repositório de acordo com depósito legal de teses e dissertações</translation>
100 <translation element="description" lang="en">Validates repository content accordingly with thesis legal deposit</translation> 100 <translation element="description" lang="en">Validates repository content accordingly with thesis legal deposit</translation>
101 101
102 - <preCondition refid="master_thesis_dc_type" />  
103 - <preCondition refid="doctoral_thesis_dc_type" /> 102 + <!--<preCondition refid="master_thesis_dc_type" />
  103 + <preCondition refid="doctoral_thesis_dc_type" /> -->
  104 +
  105 + <!-- chenaged to only one pre condition. The two previous conditions can't match at the same time-->
  106 + <preCondition refid="thesis_dc_type" />
  107 +
104 108
105 <check refid="author_exists" /> 109 <check refid="author_exists" />
106 <check refid="description_exists" /> 110 <check refid="description_exists" />
@@ -159,6 +163,22 @@ @@ -159,6 +163,22 @@
159 </parameter> 163 </parameter>
160 </preCondition> 164 </preCondition>
161 165
  166 + <!-- added this new entry to preCondition of the thesis type. We can't have both doctor and masterthesis unless we
  167 + change the value in the master/doctoral preConitions in key value to Thesis in both
  168 + -->
  169 + <preCondition id="thesis_dc_type">
  170 + <class>pt.keep.metarepository.core.validator2.pre_conditions.AtLeastOneMetadataFieldByContent</class>
  171 + <parameter key="field">
  172 + <value>type</value>
  173 + </parameter>
  174 + <parameter key="operator">
  175 + <value>ends_with</value>
  176 + </parameter>
  177 + <parameter key="value">
  178 + <value>Thesis</value>
  179 + </parameter>
  180 + </preCondition>
  181 +
162 <preCondition id="master_thesis_dc_type"> 182 <preCondition id="master_thesis_dc_type">
163 <class>pt.keep.metarepository.core.validator2.pre_conditions.AtLeastOneMetadataFieldByContent</class> 183 <class>pt.keep.metarepository.core.validator2.pre_conditions.AtLeastOneMetadataFieldByContent</class>
164 <parameter key="field"> 184 <parameter key="field">