protected String responseToPid ( final String responseText ) throws IOException { LOGGER . debug ( "responseToPid({})" , responseText ) ; if ( ! isBlank ( regex ) ) { return responseText . replaceFirst ( regex , "" ) ; } else if ( xpath != null ) { try { return xpath ( responseText , xpath ) ; } catch ( ParserConfigurationException | SAXException | XPathExpressionException e ) { throw new IOException ( e ) ; } } else { return responseText ; } }
Remove unwanted text from the minter service response to produce the desired identifier . Override this method for processing more complex than a simple regex replacement .