Ejemplo n.º 1
0
    def testReadVocab(self):
        a = AnnotationTool()

        self.assertEqual(10, len(a.getTerms()))
        self.assertEqual('1.0', a._vocab._version)
        self.assertEqual('http://physiomeproject.org/workflow',
                         a._vocab._namespace)
Ejemplo n.º 2
0
    def __init__(self, parent=None):
        super(SearchWidget, self).__init__(parent)
        self._ui = Ui_SearchWidget()
        self._ui.setupUi(self)

        pmr_info = PMR()
        self._pmrTool = PMRTool(pmr_info)
        self._annotationTool = AnnotationTool()

        self._makeConnections()
Ejemplo n.º 3
0
    def __init__(self, parent=None):
        QtGui.QDialog.__init__(self, parent)
        self._ui = Ui_PMRSearchDialog()
        self._ui.setupUi(self)

        pmr_info = PMR()
        self._pmrTool = PMRTool(pmr_info)
        self._annotationTool = AnnotationTool()

        self._makeConnections()

        self._updateUi()
Ejemplo n.º 4
0
    def __init__(self, location, annotation_filename=None, parent=None):
        QtWidgets.QDialog.__init__(self, parent)
        self._ui = Ui_AnnotationDialog()
        self._ui.setupUi(self)

        if len(location) > 0:
            self._ui.fileButton.hide()

        self._ui.locationLineEdit.setText(location)
        self._tool = AnnotationTool()
        self._annotation_filename = annotation_filename
        self._tool.deserialize(location, annotation_filename)

        self._ui.subjectComboBox.addItems(self._tool.getTerms())
        self._ui.predicateComboBox.addItems(self._tool.getTerms())
        self._ui.objectComboBox.addItems(self._tool.getTerms())

        for triple in self._tool.getTriples():
            self._addTriple(triple[0], triple[1], triple[2])

        self._makeConnections()