简体   繁体   中英

How can I add anonymous individuals in Protege?

I want to add a statement in Protege using a blank node. For example, if I expressed it as a Turtle RDF it would be something like :

[
  rdf:type rdf:Statement ;   #this anonymous resource is a Statement... 
  rdf:subject ex:Paul ;      #...with subject Paul
  rdf:predicate ex:running ; #...predicate running
  rdf:object "10miles" ;     #...and object "10miles"
  ex:hasPeriodStart "2018-04-09T10:00:00"^^xsd:dateTime ;
  ex:hasPeriodEnd "2018-04-09T12:00:00"^^xsd:dateTime ;
].

Is there a way of doing something similar in Protege (without creating a named individual with an IRI)?

Protege does not support blank nodes. One way to achieve something similar is assign a temporary/separate namespace for your blank nodes. I will give you an example of what I mean. Assume I have the following turtle syntax (I left prefixes out to keep this short),

:jane :firstname   "Jane";
      :lastname    "Doe";
      :contactInfo [:phonenumber "011 739 4751";
                    :email       "janedoe@examples.com"] .

then

[:phonenumber "011 739 4751";
 :email       "janedoe@examples.com"] 

is a blank node. This can be rewritten using a blank node _:janeContactInfo as follows:

:jane :firstname   "Jane";
      :lastname    "Doe";
      : contactInfo _:janeContactInfo .

 _:janeContactInfo :phonenumber "011 739 4751";
                   :email       "janedoe@examples.com" .

This can be represented in Manchester syntax (this is the syntax used in Protege) as:

ObjectProperty: contactInfo 
DataProperty: firstname
DataProperty: lastname
DataProperty: phonenumber
DataProperty: email

Individual: jane
Facts:
  ex:firstname, "Jane",
  ex:lastname, "Doe", 
  ex:contactInfo, _janeContactInfo

Individual: _janeContactInfo
Facts:
   ex:phonenumber, "011 739 4751"
   ex:email, "janedoe@examples.com"  

The janeContactInfo individual you can place in a temporary/separate namespace if you want.

There is RDF-Protege , that is an ONT-API -based fork, where this is possible via SPARQL tab (via INSERT with BNODE() ). Although RDF-Protege is currently a kind of "pet-project" with weak development potential, I hope this functionality could be useful to someone.

sparql 选项卡

UPD: Now creation of anonymous individuals is also available on RDF tree tab: rdf 三元组选项卡

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM