Hi Michael, There are no records in RDF. There are just triples. Each triple has subject, predicate and object.
> <https://schema.somecompany.com/ontologies/scorg#b363fc0a-2c2c-11b2-80af-001dd8b72b91 > > <https://schema.somecompany.com/ontologies/scorg#b363fc0a-2c2c-11b2-80af-001dd8b72b91>> > <http://www.w3.org/2004/02/skos/core#prefLabel > <http://www.w3.org/2004/02/skos/core#prefLabel>> > "A1" , "A2" , "A3”; Is exactly the same as > scorg:b363fc0a-2c2c-11b2-80af-001dd8b72b91 > <http://www.w3.org/2004/02/skos/core#prefLabel > <http://www.w3.org/2004/02/skos/core#prefLabel>> “A1" . > > scorg:b363fc0a-2c2c-11b2-80af-001dd8b72b91 > <http://www.w3.org/2004/02/skos/core#prefLabel > <http://www.w3.org/2004/02/skos/core#prefLabel>> “A2" . > > scorg:b363fc0a-2c2c-11b2-80af-001dd8b72b91 > <http://www.w3.org/2004/02/skos/core#prefLabel > <http://www.w3.org/2004/02/skos/core#prefLabel>> “A3" . When triples are serialized the first syntax is just a short hand for the second, but they both represent the same triples. As I understand it, you want something like > scorg:b363fc0a-2c2c-11b2-80af-001dd8b72b91 > <https://schema.somecompany.com/ontologies/somecompany_organization#org_id > <https://schema.somecompany.com/ontologies/somecompany_organization#org_id>> > "A1" ; > rdf:type > <https://schema.somecompany.com/ontologies/somecompany_organization#CLASS-7d2934e2-2c2b-11b2-8097-001dd8b72b91 > > <https://schema.somecompany.com/ontologies/somecompany_organization#CLASS-7d2934e2-2c2b-11b2-8097-001dd8b72b91>> > ; > <http://www.w3.org/2004/02/skos/core#prefLabel > <http://www.w3.org/2004/02/skos/core#prefLabel>> "Acme" . > Scorg:b363fc0a-2c2c-11b2-80af-001dd8b72b92 > <https://schema.somecompany.com/ontologies/somecompany_organization#org_id > <https://schema.somecompany.com/ontologies/somecompany_organization#org_id>> > "A2" ; > rdf:type > <https://schema.somecompany.com/ontologies/somecompany_organization#CLASS-7d2934e2-2c2b-11b2-8097-001dd8b72b91 > > <https://schema.somecompany.com/ontologies/somecompany_organization#CLASS-7d2934e2-2c2b-11b2-8097-001dd8b72b91>> > ; > <http://www.w3.org/2004/02/skos/core#prefLabel > <http://www.w3.org/2004/02/skos/core#prefLabel>> "Bachman" . > Scorg:b363fc0a-2c2c-11b2-80af-001dd8b72b93 > <https://schema.somecompany.com/ontologies/somecompany_organization#org_id > <https://schema.somecompany.com/ontologies/somecompany_organization#org_id>> > "A3" ; > rdf:type > <https://schema.somecompany.com/ontologies/somecompany_organization#CLASS-7d2934e2-2c2b-11b2-8097-001dd8b72b91 > > <https://schema.somecompany.com/ontologies/somecompany_organization#CLASS-7d2934e2-2c2b-11b2-8097-001dd8b72b91>> > ; > <http://www.w3.org/2004/02/skos/core#prefLabel > <http://www.w3.org/2004/02/skos/core#prefLabel>> "Connor" . If so, you have three issues: Your query does not produce the rdf:type triples You are generating 3 triples with the preferred label predicate and 3 triples with the id predicate that have the same subject while they need to have 3 different subjects. The object values you are creating for triples with <https://schema.somecompany.com/ontologies/somecompany_organization#org_id <https://schema.somecompany.com/ontologies/somecompany_organization#org_id>> predicate should be in triples with <http://www.w3.org/2004/02/skos/core#prefLabel <http://www.w3.org/2004/02/skos/core#prefLabel>> predicate and vice versa Correct? The third problem is the easiest one to fix. The object of new triples with skos:prefLabel you are using whatever is bound to ?orgNameString variable. And for triples with <https://schema.somecompany.com/ontologies/somecompany_organization#org_id <https://schema.somecompany.com/ontologies/somecompany_organization#org_id>> predicate you are using whatever is bound to ?orgString variable. Simply switch them around. As for the rest, clearly you have 3 different things in your JSON input with three different labels and ids, but you are using only one subject URI in your SPARQL that is bound to ?division in BIND (spif:buildURI("https://schema.somecompany.com/ontologies/scorg#b363fc0a-2c2c-11b2-80af-001dd8b72b91" <https://schema.somecompany.com/ontologies/scorg#b363fc0a-2c2c-11b2-80af-001dd8b72b91">;) AS ?division) . If you are relatively new to SPARQL, I would recommend playing more with it, running different queries, etc. in order to get a stronger handle on how it operates. I would do it in TBC with some different sample datasets. > On Jan 18, 2020, at 3:50 PM, Michael Phelan <[email protected]> wrote: > > Please note that the class ID global identifier would be unique for each of > the records (in my second example I just pasted in the same ID for all three > items). > > On Saturday, January 18, 2020 at 3:48:27 PM UTC-5, Michael Phelan wrote: > Thank you very much for your additional advice. > > "Not well-formed tuples" is likely the wrong terminology. To put things > literally, I currently am producing the first example below, and I need to be > producing the second example below. > > First example: > <https://schema.somecompany.com/ontologies/scorg#b363fc0a-2c2c-11b2-80af-001dd8b72b91 > > <https://schema.somecompany.com/ontologies/scorg#b363fc0a-2c2c-11b2-80af-001dd8b72b91>> > <http://www.w3.org/2004/02/skos/core#prefLabel > <http://www.w3.org/2004/02/skos/core#prefLabel>> > "A1" , "A2" , "A3"; > > <https://schema.somecompany.com/ontologies/somecompany_organization#org_id > <https://schema.somecompany.com/ontologies/somecompany_organization#org_id>> > "Acme" , "Bachman" , "Connor" . > > > Second example: > scorg:b363fc0a-2c2c-11b2-80af-001dd8b72b91 > <https://schema.somecompany.com/ontologies/somecompany_organization#org_id > <https://schema.somecompany.com/ontologies/somecompany_organization#org_id>> > "A1" ; > rdf:type > <https://schema.somecompany.com/ontologies/somecompany_organization#CLASS-7d2934e2-2c2b-11b2-8097-001dd8b72b91 > > <https://schema.somecompany.com/ontologies/somecompany_organization#CLASS-7d2934e2-2c2b-11b2-8097-001dd8b72b91>> > ; > <http://www.w3.org/2004/02/skos/core#prefLabel > <http://www.w3.org/2004/02/skos/core#prefLabel>> "Acme" . > > scorg:b363fc0a-2c2c-11b2-80af-001dd8b72b91 > <https://schema.somecompany.com/ontologies/somecompany_organization#org_id > <https://schema.somecompany.com/ontologies/somecompany_organization#org_id>> > "A2" ; > rdf:type > <https://schema.somecompany.com/ontologies/somecompany_organization#CLASS-7d2934e2-2c2b-11b2-8097-001dd8b72b91 > > <https://schema.somecompany.com/ontologies/somecompany_organization#CLASS-7d2934e2-2c2b-11b2-8097-001dd8b72b91>> > ; > <http://www.w3.org/2004/02/skos/core#prefLabel > <http://www.w3.org/2004/02/skos/core#prefLabel>> "Bachman" . > > scorg:b363fc0a-2c2c-11b2-80af-001dd8b72b91 > <https://schema.somecompany.com/ontologies/somecompany_organization#org_id > <https://schema.somecompany.com/ontologies/somecompany_organization#org_id>> > "A3" ; > rdf:type > <https://schema.somecompany.com/ontologies/somecompany_organization#CLASS-7d2934e2-2c2b-11b2-8097-001dd8b72b91 > > <https://schema.somecompany.com/ontologies/somecompany_organization#CLASS-7d2934e2-2c2b-11b2-8097-001dd8b72b91>> > ; > <http://www.w3.org/2004/02/skos/core#prefLabel > <http://www.w3.org/2004/02/skos/core#prefLabel>> "Connor" . > > > > On Friday, January 17, 2020 at 4:10:45 PM UTC-5, Irene Polikoff wrote: > Are you saying that your SPARQL generates label and id triples, but fails to > generate type triples such as > >> scorg:b363fc0a-2c2c-11b2-80af-001dd8b72b91 >> rdf:type >> <https://schema.somecompany.com/ontologies/somecompany_organization#CLASS-7d2934e2-2c2b-11b2-8097-001dd8b72b91 >> >> <https://schema.somecompany.com/ontologies/somecompany_organization#CLASS-7d2934e2-2c2b-11b2-8097-001dd8b72b91>> >> ; > > And this is your problem? > > I am confused by your terminology of “not well-formed tuples”. I am not sure > what this means in this context. Do you mean that some triples that you are > expecting to generate for each subject are missing? > > This would happen if a variable you are using to construct triples was > unbound. > > For example: > > SPARQL INSERT {?s a ?o1. > ?s rdtfs:label ?o2.} > > If let's say ?o1 was unbound then you would not get the type triple. If ?o2 > was unbound, you would not get the label triple. If ?s was unbound you would > not get neither of the triples. > >> On Jan 17, 2020, at 3:35 PM, Michael Phelan <[email protected] <>> wrote: >> >> The RDF I provided at the beginning was entirely produced using the TopBraid >> EDG web interface's taxonomy editor. My goal is to produce a large number of >> tuples in the same taxonomy which have the same form as the A1 test org, but >> with details taken from the data provided by the JSON document. At present, >> the SPARQL I provided produces the org_id tuple data in a comma-delineated >> list, based on runs to my localhost EDG server. I am providing an >> abbreviated version of the RDF that the current SPARQL produces, below. >> >> # baseURI: urn:x-evn-master:somecompany_organizations1_3 >> # imports: http://topbraid.org/imported <http://topbraid.org/imported> >> # imports: http://topbraid.org/skos.shapes <http://topbraid.org/skos.shapes> >> >> @prefix metadata: <http://topbraid.org/metadata# >> <http://topbraid.org/metadata#>> . >> @prefix teamwork: <http://topbraid.org/teamwork# >> <http://topbraid.org/teamwork#>> . >> @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns# >> <http://www.w3.org/1999/02/22-rdf-syntax-ns#>> . >> @prefix owl: <http://www.w3.org/2002/07/owl# >> <http://www.w3.org/2002/07/owl#>> . >> @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema# >> <http://www.w3.org/2000/01/rdf-schema#>> . >> <https://schema.somecompany.com/ontologies/scorg#b363fc0a-2c2c-11b2-80af-001dd8b72b91 >> >> <https://schema.somecompany.com/ontologies/scorg#b363fc0a-2c2c-11b2-80af-001dd8b72b91>> >> <http://www.w3.org/2004/02/skos/core#prefLabel >> <http://www.w3.org/2004/02/skos/core#prefLabel>> >> "A1" , "A2" , "A3"; >> >> <https://schema.somecompany.com/ontologies/somecompany_organization#org_id >> <https://schema.somecompany.com/ontologies/somecompany_organization#org_id>> >> "A1" , "A2" , "A3" . >> >> <urn:x-evn-master:somecompany_organizations1_3> >> a owl:Ontology ; >> rdfs:label "somecompany_organizations1_2" ; >> metadata:status metadata:UnderDevelopmentStatus ; >> <http://topbraid.org/swa#defaultNamespace >> <http://topbraid.org/swa#defaultNamespace>> >> "http://example.org/taxonomies/somecompany_organizations1_2# >> <http://example.org/taxonomies/somecompany_organizations1_2#>" ; >> teamwork:newInstancesUserCannotModifyURI >> false ; >> owl:imports <http://topbraid.org/skos.shapes >> <http://topbraid.org/skos.shapes>> , <http://topbraid.org/imported >> <http://topbraid.org/imported>> . >> >> >> >> On Friday, January 17, 2020 at 10:14:04 AM UTC-5, Irene Polikoff wrote: >> There are 3 triples here: id, label and type >> >>> scorg:b363fc0a-2c2c-11b2-80af-001dd8b72b91 >>> >>> <https://schema.somecompany.com/ontologies/somecompany_organization#org_id >>> <https://schema.somecompany.com/ontologies/somecompany_organization#org_id>> >>> "A1" ; >>> rdf:type >>> <https://schema.somecompany.com/ontologies/somecompany_organization#CLASS-7d2934e2-2c2b-11b2-8097-001dd8b72b91 >>> >>> <https://schema.somecompany.com/ontologies/somecompany_organization#CLASS-7d2934e2-2c2b-11b2-8097-001dd8b72b91>> >>> ; >>> <http://www.w3.org/2004/02/skos/core#prefLabel >>> <http://www.w3.org/2004/02/skos/core#prefLabel>> "test org" . >> >> They all look fine syntactically. >> >> What do you mean by ‘not well formed’? >> >> >> On Jan 17, 2020, at 9:55 AM, Michael Phelan <[email protected] <>> wrote: >> >>> I am pasting the Taxonomy a second time, as there was a typo in one of the >>> namespace references. >>> >>> # baseURI: urn:x-evn-master:somecompany_organizations >>> # imports: http://topbraid.org/skos.shapes <http://topbraid.org/skos.shapes> >>> # imports: http://topbraid.org/teamworkconstraints >>> <http://topbraid.org/teamworkconstraints> >>> # imports: urn:x-evn-master:somecompany_organization >>> >>> @prefix metadata: <http://topbraid.org/metadata# >>> <http://topbraid.org/metadata#>> . >>> @prefix scorg: >>> <https://schema.somecompany.com/taxonomies/somecompany_organizations# >>> <https://schema.somecompany.com/taxonomies/somecompany_organizations#>> . >>> @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns# >>> <http://www.w3.org/1999/02/22-rdf-syntax-ns#>> . >>> @prefix owl: <http://www.w3.org/2002/07/owl# >>> <http://www.w3.org/2002/07/owl#>> . >>> @prefix teamwork: <http://topbraid.org/teamwork# >>> <http://topbraid.org/teamwork#>> . >>> @prefix rdfs: <<a href="http://www.w3.org/2000/01/rdf-schema# >>> <http://www.w3.org/2000/01/rdf-schema#> > > -- > 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 [email protected] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/topbraid-users/ec159f8c-f8f9-4280-b68a-c69c1515c5d3%40googlegroups.com > > <https://groups.google.com/d/msgid/topbraid-users/ec159f8c-f8f9-4280-b68a-c69c1515c5d3%40googlegroups.com?utm_medium=email&utm_source=footer>. -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/B0E1EF6B-D804-4782-B920-72620405FA9F%40topquadrant.com.
