Re: [topbraid-users] Compiling Validation and UI/Form semanatics

2018-05-14 Thread Irene Polikoff
   sh:name “My name” ;
>   sh:minCount 1 ;
>   ]
>  ) .
>  
> As I understand the use of sh:and, this means that ex:SubShapePropertyShape 
> conforms to the constraints of both ex:SuperShapePropertyShape as well as the 
> specialized constraints in the conjoined blank node. (Although I generally 
> prefer the use of URIs for shapes to enable reuse, in this case it seems 
> appropriate to use a blank node rather than a URI node, because as a 
> specialization of ex:SuperPropertyShape it is unlikely to be re-used outside 
> of this shape, and further specialization also seems unlikely.)
>  
> According to my understanding, this is equivalent to the following;  if so, 
> what are the properties of sh:node that make it preferable to sh:and?
>  
> ex:SubShapePropertyShape
> sh:node ex:SuperShapePropertyShape ,
>   [
> sh:name “My name” ;
>      sh:minCount 1 ;
>       ] .
>  
> Thank you.
>  
> Rebecca Younes
>  
> From: <topbraid-users@googlegroups.com> on behalf of Holger Knublauch 
> <hol...@topquadrant.com>
> Reply-To: "topbraid-users@googlegroups.com" <topbraid-users@googlegroups.com>
> Date: Friday, May 11, 2018 at 9:22 PM
> To: "topbraid-users@googlegroups.com" <topbraid-users@googlegroups.com>
> Subject: Re: [topbraid-users] Compiling Validation and UI/Form semanatics
>  
>  
> 
> On 11/05/2018 22:19, Steven Michael Folsom wrote:
>> I realize the examples are not normative, but could the example given at 
>> https://www.w3.org/TR/shacl/#AndConstraintComponent be stated without the 
>> blank nodes? E.g.
>>  
>> ex:SuperShape
>> a sh:NodeShape ;
>> sh:property ex:SuperShapePropertyShape .
>>  
>> ex:SuperShapePropertyShape sh:path ex:property ;
>> sh:minCount 1 .
> 
> Yes this is equivalent. We often use URIs for property shapes too. In that 
> case I would strongly recommend adding the rdf:type sh:PropertyShape triple 
> too, so that viewers can still understand this resource outside of the 
> SuperShape context.
> 
> 
>>  
>> ex:ExampleAndShape
>> a sh:NodeShape ;
>> sh:targetNode ex:ValidInstance, ex:InvalidInstance ;
>> sh:and (
>> ex:SuperShape
>> ex:SubShapePropertyShape
>> ) .
>>  
>> :SubShapePropertyShape sh:path ex:property ;
>> sh:maxCount 1 .
> 
> BTW sh:and is a bit redundant and arguably shouldn't even be in SHACL. You 
> can simply write
> 
> ex:ExampleAndShape
> a sh:NodeShape ;
> sh:targetNode ex:ValidInstance, ex:InvalidInstance ;
> sh:node ex:SuperShape ;
> sh:node ex:SubShapePropertyShape .
> 
> for the same semantics.
> 
> 
>>  
>>  
>>  
>> Also confirming what I think is true, can property shapes use sh:and to a 
>> similar effect? E.g.
>>  
>> :SubShapePropertyShape sh:path ex:property ;
>>     sh:maxCount 1 ;
>> sh:and (ex:SubShapePropertyShape) .
> 
> Yes property shapes can use sh:and too. Again, sh:node is probably be a 
> better syntax, esp if you only have one member in the sh:and list.
> 
> sh:or is a very different story, as is sh:not.
> 
> HTH
> Holger
> 
> 
> 
> 
>>
>>  
>> Thanks,
>> Steven
>>  
>> From: <topbraid-users@googlegroups.com> on behalf of Holger Knublauch 
>> <hol...@topquadrant.com>
>> Reply-To: "topbraid-users@googlegroups.com" <topbraid-users@googlegroups.com>
>> Date: Saturday, April 14, 2018 at 7:16 PM
>> To: "topbraid-users@googlegroups.com" <topbraid-users@googlegroups.com>
>> Subject: Re: [topbraid-users] Compiling Validation and UI/Form semanatics
>>  
>>  
>> 
>> On 14/04/2018 3:59, Irene Polikoff wrote:
>>> Overrides are not supported, but inheritance is supported.
>>>  
>>> For example, you could define minCount but not define maxCount, then add a 
>>> definition of maxCount in the “sub shape”.
>>>  
>>> There are 2 ways of addressing this:
>>>  
>>> • Classes can also be shapes. If you model that way, all you need to do 
>>> is to create a class of all things that your general property constraints 
>>> will apply

