owl

How save the result of reasoner FaCT++ or HermiT in Protege

穿精又带淫゛_ 提交于 2019-12-06 06:40:20
I'm using Protégé 4.3 and I want to save the results of the reasoner to the ontology file. When I stopped the reasoner, all results disappeared. How can I save results? Ignazio In Protégé, use File → Export inferred axioms as ontology… That should do what you're looking for. 来源: https://stackoverflow.com/questions/23079459/how-save-the-result-of-reasoner-fact-or-hermit-in-protege

Jena PrefixMapping: base namespace missing when model is a named model obtained from a dataset

匆匆过客 提交于 2019-12-06 05:07:23
This the code I am using to load OntModel to a Dataset as a Named Model. Then I try to retrieve the PrefixMapping for the same in two different ways: public static void loadDatasetwithNamedModels(){ OntModel namedModel = null; Dataset dataset = null; dataset = TDBFactory.createDataset("./path/to/TDB_DIR"); namedModel = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM); dataset.begin(ReadWrite.WRITE); try{ namedModel = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM); FileManager.get().readModel( namedModel, "./Path/to/OWLFile.owl"); dataset.addNamedModel("MyNamedModel", namedModel);

map owl file into neo4j - getOrCreateNodeWithUniqueFactory method

血红的双手。 提交于 2019-12-06 04:19:32
问题 I try to move an ontology (*.owl file) into neo4j to do queries on it. I found some helpful information here but I am facing with issues in this line: Node thingNode = getOrCreateNodeWithUniqueFactory("owl:Thing"); I don't know to which class the " getOrCreateNodeWithUniqueFactory " belongs. Is this available in some library or should I implement it by myself? What am I missing here? 回答1: There are several ways to create unique nodes. The probably easiest is to use the UniqueFactory as seen

How to extract RDF triples from XML file using an existing ontology?

半腔热情 提交于 2019-12-05 10:58:47
I am trying to extract RDF triples from XML files by using an existing ontology. I am using Java, and can use XPath to extract data from XML and Jena to read and write RDF documents and ontologies. How can I extract the relevant triples from the XML according to the existing ontology? Forget about XPath to extract triples, it way easier and less problematic with Jena. You can use the interface SimpleSelector together with model.listStatements from Jena. In this example I am using SimpleSelector to find all the triples with a single property but you can implement the any search you need by

OWL ObjectProperty loading as annotation in Protégé

时间秒杀一切 提交于 2019-12-05 02:55:37
问题 I'm trying to load an ontology in Protégé but it is not processed as expected. Most problematic is that all the Object and Data Properties appear as Annotation instead of Data Property and Object Property. I have an Object Property kingdom : <owl:ObjectProperty rdf:about="&wo;kingdom"> <rdfs:label xml:lang="en">kingdom</rdfs:label> <rdfs:comment xml:lang="en">associates a taxon rank with a kingdom</rdfs:comment> <vs:term_status>testing</vs:term_status> <rdfs:range rdf:resource="&wo;Kingdom"/>

Meaning of OWL exact cardinality restrictions

旧街凉风 提交于 2019-12-04 20:28:06
I am a newbie coding with the Manchester syntax for OWL . I need to understand the role of exactly . Which of these restrictions is correct: (hasChild (A or B)) and (hasChild exactly 1 Thing) (hasChild (A or B)) and (hasChild exactly 2 Thing) (hasChild (A and B)) and (hasChild exactly 1 Thing) (hasChild (A and B)) and (hasChild exactly 2 Thing) Can you explain it when A and B are equivalent, and when they are disjoint? The meaning of class expressions is defined in section 2.2.3 Class Expressions of the OWL 2 Web Ontology Language Direct Semantics W3C recommendation. The four class expressions

Programmatically generating OWL class hierarchy with Jena

风流意气都作罢 提交于 2019-12-04 20:06:10
I want to programmatically generate an ontology using OWL by supplying a vector. My goal is to be able to open the produced OWL file in Protégé and make use of Jena. Input Vector The vector which i want to pass: [[layer, network layer, data link layer, physical layer], [network, computer network], [data link], [ontology, ontology extraction]]. Expected Output The output should have the following tree-like hierarchy structure: layer -network layer -data link layer -physical layer network -computer network ontology -ontology extraction data link The hierarchical structure, where network layer is

SPARQL Get all the properties from a Class or an Individual

梦想的初衷 提交于 2019-12-04 18:01:35
What I want to do is to get the property list from the Individual1 or from a class, Get all properties from "something" The result should be something like this (for Secret_Data): | Asset_has_Confidentiality_Importance | High | | Asset_has_Availability_Importance....| Moderate | | Asset_has_Integrity_Importance.......| Moderate | | Asset_threatenedBy_ThreatEvent.......| Compromise_sensitive_information | | Asset_threatenedBy_ThreatEvent.......| Disclosure_of_sensitive_information | | Asset_threatenedBy_ThreatEvent.......| Exploit_exposed_unauthorized_information | | Asset_threatenedBy

swrl rules to infer dataProperty values

你。 提交于 2019-12-04 17:24:42
I'm trying to test a simple SWRL rule. There are three Classes in my ontology: LivingPlace which has two sub-classes RuralArea and City. LivingPlace is the domain of the dataProperty hasHospital which has the range boolean. When I test the following rule with Pellet reasoner, the individual I created as a member of LivingPlace is also inferred as a member of RuralArea. LivingPlace(?lp), hasHospital(?lp, false) → RuralArea(?lp) However, what I really want to do is the reverse of this reasoning. RuralArea(?lp) → hasHospital(?lp, false) Whenever I create an individual of type RuralArea, I want

How is OWL actually used when building a semantic web application?

倾然丶 夕夏残阳落幕 提交于 2019-12-04 17:09:38
问题 I've been reading about semantic web technologies such as RDF and OWL, and am intrigued about the possibilities of building an RDF / triple-store semantic database on top of my existing relational DBs. It's simply an R&D exercise, to see what I can do. I like the look of OWLIM, but some basics are failing me. How exactly is one meant to build and then use an OWL ontology? Do you build it with something like Protege, then import it into your repository? Or is the ontology a byproduct of the