# Property assertion "on a class"

**URL:** <https://community.stardog.com/t/property-assertion-on-a-class/839>\
**Category:** Support\
**Created:** [February 27, 2018, 2:25am UTC](https://community.stardog.com/t/property-assertion-on-a-class/839 "2018-02-27T02:25:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![cannata](https://avatars.discourse-cdn.com/v4/letter/c/54ee81/32.png) [@cannata](https://community.stardog.com/u/cannata)\
**Post date:** [February 27, 2018, 2:25am UTC](https://community.stardog.com/t/property-assertion-on-a-class/839/1 "2018-02-27T02:25:10Z")

</div>

I'm trying to create a property assertion "on a class" in such a way that a reasoner could infer the property to be had by all of its members.

I'm try to follow a StackOverflow note at

> <https://stackoverflow.com/questions/29075078/is-it-possible-to-make-property-assertions-on-class-level-in-owl-2>

I have the following in an .n3 file:

```auto
carnot:Event
  rdf:type rdfs:Class ;
  rdf:type sh:NodeShape ;
  rdfs:label "Event" ;
  rdfs:subClassOf (schema:startDate value "1800-01-01T00:00:00+05:30"^^xsd:dateTime) ;
  rdfs:subClassOf schema:Event .

```

When I try to load the .n4 file, I get the following error

`Expected ':', found ' ' [line 5] `

Is this not supported in Stardog?  
thanks  
phil

---

<div class="post-metadata">

**Author:** ![jess](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/jess/32/10_2.png) [@jess](https://community.stardog.com/u/jess)\
**Post date:** [February 27, 2018, 2:29am UTC](https://community.stardog.com/t/property-assertion-on-a-class/839/2 "2018-02-27T02:29:40Z")

</div>

Protege uses the Manchester syntax here but you will need to use the Turtle serialization for Stardog. If you look further down the answer, you will see an example of this:

```auto
:C a owl:Class ;
        rdfs:subClassOf [ a owl:Restriction ;
                           owl:hasValue :v ;
                           owl:onProperty :p
                         ] .

```

Try this syntax.

Jess

---

<div class="post-metadata">

**Author:** ![cannata](https://avatars.discourse-cdn.com/v4/letter/c/54ee81/32.png) [@cannata](https://community.stardog.com/u/cannata)\
**Post date:** [February 27, 2018, 2:42am UTC](https://community.stardog.com/t/property-assertion-on-a-class/839/3 "2018-02-27T02:42:14Z")

</div>

That worked.  
Thanks again.  
phil

---

<div class="post-metadata">

**Author:** ![cannata](https://avatars.discourse-cdn.com/v4/letter/c/54ee81/32.png) [@cannata](https://community.stardog.com/u/cannata)\
**Post date:** [February 27, 2018, 3:19am UTC](https://community.stardog.com/t/property-assertion-on-a-class/839/4 "2018-02-27T03:19:19Z")

</div>

Actually, it worked syntactically, i.r.,

```auto
prefix carnot: <http://Carnot.org/> .

carnot:Event a owl:Class ;
rdfs:subClassOf [ a owl:Restriction ;
							     owl:hasValue 0 ;
							     owl:onProperty carnot:setStartDate
							   ] .

```

But it didn’t the value to members of Pairing, which is a subClass of Event.  
phil

---

<div class="post-metadata">

**Author:** ![lorenz\_b](https://avatars.discourse-cdn.com/v4/letter/l/d78d45/32.png) [@lorenz\_b](https://community.stardog.com/u/lorenz_b)\
**Post date:** [February 27, 2018, 6:50am UTC](https://community.stardog.com/t/property-assertion-on-a-class/839/5 "2018-02-27T06:50:32Z")

</div>

> [@cannata](#):
>
> didn’t the value

Didn't what? "Add"? How did you check this? Sample data + query or the general procedure would be helpful indeed.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [March 13, 2018, 6:50am UTC](https://community.stardog.com/t/property-assertion-on-a-class/839/6 "2018-03-13T06:50:34Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