Re: [topbraid-users] Compiling Validation and UI/Form semanatics

2018-05-14 Thread Rebecca Younes
Regarding the second example below,  using ex:ExampleAndShape, given the 
semantics of sh:node and the different interpretations of “value node” for 
NodeShapes and PropertyShapes, I understand how your version with sh:node 
rather than sh:and would work. But I’m uncertain about the meaning of the 
original formalization that conjoins a NodeShape and a PropertyShape with 
sh:and. Since sh:and means that “each value node conforms to” each conjoined 
shape, how is it that a NodeShape can conform to a PropertyShape, when 
different predicates apply to these different types of shapes? I would think 
this ought to be formulated as:

ex:SuperShape
a sh:NodeShape ;
sh:property ex:SuperShapePropertyShape .


ex:ExampleAndShape
# a sh:NodeShape ; not needed since inherited from ex:SuperShape
sh:and (
  ex:SuperShape
[
sh:property ex:SubShapePropertyShape
   ]
) .



Regarding the use of sh:and on PropertyShapes, it seems useful to apply sh:and 
as follows:

ex:SuperShapePropertyShape
a sh:PropertyShape ;
sh:path ex:predicate ;
sh:maxCount 2 ;
sh:class ex:SomeClass .

ex:SubShapePropertyShape
sh:and (
ex:SuperShapePropertyShape
  [
sh:name “My name” ;
  sh:minCount 1 ;
  ]
 ) .

As I understand the use of sh:and, this means that ex:SubShapePropertyShape 
conforms to the constraints of both ex:SuperShapePropertyShape as well as the 
specialized constraints in the conjoined blank node. (Although I generally 
prefer the use of URIs for shapes to enable reuse, in this case it seems 
appropriate to use a blank node rather than a URI node, because as a 
specialization of ex:SuperPropertyShape it is unlikely to be re-used outside of 
this shape, and further specialization also seems unlikely.)

According to my understanding, this is equivalent to the following;  if so, 
what are the properties of sh:node that make it preferable to sh:and?

ex:SubShapePropertyShape
sh:node ex:SuperShapePropertyShape ,
  [
sh:name “My name” ;
 sh:minCount 1 ;
  ] .

Thank you.

Rebecca Younes

From: <topbraid-users@googlegroups.com> on behalf of Holger Knublauch 
<hol...@topquadrant.com>
Reply-To: "topbraid-users@googlegroups.com" <topbraid-users@googlegroups.com>
Date: Friday, May 11, 2018 at 9:22 PM
To: "topbraid-users@googlegroups.com" <topbraid-users@googlegroups.com>
Subject: Re: [topbraid-users] Compiling Validation and UI/Form semanatics


On 11/05/2018 22:19, Steven Michael Folsom wrote:
I realize the examples are not normative, but could the example given at 
https://www.w3.org/TR/shacl/#AndConstraintComponent be stated without the blank 
nodes? E.g.

ex:SuperShape
a sh:NodeShape ;
sh:property ex:SuperShapePropertyShape .

ex:SuperShapePropertyShape sh:path ex:property ;
sh:minCount 1 .

Yes this is equivalent. We often use URIs for property shapes too. In that case 
I would strongly recommend adding the rdf:type sh:PropertyShape triple too, so 
that viewers can still understand this resource outside of the SuperShape 
context.



ex:ExampleAndShape
a sh:NodeShape ;
sh:targetNode ex:ValidInstance, ex:InvalidInstance ;
sh:and (
ex:SuperShape
ex:SubShapePropertyShape
) .

