Skip to content

Commit

Permalink
Merge pull request #13 from jdvorak001/issue-12
Browse files Browse the repository at this point in the history
Fix running the validator from command-line (#12)
  • Loading branch information
jdvorak001 authored Dec 9, 2023
2 parents 09f264d + 2f7f16d commit 211977c
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ public CRISValidator() throws MissingArgumentException, SAXException, IOExceptio
* @throws IOException on a problem accessing a schema
* @throws ParserConfigurationException when an XML parser cannot be instantiated
*/
public CRISValidator( final URL endpointBaseUrl ) throws SAXException, IOException, ParserConfigurationException {
protected CRISValidator( final URL endpointBaseUrl ) throws SAXException, IOException, ParserConfigurationException {
if ( endpoint == null || ! endpointBaseUrl.toExternalForm().equals( endpoint.getBaseUrl() ) ) {
endpoint = new OAIPMHEndpoint( endpointBaseUrl, getParserSchema(), CONN_STREAM_FACTORY );
metadataFormatsByPrefix.clear();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package org.eurocris.openaire.cris.validator.metadataTests;

import java.io.IOException;
import java.net.URL;

import javax.xml.parsers.ParserConfigurationException;

import org.xml.sax.SAXException;

/**
* Adapting {@link org.eurocris.openaire.cris.validator.CRISValidator} for usage in this package.
* Just inheriting the protected constructor is needed.
*/
public class CRISValidator extends org.eurocris.openaire.cris.validator.CRISValidator {

/**
* A simple call to {@link org.eurocris.openaire.cris.validator.CRISValidator#CRISValidator( URL )}.
* @param endpointBaseUrl
* @throws SAXException
* @throws IOException
* @throws ParserConfigurationException
*/
protected CRISValidator(URL endpointBaseUrl) throws SAXException, IOException, ParserConfigurationException {
super( endpointBaseUrl );
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import java.net.URL;

import org.eurocris.openaire.cris.validator.CRISValidator;
import org.junit.Test;

/**
Expand Down

0 comments on commit 211977c

Please sign in to comment.