Search code examples
rdfowlprotege

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


Solution

  • 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       "[email protected]"] .
    

    then

    [:phonenumber "011 739 4751";
     :email       "[email protected]"] 
    

    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       "[email protected]" .
    

    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, "[email protected]"  
    

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