:SubShapePropertyShape sh:path ex:property ;
sh:maxCount 1 .

BTW sh:and is a bit redundant and arguably shouldn't even be in SHACL. You can 
simply write
ex:ExampleAndShape
a sh:NodeShape ;
sh:targetNode ex:ValidInstance, ex:InvalidInstance ;
sh:node ex:SuperShape ;
sh:node ex:SubShapePropertyShape .

for the same semantics.





Also confirming what I think is true, can property shapes use sh:and to a 
similar effect? E.g.

:SubShapePropertyShape sh:path ex:property ;
sh:maxCount 1 ;
sh:and (ex:SubShapePropertyShape) .

Yes property shapes can use sh:and too. Again, sh:node is probably be a better 
syntax, esp if you only have one member in the sh:and list.

sh:or is a very different story, as is sh:not.

HTH
Holger






Thanks,
Steven

From: <topbraid-users@googlegroups.com><mailto:topbraid-users@googlegroups.com> 
on behalf of Holger Knublauch 
<hol...@topquadrant.com><mailto:hol...@topquadrant.com>
Reply-To: 
"topbraid-users@googlegroups.com"<mailto:topbraid-users@googlegroups.com> 
<topbraid-users@googlegroups

Re: [topbraid-users] Compiling Validation and UI/Form semanatics

2018-05-11 Thread Holger Knublauch



On 11/05/2018 22:19, Steven Michael Folsom wrote:


I realize the examples are not normative, but could the example given 
at https://www.w3.org/TR/shacl/#AndConstraintComponent be stated 
without the blank nodes? E.g.


ex:SuperShape

    a sh:NodeShape ;

    sh:property ex:SuperShapePropertyShape .

ex:SuperShapePropertyShape sh:path ex:property ;

    sh:minCount 1 .



Yes this is equivalent. We often use URIs for property shapes too. In 
that case I would strongly recommend adding the rdf:type 
sh:PropertyShape triple too, so that viewers can still understand this 
resource outside of the SuperShape context.



ex:ExampleAndShape

    a sh:NodeShape ;

/sh:targetNode ex:ValidInstance, ex:InvalidInstance ;/

    sh:and (

ex:SuperShape

ex:SubShapePropertyShape

    ) .

:SubShapePropertyShape sh:path ex:property ;

    sh:maxCount 1 .



BTW sh:and is a bit redundant and arguably shouldn't even be in SHACL. 
You can simply write


ex:ExampleAndShape

    a sh:NodeShape ;

/sh:targetNode ex:ValidInstance, ex:InvalidInstance ;/

    sh:node ex:SuperShape ;

    sh:node ex:SubShapePropertyShape .


for the same semantics.

Also confirming what I think is true, can property shapes use sh:and 
to a similar effect? E.g.


:SubShapePropertyShape sh:path ex:property ;

    sh:maxCount 1 ;

    sh:and (ex:SubShapePropertyShape) .



Yes property shapes can use sh:and too. Again, sh:node is probably be a 
better syntax, esp if you only have one member in the sh:and list.


sh:or is a very different story, as is sh:not.

HTH
Holger




Thanks,
Steven

*From: *<topbraid-users@googlegroups.com> on behalf of Holger 
Knublauch <hol...@topquadrant.com>
*Reply-To: *"topbraid-users@googlegroups.com" 
<topbraid-users@googlegroups.com>

*Date: *Saturday, April 14, 2018 at 7:16 PM
*To: *"topbraid-users@googlegroups.com" <topbraid-users@googlegroups.com>
*Subject: *Re: [topbraid-users] Compiling Validation and UI/Form 
semanatics


On 14/04/2018 3:59, Irene Polikoff wrote:

Overrides are not supported, but inheritance is supported.

For example, you could define minCount but not define maxCount,
then add a definition of maxCount in the “sub shape”.

There are 2 ways of addressing this:

  * Classes can also be shapes. If you model that way, all you
