Revision 54856
Added by Claudio Atzori about 5 years ago
modules/dnet-validator-workflows/tags/dnet-validator-workflows-1.1.8/deploy.info | ||
---|---|---|
1 |
{ |
|
2 |
"type_source": "SVN", |
|
3 |
"goal": "package -U source:jar", |
|
4 |
"url": "http://svn-public.driver.research-infrastructures.eu/driver/dnet45/modules/dnet-validator-workflows/trunk", |
|
5 |
"deploy_repository": "dnet45-snapshots", |
|
6 |
"version": "4", |
|
7 |
"mail": "sandro.labruzzo@isti.cnr.it,michele.artini@isti.cnr.it,claudio.atzori@isti.cnr.it,alessia.bardi@isti.cnr.it,andrea.mannocci@isti.cnr.it", |
|
8 |
"deploy_repository_url": "http://maven.research-infrastructures.eu/nexus/content/repositories/dnet45-snapshots", |
|
9 |
"name": "dnet-validator-workflows" |
|
10 |
} |
modules/dnet-validator-workflows/tags/dnet-validator-workflows-1.1.8/src/test/java/eu/dnetlib/PatchValidatedRecordTest.java | ||
---|---|---|
1 |
package eu.dnetlib; |
|
2 |
|
|
3 |
import java.io.InputStream; |
|
4 |
|
|
5 |
import org.apache.commons.io.IOUtils; |
|
6 |
import org.junit.Before; |
|
7 |
import org.junit.Test; |
|
8 |
|
|
9 |
import eu.dnetlib.miscutils.functional.xml.ApplyXslt; |
|
10 |
|
|
11 |
public class PatchValidatedRecordTest { |
|
12 |
|
|
13 |
String patchXslt = null; |
|
14 |
String validatorRecord = null; |
|
15 |
|
|
16 |
@Before |
|
17 |
public void setUp() throws Exception { |
|
18 |
patchXslt = IOUtils.toString(load("/eu/dnetlib/msro/workflows/repo/validation/patchValidationHeader.xsl")); |
|
19 |
validatorRecord = IOUtils.toString(load("validator-record.xml")); |
|
20 |
} |
|
21 |
|
|
22 |
@Test |
|
23 |
public void test() { |
|
24 |
ApplyXslt applyXslt = new ApplyXslt(patchXslt); |
|
25 |
String output = applyXslt.evaluate(validatorRecord); |
|
26 |
System.out.println(output); |
|
27 |
} |
|
28 |
|
|
29 |
private InputStream load(final String fileName) { |
|
30 |
return getClass().getResourceAsStream(fileName); |
|
31 |
} |
|
32 |
|
|
33 |
} |
modules/dnet-validator-workflows/tags/dnet-validator-workflows-1.1.8/src/test/resources/eu/dnetlib/validator-record.xml | ||
---|---|---|
1 |
<validator:result recordId="reposit2:HASH01939420936165b797fbc1ce" score="0" status="fail" |
|
2 |
xmlns:validator="http://eu.dnetlib/validator"> |
|
3 |
<validator:failedRules> |
|
4 |
<validator:rule id="109" mandatory="false" name="Field Source (R)" |
|
5 |
xpath="//record/metadata//*[name()='dc:source']/text()"/> |
|
6 |
<validator:rule id="111" mandatory="false" name="Field Coverage (R)" |
|
7 |
xpath="//record/metadata//*[name()='dc:coverage']/text()"/> |
|
8 |
<validator:rule id="112" mandatory="false" name="Field Audience (R)" |
|
9 |
xpath="//record/metadata//*[name()='dc:audience']/text()"/> |
|
10 |
<validator:rule id="116" mandatory="true" |
|
11 |
name="Field Project Identifier for ecfundedresources (M)" xpath="$rule.xpath"/> |
|
12 |
</validator:failedRules> |
|
13 |
<validator:record> |
|
14 |
<oai:record xmlns="http://namespace.openaire.eu/" |
|
15 |
xmlns:dc="http://purl.org/dc/elements/1.1/" |
|
16 |
xmlns:dr="http://www.driver-repository.eu/namespace/dr" |
|
17 |
xmlns:dri="http://www.driver-repository.eu/namespace/dri" |
|
18 |
xmlns:oai="http://www.openarchives.org/OAI/2.0/" |
|
19 |
xmlns:prov="http://www.openarchives.org/OAI/2.0/provenance" |
|
20 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
|
21 |
<oai:header xmlns=""> |
|
22 |
<dri:objIdentifier>UNLA::0024ba2d80e96b1ca5fd0ad87c80d276</dri:objIdentifier> |
|
23 |
<dri:recordIdentifier>reposit2:HASH01939420936165b797fbc1ce</dri:recordIdentifier> |
|
24 |
<dri:dateOfCollection>2015-03-25T17:19:24.657+01:00</dri:dateOfCollection> |
|
25 |
<dri:repositoryId>a4c4289b-dec2-469e-8da1-ad226714f13a_UmVwb3NpdG9yeVNlcnZpY2VSZXNvdXJjZXMvUmVwb3NpdG9yeVNlcnZpY2VSZXNvdXJjZVR5cGU=</dri:repositoryId> |
|
26 |
<dri:datasourceprefix>UNLA</dri:datasourceprefix> |
|
27 |
<identifier xmlns="http://www.openarchives.org/OAI/2.0/" |
|
28 |
>reposit2:HASH01939420936165b797fbc1ce</identifier> |
|
29 |
<datestamp xmlns="http://www.openarchives.org/OAI/2.0/">2015-03-09</datestamp> |
|
30 |
<setSpec xmlns="http://www.openarchives.org/OAI/2.0/">reposit2</setSpec> |
|
31 |
</oai:header> |
|
32 |
<metadata xmlns="http://www.openarchives.org/OAI/2.0/"> |
|
33 |
<oai_dc:dc xmlns="" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" |
|
34 |
xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd"> |
|
35 |
<dc:creator>Flores Rondón, María del Mar</dc:creator> |
|
36 |
<dc:contributor>Gassibe, Ines</dc:contributor> |
|
37 |
<dc:date>2014</dc:date> |
|
38 |
<dc:description>Fil: Flores Rondón, María del Mar. Universidad Nacional de |
|
39 |
Lanús. Departamento de Planificación y Políticas Públicas. Maestría en |
|
40 |
Políticas Públicas y Gobierno; Argentina</dc:description> |
|
41 |
<dc:format>application/pdf</dc:format> |
|
42 |
<dc:language>spa</dc:language> |
|
43 |
<dc:type>info:eu-repo/semantics/masterThesis</dc:type> |
|
44 |
<dc:type>tesis de maestría</dc:type> |
|
45 |
<dc:type>info:eu-repo/semantics/publishedVersion</dc:type> |
|
46 |
<dc:publisher>Universidad Nacional de Lanús. Departamento de Planificación y |
|
47 |
Políticas Públicas. Maestría en Políticas Públicas y Gobierno</dc:publisher> |
|
48 |
<dc:subject>POLITICAS PUBLICAS</dc:subject> |
|
49 |
<dc:subject>COMUNICACION</dc:subject> |
|
50 |
<dc:subject>POLITICA</dc:subject> |
|
51 |
<dc:subject>SEGURIDAD SOCIAL</dc:subject> |
|
52 |
<dc:title>Política pública de inserción laboral para personas con discapacidad |
|
53 |
auditiva : caso Municipio Libertador del Estado de |
|
54 |
Mérida-Venezuela</dc:title> |
|
55 |
<dc:identifier>http://www.repositoriojmr.unla.edu.ar/descarga/Tesis/MaPPyG/034717_Flores_Rondon.pdf</dc:identifier> |
|
56 |
</oai_dc:dc> |
|
57 |
</metadata> |
|
58 |
<about xmlns=""> |
|
59 |
<provenance xmlns="http://www.openarchives.org/OAI/2.0/provenance" |
|
60 |
xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/provenance http://www.openarchives.org/OAI/2.0/provenance.xsd"> |
|
61 |
<originDescription altered="true" harvestDate="2015-03-25T17:19:24.657+01:00" |
|
62 |
xmlns=""> |
|
63 |
<baseURL>http%3A%2F%2Fwww.unla.edu.ar%2Fgreenstone%2Fcgi-bin%2Foaiserver.cgi</baseURL> |
|
64 |
<identifier>reposit2:HASH01939420936165b797fbc1ce</identifier> |
|
65 |
<datestamp>2015-03-09</datestamp> |
|
66 |
<metadataNamespace>http://www.openarchives.org/OAI/2.0/oai_dc/</metadataNamespace> |
|
67 |
</originDescription> |
|
68 |
</provenance> |
|
69 |
</about> |
|
70 |
</oai:record> |
|
71 |
</validator:record> |
|
72 |
</validator:result> |
modules/dnet-validator-workflows/tags/dnet-validator-workflows-1.1.8/src/test/resources/eu/dnetlib/expected-prepared-record.xml | ||
---|---|---|
1 |
<oai:record xmlns:dc="http://purl.org/dc/elements/1.1/" |
|
2 |
xmlns:dr="http://www.driver-repository.eu/namespace/dr" |
|
3 |
xmlns:dri="http://www.driver-repository.eu/namespace/dri" |
|
4 |
xmlns:oai="http://www.openarchives.org/OAI/2.0/" |
|
5 |
xmlns:prov="http://www.openarchives.org/OAI/2.0/provenance" |
|
6 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
7 |
xmlns:validator="http://eu.dnetlib/validator"> |
|
8 |
<oai:header xmlns=""> |
|
9 |
<dri:objIdentifier>UNLA::0024ba2d80e96b1ca5fd0ad87c80d276</dri:objIdentifier> |
|
10 |
<dri:recordIdentifier>reposit2:HASH01939420936165b797fbc1ce</dri:recordIdentifier> |
|
11 |
<dri:dateOfCollection>2015-03-25T17:19:24.657+01:00</dri:dateOfCollection> |
|
12 |
<dri:repositoryId>a4c4289b-dec2-469e-8da1-ad226714f13a_UmVwb3NpdG9yeVNlcnZpY2VSZXNvdXJjZXMvUmVwb3NpdG9yeVNlcnZpY2VSZXNvdXJjZVR5cGU=</dri:repositoryId> |
|
13 |
<dri:datasourceprefix>UNLA</dri:datasourceprefix> |
|
14 |
<identifier xmlns="http://www.openarchives.org/OAI/2.0/" |
|
15 |
>reposit2:HASH01939420936165b797fbc1ce</identifier> |
|
16 |
<datestamp xmlns="http://www.openarchives.org/OAI/2.0/">2015-03-09</datestamp> |
|
17 |
<setSpec xmlns="http://www.openarchives.org/OAI/2.0/">reposit2</setSpec> |
|
18 |
<validator:result score="0" status="fail"> |
|
19 |
<validator:failedRules> |
|
20 |
<validator:rule id="109" mandatory="false" name="Field Source (R)" |
|
21 |
xpath="//record/metadata//*[name()='dc:source']/text()"/> |
|
22 |
<validator:rule id="111" mandatory="false" name="Field Coverage (R)" |
|
23 |
xpath="//record/metadata//*[name()='dc:coverage']/text()"/> |
|
24 |
<validator:rule id="112" mandatory="false" name="Field Audience (R)" |
|
25 |
xpath="//record/metadata//*[name()='dc:audience']/text()"/> |
|
26 |
<validator:rule id="116" mandatory="true" |
|
27 |
name="Field Project Identifier for ecfundedresources (M)" xpath="$rule.xpath"/> |
|
28 |
</validator:failedRules> |
|
29 |
</validator:result> |
|
30 |
</oai:header> |
|
31 |
<metadata xmlns="http://www.openarchives.org/OAI/2.0/"> |
|
32 |
<oai_dc:dc xmlns="" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" |
|
33 |
xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd"> |
|
34 |
<dc:creator>Flores Rondón, María del Mar</dc:creator> |
|
35 |
<dc:contributor>Gassibe, Ines</dc:contributor> |
|
36 |
<dc:date>2014</dc:date> |
|
37 |
<dc:description>Fil: Flores Rondón, María del Mar. Universidad Nacional de Lanús. |
|
38 |
Departamento de Planificación y Políticas Públicas. Maestría en Políticas Públicas y |
|
39 |
Gobierno; Argentina</dc:description> |
|
40 |
<dc:format>application/pdf</dc:format> |
|
41 |
<dc:language>spa</dc:language> |
|
42 |
<dc:type>info:eu-repo/semantics/masterThesis</dc:type> |
|
43 |
<dc:type>tesis de maestría</dc:type> |
|
44 |
<dc:type>info:eu-repo/semantics/publishedVersion</dc:type> |
|
45 |
<dc:publisher>Universidad Nacional de Lanús. Departamento de Planificación y Políticas |
|
46 |
Públicas. Maestría en Políticas Públicas y Gobierno</dc:publisher> |
|
47 |
<dc:subject>POLITICAS PUBLICAS</dc:subject> |
|
48 |
<dc:subject>COMUNICACION</dc:subject> |
|
49 |
<dc:subject>POLITICA</dc:subject> |
|
50 |
<dc:subject>SEGURIDAD SOCIAL</dc:subject> |
|
51 |
<dc:title>Política pública de inserción laboral para personas con discapacidad auditiva |
|
52 |
: caso Municipio Libertador del Estado de Mérida-Venezuela</dc:title> |
|
53 |
<dc:identifier>http://www.repositoriojmr.unla.edu.ar/descarga/Tesis/MaPPyG/034717_Flores_Rondon.pdf</dc:identifier> |
|
54 |
</oai_dc:dc> |
|
55 |
</metadata> |
|
56 |
<about xmlns=""> |
|
57 |
<provenance xmlns="http://www.openarchives.org/OAI/2.0/provenance" |
|
58 |
xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/provenance http://www.openarchives.org/OAI/2.0/provenance.xsd"> |
|
59 |
<originDescription altered="true" harvestDate="2015-03-25T17:19:24.657+01:00" xmlns=""> |
|
60 |
<baseURL>http%3A%2F%2Fwww.unla.edu.ar%2Fgreenstone%2Fcgi-bin%2Foaiserver.cgi</baseURL> |
|
61 |
<identifier>reposit2:HASH01939420936165b797fbc1ce</identifier> |
|
62 |
<datestamp>2015-03-09</datestamp> |
|
63 |
<metadataNamespace>http://www.openarchives.org/OAI/2.0/oai_dc/</metadataNamespace> |
|
64 |
</originDescription> |
|
65 |
</provenance> |
|
66 |
</about> |
|
67 |
</oai:record> |
modules/dnet-validator-workflows/tags/dnet-validator-workflows-1.1.8/src/main/java/eu/dnetlib/msro/workflows/nodes/validation/SetInfoForValidationJobNode.java | ||
---|---|---|
1 |
package eu.dnetlib.msro.workflows.nodes.validation; |
|
2 |
|
|
3 |
import javax.annotation.Resource; |
|
4 |
|
|
5 |
import com.googlecode.sarasvati.Arc; |
|
6 |
import com.googlecode.sarasvati.NodeToken; |
|
7 |
import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpService; |
|
8 |
import eu.dnetlib.enabling.locators.UniqueServiceLocator; |
|
9 |
import eu.dnetlib.msro.workflows.nodes.SimpleJobNode; |
|
10 |
import eu.dnetlib.msro.workflows.util.WorkflowsConstants; |
|
11 |
import org.apache.commons.logging.Log; |
|
12 |
import org.apache.commons.logging.LogFactory; |
|
13 |
|
|
14 |
public class SetInfoForValidationJobNode extends SimpleJobNode { |
|
15 |
|
|
16 |
public static final Log log = LogFactory.getLog(SetInfoForValidationJobNode.class); // NOPMD by marko on 11/24/08 5:02 PM |
|
17 |
|
|
18 |
@Resource |
|
19 |
private UniqueServiceLocator serviceLocator; |
|
20 |
private String profileId; |
|
21 |
private String providerName; |
|
22 |
private String api; |
|
23 |
|
|
24 |
@Override |
|
25 |
protected String execute(final NodeToken token) throws Exception { |
|
26 |
token.getEnv().setAttribute(WorkflowsConstants.DATAPROVIDER_ID, getProfileId()); |
|
27 |
token.getEnv().setAttribute(WorkflowsConstants.DATAPROVIDER_NAME, getProviderName()); |
|
28 |
token.getEnv().setAttribute(WorkflowsConstants.DATAPROVIDER_INTERFACE, getApi()); |
|
29 |
|
|
30 |
token.getFullEnv().setAttribute(WorkflowsConstants.DATAPROVIDER_ID, getProfileId()); |
|
31 |
token.getFullEnv().setAttribute(WorkflowsConstants.DATAPROVIDER_NAME, getProviderName()); |
|
32 |
token.getFullEnv().setAttribute(WorkflowsConstants.DATAPROVIDER_INTERFACE, getApi()); |
|
33 |
|
|
34 |
token.getProcess().getEnv().setAttribute(WorkflowsConstants.DATAPROVIDER_ID, getProfileId()); |
|
35 |
token.getProcess().getEnv().setAttribute(WorkflowsConstants.DATAPROVIDER_NAME, getProviderName()); |
|
36 |
token.getProcess().getEnv().setAttribute(WorkflowsConstants.DATAPROVIDER_INTERFACE, getApi()); |
|
37 |
|
|
38 |
final String query = "let $x := /*[.//RESOURCE_IDENTIFIER/@value='" + getProfileId() + "']\n" |
|
39 |
+ "return concat($x//DATASOURCE_ORIGINAL_ID/text(), '@@@', $x//EXTRA_FIELDS/FIELD[./key='NamespacePrefix']/value, '@@@', $x//INTERFACE[./@id='" |
|
40 |
+ getApi() + "']/BASE_URL/text())"; |
|
41 |
|
|
42 |
final String[] arr = serviceLocator.getService(ISLookUpService.class).getResourceProfileByQuery(query).split("@@@"); |
|
43 |
final String origId = arr[0].trim(); |
|
44 |
final String nsPrefix = arr[1].trim(); |
|
45 |
final String interfaceURL = arr[2].trim(); |
|
46 |
|
|
47 |
token.getEnv().setAttribute(WorkflowsConstants.DATAPROVIDER_ORIGINALID, origId); |
|
48 |
token.getEnv().setAttribute(WorkflowsConstants.DATAPROVIDER_NAMESPACE_PREFIX, nsPrefix); |
|
49 |
token.getEnv().setAttribute(WorkflowsConstants.DATAPROVIDER_INTERFACE_BASEURL, interfaceURL); |
|
50 |
|
|
51 |
token.getFullEnv().setAttribute(WorkflowsConstants.DATAPROVIDER_ORIGINALID, origId); |
|
52 |
token.getFullEnv().setAttribute(WorkflowsConstants.DATAPROVIDER_NAMESPACE_PREFIX, nsPrefix); |
|
53 |
token.getFullEnv().setAttribute(WorkflowsConstants.DATAPROVIDER_INTERFACE_BASEURL, interfaceURL); |
|
54 |
|
|
55 |
token.getProcess().getEnv().setAttribute(WorkflowsConstants.DATAPROVIDER_ORIGINALID, origId); |
|
56 |
token.getProcess().getEnv().setAttribute(WorkflowsConstants.DATAPROVIDER_NAMESPACE_PREFIX, nsPrefix); |
|
57 |
token.getProcess().getEnv().setAttribute(WorkflowsConstants.DATAPROVIDER_INTERFACE_BASEURL, interfaceURL); |
|
58 |
|
|
59 |
return Arc.DEFAULT_ARC; |
|
60 |
} |
|
61 |
|
|
62 |
public String getProviderName() { |
|
63 |
return providerName; |
|
64 |
} |
|
65 |
|
|
66 |
public void setProviderName(final String providerName) { |
|
67 |
this.providerName = providerName; |
|
68 |
} |
|
69 |
|
|
70 |
public String getApi() { |
|
71 |
return api; |
|
72 |
} |
|
73 |
|
|
74 |
public void setApi(final String api) { |
|
75 |
this.api = api; |
|
76 |
} |
|
77 |
|
|
78 |
public String getProfileId() { |
|
79 |
return profileId; |
|
80 |
} |
|
81 |
|
|
82 |
public void setProfileId(final String profileId) { |
|
83 |
this.profileId = profileId; |
|
84 |
} |
|
85 |
} |
modules/dnet-validator-workflows/tags/dnet-validator-workflows-1.1.8/src/main/java/eu/dnetlib/msro/workflows/nodes/validation/ValidatorServiceBlackboardJobNode.java | ||
---|---|---|
1 |
package eu.dnetlib.msro.workflows.nodes.validation; |
|
2 |
|
|
3 |
import javax.annotation.Resource; |
|
4 |
|
|
5 |
import eu.dnetlib.enabling.datasources.common.Api; |
|
6 |
import eu.dnetlib.enabling.datasources.common.Datasource; |
|
7 |
import eu.dnetlib.enabling.datasources.common.DsmException; |
|
8 |
import eu.dnetlib.enabling.datasources.common.LocalDatasourceManager; |
|
9 |
import eu.dnetlib.msro.rmi.MSROException; |
|
10 |
import eu.dnetlib.msro.rmi.MSRORuntimeException; |
|
11 |
import org.apache.commons.lang.StringUtils; |
|
12 |
import org.apache.commons.logging.Log; |
|
13 |
import org.apache.commons.logging.LogFactory; |
|
14 |
|
|
15 |
import com.googlecode.sarasvati.Engine; |
|
16 |
import com.googlecode.sarasvati.NodeToken; |
|
17 |
|
|
18 |
import eu.dnetlib.data.mdstore.MDStoreService; |
|
19 |
import eu.dnetlib.data.mdstore.MDStoreServiceException; |
|
20 |
import eu.dnetlib.enabling.is.lookup.rmi.ISLookUpService; |
|
21 |
import eu.dnetlib.enabling.locators.UniqueServiceLocator; |
|
22 |
import eu.dnetlib.enabling.tools.blackboard.BlackboardJob; |
|
23 |
import eu.dnetlib.miscutils.datetime.DateUtils; |
|
24 |
import eu.dnetlib.msro.workflows.nodes.BlackboardJobNode; |
|
25 |
import eu.dnetlib.msro.workflows.nodes.ProgressJobNode; |
|
26 |
import eu.dnetlib.msro.workflows.nodes.blackboard.BlackboardWorkflowJobListener; |
|
27 |
import eu.dnetlib.msro.workflows.util.ProgressProvider; |
|
28 |
import eu.dnetlib.msro.workflows.util.WorkflowsConstants; |
|
29 |
import org.springframework.beans.factory.annotation.Autowired; |
|
30 |
|
|
31 |
/** |
|
32 |
* This node send the BB message to the ValidatorService to validate records from an mdstore. |
|
33 |
* <p> |
|
34 |
* See ticket https://issue.openaire.research-infrastructures.eu/issues/538 for specs. |
|
35 |
* </p> |
|
36 |
* |
|
37 |
* @author andrea.mannocci, alessia |
|
38 |
* |
|
39 |
*/ |
|
40 |
public class ValidatorServiceBlackboardJobNode extends BlackboardJobNode implements ProgressJobNode, ProgressProvider { |
|
41 |
|
|
42 |
public static final Log log = LogFactory.getLog(ValidatorServiceBlackboardJobNode.class); // NOPMD by marko on 11/24/08 5:02 PM |
|
43 |
|
|
44 |
public static final String VALIDATE_ACTION = "VALIDATE"; |
|
45 |
public static final String VALIDATION_TYPE = "DNET"; |
|
46 |
|
|
47 |
public static final String VALIDATOR_EPR_PARAM_NAME = "outputResultSetEpr"; |
|
48 |
|
|
49 |
private String xQueryForValidatorServiceId; |
|
50 |
private String outputEprName = VALIDATOR_EPR_PARAM_NAME; |
|
51 |
|
|
52 |
// VALIDATOR JOB PARAM VALUES |
|
53 |
private String mdstoreId; |
|
54 |
private String guidelines; |
|
55 |
private String blacklistRuleName; |
|
56 |
private String recordsSampleSize; |
|
57 |
/** Json key-value map of other parameters that will be stored in the validator back-end as they are. **/ |
|
58 |
private String extraParams; |
|
59 |
|
|
60 |
/** True to ask the validator to generate the output EPR. **/ |
|
61 |
private boolean shouldOutputRecords = false; |
|
62 |
/** True to ask the validator to update the blacklist. **/ |
|
63 |
private boolean shouldUpdateBlacklist = true; |
|
64 |
|
|
65 |
@Resource |
|
66 |
private UniqueServiceLocator serviceLocator; |
|
67 |
|
|
68 |
@Autowired |
|
69 |
private LocalDatasourceManager<Datasource<?, ?>, Api<?>> dsManager; |
|
70 |
|
|
71 |
/** Number of records after which the Validator must update its progress status in currentlyValidatedParam **/ |
|
72 |
private int jobStatusUpdateInterval = 1000; |
|
73 |
/** Parameter where the validator tells how many records have been processed sofar **/ |
|
74 |
private String currentlyValidatedParam = "recordsTested"; |
|
75 |
/** Number of records validated so far. **/ |
|
76 |
private int currentlyValidated = 0; |
|
77 |
private int total = 0; |
|
78 |
private boolean accurate; |
|
79 |
|
|
80 |
/** |
|
81 |
* <p> |
|
82 |
* Parameters to set for the VALIDATE BB job: |
|
83 |
* |
|
84 |
* <pre> |
|
85 |
* <PARAMETER name="type" value="DNET"/> |
|
86 |
* <PARAMETER name="guidelines" value="openaire3.0"/> //values: openaire3.0, openaire2.0, openaire2.0_data, driver |
|
87 |
* <PARAMETER name="records" value="#records"/> //OPTIONAL |
|
88 |
* <PARAMETER name="blacklistedRecords" value="true"/> //enables the feature to keep blacklisted records. Default is true. |
|
89 |
* <PARAMETER name="blacklistGuidelines" value="blacklist_ruleset"/> //optional. values: name of the ruleset (as created from the validator admin panel) to use to generate the blacklist. Default value is the value in "guidelines". |
|
90 |
* <PARAMETER name="datasourceID" value=""/> |
|
91 |
* <PARAMETER name="datasourceName" value=""/> //OPTIONAL |
|
92 |
* <PARAMETER name="datasourceNamespacePrefix" value=""/> //OPTIONAL |
|
93 |
* <PARAMETER name="interfaceId" value=" "/> |
|
94 |
* <PARAMETER name="baseUrl" value=""/> //OPTIONAL |
|
95 |
* <PARAMETER name="mdstoreId" value=" "/> |
|
96 |
* <PARAMETER name="outputEpr" value="boolean"/> //TRUE to get the EPR of validated records. Default is false. |
|
97 |
* <PARAMETER name="extraParams" value="json key-value map"/> //OPTIONAL |
|
98 |
* <PARAMETER name="submissionDate" value="YYYY-MM-DD HH24:MI:SS"/> |
|
99 |
* </pre> |
|
100 |
* |
|
101 |
* </p> |
|
102 |
* {@inheritDoc} |
|
103 |
* |
|
104 |
* @see eu.dnetlib.msro.workflows.nodes.BlackboardJobNode#prepareJob(eu.dnetlib.enabling.tools.blackboard.BlackboardJob, |
|
105 |
* com.googlecode.sarasvati.NodeToken) |
|
106 |
*/ |
|
107 |
@Override |
|
108 |
protected void prepareJob(final BlackboardJob job, final NodeToken token) throws Exception { |
|
109 |
|
|
110 |
job.setAction(VALIDATE_ACTION); |
|
111 |
job.getParameters().put("type", VALIDATION_TYPE); |
|
112 |
job.getParameters().put("guidelines", guidelines); |
|
113 |
job.getParameters().put("records", getRecordsSampleSize()); |
|
114 |
// params for blacklist |
|
115 |
job.getParameters().put("blacklistedRecords", isShouldUpdateBlacklist() + ""); |
|
116 |
if (isShouldUpdateBlacklist()) { |
|
117 |
job.getParameters().put("blacklistGuidelines", blacklistRuleName); |
|
118 |
} |
|
119 |
|
|
120 |
// datasource params |
|
121 |
final String datasourceId = token.getFullEnv().getAttribute(WorkflowsConstants.DATAPROVIDER_ORIGINALID); |
|
122 |
final String api = token.getFullEnv().getAttribute(WorkflowsConstants.DATAPROVIDER_INTERFACE); |
|
123 |
job.getParameters().put("datasourceId", datasourceId); |
|
124 |
job.getParameters().put("datasourceName", token.getFullEnv().getAttribute(WorkflowsConstants.DATAPROVIDER_NAME)); |
|
125 |
job.getParameters().put("datasourceNamespacePrefix", token.getFullEnv().getAttribute(WorkflowsConstants.DATAPROVIDER_NAMESPACE_PREFIX)); |
|
126 |
|
|
127 |
job.getParameters().put("interfaceId", api); |
|
128 |
job.getParameters().put("baseUrl", token.getFullEnv().getAttribute(WorkflowsConstants.DATAPROVIDER_INTERFACE_BASEURL)); |
|
129 |
job.getParameters().put("mdstoreId", mdstoreId); |
|
130 |
|
|
131 |
// output params |
|
132 |
job.getParameters().put("outputEpr", isShouldOutputRecords() + ""); |
|
133 |
// extra params |
|
134 |
if (StringUtils.isNotBlank(extraParams)) { |
|
135 |
job.getParameters().put("extraParams", extraParams); |
|
136 |
} |
|
137 |
|
|
138 |
// Setting properties for the progress bar |
|
139 |
if (StringUtils.isBlank(getRecordsSampleSize()) || getRecordsSampleSize().equalsIgnoreCase("ALL")) { |
|
140 |
total = getTotal(); |
|
141 |
} else { |
|
142 |
total = Integer.getInteger(getRecordsSampleSize()); |
|
143 |
} |
|
144 |
if (jobStatusUpdateInterval > 0) { |
|
145 |
job.getParameters().put("jobStatusUpdateInterval", "" + jobStatusUpdateInterval); |
|
146 |
} |
|
147 |
|
|
148 |
log.debug("*****Launching validation with the following parameters:****"); |
|
149 |
log.debug("Datasource id: " + datasourceId); |
|
150 |
log.debug("API: " + api); |
|
151 |
log.debug("Total records: " + total); |
|
152 |
log.debug("Number of records to validate: " + getRecordsSampleSize()); |
|
153 |
log.debug("jobStatusUpdateInterval (set only if > 0, wf default is 1000, validator's default is 100): " + jobStatusUpdateInterval); |
|
154 |
|
|
155 |
job.getParameters().put("submissionDate", DateUtils.now_ISO8601()); |
|
156 |
} |
|
157 |
|
|
158 |
private int getTotal() { |
|
159 |
int size = -1; |
|
160 |
accurate = false; |
|
161 |
try { |
|
162 |
if (StringUtils.isBlank(getRecordsSampleSize()) || getRecordsSampleSize().equalsIgnoreCase("ALL")) { |
|
163 |
size = serviceLocator.getService(MDStoreService.class).size(mdstoreId); |
|
164 |
accurate = true; |
|
165 |
} else { |
|
166 |
total = Integer.parseInt(getRecordsSampleSize()); |
|
167 |
accurate = true; |
|
168 |
} |
|
169 |
} catch (final MDStoreServiceException e) { |
|
170 |
log.warn("Can't get size of mdstore " + mdstoreId + " progress will be INACCURATE"); |
|
171 |
e.printStackTrace(); |
|
172 |
} catch (final NumberFormatException e) { |
|
173 |
log.warn("The parameter recordSampleSize is invalid: progress will be INACCURATE"); |
|
174 |
e.printStackTrace(); |
|
175 |
|
|
176 |
} |
|
177 |
return size; |
|
178 |
} |
|
179 |
|
|
180 |
/** |
|
181 |
* <p> |
|
182 |
* Parameters in the VALIDATE BB job response: |
|
183 |
* |
|
184 |
* <pre> |
|
185 |
* <PARAMETER name="error" value=""/> |
|
186 |
* <PARAMETER name="outputResultSetEpr" value=""/> //only if isShouldOutputRecords() == true |
|
187 |
* <PARAMETER name="jobId" value=""/> |
|
188 |
* </pre> |
|
189 |
* |
|
190 |
* </p> |
|
191 |
* |
|
192 |
* |
|
193 |
* {@inheritDoc} |
|
194 |
* |
|
195 |
* @see eu.dnetlib.msro.workflows.nodes.BlackboardJobNode#generateBlackboardListener(com.googlecode.sarasvati.Engine, |
|
196 |
* com.googlecode.sarasvati.NodeToken) |
|
197 |
*/ |
|
198 |
@Override |
|
199 |
protected BlackboardWorkflowJobListener generateBlackboardListener(final Engine engine, final NodeToken token) { |
|
200 |
return new BlackboardWorkflowJobListener(engine, token) { |
|
201 |
|
|
202 |
boolean eprFound = false; |
|
203 |
|
|
204 |
@Override |
|
205 |
protected void onDone(final BlackboardJob job) { |
|
206 |
|
|
207 |
log.debug("If you see this log you are not asking to get the validated EPR..."); |
|
208 |
|
|
209 |
final String jobId = job.getParameters().get("jobId"); |
|
210 |
|
|
211 |
token.getEnv().setAttribute("validatorJobId", jobId); |
|
212 |
final String error = job.getParameters().get("error"); |
|
213 |
if (StringUtils.isNotBlank(error)) { |
|
214 |
token.getEnv().setAttribute("validatorError", error); |
|
215 |
} |
|
216 |
|
|
217 |
final String dsId = token.getFullEnv().getAttribute(WorkflowsConstants.DATAPROVIDER_ORIGINALID); |
|
218 |
final String ifaceId = token.getFullEnv().getAttribute(WorkflowsConstants.DATAPROVIDER_INTERFACE); |
|
219 |
|
|
220 |
try { |
|
221 |
dsManager.setLastValidationJob(dsId, ifaceId, jobId); |
|
222 |
} catch (final Throwable e) { |
|
223 |
final String msg = String.format("Error setting last_validation_job field, BB jobId '%s'", job.getId()); |
|
224 |
log.error(msg); |
|
225 |
job.setError(msg); |
|
226 |
super.onFailed(job); |
|
227 |
throw new MSRORuntimeException(msg, e); |
|
228 |
} |
|
229 |
|
|
230 |
super.onDone(job); |
|
231 |
} |
|
232 |
|
|
233 |
@Override |
|
234 |
protected void onOngoing(final BlackboardJob job) { |
|
235 |
currentlyValidated = Integer.parseInt(job.getParameters().get(currentlyValidatedParam)); |
|
236 |
if (isShouldOutputRecords() & !eprFound) { |
|
237 |
final String epr = job.getParameters().get(VALIDATOR_EPR_PARAM_NAME); |
|
238 |
log.fatal(VALIDATOR_EPR_PARAM_NAME + "= " + epr); |
|
239 |
token.getEnv().setAttribute(outputEprName, epr); |
|
240 |
eprFound = true; |
|
241 |
} |
|
242 |
super.onOngoing(job); |
|
243 |
} |
|
244 |
|
|
245 |
}; |
|
246 |
|
|
247 |
} |
|
248 |
|
|
249 |
@Override |
|
250 |
protected String obtainServiceId(final NodeToken token) { |
|
251 |
try { |
|
252 |
return getServiceLocator().getService(ISLookUpService.class).getResourceProfileByQuery(xQueryForValidatorServiceId); |
|
253 |
} catch (final Exception e) { |
|
254 |
throw new RuntimeException(e); |
|
255 |
} |
|
256 |
} |
|
257 |
|
|
258 |
@Override |
|
259 |
public ProgressProvider getProgressProvider() { |
|
260 |
return this; |
|
261 |
} |
|
262 |
|
|
263 |
@Override |
|
264 |
public int getTotalValue() { |
|
265 |
return total; |
|
266 |
} |
|
267 |
|
|
268 |
@Override |
|
269 |
public int getCurrentValue() { |
|
270 |
return currentlyValidated; |
|
271 |
} |
|
272 |
|
|
273 |
@Override |
|
274 |
public boolean isInaccurate() { |
|
275 |
return !accurate; |
|
276 |
} |
|
277 |
|
|
278 |
public String getGuidelines() { |
|
279 |
return guidelines; |
|
280 |
} |
|
281 |
|
|
282 |
public void setGuidelines(final String guidelines) { |
|
283 |
this.guidelines = guidelines; |
|
284 |
} |
|
285 |
|
|
286 |
public String getRecordsSampleSize() { |
|
287 |
return recordsSampleSize; |
|
288 |
} |
|
289 |
|
|
290 |
public void setRecordsSampleSize(final String recordsSampleSize) { |
|
291 |
this.recordsSampleSize = recordsSampleSize; |
|
292 |
} |
|
293 |
|
|
294 |
public String getMdstoreId() { |
|
295 |
return mdstoreId; |
|
296 |
} |
|
297 |
|
|
298 |
public void setMdstoreId(final String mdstoreId) { |
|
299 |
this.mdstoreId = mdstoreId; |
|
300 |
} |
|
301 |
|
|
302 |
public String getExtra_param() { |
|
303 |
return extraParams; |
|
304 |
} |
|
305 |
|
|
306 |
public void setExtra_param(final String extra_param) { |
|
307 |
this.extraParams = extra_param; |
|
308 |
} |
|
309 |
|
|
310 |
public String getxQueryForValidatorServiceId() { |
|
311 |
return xQueryForValidatorServiceId; |
|
312 |
} |
|
313 |
|
|
314 |
public void setxQueryForValidatorServiceId(final String xQueryForValidatorServiceId) { |
|
315 |
this.xQueryForValidatorServiceId = xQueryForValidatorServiceId; |
|
316 |
} |
|
317 |
|
|
318 |
public String getOutputEprName() { |
|
319 |
return outputEprName; |
|
320 |
} |
|
321 |
|
|
322 |
public void setOutputEprName(final String outputEprName) { |
|
323 |
this.outputEprName = outputEprName; |
|
324 |
} |
|
325 |
|
|
326 |
public String getExtraParams() { |
|
327 |
return extraParams; |
|
328 |
} |
|
329 |
|
|
330 |
public void setExtraParams(final String extraParams) { |
|
331 |
this.extraParams = extraParams; |
|
332 |
} |
|
333 |
|
|
334 |
public String getCurrentlyValidatedParam() { |
|
335 |
return currentlyValidatedParam; |
|
336 |
} |
|
337 |
|
|
338 |
public void setCurrentlyValidatedParam(final String currentlyValidatedParam) { |
|
339 |
this.currentlyValidatedParam = currentlyValidatedParam; |
|
340 |
} |
|
341 |
|
|
342 |
public int getJobStatusUpdateInterval() { |
|
343 |
return jobStatusUpdateInterval; |
|
344 |
} |
|
345 |
|
|
346 |
public void setJobStatusUpdateInterval(final int jobStatusUpdateInterval) { |
|
347 |
this.jobStatusUpdateInterval = jobStatusUpdateInterval; |
|
348 |
} |
|
349 |
|
|
350 |
public int getCurrentlyValidated() { |
|
351 |
return currentlyValidated; |
|
352 |
} |
|
353 |
|
|
354 |
public void setCurrentlyValidated(final int currentlyValidated) { |
|
355 |
this.currentlyValidated = currentlyValidated; |
|
356 |
} |
|
357 |
|
|
358 |
public boolean isShouldOutputRecords() { |
|
359 |
return shouldOutputRecords; |
|
360 |
} |
|
361 |
|
|
362 |
public void setShouldOutputRecords(final boolean shouldOutputRecords) { |
|
363 |
this.shouldOutputRecords = shouldOutputRecords; |
|
364 |
} |
|
365 |
|
|
366 |
public boolean isShouldUpdateBlacklist() { |
|
367 |
return shouldUpdateBlacklist; |
|
368 |
} |
|
369 |
|
|
370 |
public void setShouldUpdateBlacklist(final boolean shouldUpdateBlacklist) { |
|
371 |
this.shouldUpdateBlacklist = shouldUpdateBlacklist; |
|
372 |
} |
|
373 |
|
|
374 |
public String getBlacklistRuleName() { |
|
375 |
return blacklistRuleName; |
|
376 |
} |
|
377 |
|
|
378 |
public void setBlacklistRuleName(final String blacklistRuleName) { |
|
379 |
this.blacklistRuleName = blacklistRuleName; |
|
380 |
} |
|
381 |
|
|
382 |
} |
modules/dnet-validator-workflows/tags/dnet-validator-workflows-1.1.8/src/main/resources/eu/dnetlib/test/profiles/workflows/repo-hi-validation-nostore.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<RESOURCE_PROFILE xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
|
3 |
<HEADER> |
|
4 |
<RESOURCE_IDENTIFIER value="0de2924a-f0f2-436c-8416-0df87e5bb073_V29ya2Zsb3dEU1Jlc291cmNlcy9Xb3JrZmxvd0RTUmVzb3VyY2VUeXBl" /> |
|
5 |
<RESOURCE_TYPE value="WorkflowDSResourceType" /> |
|
6 |
<RESOURCE_KIND value="WorkflowDSResources" /> |
|
7 |
<RESOURCE_URI value="value3" /> |
|
8 |
<DATE_OF_CREATION value="2015-07-16T18:13:51.0Z" /> |
|
9 |
</HEADER> |
|
10 |
<BODY> |
|
11 |
<WORKFLOW_NAME>Collection, validation (no stored records), and transformation</WORKFLOW_NAME> |
|
12 |
<WORKFLOW_TYPE>REPO_HI</WORKFLOW_TYPE> |
|
13 |
<WORKFLOW_PRIORITY>20</WORKFLOW_PRIORITY> |
|
14 |
<CONFIGURATION start="manual"> |
|
15 |
<NODE name="VerifyDatasource" type="VerifyDatasource" isStart="true"> |
|
16 |
<DESCRIPTION>Verify if DS is pending</DESCRIPTION> |
|
17 |
<PARAMETERS> |
|
18 |
<PARAM name="expectedInterfaceTypologyPrefixes" managedBy="system" required="false" type="string"/> |
|
19 |
<PARAM name="expectedCompliancePrefixes" managedBy="system" required="false" type="string">metadata</PARAM> |
|
20 |
</PARAMETERS> |
|
21 |
<ARCS> |
|
22 |
<ARC to="createMetaWf"/> |
|
23 |
<ARC to="validateDs" name="validateDs"/> |
|
24 |
</ARCS> |
|
25 |
</NODE> |
|
26 |
|
|
27 |
<NODE name="validateDs" type="ValidateDatasource"> |
|
28 |
<DESCRIPTION>Validate DS</DESCRIPTION> |
|
29 |
<PARAMETERS/> |
|
30 |
<ARCS> |
|
31 |
<ARC to="createMetaWf"/> |
|
32 |
</ARCS> |
|
33 |
</NODE> |
|
34 |
|
|
35 |
<NODE name="createMetaWf" type="RegisterMetaWf"> |
|
36 |
<DESCRIPTION>Create MetaWorkflow</DESCRIPTION> |
|
37 |
<PARAMETERS> |
|
38 |
<PARAM name="wfName" managedBy="system" required="true" type="string">Collection, validation (no stored records), and transformation</PARAM> |
|
39 |
</PARAMETERS> |
|
40 |
<ARCS> |
|
41 |
<ARC to="createNative"/> |
|
42 |
<ARC to="createTransformed"/> |
|
43 |
<ARC to="prepareCreateIndex"/> |
|
44 |
</ARCS> |
|
45 |
</NODE> |
|
46 |
|
|
47 |
<NODE name="createNative" type="CreateMDStore"> |
|
48 |
<DESCRIPTION>Create native store</DESCRIPTION> |
|
49 |
<PARAMETERS> |
|
50 |
<PARAM name="format" managedBy="system" required="true" type="string">DMF</PARAM> |
|
51 |
<PARAM name="interpretation" managedBy="system" required="true" type="string">native</PARAM> |
|
52 |
<PARAM name="layout" managedBy="system" required="true" type="string">store</PARAM> |
|
53 |
<PARAM name="outputPrefix" managedBy="system" required="true" type="string">coll_</PARAM> |
|
54 |
</PARAMETERS> |
|
55 |
<ARCS> |
|
56 |
<ARC to="updateMetaWf" /> |
|
57 |
</ARCS> |
|
58 |
</NODE> |
|
59 |
|
|
60 |
<NODE name="createTransformed" type="CreateMDStore"> |
|
61 |
<DESCRIPTION>Create transformed store</DESCRIPTION> |
|
62 |
<PARAMETERS> |
|
63 |
<PARAM name="format" managedBy="system" required="true" type="string">DMF</PARAM> |
|
64 |
<PARAM name="interpretation" managedBy="system" required="true" type="string">transformed</PARAM> |
|
65 |
<PARAM name="layout" managedBy="system" required="true" type="string">store</PARAM> |
|
66 |
<PARAM name="outputPrefix" managedBy="system" required="true" type="string">tran_</PARAM> |
|
67 |
</PARAMETERS> |
|
68 |
<ARCS> |
|
69 |
<ARC to="updateMetaWf" /> |
|
70 |
</ARCS> |
|
71 |
</NODE> |
|
72 |
|
|
73 |
<NODE name="prepareCreateIndex" type="PrepareCreateIndex"> |
|
74 |
<DESCRIPTION>Prepare create index</DESCRIPTION> |
|
75 |
<PARAMETERS> |
|
76 |
<PARAM name="format" managedBy="system" required="true" type="string">DMF</PARAM> |
|
77 |
<PARAM name="interpretation" managedBy="system" required="true" type="string">transformed</PARAM> |
|
78 |
<PARAM name="layout" managedBy="system" required="true" type="string">index</PARAM> |
|
79 |
</PARAMETERS> |
|
80 |
<ARCS> |
|
81 |
<ARC to="createIndex" /> |
|
82 |
</ARCS> |
|
83 |
</NODE> |
|
84 |
|
|
85 |
<NODE name="createIndex" type="CreateIndex"> |
|
86 |
<DESCRIPTION>Create index</DESCRIPTION> |
|
87 |
<PARAMETERS> |
|
88 |
<PARAM name="outputPrefix" managedBy="system" required="true" type="string">index_</PARAM> |
|
89 |
</PARAMETERS> |
|
90 |
<ARCS> |
|
91 |
<ARC to="updateMetaWf" /> |
|
92 |
</ARCS> |
|
93 |
</NODE> |
|
94 |
|
|
95 |
<NODE name="updateMetaWf" type="UpdateMetaWf" isJoin="true"> |
|
96 |
<DESCRIPTION>Create MetaWorkflow</DESCRIPTION> |
|
97 |
<PARAMETERS> |
|
98 |
<PARAM name="beanName" managedBy="system" required="true" type="string">metaWfHiValidatorAsStepNoStore</PARAM> |
|
99 |
</PARAMETERS> |
|
100 |
<ARCS> |
|
101 |
<ARC to="updateMetaWfStatus" /> |
|
102 |
</ARCS> |
|
103 |
</NODE> |
|
104 |
|
|
105 |
<NODE name="updateMetaWfStatus" type="UpdateMetaWfStatus"> |
|
106 |
<DESCRIPTION>Update MetaWorkflow Status</DESCRIPTION> |
|
107 |
<PARAMETERS /> |
|
108 |
<ARCS> |
|
109 |
<ARC to="success" /> |
|
110 |
</ARCS> |
|
111 |
</NODE> |
|
112 |
|
|
113 |
</CONFIGURATION> |
|
114 |
|
|
115 |
<STATUS /> |
|
116 |
</BODY> |
|
117 |
</RESOURCE_PROFILE> |
modules/dnet-validator-workflows/tags/dnet-validator-workflows-1.1.8/src/main/resources/eu/dnetlib/test/profiles/workflows/repo-hi-validatorAsStep.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<RESOURCE_PROFILE xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
|
3 |
<HEADER> |
|
4 |
<RESOURCE_IDENTIFIER value="b1bb171a-6c7f-41ff-92e9-a992170cdc7d_V29ya2Zsb3dEU1Jlc291cmNlcy9Xb3JrZmxvd0RTUmVzb3VyY2VUeXBl" /> |
|
5 |
<RESOURCE_TYPE value="WorkflowDSResourceType" /> |
|
6 |
<RESOURCE_KIND value="WorkflowDSResources" /> |
|
7 |
<RESOURCE_URI value="value3" /> |
|
8 |
<DATE_OF_CREATION value="2006-05-04T18:13:51.0Z" /> |
|
9 |
</HEADER> |
|
10 |
<BODY> |
|
11 |
<WORKFLOW_NAME>Collection, validation and transformation</WORKFLOW_NAME> |
|
12 |
<WORKFLOW_TYPE>REPO_HI</WORKFLOW_TYPE> |
|
13 |
<WORKFLOW_PRIORITY>20</WORKFLOW_PRIORITY> |
|
14 |
<CONFIGURATION start="manual"> |
|
15 |
<NODE name="VerifyDatasource" type="VerifyDatasource" isStart="true"> |
|
16 |
<DESCRIPTION>Verify if DS is pending</DESCRIPTION> |
|
17 |
<PARAMETERS> |
|
18 |
<PARAM name="expectedInterfaceTypologyPrefixes" managedBy="system" required="false" type="string"/> |
|
19 |
<PARAM name="expectedCompliancePrefixes" managedBy="system" required="false" type="string">metadata</PARAM> |
|
20 |
</PARAMETERS> |
|
21 |
<ARCS> |
|
22 |
<ARC to="createMetaWf"/> |
|
23 |
<ARC to="validateDs" name="validateDs"/> |
|
24 |
</ARCS> |
|
25 |
</NODE> |
|
26 |
|
|
27 |
<NODE name="validateDs" type="ValidateDatasource"> |
|
28 |
<DESCRIPTION>Validate DS</DESCRIPTION> |
|
29 |
<PARAMETERS/> |
|
30 |
<ARCS> |
|
31 |
<ARC to="createMetaWf"/> |
|
32 |
</ARCS> |
|
33 |
</NODE> |
|
34 |
|
|
35 |
<NODE name="createMetaWf" type="RegisterMetaWf"> |
|
36 |
<DESCRIPTION>Create MetaWorkflow</DESCRIPTION> |
|
37 |
<PARAMETERS> |
|
38 |
<PARAM name="wfName" managedBy="system" required="true" type="string">Collection, validation and transformation</PARAM> |
|
39 |
</PARAMETERS> |
|
40 |
<ARCS> |
|
41 |
<ARC to="createNative"/> |
|
42 |
<ARC to="createTransformed"/> |
|
43 |
<ARC to="createValidated"/> |
|
44 |
<ARC to="prepareCreateIndex"/> |
|
45 |
</ARCS> |
|
46 |
</NODE> |
|
47 |
|
|
48 |
<NODE name="createNative" type="CreateMDStore"> |
|
49 |
<DESCRIPTION>Create native store</DESCRIPTION> |
|
50 |
<PARAMETERS> |
|
51 |
<PARAM name="format" managedBy="system" required="true" type="string">DMF</PARAM> |
|
52 |
<PARAM name="interpretation" managedBy="system" required="true" type="string">native</PARAM> |
|
53 |
<PARAM name="layout" managedBy="system" required="true" type="string">store</PARAM> |
|
54 |
<PARAM name="outputPrefix" managedBy="system" required="true" type="string">coll_</PARAM> |
|
55 |
</PARAMETERS> |
|
56 |
<ARCS> |
|
57 |
<ARC to="updateMetaWf" /> |
|
58 |
</ARCS> |
|
59 |
</NODE> |
|
60 |
|
|
61 |
<NODE name="createTransformed" type="CreateMDStore"> |
|
62 |
<DESCRIPTION>Create transformed store</DESCRIPTION> |
|
63 |
<PARAMETERS> |
|
64 |
<PARAM name="format" managedBy="system" required="true" type="string">DMF</PARAM> |
|
65 |
<PARAM name="interpretation" managedBy="system" required="true" type="string">transformed</PARAM> |
|
66 |
<PARAM name="layout" managedBy="system" required="true" type="string">store</PARAM> |
|
67 |
<PARAM name="outputPrefix" managedBy="system" required="true" type="string">tran_</PARAM> |
|
68 |
</PARAMETERS> |
|
69 |
<ARCS> |
|
70 |
<ARC to="updateMetaWf" /> |
|
71 |
</ARCS> |
|
72 |
</NODE> |
|
73 |
|
|
74 |
<NODE name="createValidated" type="CreateMDStore"> |
|
75 |
<DESCRIPTION>Create validated store</DESCRIPTION> |
|
76 |
<PARAMETERS> |
|
77 |
<PARAM name="format" managedBy="system" required="true" type="string">DMF</PARAM> |
|
78 |
<PARAM name="interpretation" managedBy="system" required="true" type="string">validated</PARAM> |
|
79 |
<PARAM name="layout" managedBy="system" required="true" type="string">store</PARAM> |
|
80 |
<PARAM name="outputPrefix" managedBy="system" required="true" type="string">val_</PARAM> |
|
81 |
</PARAMETERS> |
|
82 |
<ARCS> |
|
83 |
<ARC to="updateMetaWf" /> |
|
84 |
</ARCS> |
|
85 |
</NODE> |
|
86 |
|
|
87 |
<NODE name="prepareCreateIndex" type="PrepareCreateIndex"> |
|
88 |
<DESCRIPTION>Prepare create index</DESCRIPTION> |
|
89 |
<PARAMETERS> |
|
90 |
<PARAM name="format" managedBy="system" required="true" type="string">DMF</PARAM> |
|
91 |
<PARAM name="interpretation" managedBy="system" required="true" type="string">transformed</PARAM> |
|
92 |
<PARAM name="layout" managedBy="system" required="true" type="string">index</PARAM> |
|
93 |
</PARAMETERS> |
|
94 |
<ARCS> |
|
95 |
<ARC to="createIndex" /> |
|
96 |
</ARCS> |
|
97 |
</NODE> |
|
98 |
|
|
99 |
<NODE name="createIndex" type="CreateIndex"> |
|
100 |
<DESCRIPTION>Create index</DESCRIPTION> |
|
101 |
<PARAMETERS> |
|
102 |
<PARAM name="outputPrefix" managedBy="system" required="true" type="string">index_</PARAM> |
|
103 |
</PARAMETERS> |
|
104 |
<ARCS> |
|
105 |
<ARC to="updateMetaWf" /> |
|
106 |
</ARCS> |
|
107 |
</NODE> |
|
108 |
|
|
109 |
<NODE name="updateMetaWf" type="UpdateMetaWf" isJoin="true"> |
|
110 |
<DESCRIPTION>Create MetaWorkflow</DESCRIPTION> |
|
111 |
<PARAMETERS> |
|
112 |
<PARAM name="beanName" managedBy="system" required="true" type="string">metaWfHiValidatorAsStep</PARAM> |
|
113 |
</PARAMETERS> |
|
114 |
<ARCS> |
|
115 |
<ARC to="updateMetaWfStatus" /> |
|
116 |
</ARCS> |
|
117 |
</NODE> |
|
118 |
|
|
119 |
<NODE name="updateMetaWfStatus" type="UpdateMetaWfStatus"> |
|
120 |
<DESCRIPTION>Update MetaWorkflow Status</DESCRIPTION> |
|
121 |
<PARAMETERS /> |
|
122 |
<ARCS> |
|
123 |
<ARC to="success" /> |
|
124 |
</ARCS> |
|
125 |
</NODE> |
|
126 |
|
|
127 |
</CONFIGURATION> |
|
128 |
|
|
129 |
<STATUS /> |
|
130 |
</BODY> |
|
131 |
</RESOURCE_PROFILE> |
modules/dnet-validator-workflows/tags/dnet-validator-workflows-1.1.8/src/main/resources/eu/dnetlib/msro/workflows/repo/validation/transform-validated.wf.st | ||
---|---|---|
1 |
<NODE name="SET_INFO" isStart="true" type="SetProviderInfo"> |
|
2 |
<DESCRIPTION>Retrieve information about current Content Provider</DESCRIPTION> |
|
3 |
<PARAMETERS> |
|
4 |
<PARAM required="true" type="string" name="providerId" managedBy="system">$params.("dataprovider:id")$</PARAM> |
|
5 |
<PARAM required="true" type="string" name="providerName" managedBy="system">$params.("dataprovider:name")$</PARAM> |
|
6 |
<PARAM required="true" type="string" name="api" managedBy="system">$params.("dataprovider:interface")$</PARAM> |
|
7 |
</PARAMETERS> |
|
8 |
<ARCS> |
|
9 |
<ARC to="selectStoreToFetch"/> |
|
10 |
</ARCS> |
|
11 |
</NODE> |
|
12 |
<NODE name="selectStoreToFetch" type="Selection"> |
|
13 |
<DESCRIPTION>Which records do you want to transform?</DESCRIPTION> |
|
14 |
<PARAMETERS> |
|
15 |
<PARAM function="validValues(['VALIDATED_RECORDS', 'NATIVE_RECORDS'])" managedBy="user" name="selection" required="true" type="string">VALIDATED_RECORDS</PARAM> |
|
16 |
</PARAMETERS> |
|
17 |
<ARCS> |
|
18 |
<ARC name="VALIDATED_RECORDS" to="fetchValidatedRecords" /> |
|
19 |
<ARC name="NATIVE_RECORDS" to="fetchNativeRecords" /> |
|
20 |
</ARCS> |
|
21 |
</NODE> |
|
22 |
<NODE name="fetchNativeRecords" type="FetchMDStoreRecords"> |
|
23 |
<DESCRIPTION>Fetch records from native MDStore</DESCRIPTION> |
|
24 |
<PARAMETERS> |
|
25 |
<PARAM required="true" type="string" name="mdId" managedBy="system" category="MDSTORE_ID">$params.("coll_id")$</PARAM> |
|
26 |
<PARAM required="true" type="string" name="mdFormat" managedBy="system">$params.("coll_format")$</PARAM> |
|
27 |
<PARAM required="true" type="string" name="eprParam" managedBy="system">epr_for_transformator</PARAM> |
|
28 |
</PARAMETERS> |
|
29 |
<ARCS> |
|
30 |
<ARC to="transformRecords"/> |
|
31 |
</ARCS> |
|
32 |
</NODE> |
|
33 |
<NODE name="fetchValidatedRecords" type="FetchMDStoreRecords"> |
|
34 |
<DESCRIPTION>Fetch records from validated MDStore</DESCRIPTION> |
|
35 |
<PARAMETERS> |
|
36 |
<PARAM required="true" type="string" name="mdId" managedBy="system" category="MDSTORE_ID">$params.("val_id")$</PARAM> |
|
37 |
<PARAM required="true" type="string" name="mdFormat" managedBy="system">$params.("coll_format")$</PARAM> |
|
38 |
<PARAM required="true" type="string" name="eprParam" managedBy="system">validated_epr</PARAM> |
|
39 |
</PARAMETERS> |
|
40 |
<ARCS> |
|
41 |
<ARC to="prepareValidatedRecords"/> |
|
42 |
</ARCS> |
|
43 |
</NODE> |
|
44 |
<NODE name="prepareValidatedRecords" type="ApplyXslt"> |
|
45 |
<DESCRIPTION>Prepare validated records for transformation</DESCRIPTION> |
|
46 |
<PARAMETERS> |
|
47 |
<PARAM required="true" type="string" name="inputEprParam" managedBy="system">validated_epr</PARAM> |
|
48 |
<PARAM required="true" type="string" name="outputEprParam" managedBy="system">epr_for_transformator</PARAM> |
|
49 |
<PARAM required="true" type="string" name="xsltClasspath" managedBy="user">/eu/dnetlib/msro/workflows/repo/validation/patchValidationHeader.xsl</PARAM></PARAMETERS> |
|
50 |
<ARCS> |
|
51 |
<ARC to="transformRecords"/> |
|
52 |
</ARCS> |
|
53 |
</NODE> |
|
54 |
<NODE name="transformRecords" type="Transform"> |
|
55 |
<DESCRIPTION>Transform records</DESCRIPTION> |
|
56 |
<PARAMETERS> |
|
57 |
<PARAM required="true" type="string" name="inputEprParam" managedBy="system">epr_for_transformator</PARAM> |
|
58 |
<PARAM required="true" type="string" name="outputEprParam" managedBy="system">transformed_epr</PARAM> |
|
59 |
<PARAM required="true" type="string" name="ruleId" managedBy="user" function="listProfiles('TransformationRuleDSResourceType', '//TITLE')" category="TRANSFORMATION_RULE_ID" /> |
|
60 |
</PARAMETERS> |
|
61 |
<ARCS> |
|
62 |
<ARC to="storeRecords"/> |
|
63 |
</ARCS> |
|
64 |
</NODE> |
|
65 |
|
|
66 |
<NODE name="storeRecords" type="StoreMDStoreRecords"> |
|
67 |
<DESCRIPTION>Store records into mdstore</DESCRIPTION> |
|
68 |
<PARAMETERS> |
|
69 |
<PARAM required="true" type="string" name="mdId" managedBy="system" category="MDSTORE_ID">$params.("tran_id")$</PARAM> |
|
70 |
<PARAM required="true" type="string" name="storingType" managedBy="system">REFRESH</PARAM> |
|
71 |
<PARAM required="true" type="string" name="eprParam" managedBy="system">transformed_epr</PARAM> |
|
72 |
</PARAMETERS> |
|
73 |
<ARCS> |
|
74 |
<ARC to="UPDATE_INFO"/> |
|
75 |
</ARCS> |
|
76 |
</NODE> |
|
77 |
|
|
78 |
<NODE name="UPDATE_INFO" type="MDStoreToApiExtraField"> |
|
79 |
<DESCRIPTION>Update datasource API extra fields</DESCRIPTION> |
|
80 |
<PARAMETERS> |
|
81 |
<PARAM required="true" type="string" name="mdId" managedBy="system">$params.("tran_id")$</PARAM> |
|
82 |
<PARAM required="true" type="string" name="datasourceId" managedBy="system">$params.("dataprovider:id")$</PARAM> |
|
83 |
<PARAM required="true" type="string" name="datasourceInterface" managedBy="system">$params.("dataprovider:interface")$</PARAM> |
|
84 |
<PARAM required="true" type="string" name="extraFieldForTotal" managedBy="system">last_aggregation_total</PARAM> |
|
85 |
<PARAM required="true" type="string" name="extraFieldForDate" managedBy="system">last_aggregation_date</PARAM> |
|
86 |
<PARAM required="true" type="string" name="extraFieldForMdId" managedBy="system">last_aggregation_mdId</PARAM> |
|
87 |
</PARAMETERS> |
|
88 |
<ARCS> |
|
89 |
<ARC to="success"/> |
|
90 |
</ARCS> |
|
91 |
</NODE> |
modules/dnet-validator-workflows/tags/dnet-validator-workflows-1.1.8/src/main/resources/eu/dnetlib/msro/workflows/repo/validation/patchValidationHeader.xsl | ||
---|---|---|
1 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
|
2 |
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:validator="http://eu.dnetlib/validator" |
|
3 |
xmlns:oai="http://www.openarchives.org/OAI/2.0/" exclude-result-prefixes="xs" version="2.0"> |
|
4 |
|
|
5 |
<xsl:output method="xml" indent="yes" /> |
|
6 |
|
|
7 |
<xsl:template match="/"> |
|
8 |
<oai:record xmlns:dc="http://purl.org/dc/elements/1.1/" |
|
9 |
xmlns:dr="http://www.driver-repository.eu/namespace/dr" |
|
10 |
xmlns:dri="http://www.driver-repository.eu/namespace/dri" |
|
11 |
xmlns:prov="http://www.openarchives.org/OAI/2.0/provenance" |
|
12 |
xmlns:oai="http://www.openarchives.org/OAI/2.0/" |
|
13 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
|
14 |
<oai:header> |
|
15 |
<xsl:apply-templates select="//*[./local-name()='header']/*"/> |
|
16 |
<xsl:apply-templates select="//validator:result"/> |
|
17 |
</oai:header> |
|
18 |
<xsl:apply-templates select="//*[./local-name()='metadata']"/> |
|
19 |
<xsl:apply-templates select="//*[./local-name()='about']"/> |
|
20 |
</oai:record> |
|
21 |
|
|
22 |
</xsl:template> |
|
23 |
|
|
24 |
<xsl:template match="validator:result"> |
|
25 |
<validator:result score="{@score}" status="{@status}"> |
|
26 |
<xsl:apply-templates select="./validator:failedRules"/> |
|
27 |
</validator:result> |
|
28 |
</xsl:template> |
|
29 |
|
|
30 |
<xsl:template match="@*|node()"> |
|
31 |
<xsl:copy> |
|
32 |
<xsl:apply-templates select="@*|node()"/> |
|
33 |
</xsl:copy> |
|
34 |
</xsl:template> |
|
35 |
|
|
36 |
</xsl:stylesheet> |
modules/dnet-validator-workflows/tags/dnet-validator-workflows-1.1.8/src/main/resources/eu/dnetlib/msro/workflows/repo/validation/repobye-validatorAsStep.wf.st | ||
---|---|---|
1 |
<NODE name="SET_INFO" isStart="true" type="SetProviderInfo"> |
|
2 |
<DESCRIPTION>Retrieve information about current Content Provider</DESCRIPTION> |
|
3 |
<PARAMETERS> |
|
4 |
<PARAM required="true" type="string" name="providerId" managedBy="system">$params.("dataprovider:id")$</PARAM> |
|
5 |
<PARAM required="true" type="string" name="providerName" managedBy="system">$params.("dataprovider:name")$</PARAM> |
|
6 |
<PARAM required="true" type="string" name="api" managedBy="system">$params.("dataprovider:interface")$</PARAM> |
|
7 |
</PARAMETERS> |
|
8 |
<ARCS> |
|
9 |
<ARC to="DeleteMetaWorkflow"/> |
|
10 |
</ARCS> |
|
11 |
</NODE> |
|
12 |
|
|
13 |
<NODE name="DeleteMetaWorkflow" type="DeleteMetaWf"> |
|
14 |
<DESCRIPTION>Delete the MetaWorkflow</DESCRIPTION> |
|
15 |
<PARAMETERS> |
|
16 |
<PARAM required="true" type="string" name="metaWfId" managedBy="system">$params.("META_WORKFLOW_ID")$</PARAM> |
|
17 |
</PARAMETERS> |
|
18 |
<ARCS> |
|
19 |
<ARC to="DeleteMDStoreNative"/> |
|
20 |
</ARCS> |
|
21 |
</NODE> |
|
22 |
|
|
23 |
<NODE name="DeleteMDStoreNative" type="DeleteMDStore"> |
|
24 |
<DESCRIPTION>Delete the native mdstore</DESCRIPTION> |
|
25 |
<PARAMETERS> |
|
26 |
<PARAM required="true" type="string" name="mdstoreId" managedBy="system">$params.("coll_id")$</PARAM> |
|
27 |
</PARAMETERS> |
|
28 |
<ARCS> |
|
29 |
<ARC to="DeleteMDStoreTransformed"/> |
|
30 |
</ARCS> |
|
31 |
</NODE> |
|
32 |
|
|
33 |
<NODE name="DeleteMDStoreTransformed" type="DeleteMDStore"> |
|
34 |
<DESCRIPTION>Delete the transformed mdstore</DESCRIPTION> |
|
35 |
<PARAMETERS> |
|
36 |
<PARAM required="true" type="string" name="mdstoreId" managedBy="system">$params.("tran_id")$</PARAM> |
|
37 |
</PARAMETERS> |
|
38 |
<ARCS> |
|
39 |
<ARC to="DeleteMDStoreValidated"/> |
|
40 |
</ARCS> |
|
41 |
</NODE> |
|
42 |
|
|
43 |
<NODE name="DeleteMDStoreValidated" type="DeleteMDStore"> |
|
44 |
<DESCRIPTION>Delete the validated mdstore</DESCRIPTION> |
|
45 |
<PARAMETERS> |
|
46 |
<PARAM required="true" type="string" name="mdstoreId" managedBy="system">$params.("val_id")$</PARAM> |
|
47 |
</PARAMETERS> |
|
48 |
<ARCS> |
|
49 |
<ARC to="DeleteIndex"/> |
|
50 |
</ARCS> |
|
51 |
</NODE> |
|
52 |
|
|
53 |
<NODE name="DeleteIndex" type="DeleteIndex"> |
|
54 |
<DESCRIPTION>Delete the index</DESCRIPTION> |
|
55 |
<PARAMETERS> |
|
56 |
<PARAM required="true" type="string" name="indexId" managedBy="system">$params.("index_id")$</PARAM> |
|
57 |
</PARAMETERS> |
|
58 |
<ARCS> |
|
59 |
<ARC to="RemoveApiExtraFields"/> |
|
60 |
</ARCS> |
|
61 |
</NODE> |
|
62 |
|
|
63 |
<NODE name="RemoveApiExtraFields" type="RemoveApiExtraFields"> |
|
64 |
<DESCRIPTION>Reset the extrafields of the api</DESCRIPTION> |
|
65 |
<PARAMETERS> |
|
66 |
<PARAM required="true" type="string" name="datasourceId" managedBy="system">$params.("dataprovider:id")$</PARAM> |
|
67 |
<PARAM required="true" type="string" name="datasourceInterface" managedBy="system">$params.("dataprovider:interface")$</PARAM> |
|
68 |
<PARAM required="true" type="string" name="fields" managedBy="system">last_collection_total, last_collection_date, last_collection_mdId, last_aggregation_total, last_aggregation_date, last_aggregation_mdId</PARAM> |
|
69 |
</PARAMETERS> |
|
70 |
<ARCS> |
|
71 |
<ARC to="success"/> |
|
72 |
</ARCS> |
|
73 |
</NODE> |
modules/dnet-validator-workflows/tags/dnet-validator-workflows-1.1.8/src/main/resources/eu/dnetlib/msro/workflows/repo/validation/nostore/validate-nostore.wf.st | ||
---|---|---|
1 |
<NODE name="SET_INFO_VALIDATION" isStart="true" type="SetInfoForValidation"> |
|
2 |
<DESCRIPTION>Retrieve information about current Content Provider</DESCRIPTION> |
|
3 |
<PARAMETERS> |
|
4 |
<PARAM required="true" type="string" name="profileId" managedBy="system">$params.("dataprovider:id")$</PARAM> |
|
5 |
<PARAM required="true" type="string" name="providerName" managedBy="system">$params.("dataprovider:name")$</PARAM> |
|
6 |
<PARAM required="true" type="string" name="api" managedBy="system">$params.("dataprovider:interface")$</PARAM> |
|
7 |
</PARAMETERS> |
|
8 |
<ARCS> |
|
9 |
<ARC to="selectValidate"/> |
|
10 |
</ARCS> |
|
11 |
</NODE> |
|
12 |
<NODE name="selectValidate" type="Selection"> |
|
13 |
<DESCRIPTION>Do we validate the records?</DESCRIPTION> |
|
14 |
<PARAMETERS> |
|
15 |
<PARAM function="validValues(['YES', 'NO'])" managedBy="user" name="selection" required="true" type="string">YES</PARAM> |
|
16 |
</PARAMETERS> |
|
17 |
<ARCS> |
|
18 |
<ARC name="YES" to="validate" /> |
|
19 |
<ARC name="NO" to="success" /> |
|
20 |
</ARCS> |
|
21 |
</NODE> |
|
22 |
<NODE name="validate" type="ValidationAsStep"> |
|
23 |
<DESCRIPTION>Validate from mdStore</DESCRIPTION> |
|
24 |
<PARAMETERS> |
|
25 |
<PARAM required="true" type="boolean" name="shouldOutputRecords" managedBy="system">false</PARAM> |
|
26 |
<PARAM required="false" type="string" name="outputEprName" managedBy="system">validatorEpr</PARAM> |
|
27 |
<PARAM required="true" type="string" name="mdstoreId" managedBy="system" category="MDSTORE_ID">$params.("coll_id")$</PARAM> |
|
28 |
<PARAM required="true" type="string" name="xQueryForValidatorServiceId" managedBy="user">/RESOURCE_PROFILE[.//RESOURCE_TYPE/@value='ValidatorServiceResourceType' and .//RESOURCE_KIND/@value='ServiceResources']/HEADER/RESOURCE_IDENTIFIER/@value/string()</PARAM> |
|
29 |
<PARAM required="false" type="string" name="recordsSampleSize" managedBy="user">ALL</PARAM> |
|
30 |
<PARAM required="true" type="string" name="guidelines" managedBy="user" function="validValues(['openaire3.0', 'openaire2.0', 'openaire2.0_data', 'driver'])"/> |
|
31 |
<PARAM required="true" type="boolean" name="shouldUpdateBlacklist" managedBy="user">true</PARAM> |
|
32 |
<PARAM managedBy="user" name="blacklistRuleName" required="false" type="string">blacklist_rules</PARAM> |
|
33 |
<PARAM required="false" type="int" name="jobStatusUpdateInterval" managedBy="system"/> |
|
34 |
<PARAM required="false" type="string" name="extraParams" managedBy="user"/> |
|
35 |
</PARAMETERS> |
|
36 |
<ARCS> |
|
37 |
<ARC to="success"/> |
|
38 |
</ARCS> |
|
39 |
</NODE> |
modules/dnet-validator-workflows/tags/dnet-validator-workflows-1.1.8/src/main/resources/eu/dnetlib/msro/workflows/repo/validation/nostore/repobye-validatorAsStepNoStore.wf.st | ||
---|---|---|
1 |
<NODE name="SET_INFO" isStart="true" type="SetProviderInfo"> |
|
2 |
<DESCRIPTION>Retrieve information about current Content Provider</DESCRIPTION> |
|
3 |
<PARAMETERS> |
|
4 |
<PARAM required="true" type="string" name="providerId" managedBy="system">$params.("dataprovider:id")$</PARAM> |
|
5 |
<PARAM required="true" type="string" name="providerName" managedBy="system">$params.("dataprovider:name")$</PARAM> |
|
6 |
<PARAM required="true" type="string" name="api" managedBy="system">$params.("dataprovider:interface")$</PARAM> |
|
7 |
</PARAMETERS> |
|
8 |
<ARCS> |
|
9 |
<ARC to="DeleteMetaWorkflow"/> |
|
10 |
</ARCS> |
|
11 |
</NODE> |
|
12 |
|
|
13 |
<NODE name="DeleteMetaWorkflow" type="DeleteMetaWf"> |
|
14 |
<DESCRIPTION>Delete the MetaWorkflow</DESCRIPTION> |
|
15 |
<PARAMETERS> |
|
16 |
<PARAM required="true" type="string" name="metaWfId" managedBy="system">$params.("META_WORKFLOW_ID")$</PARAM> |
|
17 |
</PARAMETERS> |
|
18 |
<ARCS> |
|
19 |
<ARC to="DeleteMDStoreNative"/> |
|
20 |
</ARCS> |
|
21 |
</NODE> |
|
22 |
|
|
23 |
<NODE name="DeleteMDStoreNative" type="DeleteMDStore"> |
|
24 |
<DESCRIPTION>Delete the native mdstore</DESCRIPTION> |
|
25 |
<PARAMETERS> |
|
26 |
<PARAM required="true" type="string" name="mdstoreId" managedBy="system">$params.("coll_id")$</PARAM> |
|
27 |
</PARAMETERS> |
|
28 |
<ARCS> |
|
29 |
<ARC to="DeleteMDStoreTransformed"/> |
|
30 |
</ARCS> |
|
31 |
</NODE> |
|
32 |
|
|
33 |
<NODE name="DeleteMDStoreTransformed" type="DeleteMDStore"> |
|
34 |
<DESCRIPTION>Delete the transformed mdstore</DESCRIPTION> |
|
35 |
<PARAMETERS> |
|
36 |
<PARAM required="true" type="string" name="mdstoreId" managedBy="system">$params.("tran_id")$</PARAM> |
|
37 |
</PARAMETERS> |
|
38 |
<ARCS> |
|
39 |
<ARC to="DeleteIndex"/> |
|
40 |
</ARCS> |
|
41 |
</NODE> |
|
42 |
|
|
43 |
<NODE name="DeleteIndex" type="DeleteIndex"> |
|
44 |
<DESCRIPTION>Delete the index</DESCRIPTION> |
|
45 |
<PARAMETERS> |
|
46 |
<PARAM required="true" type="string" name="indexId" managedBy="system">$params.("index_id")$</PARAM> |
|
47 |
</PARAMETERS> |
|
48 |
<ARCS> |
|
49 |
<ARC to="RemoveApiExtraFields"/> |
|
50 |
</ARCS> |
|
51 |
</NODE> |
|
52 |
|
|
53 |
<NODE name="RemoveApiExtraFields" type="RemoveApiExtraFields"> |
|
54 |
<DESCRIPTION>Reset the extrafields of the api</DESCRIPTION> |
|
55 |
<PARAMETERS> |
|
56 |
<PARAM required="true" type="string" name="datasourceId" managedBy="system">$params.("dataprovider:id")$</PARAM> |
|
57 |
<PARAM required="true" type="string" name="datasourceInterface" managedBy="system">$params.("dataprovider:interface")$</PARAM> |
|
58 |
<PARAM required="true" type="string" name="fields" managedBy="system">last_collection_total, last_collection_date, last_collection_mdId, last_aggregation_total, last_aggregation_date, last_aggregation_mdId</PARAM> |
|
59 |
</PARAMETERS> |
|
60 |
<ARCS> |
|
61 |
<ARC to="success"/> |
|
62 |
</ARCS> |
|
63 |
</NODE> |
modules/dnet-validator-workflows/tags/dnet-validator-workflows-1.1.8/src/main/resources/eu/dnetlib/msro/workflows/repo/validation/validate.wf.st | ||
---|---|---|
1 |
<NODE name="SET_INFO_VALIDATION" isStart="true" type="SetInfoForValidation"> |
|
2 |
<DESCRIPTION>Retrieve information about current Content Provider</DESCRIPTION> |
|
3 |
<PARAMETERS> |
|
4 |
<PARAM required="true" type="string" name="profileId" managedBy="system">$params.("dataprovider:id")$</PARAM> |
|
5 |
<PARAM required="true" type="string" name="providerName" managedBy="system">$params.("dataprovider:name")$</PARAM> |
|
6 |
<PARAM required="true" type="string" name="api" managedBy="system">$params.("dataprovider:interface")$</PARAM> |
|
7 |
</PARAMETERS> |
|
8 |
<ARCS> |
|
9 |
<ARC to="selectValidate"/> |
|
10 |
</ARCS> |
|
11 |
</NODE> |
|
12 |
<NODE name="selectValidate" type="Selection"> |
|
13 |
<DESCRIPTION>Do we validate the records?</DESCRIPTION> |
|
14 |
<PARAMETERS> |
|
15 |
<PARAM function="validValues(['YES', 'NO'])" managedBy="user" name="selection" required="true" type="string">YES</PARAM> |
|
16 |
</PARAMETERS> |
|
17 |
<ARCS> |
|
18 |
<ARC name="YES" to="validate" /> |
|
19 |
<ARC name="NO" to="success" /> |
|
20 |
</ARCS> |
|
21 |
</NODE> |
|
22 |
<NODE name="validate" type="ValidationAsStep"> |
|
23 |
<DESCRIPTION>Validate from mdStore</DESCRIPTION> |
|
24 |
<PARAMETERS> |
|
25 |
<PARAM required="true" type="boolean" name="shouldOutputRecords" managedBy="system">false</PARAM> |
|
26 |
<PARAM required="false" type="string" name="outputEprName" managedBy="system">validatorEpr</PARAM> |
|
27 |
<PARAM required="true" type="string" name="mdstoreId" managedBy="system" category="MDSTORE_ID">$params.("coll_id")$</PARAM> |
|
28 |
<PARAM required="true" type="string" name="xQueryForValidatorServiceId" managedBy="user">/RESOURCE_PROFILE[.//RESOURCE_TYPE/@value='ValidatorServiceResourceType' and .//RESOURCE_KIND/@value='ServiceResources']/HEADER/RESOURCE_IDENTIFIER/@value/string()</PARAM> |
|
29 |
<PARAM required="false" type="string" name="recordsSampleSize" managedBy="user">ALL</PARAM> |
|
30 |
<PARAM required="true" type="string" name="guidelines" managedBy="user" function="validValues(['openaire3.0', 'openaire2.0', 'openaire2.0_data', 'driver'])"/> |
|
31 |
<PARAM required="true" type="boolean" name="shouldUpdateBlacklist" managedBy="user">true</PARAM> |
|
32 |
<PARAM managedBy="user" name="blacklistRuleName" required="false" type="string">blacklist_rules</PARAM> |
|
33 |
<PARAM required="false" type="int" name="jobStatusUpdateInterval" managedBy="system"/> |
|
34 |
<PARAM required="false" type="string" name="extraParams" managedBy="user"/> |
|
35 |
</PARAMETERS> |
|
36 |
<ARCS> |
|
37 |
<ARC to="storeRecords"/> |
|
38 |
</ARCS> |
|
39 |
</NODE> |
|
40 |
<NODE name="storeRecords" type="StoreMDStoreRecords"> |
|
41 |
<DESCRIPTION>Store records into mdstore</DESCRIPTION> |
|
42 |
<PARAMETERS> |
|
43 |
<PARAM required="true" type="string" name="mdId" managedBy="system" category="MDSTORE_ID">$params.("val_id")$</PARAM> |
|
44 |
<PARAM required="true" type="string" name="storingType" managedBy="user" function="validValues(['REFRESH', 'INCREMENTAL'])"/> |
|
45 |
<PARAM required="true" type="string" name="eprParam" managedBy="system">validatorEpr</PARAM> |
|
46 |
</PARAMETERS> |
|
47 |
<ARCS> |
|
48 |
<ARC to="success"/> |
|
49 |
</ARCS> |
|
50 |
</NODE> |
modules/dnet-validator-workflows/tags/dnet-validator-workflows-1.1.8/src/main/resources/eu/dnetlib/msro/workflows/applicationContext-repohi.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<beans xmlns="http://www.springframework.org/schema/beans" |
|
3 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" |
|
4 |
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> |
|
5 |
|
|
6 |
<bean id="metaWfHiValidatorAsStep" class="eu.dnetlib.msro.workflows.metawf.DatasourceMetaWorkflow" |
|
7 |
p:destroyWorkflowTemplate="classpath:/eu/dnetlib/msro/workflows/repo/validation/repobye-validatorAsStep.wf.st" |
|
8 |
scope="prototype"> |
|
9 |
<property name="tree"> |
|
10 |
<bean class="eu.dnetlib.msro.workflows.metawf.WorkflowTree" |
|
11 |
p:name="collect" |
|
12 |
p:template="classpath:/eu/dnetlib/msro/aggregative/workflows/repo/collect.wf.st"> |
|
13 |
<property name="children"> |
|
14 |
<list> |
|
15 |
<bean class="eu.dnetlib.msro.workflows.metawf.WorkflowTree" |
|
16 |
p:name="validate" |
|
17 |
p:template="classpath:/eu/dnetlib/msro/workflows/repo/validation/validate.wf.st"> |
|
18 |
<property name="children"> |
|
19 |
<list> |
|
20 |
<bean class="eu.dnetlib.msro.workflows.metawf.WorkflowTree" |
|
21 |
p:name="transform" |
|
22 |
p:template="classpath:/eu/dnetlib/msro/workflows/repo/validation/transform-validated.wf.st"> |
|
23 |
<property name="children"> |
|
24 |
<list> |
|
25 |
<bean class="eu.dnetlib.msro.workflows.metawf.WorkflowTree" |
|
26 |
p:name="index" |
|
27 |
p:template="classpath:/eu/dnetlib/msro/aggregative/workflows/repo/index.wf.st"> |
|
28 |
</bean> |
|
29 |
<bean class="eu.dnetlib.msro.workflows.metawf.WorkflowTree" |
|
30 |
p:name="oai" |
|
31 |
p:template="classpath:/eu/dnetlib/msro/aggregative/workflows/repo/oai.wf.st"> |
|
32 |
<property name="children"> |
|
33 |
<list> |
|
34 |
<bean class="eu.dnetlib.msro.workflows.metawf.WorkflowTree" |
|
35 |
p:name="oaiPostFeed" |
|
36 |
p:template="classpath:/eu/dnetlib/msro/aggregative/workflows/repo/oaiPostFeed.wf.st"> |
|
37 |
</bean> |
|
38 |
</list> |
|
39 |
</property> |
|
40 |
</bean> |
|
41 |
</list> |
|
42 |
</property> |
|
43 |
</bean> |
|
44 |
</list> |
|
45 |
</property> |
|
46 |
</bean> |
|
47 |
</list> |
|
48 |
</property> |
|
49 |
</bean> |
|
50 |
</property> |
|
51 |
</bean> |
|
52 |
|
|
53 |
|
|
54 |
<bean id="metaWfHiValidatorAsStepNoStore" class="eu.dnetlib.msro.workflows.metawf.DatasourceMetaWorkflow" |
|
55 |
p:destroyWorkflowTemplate="classpath:/eu/dnetlib/msro/workflows/repo/validation/nostore/repobye-validatorAsStepNoStore.wf.st" |
|
56 |
scope="prototype"> |
|
57 |
<property name="tree"> |
|
58 |
<bean class="eu.dnetlib.msro.workflows.metawf.WorkflowTree" |
|
59 |
p:name="collect" |
|
60 |
p:template="classpath:/eu/dnetlib/msro/aggregative/workflows/repo/collect.wf.st"> |
|
61 |
<property name="children"> |
|
62 |
<list> |
|
63 |
<bean class="eu.dnetlib.msro.workflows.metawf.WorkflowTree" |
|
64 |
p:name="validate" |
|
65 |
p:template="classpath:/eu/dnetlib/msro/workflows/repo/validation/nostore/validate-nostore.wf.st"> |
|
66 |
<property name="children"> |
|
67 |
<list> |
|
68 |
<bean class="eu.dnetlib.msro.workflows.metawf.WorkflowTree" |
|
69 |
p:name="transform" |
|
70 |
p:template="classpath:/eu/dnetlib/msro/aggregative/workflows/repo/transform.wf.st"> |
|
71 |
<property name="children"> |
|
72 |
<list> |
|
73 |
<bean class="eu.dnetlib.msro.workflows.metawf.WorkflowTree" |
|
74 |
p:name="index" |
|
75 |
p:template="classpath:/eu/dnetlib/msro/aggregative/workflows/repo/index.wf.st"> |
|
76 |
</bean> |
|
77 |
<bean class="eu.dnetlib.msro.workflows.metawf.WorkflowTree" |
|
78 |
p:name="oai" |
|
79 |
p:template="classpath:/eu/dnetlib/msro/aggregative/workflows/repo/oai.wf.st"> |
|
80 |
<property name="children"> |
|
81 |
<list> |
|
82 |
<bean class="eu.dnetlib.msro.workflows.metawf.WorkflowTree" |
|
83 |
p:name="oaiPostFeed" |
|
84 |
p:template="classpath:/eu/dnetlib/msro/aggregative/workflows/repo/oaiPostFeed.wf.st"> |
|
85 |
</bean> |
|
86 |
</list> |
|
87 |
</property> |
|
88 |
</bean> |
|
89 |
</list> |
|
90 |
</property> |
|
91 |
</bean> |
|
92 |
</list> |
|
93 |
</property> |
|
94 |
</bean> |
|
95 |
</list> |
|
96 |
</property> |
|
97 |
</bean> |
|
98 |
</property> |
|
99 |
</bean> |
|
100 |
|
|
101 |
</beans> |
modules/dnet-validator-workflows/tags/dnet-validator-workflows-1.1.8/src/main/resources/eu/dnetlib/applicationContext-dnet-validator-wfnodes.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<beans xmlns="http://www.springframework.org/schema/beans" |
|
3 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
4 |
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> |
|
5 |
|
|
6 |
<bean id="wfNodeSetInfoForValidation" |
|
7 |
class="eu.dnetlib.msro.workflows.nodes.validation.SetInfoForValidationJobNode" |
|
8 |
scope="prototype" /> |
|
9 |
|
|
10 |
<bean id="wfNodeValidationAsStep" |
|
11 |
class="eu.dnetlib.msro.workflows.nodes.validation.ValidatorServiceBlackboardJobNode" |
|
12 |
scope="prototype" /> |
|
13 |
|
|
14 |
</beans> |
modules/dnet-validator-workflows/tags/dnet-validator-workflows-1.1.8/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> |
|
3 |
<parent> |
|
4 |
<groupId>eu.dnetlib</groupId> |
|
5 |
<artifactId>dnet45-parent</artifactId> |
|
6 |
<version>1.0.0</version> |
|
7 |
<relativePath /> |
|
8 |
</parent> |
|
9 |
<modelVersion>4.0.0</modelVersion> |
|
10 |
<groupId>eu.dnetlib</groupId> |
|
11 |
<artifactId>dnet-validator-workflows</artifactId> |
|
12 |
<packaging>jar</packaging> |
|
13 |
<version>1.1.8</version> |
|
14 |
<scm> |
|
15 |
<developerConnection>scm:svn:https://svn.driver.research-infrastructures.eu/driver/dnet45/modules/dnet-validator-workflows/tags/dnet-validator-workflows-1.1.8</developerConnection> |
|
16 |
</scm> |
|
17 |
<dependencies> |
|
18 |
<dependency> |
|
19 |
<groupId>eu.dnetlib</groupId> |
|
20 |
<artifactId>dnet-aggregative-basic-workflows</artifactId> |
|
21 |
<version>[2.0.0,3.0.0)</version> |
|
22 |
</dependency> |
|
23 |
<dependency> |
|
24 |
<groupId>junit</groupId> |
|
25 |
<artifactId>junit</artifactId> |
|
26 |
<version>${junit.version}</version> |
|
27 |
<scope>test</scope> |
|
28 |
</dependency> |
|
29 |
</dependencies> |
|
30 |
</project> |
Also available in: Unified diff
[maven-release-plugin] copy for tag dnet-validator-workflows-1.1.8