private List < MetadataResolver > loadMetadataFromResource ( final MetadataFilter metadataFilter , final Resource resource , final String entityId ) { LOGGER . debug ( "Evaluating metadata resource [{}]" , resource . getFilename ( ) ) ; try ( val in = getResourceInputStream ( resource , entityId ) ) { if ( in . available ( ) > 0 && in . markSupported ( ) ) { LOGGER . debug ( "Parsing [{}]" , resource . getFilename ( ) ) ; val document = this . configBean . getParserPool ( ) . parse ( in ) ; return buildSingleMetadataResolver ( metadataFilter , resource , document ) ; } LOGGER . warn ( "Input stream from resource [{}] appears empty. Moving on..." , resource . getFilename ( ) ) ; } catch ( final Exception e ) { LOGGER . warn ( "Could not retrieve input stream from resource. Moving on..." , e ) ; } return new ArrayList <> ( 0 ) ; }
Load metadata from resource .