Skip to content

Commit

Permalink
Check if filename is an .ttl file (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
michelu89 authored Jun 19, 2023
1 parent b354472 commit dd9f512
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,14 @@ private synchronized void setNamespaces( final Map<String, List<String>> namespa
*/
private Map<String, List<String>> readAllNamespacesFromFolder() {
final String rootSharedFolder = getQualifiedFilePath( StringUtils.EMPTY );
final File file = getFileInstance( rootSharedFolder );
final File file = new File( rootSharedFolder );

if ( !file.exists() ) {
throw new FileNotFoundException( String.format( STORAGE_FOLDER_NOT_EXISTS, rootSharedFolder ) );
}

final List<String> endFilePaths = getEndFilePaths( rootSharedFolder, file );
final List<String> endFilePaths = getEndFilePaths( rootSharedFolder, file ).stream().filter(
path -> path.endsWith( ".ttl" ) ).toList();

final Map<String, List<String>> namespacePathMapping = endFilePaths.stream()
.map( LocalFolderResolverStrategy::transformToValidModelDirectory )
Expand Down

0 comments on commit dd9f512

Please sign in to comment.