public List getPrototypeTriples() { int[] sels = getSelectedRows(); if (sels.length == 1 && tableModel.isSeparator(sels[0])) { RDFProperty predicate = null; if (tableModel.isDefinition(sels[0])) { predicate = getOWLModel().getOWLEquivalentClassProperty(); } else { predicate = getOWLModel().getRDFSSubClassOfProperty(); } return Collections.singletonList( new DefaultTriple(tableModel.getEditedCls(), predicate, null)); } return super.getPrototypeTriples(); }
public int addRow(Cls cls) { if (cls.equals(tableModel.getEditedCls())) { tableModel.displaySemanticError("Cannot assign " + cls.getBrowserText() + " to itself."); return -1; } else { RDFSClass rdfsClass = (RDFSClass) cls; if (tableModel.addRow(rdfsClass, getSelectedRow())) { setSelectedRow(rdfsClass); return tableModel.getClassRow(rdfsClass); } else { tableModel.displaySemanticError("Could not add " + cls.getBrowserText() + "."); if (rdfsClass instanceof OWLAnonymousClass) { rdfsClass.delete(); } return -1; } } }