4

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)?

2 Answers2

2

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.

Henriette Harmse
  • 4,167
  • 1
  • 13
  • 22
2

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 tab

UPD: Now creation of anonymous individuals is also available on RDF tree tab: rdf triples tab

ssz
  • 835
  • 1
  • 6
  • 18