need to do is to create a class of all things that your
general property constraints will apply to, then create
subclasses and add additional constraints to them.

  o For example, you would create a class Person with property
shapes that say that a person must have name and age. Then
you define a subclass Student with property shapes that
say that students age must be greater than 15 and they
need to have student ID.

  * Otherwise, shapes can contain other shapes. You would define a
general shape with constraints you want to use in other
shapes. When you define more specific shapes, you would
include the general shape into them using sh:and.

  o https://www.w3.org/TR/shacl/#AndConstraintComponent


An alternative to using sh:and is simply sh:node. In shapes, sh:node 
fulfills a similar role as rdfs:subClassOf for classes. For example 
state ex:SubShape sh:node ex:SuperShape to ensure that all constraints 
defined for SuperShape also apply to the target nodes of SubShape. 
(Whether tools will understand this form of inheritance is another 
question - currently not all places of the TopBraid forms would use 
sh:node although I'd like to move there).


Holger



On Apr 13, 2018, at 1:20 PM, Rebecca Younes
<rebecca.you...@gmail.com <mailto:rebecca.you...@gmail.com>>
wrote:

A related question: is it possible for one shape to invoke,
inherit, and/or override values from another shape? For
example, I would like to create a general property shape for a
title property that defines cardinality, sh:class, sh:path,
etc. Then in the context of different form shapes, I would
like to define specific names, descriptions, orders, etc.:
"Album title," "Book title," and so on. Perhaps I would like
to define a default name "Title," which could be overridden by
the specific form shapes. Is any of this possible?

Thanks.

Rebecca Younes

Semantic Application Developer and Ontology Engineer

Cornell University Library Information Technology



On Thursday, April 12, 2018 at 4:17:52 PM UTC-4, Steven Folsom
wrote:

I would be interested to be able to look at any
implementations where /Validation/ shapes are compiled
with non-Validat

Re: [topbraid-users] Compiling Validation and UI/Form semanatics

2018-04-14 Thread Holger Knublauch



On 14/04/2018 3:59, Irene Polikoff wrote:

Overrides are not supported, but inheritance is supported.

For example, you could define minCount but not define maxCount, then 
add a definition of maxCount in the “sub shape”.


There are 2 ways of addressing this:

  * Classes can also be shapes. If you model that way, all you need to
do is to create a class of all things that your general property
constraints will apply to, then create subclasses and add
additional constraints to them.
  o For example, you would create a class Person with property
shapes that say that a person must have name and age. Then you
define a subclass Student with property shapes that say that
students age must be greater than 15 and they need to have
student ID.
  * Otherwise, shapes can contain other shapes. You would define a
general shape with constraints you want to use in other shapes.
When you define more specific shapes, you would include the
general shape into them using sh:and.
  o https://www.w3.org/TR/shacl/#AndConstraintComponent




An alternative to using sh:and is simply sh:node. In shapes, sh:node 
fulfills a similar role as rdfs:subClassOf for classes. For example 
state ex:SubShape sh:node ex:SuperShape to ensure that all constraints 
defined for SuperShape also apply to the target nodes of SubShape. 
(Whether tools will understand this form of inheritance is another 
question - currently not all places of the TopBraid forms would use 
sh:node although I'd like to move there).


Holger






On Apr 13, 2018, at 1:20 PM, Rebecca Younes > wrote:


A related question: is it possible for one shape to invoke, inherit, 
and/or override values from another shape? For example, I would like 
to create a general property shape for a title property that defines 
cardinality, sh:class, sh:path, etc. Then in the context of different 
form shapes, I would like to define specific names, descriptions, 
orders, etc.: "Album title," "Book title," and so on. Perhaps I would 
like to define a default name "Title," which could be overridden by 
the specific form shapes. Is any of this possible?


Thanks.

Rebecca Younes
Semantic Application Developer and Ontology Engineer
Cornell University Library Information Technology


On Thursday, April 12, 2018 at 4:17:52 PM UTC-4, Steven Folsom wrote:

I would be interested to be able to look at any implementations
where /Validation/ shapes are compiled with non-Validation shapes
to build Forms, where that the validation axioms are maintained
in separate shapes from non-validation (UI) shapes?


Is anyone doing this? We’ve been considering it for easier
maintenance of our various shapes, but right now it’s easier to
see all the axioms needed for the app in one place…


Thanks,
Steven


-- 


Steven Folsom

Metadata Specialist

Cornell University Library

pronouns: he/him/they/them

http://orcid.org/-0003-3427-5769


http://vivo.cornell.edu/individual/sf433


@sf433



--
You received this message because you are subscribed to the Google 
Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, 
send an email to topbraid-users+unsubscr...@googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google 
Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to topbraid-users+unsubscr...@googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "TopBraid 
Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to topbraid-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [topbraid-users] Compiling Validation and UI/Form semanatics

2018-04-13 Thread Irene Polikoff
Overrides are not supported, but inheritance is supported.

For example, you could define minCount but not define maxCount, then add a 
definition of maxCount in the “sub shape”.

There are 2 ways of addressing this:

Classes can also be shapes. If you model that way, all you need to do is to 
create a class of all things that your general property constraints will apply 
to, then create subclasses and add additional constraints to them.
For example, you would create a class Person with property shapes that say that 
a person must have name and age. Then you define a subclass Student with 
property shapes that say that students age must be greater than 15 and they 
need to have student ID.
Otherwise, shapes can contain other shapes. You would define a general shape 
with constraints you want to use in other shapes. When you define more specific 
shapes, you would include the general shape into them using sh:and.
https://www.w3.org/TR/shacl/#AndConstraintComponent 





> On Apr 13, 2018, at 1:20 PM, Rebecca Younes  wrote:
> 
> A related question: is it possible for one shape to invoke, inherit, and/or 
> override values from another shape? For example, I would like to create a 
> general property shape for a title property that defines cardinality, 
> sh:class, sh:path, etc. Then in the context of different form shapes, I would 
> like to define specific names, descriptions, orders, etc.: "Album title," 
> "Book title," and so on. Perhaps I would like to define a default name 
> "Title," which could be overridden by the specific form shapes. Is any of 
> this possible?
> 
> Thanks.
> 
> Rebecca Younes
> Semantic Application Developer and Ontology Engineer
> Cornell University Library Information Technology
> 
> 
> On Thursday, April 12, 2018 at 4:17:52 PM UTC-4, Steven Folsom wrote:
> I would be interested to be able to look at any implementations where 
> Validation shapes are compiled with non-Validation shapes to build Forms, 
> where that the validation axioms are maintained in separate shapes from 
> non-validation (UI) shapes?
> 
>  
> Is anyone doing this? We’ve been considering it for easier maintenance of our 
> various shapes, but right now it’s easier to see all the axioms needed for 
> the app in one place…
> 
>  
> Thanks,
> Steven
> 
>  
> -- 
> 
> Steven Folsom
> 
> Metadata Specialist
> 
> Cornell University Library
> 
> pronouns: he/him/they/them
> 
> http://orcid.org/-0003-3427-5769 
> http://vivo.cornell.edu/individual/sf433 
> 
> @sf433
> 
>  
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "TopBraid Suite Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to topbraid-users+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
You received this message because you are subscribed to the Google Groups 
"TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to topbraid-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[topbraid-users] Compiling Validation and UI/Form semanatics

2018-04-12 Thread Steven Michael Folsom
I would be interested to be able to look at any implementations where 
Validation shapes are compiled with non-Validation shapes to build Forms, where 
that the validation axioms are maintained in separate shapes from 
non-validation (UI) shapes?

Is anyone doing this? We’ve been considering it for easier maintenance of our 
various shapes, but right now it’s easier to see all the axioms needed for the 
app in one place…

Thanks,
Steven

--
Steven Folsom
Metadata Specialist
Cornell University Library
pronouns: he/him/they/them
http://orcid.org/-0003-3427-5769
http://vivo.cornell.edu/individual/sf433
@sf433

-- 
You received this message because you are subscribed to the Google Groups 
"TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to topbraid-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.