org.protege.editor.owl.rdf.SwingResultModel Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sparql-query-plugin Show documentation
Show all versions of sparql-query-plugin Show documentation
Plug-in for the Protege Desktop ontology editor that provides support for writing and executing SPARQL queries.
package org.protege.editor.owl.rdf;
import java.util.ArrayList;
import javax.swing.table.AbstractTableModel;
public class SwingResultModel extends AbstractTableModel {
private static final long serialVersionUID = 8138862450119034828L;
private SparqlResultSet results = new SparqlResultSet(new ArrayList());
@Override
public int getRowCount() {
return results.getRowCount();
}
@Override
public int getColumnCount() {
return results.getColumnCount();
}
@Override
public String getColumnName(int column) {
return results.getColumnName(column);
}
@Override
public Object getValueAt(int rowIndex, int columnIndex) {
return results.getResult(rowIndex, columnIndex);
}
public void setResults(SparqlResultSet results) {
this.results = results;
fireTableStructureChanged();
}
}