Esempio n. 1
0
# GNU Lesser General Public License for more details.

# You should have received a copy of the GNU Lesser General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from collections import defaultdict

import editobj3, editobj3.introsp as introsp, editobj3.field as field, editobj3.editor as editor

import owlready
from owlready import *
from owlready import _PYTHON_2_DATATYPES

IGNORE_DOMAINLESS_PROPERTY = False

introsp.def_attr("topObjectProperty", field.HiddenField)

descr = introsp.description(Ontology)
descr.def_attr("loaded", field.HiddenField)
descr.def_attr("name", field.HiddenField)
descr.def_attr("base_iri", field.StringField)
descr.def_attr("python_module", field.StringField)
descr.def_attr("classes", add_method="add", label="class")
descr.def_attr("imported_ontologies",
               add_method="add",
               label="imported_ontology")
descr.def_attr("properties", add_method="add", label="property")
descr.def_attr("instances", add_method="add")
descr.def_attr("all_disjoints", add_method="add")
descr.set_icon_filename(
    os.path.join(os.path.dirname(__file__), "icons", "owl_instance.svg"))
Esempio n. 2
0
# GNU Lesser General Public License for more details.

# You should have received a copy of the GNU Lesser General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from collections import defaultdict

import editobj3, editobj3.introsp as introsp, editobj3.field as field, editobj3.editor as editor

import owlready
from owlready import *
from owlready import _PYTHON_2_DATATYPES

IGNORE_DOMAINLESS_PROPERTY = False

introsp.def_attr("topObjectProperty"  , field.HiddenField)

descr = introsp.description(Ontology)
descr.def_attr("loaded"             , field.HiddenField)
descr.def_attr("name"               , field.HiddenField)
descr.def_attr("base_iri"           , field.StringField)
descr.def_attr("python_module"      , field.StringField)
descr.def_attr("classes"            , add_method = "add", label = "class")
descr.def_attr("imported_ontologies", add_method = "add", label = "imported_ontology")
descr.def_attr("properties"         , add_method = "add", label = "property")
descr.def_attr("instances"          , add_method = "add")
descr.def_attr("all_disjoints"      , add_method = "add")
descr.set_icon_filename(os.path.join(os.path.dirname(__file__), "icons", "owl_instance.svg"))

def _keep_most_generic(s):
  r = set()