-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open .meta
files from Solid Pods/Linked Data Platform file structure
#1249
Comments
Is the problem that you can’t select a file with a On MacOS, that does not seem possible – I am not sure why, I’ll investigate that later. For now, you have two workarounds:
open -a Protégé myfile.meta (But you may need to run that command twice: once to start Protégé, and another one to actually get it to open the file – this is because of another known bug.) If your problem is different – in particular, if you are not under MacOS –, please provide more details. |
Hi @gouttegd!! That is precisely the issue, and I am using macOS! An additional note is that the files are hidden files. They are not Given they are natural to the file system of Solid and Linked Data Platforms, I could not rename them. And having over 20 files named like this, opening one by one with a command like this might be hard in the long run. Is this an issue only for the macOS version? Is there a way to select and open non-RDF/OWL files that might have RDF/OWL content? What about hidden files? Thank you so much @gouttegd! Looking forward to your thoughts |
Yes. As I have said, on GNU/Linux and Windows the “Open file” dialog allows to remove the constraint that only “OWL files” (files with a recognised extension, such as
On MacOS, not from within Protégé itself. A workaround is to open those files from the Finder, by manually associating the (This is basically the graphical version of the
Use Command + Shift + . to toggle the display of hidden files. This works both in the Finder and in a “Open file” dialog. (But within a “Open file” dialog, this will only allow you to see the |
This might be useful: import javax.swing.*;
import java.awt.*;
import java.io.File;
public class FileChooserExample {
public static void main(String[] args) {
SwingUtilities.invokeLater(() -> {
JFrame frame = new JFrame("File Chooser Example");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(400, 200);
JButton button = new JButton("Open File");
button.addActionListener(e -> {
JFileChooser fileChooser = new JFileChooser();
// Add a filter for .owl files
fileChooser.addChoosableFileFilter(new javax.swing.filechooser.FileFilter() {
@Override
public boolean accept(File f) {
return f.isDirectory() || f.getName().toLowerCase().endsWith(".owl");
}
@Override
public String getDescription() {
return "OWL Files (*.owl)";
}
});
// Enable "All Files" option
fileChooser.setAcceptAllFileFilterUsed(true);
// Set the default filter to .owl
fileChooser.setFileFilter(fileChooser.getChoosableFileFilters()[0]);
int result = fileChooser.showOpenDialog(frame);
if (result == JFileChooser.APPROVE_OPTION) {
File selectedFile = fileChooser.getSelectedFile();
System.out.println("Selected file: " + selectedFile.getAbsolutePath());
}
});
frame.getContentPane().add(button, BorderLayout.CENTER);
frame.setVisible(true);
});
}
} I read somewhere that this code might allow a user to initially choose Thanks for the rest! |
This is not as simple as Protégé on macOS is using the native (AWT-based) file dialog, which on macOS simply does not include an option to select any file if a filter is set. The only way to fix that would be to drop the native dialog and use the non-native (Swing-based) dialog instead. |
Hi!
I'm trying to open .meta files (which have ttl content).
The Solid Protocol, which implements the Linked Data Platform Standard, allows users to declare a
.meta
file for a given directory or container.This
.meta
file is actually a turtle file.How can we open this file in Protegé so we can manage our ontologies in these files?
Thank you in advance!
The text was updated successfully, but these errors were encountered: