[topbraid-users] ADS to add a comment and remove and have an entry in the change history

2024-04-23 Thread Kasia Kryczka
Hi ,

I would like to add a simple comment to all graphs their object of a type 
class and instaces and then remove so it appears in the change history.


graph.select(`PREFIX rdf: 
PREFIX teamwork: 
PREFIX edg: 
PREFIX bosch-metadata-ontology: 
 
PREFIX owl: 
PREFIX ontologyprojects: 
 
PREFIX spif: 

  
SELECT DISTINCT ?masterGs ?class ?instance 
WHERE {
{
rdf:nil teamwork:readableGraphsUnderTeamControl ?masterGs.
GRAPH ?masterGs {
?s a ontologyprojects:Ontology;
   edg:subjectArea ?subArea.
  OPTIONAL{?class a owl:Class.}
  OPTIONAL{?instance a ?class}
OPTIONAL { ?masterGs bosch-metadata-ontology:securityClass 
?SecClass }
FILTER (
?SecClass = bosch-metadata-ontology:CSC0 || 
?SecClass = bosch-metadata-ontology:CSC1
)
FILTER (
str(?subArea) != 'test' &&
str(?subArea) != 'test2' &&
str(?subArea) != 'test3' &&
str(?subArea) != 'test4'
)
}
  }}
 

`).bindings.forEach(b => {
let masterGraph =b.masterGs;
let masterClass = b.class;
let instance = b.instance;
// console.log (b.masterGs);
// console.log (b.class);
// console.log (b.instance);

 graph.transaction(b.masterGs, 'Adding something', () => {
// Create node references
let graphNode = graph.namedNode(b.masterGs);
let classNode = graph.namedNode(b.class);
let instanceNode = b.instance ? graph.namedNode(b.instance) : null;

// Add comments or other properties
 graphNode.add('http://www.w3.org/2000/01/rdf-schema#comment', "Added 
to graph");
classNode.add('http://www.w3.org/2000/01/rdf-schema#comment', "Added to 
class");
if (instanceNode) {
instanceNode.add('http://www.w3.org/2000/01/rdf-schema#comment', "Added 
to instance");
}
});
});  
I created sth like this but unfortunately this doesn't work. Could you help 
me with that ?

Br,

Kasia

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/564a8afe-4ce2-4e46-a39e-86086cd0d824n%40googlegroups.com.


Re: [topbraid-users] ADS add a business term

2024-02-28 Thread Kasia Kryczka
You are right is should be a class.

Your script worked but I got no results on Business Term.

Br,

Kasia

On Wednesday, February 28, 2024 at 10:47:17 AM UTC+1 Holger Knublauch wrote:

> In general, if uri is a NamedNode, and you call uri.add(string, value) it 
> will use string as the URI of a property. In my local test this works. But 
> are you sure you want 'http://edg.topbraid.solutions/model/BusinessTerm' 
> as property? This looks like a class URI to me, which should be value of 
> rdf.type.
>
> Also if you're saying it doesn't work, what happens exactly?
>
> Holger
>
>
> On 28 Feb 2024, at 9:38 am, Kasia Kryczka  wrote:
>
> Hi,
>
> The one with typeLabel was just an example. The extra brackets were 
> probably from previous trials. 
>
> Unfortunately this :
>
> uri.add('http://edg.topbraid.solutions/model/BusinessTerm', 'LALA'); 
> doesn't work.
>
> I thought wit rdfs.label would work  as this is the result we have after 
> adding the bt manually:
>
>
> 
>   a edg:BusinessTerm ;
>   rdfs:label "test2" ;
> .
>
> Br,
>
> Kasia
>
> On Tuesday, February 27, 2024 at 3:44:47 PM UTC+1 Holger Knublauch wrote:
>
>>
>> On 27 Feb 2024, at 2:36 pm, Kasia Kryczka  wrote:
>>
>> Hi, 
>>
>> I would like to use ads to add business terms and I have done :
>> let id = tbs.createAssetCollection({
>>  typeLabel: "",
>> name: "",
>> description: ""
>> });
>>
>>
>> typeLabel and name cannot be empty. But I guess that was just an example?
>>
>>
>> let uri = graph.namedNode(tbs.assetCollectionURI(id));
>>
>>
>>
>> graph.transaction(uri, 'Initializing asset collection ' + id, () => {
>> 
>>  uri.add(('http://edg.topbraid.solutions/model/BusinessTerm', 
>> ('LALA')));
>>
>>
>> Why are there extra ( here? Should this be
>>
>> uri.add('http://edg.topbraid.solutions/model/BusinessTerm', 'LALA');
>>
>> ?
>>
>> Holger
>>
>>
>>
>>
>> OR   
>>  uri.add(('http://edg.topbraid.solutions/model/BusinessTerm', 
>> rdfs.label('test')));
>> });
>> but they don't work. Could you give me a hint how to do that? 
>>
>> Thanks,
>>
>> Kasia
>>
>> -- 
>> The topics of this mailing list include TopBraid EDG and related 
>> technologies such as SHACL.
>> To post to this group, send email to topbrai...@googlegroups.com
>> --- 
>> 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-user...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/topbraid-users/7088b089-0527-42f3-af3c-67afcebf8a93n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/topbraid-users/7088b089-0527-42f3-af3c-67afcebf8a93n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>>
>>
> -- 
> The topics of this mailing list include TopBraid EDG and related 
> technologies such as SHACL.
> To post to this group, send email to topbrai...@googlegroups.com
> --- 
> 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-user...@googlegroups.com.
>
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/5f378e0f-5b0a-44d3-b3e6-8dd64db6d343n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/topbraid-users/5f378e0f-5b0a-44d3-b3e6-8dd64db6d343n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/745b873c-dd9d-4017-bea0-fde5288d4289n%40googlegroups.com.


Re: [topbraid-users] ADS add a business term

2024-02-28 Thread Kasia Kryczka
Hi,

The one with typeLabel was just an example. The extra brackets were 
probably from previous trials. 

Unfortunately this :

uri.add('http://edg.topbraid.solutions/model/BusinessTerm', 'LALA'); 
doesn't work.

I thought wit rdfs.label would work  as this is the result we have after 
adding the bt manually:



  a edg:BusinessTerm ;
  rdfs:label "test2" ;
.

Br,

Kasia

On Tuesday, February 27, 2024 at 3:44:47 PM UTC+1 Holger Knublauch wrote:

>
> On 27 Feb 2024, at 2:36 pm, Kasia Kryczka  wrote:
>
> Hi, 
>
> I would like to use ads to add business terms and I have done :
> let id = tbs.createAssetCollection({
>  typeLabel: "",
> name: "",
> description: ""
> });
>
>
> typeLabel and name cannot be empty. But I guess that was just an example?
>
>
> let uri = graph.namedNode(tbs.assetCollectionURI(id));
>
>
>
> graph.transaction(uri, 'Initializing asset collection ' + id, () => {
> 
>  uri.add(('http://edg.topbraid.solutions/model/BusinessTerm', 
> ('LALA')));
>
>
> Why are there extra ( here? Should this be
>
> uri.add('http://edg.topbraid.solutions/model/BusinessTerm', 'LALA');
>
> ?
>
> Holger
>
>
>
>
> OR   
>  uri.add(('http://edg.topbraid.solutions/model/BusinessTerm', 
> rdfs.label('test')));
> });
> but they don't work. Could you give me a hint how to do that? 
>
> Thanks,
>
> Kasia
>
> -- 
> The topics of this mailing list include TopBraid EDG and related 
> technologies such as SHACL.
> To post to this group, send email to topbrai...@googlegroups.com
> --- 
> 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-user...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/7088b089-0527-42f3-af3c-67afcebf8a93n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/topbraid-users/7088b089-0527-42f3-af3c-67afcebf8a93n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/5f378e0f-5b0a-44d3-b3e6-8dd64db6d343n%40googlegroups.com.


[topbraid-users] ADS add a business term

2024-02-27 Thread Kasia Kryczka
Hi, 

I would like to use ads to add business terms and I have done :
let id = tbs.createAssetCollection({
 typeLabel: "",
name: "",
description: ""
});

let uri = graph.namedNode(tbs.assetCollectionURI(id));



graph.transaction(uri, 'Initializing asset collection ' + id, () => {

 uri.add(('http://edg.topbraid.solutions/model/BusinessTerm', 
('LALA')));

OR   
 uri.add(('http://edg.topbraid.solutions/model/BusinessTerm', 
rdfs.label('test')));
});
but they don't work. Could you give me a hint how to do that? 

Thanks,

Kasia

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/7088b089-0527-42f3-af3c-67afcebf8a93n%40googlegroups.com.


Re: [topbraid-users] ADS adding a givernance role as viewer

2024-02-06 Thread Kasia Kryczka
Hi Holger,

This is perfect.

Thank you!

Kasia

On Tuesday, February 6, 2024 at 12:33:23 PM UTC+1 Holger Knublauch wrote:

> I don't see a function that would construct a urn:x-tb-role:XY URI, but 
> you can just use
>
> graph.namedGraph('urn:x-tb-role:' + xy)
>
> and yes, the graph.add below looks fine with that value.
>
> tbs.addGovernanceRole is doing something else.
>
> Holger
>
>
> On 6 Feb 2024, at 12:02 pm, Kasia Kryczka  wrote:
>
> graph.transaction( uri + '.tch','Adding Permission', () => {
> graph.add(graph.namedNode(uri + '.tch'),'
> http://topbraid.org/teamwork#editor', tbs.userURI('test'));
> graph.add(graph.namedNode(uri + '.tch'),'
> http://topbraid.org/teamwork#viewer', ... 
> and here I want to add 
> urn:x-tb-role:TTT-BBB-CC etc. 
>
> });
>
> Could you please let me know how to add this ? 
>
> Is tbs.addGovernanceRole right method? or maybe there is sth else ?
>
> Thanks,
>
> Kasia
>
> -- 
> The topics of this mailing list include TopBraid EDG and related 
> technologies such as SHACL.
> To post to this group, send email to topbrai...@googlegroups.com
> --- 
> 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-user...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/90747260-6f61-4a12-8f30-8be3b698aaecn%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/topbraid-users/90747260-6f61-4a12-8f30-8be3b698aaecn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/b933c379-3ce2-4260-b938-090875a0df7an%40googlegroups.com.


[topbraid-users] ADS adding a givernance role as viewer

2024-02-06 Thread Kasia Kryczka
graph.transaction( uri + '.tch','Adding Permission', () => {
graph.add(graph.namedNode(uri + '.tch'),
'http://topbraid.org/teamwork#editor', tbs.userURI('test'));
graph.add(graph.namedNode(uri + '.tch'),
'http://topbraid.org/teamwork#viewer', ... 
and here I want to add 
urn:x-tb-role:TTT-BBB-CC etc. 

});

Could you please let me know how to add this ? 

Is tbs.addGovernanceRole right method? or maybe there is sth else ?

Thanks,

Kasia

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/90747260-6f61-4a12-8f30-8be3b698aaecn%40googlegroups.com.


Re: [topbraid-users] sparql query to get all objects

2024-01-30 Thread Kasia Kryczka
It worked, but I can see it in the source code :
  j.2:editor  ;
  j.2:viewer  ;

but not in the Users Panel but when I add uri.add(edg + 'dataSteward', 
tbs.userURI('Test User')); this one I can see in the users Panel. 
Why is that ?

Br,

Kasia

On Tuesday, January 30, 2024 at 2:44:29 PM UTC+1 Holger Knublauch wrote:

> On 30 Jan 2024, at 2:41 pm, Kasia Kryczka  wrote:
>
> Hi Holger,
>
> as for this ?subject and ?class 2 it was my mistake. The query is correct 
> with ?subject.
> I'll check the hours and create a ticket :)
>
> I have one more question. How to add  teamwork: editor and viewer. 
>
> let id = tbs.createAssetCollection({
>  typeLabel: "Glossary",
> name: "Test Glossary v4",
> description: "this is a test glossary"
> });
> let edg = 'http://edg.topbraid.solutions/model/';
> let uri = graph.namedNode(tbs.assetCollectionURI(id));
> graph.transaction(uri, 'Initializing asset collection ' + id, () => {
> uri.add(edg + 'subjectArea', graph.namedNode(
> 'urn:x-tb-governance:Test'));
> *uri.add(teamwork + 'editor', tbs.userURI('test'));*
> *uri.add(teamwork + 'viewer', tbs.userURI('test'));*
> });
>
>
> Safest to use the full URI of that property, e.g. 'http://topbraid
> .org/teamwork#editor'
>
> HTH
> Holger
>
>
>  
>
>
>
>
> Br,
>
> Kasia
>
> On Tuesday, January 30, 2024 at 2:18:11 PM UTC+1 Holger Knublauch wrote:
>
>> I don't see why it would ever write to some imported graph - the 
>> graph.transaction clearly targets just the given graphURI.
>> It does however also collect unused classes from imported graphs, because 
>> the select query walks across those.
>>
>> BTW note that with
>>
>> SELECT ?subject
>> WHERE {
>> {
>> ?class a owl:Class. 
>> BIND (?class as ?subject)
>> }
>> UNION
>> {
>> SELECT ?class2
>> WHERE {
>> {
>> ?instances a ?class.
>> BIND(?instances as ?subject)
>> }
>> }
>> }
>> FILTER (?subject != "")
>> FILTER isIRI(?subject).
>> FILTER((?subject != owl:Thing) && (?subject != owl:Nothing ))
>> }
>>
>> the second branch of the UNION never returns any bindings for ?subject, 
>> as the SELECT only returns ?class2.
>> Also the FILTER (?subject != "") is unnecessary.
>>
>> Overall I don't think that continuing such complex topics via email works 
>> well. I think you should check if professional services
>> hours can be used for this.
>>
>> Regards,
>> Holger
>>
>>
>> On 30 Jan 2024, at 1:04 pm, Kasia Kryczka  wrote:
>>
>> Sure,
>>
>> let graphURI = 'urn:x-evn-master:test';
>> graph.withDataGraph(graphURI, () => {
>> let usedURIs = graph.withDataGraph(graphURI + '.tch', () => {
>> return graph.select(`
>> SELECT DISTINCT ?uri
>> WHERE {
>> ?t ?o ?uri .
>> FILTER isIRI(?uri) .
>> }`).bindings.map(b => b.uri.uri);
>> });
>> console.log('Found ' + usedURIs.length);
>> // console.log(usedURIs);
>>
>>  let orphans = graph.withDataGraph(dataset.withImports(graphURI), () =>
>> graph.select(`SELECT ?subject
>>   WHERE {{?class a owl:Class.  
>> BIND(?class as ?subject)
>>   }
>> UNION
>> {SELECT ?class2
>>WHERE {{?instances a ?class.
>> BIND(?instances as ?subject)
>> }}}
>>   FILTER (?subject != "")
>>   FILTER isIRI(?subject).
>>   FILTER((?subject != owl:Thing) &&(?subject != owl:Nothing ))
>> }`))
>> .bindings
>> .map(b => b.subject)
>>   .filter(subject => !usedURIs.includes(subject.uri));
>> orphans.forEach((orphan) => {
>> console.log('Orphan is ' + orphan.uri);
>>  let triples = graph.withDataGraph(dataset.withImports(graphURI), 
>> () => graph.triples(orphan));
>> graph.transaction(graphURI + '.tch', 'Create dummy change 
>> for ' + orphan.uri, () => {
>> let uuid = graph.eval('STRUUID()');
>> let change = graph.namedNode('urn:x-change:' + uuid);
>> console.log('Change: ' + change.uri);
>>  console.log(change.uri);
>>  console.log(orphans)
>>   

Re: [topbraid-users] sparql query to get all objects

2024-01-30 Thread Kasia Kryczka
Hi Holger,

as for this ?subject and ?class 2 it was my mistake. The query is correct 
with ?subject.
I'll check the hours and create a ticket :)

I have one more question. How to add  teamwork: editor and viewer. 

let id = tbs.createAssetCollection({
 typeLabel: "Glossary",
name: "Test Glossary v4",
description: "this is a test glossary"
});
let edg = 'http://edg.topbraid.solutions/model/';
let uri = graph.namedNode(tbs.assetCollectionURI(id));
graph.transaction(uri, 'Initializing asset collection ' + id, () => {
uri.add(edg + 'subjectArea', graph.namedNode('urn:x-tb-governance:Test'
));
*uri.add(teamwork + 'editor', tbs.userURI('test'));*
*uri.add(teamwork + 'viewer', tbs.userURI('test'));*
});
 




Br,

Kasia

On Tuesday, January 30, 2024 at 2:18:11 PM UTC+1 Holger Knublauch wrote:

> I don't see why it would ever write to some imported graph - the 
> graph.transaction clearly targets just the given graphURI.
> It does however also collect unused classes from imported graphs, because 
> the select query walks across those.
>
> BTW note that with
>
> SELECT ?subject
> WHERE {
> {
> ?class a owl:Class. 
> BIND (?class as ?subject)
> }
> UNION
> {
> SELECT ?class2
> WHERE {
> {
> ?instances a ?class.
> BIND(?instances as ?subject)
> }
> }
> }
> FILTER (?subject != "")
> FILTER isIRI(?subject).
> FILTER((?subject != owl:Thing) && (?subject != owl:Nothing ))
> }
>
> the second branch of the UNION never returns any bindings for ?subject, as 
> the SELECT only returns ?class2.
> Also the FILTER (?subject != "") is unnecessary.
>
> Overall I don't think that continuing such complex topics via email works 
> well. I think you should check if professional services
> hours can be used for this.
>
> Regards,
> Holger
>
>
> On 30 Jan 2024, at 1:04 pm, Kasia Kryczka  wrote:
>
> Sure,
>
> let graphURI = 'urn:x-evn-master:test';
> graph.withDataGraph(graphURI, () => {
> let usedURIs = graph.withDataGraph(graphURI + '.tch', () => {
> return graph.select(`
> SELECT DISTINCT ?uri
> WHERE {
> ?t ?o ?uri .
> FILTER isIRI(?uri) .
> }`).bindings.map(b => b.uri.uri);
> });
> console.log('Found ' + usedURIs.length);
> // console.log(usedURIs);
>
>  let orphans = graph.withDataGraph(dataset.withImports(graphURI), () =>
> graph.select(`SELECT ?subject
>   WHERE {{?class a owl:Class.  
> BIND(?class as ?subject)
>   }
> UNION
> {SELECT ?class2
>WHERE {{?instances a ?class.
> BIND(?instances as ?subject)
> }}}
>   FILTER (?subject != "")
>   FILTER isIRI(?subject).
>   FILTER((?subject != owl:Thing) &&(?subject != owl:Nothing ))
> }`))
> .bindings
> .map(b => b.subject)
>   .filter(subject => !usedURIs.includes(subject.uri));
> orphans.forEach((orphan) => {
> console.log('Orphan is ' + orphan.uri);
>  let triples = graph.withDataGraph(dataset.withImports(graphURI), 
> () => graph.triples(orphan));
> graph.transaction(graphURI + '.tch', 'Create dummy change 
> for ' + orphan.uri, () => {
> let uuid = graph.eval('STRUUID()');
> let change = graph.namedNode('urn:x-change:' + uuid);
> console.log('Change: ' + change.uri);
>  console.log(change.uri);
>  console.log(orphans)
>   graph.update(`
> PREFIX dcterms: <http://purl.org/dc/terms/>
> PREFIX sioc: <http://rdfs.org/sioc/ns#>
> prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
> prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
> INSERT {
> <${change.uri}> rdf:type teamwork:Change ;
> rdfs:comment "Dummy change entry for 
> ${orphan.uri}";
> dcterms:created ?now ;
> sioc:has_creator  ;
> teamwork:status   teamwork:Committed .
> }
> WHERE {
> BIND (NOW() AS ?now) .
> }`, {
> $change : change
> });
> triples.forEach(triple => {
> triple.change = change;
> graph.update(`
>     INSERT {
&

Re: [topbraid-users] sparql query to get all objects

2024-01-30 Thread Kasia Kryczka
Sure,

let graphURI = 'urn:x-evn-master:test';
graph.withDataGraph(graphURI, () => {
let usedURIs = graph.withDataGraph(graphURI + '.tch', () => {
return graph.select(`
SELECT DISTINCT ?uri
WHERE {
?t ?o ?uri .
FILTER isIRI(?uri) .
}`).bindings.map(b => b.uri.uri);
});
console.log('Found ' + usedURIs.length);
// console.log(usedURIs);

 let orphans = graph.withDataGraph(dataset.withImports(graphURI), () =>
graph.select(`SELECT ?subject
  WHERE {{?class a owl:Class.  
BIND(?class as ?subject)
  }
UNION
{SELECT ?class2
   WHERE {{?instances a ?class.
BIND(?instances as ?subject)
}}}
  FILTER (?subject != "")
  FILTER isIRI(?subject).
  FILTER((?subject != owl:Thing) &&(?subject != owl:Nothing ))
}`))
.bindings
.map(b => b.subject)
  .filter(subject => !usedURIs.includes(subject.uri));
orphans.forEach((orphan) => {
console.log('Orphan is ' + orphan.uri);
 let triples = graph.withDataGraph(dataset.withImports(graphURI), 
() => graph.triples(orphan));
graph.transaction(graphURI + '.tch', 'Create dummy change 
for ' + orphan.uri, () => {
let uuid = graph.eval('STRUUID()');
let change = graph.namedNode('urn:x-change:' + uuid);
console.log('Change: ' + change.uri);
 console.log(change.uri);
 console.log(orphans)
  graph.update(`
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX sioc: <http://rdfs.org/sioc/ns#>
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
INSERT {
<${change.uri}> rdf:type teamwork:Change ;
rdfs:comment "Dummy change entry for ${orphan.uri}";
dcterms:created ?now ;
sioc:has_creator  ;
teamwork:status   teamwork:Committed .
}
WHERE {
BIND (NOW() AS ?now) .
}`, {
$change : change
});
triples.forEach(triple => {
triple.change = change;
graph.update(`
INSERT {
<${change.uri}> teamwork:added [
teamwork:object $object ;
teamwork:predicate  $predicate ;
teamwork:subject$subject ;
]
} WHERE {}`, triple);

});
 })
})
 return orphans; 
});


Br,

Kasia
On Tuesday, January 30, 2024 at 12:02:17 PM UTC+1 Holger Knublauch wrote:

> Could you paste the code that you have right now so that I can see the 
> full context?
>
> Thanks
> Holger
>
>
> On 30 Jan 2024, at 11:58 am, Kasia Kryczka  wrote:
>
> Hi Holger,
>
>
> Unfortunately, the solution does not give the expected results. 
>
> It appears that when we add the history of changes to all the includes, 
> the history is saved in the included ontology and not in the collection we 
> are in.
>   
> Could you please advise whether this script can be adapted so that the 
> history of includes is saved in the collection we are in, or whether this 
> is not possible?
>
> Br,
>
> Kasia
> On Wednesday, January 10, 2024 at 12:59:52 PM UTC+1 Kasia Kryczka wrote:
>
>> Hi Holger,
>>
>> This is great :)
>>
>> Thank you,
>>
>> Br,
>>
>> Kasia
>>
>> On Monday, January 8, 2024 at 2:08:02 PM UTC+1 Holger Knublauch wrote:
>>
>>> Ok in that case, use something like
>>>
>>> let triples = graph.withDataGraph(dataset.withImports(graphURI), () => 
>>> graph.triples(orphan));
>>>
>>> (You will likely want to filter out owl:Thing and all kinds of other 
>>> classes that will be listed.)
>>>
>>> Holger
>>>
>>>
>>> On 8 Jan 2024, at 2:03 pm, Kasia Kryczka  wrote:
>>>
>>> Hi Holger,
>>>
>>> I got a request to create a dummy change history comment for all 
>>> owl:Class both defined locally and those which are included from all 
>>> imports. 
>>> These   owl:Thing and owl:Nothing do not need to have a dummy comment 
>>> but I have much more included classes from imports.
>>>
>>> Br,
>>>
>>> Kasia
>>>
>>> On Monday, January 8, 2024 at 1:45:49 PM UTC+1 Holger Knublauch wrote:
>>>
>&

Re: [topbraid-users] sparql query to get all objects

2024-01-30 Thread Kasia Kryczka
Hi Holger,


Unfortunately, the solution does not give the expected results. 

It appears that when we add the history of changes to all the includes, the 
history is saved in the included ontology and not in the collection we are 
in.
  
Could you please advise whether this script can be adapted so that the 
history of includes is saved in the collection we are in, or whether this 
is not possible?

Br,

Kasia
On Wednesday, January 10, 2024 at 12:59:52 PM UTC+1 Kasia Kryczka wrote:

> Hi Holger,
>
> This is great :)
>
> Thank you,
>
> Br,
>
> Kasia
>
> On Monday, January 8, 2024 at 2:08:02 PM UTC+1 Holger Knublauch wrote:
>
>> Ok in that case, use something like
>>
>> let triples = graph.withDataGraph(dataset.withImports(graphURI), () => 
>> graph.triples(orphan));
>>
>> (You will likely want to filter out owl:Thing and all kinds of other 
>> classes that will be listed.)
>>
>> Holger
>>
>>
>> On 8 Jan 2024, at 2:03 pm, Kasia Kryczka  wrote:
>>
>> Hi Holger,
>>
>> I got a request to create a dummy change history comment for all 
>> owl:Class both defined locally and those which are included from all 
>> imports. 
>> These   owl:Thing and owl:Nothing do not need to have a dummy comment but 
>> I have much more included classes from imports.
>>
>> Br,
>>
>> Kasia
>>
>> On Monday, January 8, 2024 at 1:45:49 PM UTC+1 Holger Knublauch wrote:
>>
>>> Ok thanks, I better see what you're trying to do now. My previous "hint" 
>>> was not helpful.
>>>
>>> I ran the script in my test setup and think there is a mismatch between 
>>> the use of imported graphs:
>>>
>>> When you collect the orphans it will walk into the subgraphs, which in 
>>> my case found imported classes including owl:Thing and owl:Nothing. I don't 
>>> think you really want to have change history entries for those.
>>>
>>> let orphans = graph.withDataGraph(dataset.withImports(graphURI)
>>>>
>>>>
>>> But then when you ask for triples, you're only getting the locally 
>>> defined triples:
>>>
>>>   let triples = graph.triples(orphan, null, null);
>>>>
>>>>
>>> Shouldn't both do the same thing and use imported graphs consistently?
>>>
>>> Why did you want to use dataset.withImports in the first case?
>>>
>>> In my local tests I can see a dummy change history entry created just 
>>> fine, assuming the owl:Class is defined locally.
>>>
>>> Also, to double-check, you really want to only find newly defined 
>>> owl:Classes and not their instances?
>>>
>>> Holger
>>>
>>>
>>> On 8 Jan 2024, at 1:23 pm, Kasia Kryczka  wrote:
>>>
>>> Hi Holger, 
>>>
>>> Unfortunately, it doesn't work. 
>>> I get the comment but nothing gets added. The record is empty.  
>>> When i look at the console I see correct "orphans" and I changed so the 
>>>  usedURIs  should be a match when filtering but the result is the same. 
>>>
>>> let graphURI = 'urn:x-evn-master:test';
>>> graph.withDataGraph(graphURI, () => {
>>> let usedURIs = graph.withDataGraph(graphURI + '.tch', () => {
>>> return graph.select(`
>>> SELECT DISTINCT ?uri
>>> WHERE {
>>> ?t ?o ?uri .
>>> FILTER isIRI(?uri) .
>>> }`).bindings.map(b => b.uri.uri);
>>> });
>>> console.log('Found ' + usedURIs.length);
>>> // console.log(usedURIs);
>>>
>>> Am I missing sth ?
>>>
>>> Br,
>>>
>>> Kasia
>>>
>>> On Friday, January 5, 2024 at 3:56:26 PM UTC+1 Holger Knublauch wrote:
>>>
>>>>
>>>> On 5 Jan 2024, at 3:51 pm, Kasia Kryczka  wrote:
>>>>
>>>> Hi Holger, 
>>>>
>>>>
>>>> I used a different thing  as I need to add a change history to all 
>>>> these objects: I used the following :
>>>>
>>>>
>>>> let graphURI = 'urn:x-evn-master:test';
>>>> graph.withDataGraph(graphURI, () => {
>>>> let usedURIs = graph.withDataGraph(graphURI + '.tch', () => {
>>>> return graph.select(`
>>>> SELECT DISTINCT ?uri
>>>> WHERE {
>>>> ?

Re: [topbraid-users] Sparql to extract all characters before an uppercase character

2024-01-22 Thread Kasia Kryczka
Hi Matt,

it worked like a charm:)

Thank you :)

Br,

Kasia

On Monday, January 22, 2024 at 3:57:31 PM UTC+1 Matt Goldberg wrote:

> If it's that simple, then the REPLACE function with a regex pattern would 
> probably work, something like this-
>
> SELECT ?original (REPLACE(?original, "-[A-Z].+", "") AS ?extracted)
>  WHERE {
>VALUES ?original {
>  "a-bb-cc-dd-TEST"
>  "a-TEST"
>  "a-cc-dd-ONE"
>}
>  }
>
>
> On Mon, Jan 22, 2024, 9:17 AM Kasia Kryczka  wrote:
>
>> Hi there,
>>
>> this might be a trivial sparql question.
>>
>> I have name like : 
>> a-bb-cc-dd-TEST I would like to get a-bb-cc-dd
>> a-TEST result a
>> a-cc-dd-ONE result a-cc-dd
>> x-BLOB result d
>> etc.
>>
>> how to extract all that is before the uppercase letter ?
>>
>> Thanks,
>>
>> Kasia
>>
>> -- 
>> The topics of this mailing list include TopBraid EDG and related 
>> technologies such as SHACL.
>> To post to this group, send email to topbrai...@googlegroups.com
>> --- 
>> 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-user...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/topbraid-users/a81aca03-1159-4aa6-917b-5aff6934c16bn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/topbraid-users/a81aca03-1159-4aa6-917b-5aff6934c16bn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/c7259828-26b8-421d-b927-ad5c5491e0f6n%40googlegroups.com.


[topbraid-users] Sparql to extract all characters before an uppercase character

2024-01-22 Thread Kasia Kryczka
Hi there,

this might be a trivial sparql question.

I have name like : 
a-bb-cc-dd-TEST I would like to get a-bb-cc-dd
a-TEST result a
a-cc-dd-ONE result a-cc-dd
x-BLOB result d
etc.

how to extract all that is before the uppercase letter ?

Thanks,

Kasia

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/a81aca03-1159-4aa6-917b-5aff6934c16bn%40googlegroups.com.


Re: [topbraid-users] sparql query to get all objects

2024-01-10 Thread Kasia Kryczka
Hi Holger,

This is great :)

Thank you,

Br,

Kasia

On Monday, January 8, 2024 at 2:08:02 PM UTC+1 Holger Knublauch wrote:

> Ok in that case, use something like
>
> let triples = graph.withDataGraph(dataset.withImports(graphURI), () => 
> graph.triples(orphan));
>
> (You will likely want to filter out owl:Thing and all kinds of other 
> classes that will be listed.)
>
> Holger
>
>
> On 8 Jan 2024, at 2:03 pm, Kasia Kryczka  wrote:
>
> Hi Holger,
>
> I got a request to create a dummy change history comment for all owl:Class 
> both defined locally and those which are included from all imports. 
> These   owl:Thing and owl:Nothing do not need to have a dummy comment but 
> I have much more included classes from imports.
>
> Br,
>
> Kasia
>
> On Monday, January 8, 2024 at 1:45:49 PM UTC+1 Holger Knublauch wrote:
>
>> Ok thanks, I better see what you're trying to do now. My previous "hint" 
>> was not helpful.
>>
>> I ran the script in my test setup and think there is a mismatch between 
>> the use of imported graphs:
>>
>> When you collect the orphans it will walk into the subgraphs, which in my 
>> case found imported classes including owl:Thing and owl:Nothing. I don't 
>> think you really want to have change history entries for those.
>>
>> let orphans = graph.withDataGraph(dataset.withImports(graphURI)
>>>
>>>
>> But then when you ask for triples, you're only getting the locally 
>> defined triples:
>>
>>   let triples = graph.triples(orphan, null, null);
>>>
>>>
>> Shouldn't both do the same thing and use imported graphs consistently?
>>
>> Why did you want to use dataset.withImports in the first case?
>>
>> In my local tests I can see a dummy change history entry created just 
>> fine, assuming the owl:Class is defined locally.
>>
>> Also, to double-check, you really want to only find newly defined 
>> owl:Classes and not their instances?
>>
>> Holger
>>
>>
>> On 8 Jan 2024, at 1:23 pm, Kasia Kryczka  wrote:
>>
>> Hi Holger, 
>>
>> Unfortunately, it doesn't work. 
>> I get the comment but nothing gets added. The record is empty.  
>> When i look at the console I see correct "orphans" and I changed so the  
>> usedURIs  should be a match when filtering but the result is the same. 
>>
>> let graphURI = 'urn:x-evn-master:test';
>> graph.withDataGraph(graphURI, () => {
>> let usedURIs = graph.withDataGraph(graphURI + '.tch', () => {
>> return graph.select(`
>> SELECT DISTINCT ?uri
>> WHERE {
>> ?t ?o ?uri .
>> FILTER isIRI(?uri) .
>> }`).bindings.map(b => b.uri.uri);
>> });
>> console.log('Found ' + usedURIs.length);
>> // console.log(usedURIs);
>>
>> Am I missing sth ?
>>
>> Br,
>>
>> Kasia
>>
>> On Friday, January 5, 2024 at 3:56:26 PM UTC+1 Holger Knublauch wrote:
>>
>>>
>>> On 5 Jan 2024, at 3:51 pm, Kasia Kryczka  wrote:
>>>
>>> Hi Holger, 
>>>
>>>
>>> I used a different thing  as I need to add a change history to all these 
>>> objects: I used the following :
>>>
>>>
>>> let graphURI = 'urn:x-evn-master:test';
>>> graph.withDataGraph(graphURI, () => {
>>> let usedURIs = graph.withDataGraph(graphURI + '.tch', () => {
>>> return graph.select(`
>>> SELECT DISTINCT ?uri
>>> WHERE {
>>> ?t teamwork:subject|teamwork:predicate|teamwork:object 
>>> ?uri .
>>> FILTER isIRI(?uri) .
>>> }`).bindings.map(b => b.uri.uri);
>>> });
>>>
>>> console.log('Found ' + usedURIs.length);
>>> let orphans = graph.withDataGraph(dataset.withImports(graphURI), () 
>>> => 
>>> graph.select(`SELECT ?subject  WHERE { ?subject a owl:Class. 
>>>  FILTER isIRI(?subject) }`))
>>> .bindings
>>> .map(b => b.subject)
>>>   .filter(subject => !usedURIs.includes(subject.uri));
>>> 
>>> orphans.forEach((orphan) => {
>>> console.log('Orphan is ' + orphan.uri);
>>> let triples = graph.triples(orphan, null, null);
>>> graph.transaction(graphURI + '.tch', 'Create d

Re: [topbraid-users] sparql query to get all objects

2024-01-08 Thread Kasia Kryczka
Hi Holger,

I got a request to create a dummy change history comment for all owl:Class 
both defined locally and those which are included from all imports. 
These   owl:Thing and owl:Nothing do not need to have a dummy comment but I 
have much more included classes from imports.

Br,

Kasia

On Monday, January 8, 2024 at 1:45:49 PM UTC+1 Holger Knublauch wrote:

> Ok thanks, I better see what you're trying to do now. My previous "hint" 
> was not helpful.
>
> I ran the script in my test setup and think there is a mismatch between 
> the use of imported graphs:
>
> When you collect the orphans it will walk into the subgraphs, which in my 
> case found imported classes including owl:Thing and owl:Nothing. I don't 
> think you really want to have change history entries for those.
>
> let orphans = graph.withDataGraph(dataset.withImports(graphURI)
>>
>>
> But then when you ask for triples, you're only getting the locally defined 
> triples:
>
>   let triples = graph.triples(orphan, null, null);
>>
>>
> Shouldn't both do the same thing and use imported graphs consistently?
>
> Why did you want to use dataset.withImports in the first case?
>
> In my local tests I can see a dummy change history entry created just 
> fine, assuming the owl:Class is defined locally.
>
> Also, to double-check, you really want to only find newly defined 
> owl:Classes and not their instances?
>
> Holger
>
>
> On 8 Jan 2024, at 1:23 pm, Kasia Kryczka  wrote:
>
> Hi Holger, 
>
> Unfortunately, it doesn't work. 
> I get the comment but nothing gets added. The record is empty.  
> When i look at the console I see correct "orphans" and I changed so the  
> usedURIs  should be a match when filtering but the result is the same. 
>
> let graphURI = 'urn:x-evn-master:test';
> graph.withDataGraph(graphURI, () => {
> let usedURIs = graph.withDataGraph(graphURI + '.tch', () => {
> return graph.select(`
> SELECT DISTINCT ?uri
> WHERE {
> ?t ?o ?uri .
> FILTER isIRI(?uri) .
> }`).bindings.map(b => b.uri.uri);
> });
> console.log('Found ' + usedURIs.length);
> // console.log(usedURIs);
>
> Am I missing sth ?
>
> Br,
>
> Kasia
>
> On Friday, January 5, 2024 at 3:56:26 PM UTC+1 Holger Knublauch wrote:
>
>>
>> On 5 Jan 2024, at 3:51 pm, Kasia Kryczka  wrote:
>>
>> Hi Holger, 
>>
>>
>> I used a different thing  as I need to add a change history to all these 
>> objects: I used the following :
>>
>>
>> let graphURI = 'urn:x-evn-master:test';
>> graph.withDataGraph(graphURI, () => {
>> let usedURIs = graph.withDataGraph(graphURI + '.tch', () => {
>> return graph.select(`
>> SELECT DISTINCT ?uri
>> WHERE {
>> ?t teamwork:subject|teamwork:predicate|teamwork:object 
>> ?uri .
>> FILTER isIRI(?uri) .
>> }`).bindings.map(b => b.uri.uri);
>> });
>>
>> console.log('Found ' + usedURIs.length);
>> let orphans = graph.withDataGraph(dataset.withImports(graphURI), () 
>> => 
>> graph.select(`SELECT ?subject  WHERE { ?subject a owl:Class. 
>>  FILTER isIRI(?subject) }`))
>> .bindings
>> .map(b => b.subject)
>>   .filter(subject => !usedURIs.includes(subject.uri));
>> 
>> orphans.forEach((orphan) => {
>> console.log('Orphan is ' + orphan.uri);
>> let triples = graph.triples(orphan, null, null);
>> graph.transaction(graphURI + '.tch', 'Create dummy change for ' 
>> + orphan.uri, () => {
>> let uuid = graph.eval('STRUUID()');
>> let change = graph.namedNode('urn:x-change:' + uuid);
>> console.log('Change: ' + change.uri);
>> graph.update(`
>> PREFIX dcterms: <http://purl.org/dc/terms/>
>> PREFIX sioc: <http://rdfs.org/sioc/ns#>
>> INSERT {
>> $change rdf:type teamwork:Change ;
>> rdfs:comment "Dummy change entry for 
>> ${orphan.uri}";
>> dcterms:created ?now ;
>> sioc:has_creator  ;
>> teamwork:status   teamwork:Committed .
>> }
>> WHERE {
>>

Re: [topbraid-users] sparql query to get all objects

2024-01-08 Thread Kasia Kryczka
Hi Holger, 

Unfortunately, it doesn't work. 
I get the comment but nothing gets added. The record is empty.  
When i look at the console I see correct "orphans" and I changed so the  
usedURIs  should be a match when filtering but the result is the same. 

let graphURI = 'urn:x-evn-master:test';
graph.withDataGraph(graphURI, () => {
let usedURIs = graph.withDataGraph(graphURI + '.tch', () => {
return graph.select(`
SELECT DISTINCT ?uri
WHERE {
?t ?o ?uri .
FILTER isIRI(?uri) .
}`).bindings.map(b => b.uri.uri);
});
console.log('Found ' + usedURIs.length);
// console.log(usedURIs);

Am I missing sth ?

Br,

Kasia

On Friday, January 5, 2024 at 3:56:26 PM UTC+1 Holger Knublauch wrote:

>
> On 5 Jan 2024, at 3:51 pm, Kasia Kryczka  wrote:
>
> Hi Holger, 
>
>
> I used a different thing  as I need to add a change history to all these 
> objects: I used the following :
>
>
> let graphURI = 'urn:x-evn-master:test';
> graph.withDataGraph(graphURI, () => {
> let usedURIs = graph.withDataGraph(graphURI + '.tch', () => {
> return graph.select(`
> SELECT DISTINCT ?uri
> WHERE {
> ?t teamwork:subject|teamwork:predicate|teamwork:object 
> ?uri .
> FILTER isIRI(?uri) .
> }`).bindings.map(b => b.uri.uri);
> });
>
> console.log('Found ' + usedURIs.length);
> let orphans = graph.withDataGraph(dataset.withImports(graphURI), () 
> => 
> graph.select(`SELECT ?subject  WHERE { ?subject a owl:Class. 
>  FILTER isIRI(?subject) }`))
> .bindings
> .map(b => b.subject)
>   .filter(subject => !usedURIs.includes(subject.uri));
> 
> orphans.forEach((orphan) => {
> console.log('Orphan is ' + orphan.uri);
> let triples = graph.triples(orphan, null, null);
> graph.transaction(graphURI + '.tch', 'Create dummy change for ' + 
> orphan.uri, () => {
> let uuid = graph.eval('STRUUID()');
> let change = graph.namedNode('urn:x-change:' + uuid);
> console.log('Change: ' + change.uri);
> graph.update(`
> PREFIX dcterms: <http://purl.org/dc/terms/>
> PREFIX sioc: <http://rdfs.org/sioc/ns#>
> INSERT {
> $change rdf:type teamwork:Change ;
> rdfs:comment "Dummy change entry for ${orphan.uri}
> ";
> dcterms:created ?now ;
> sioc:has_creator  ;
> teamwork:status   teamwork:Committed .
> }
> WHERE {
> BIND (NOW() AS ?now) .
> }`, {
> change: change
> });
> triples.forEach(triple => {
> triple.change = change;
> graph.update(`
> INSERT {
> $change teamwork:added [
> teamwork:object $object ;
> teamwork:predicate  $predicate ;
> teamwork:subject$subject ;
> ]
> } WHERE {}`, triple);
>
>
> Here, $change would be unbound. So you either need to insert that into the 
> query string or pre-bind it:
>
> graph.update(`
> INSERT {
> <${change.uri}> teamwork:added [
>
> teamwork:object $object ;
> teamwork:predicate  $predicate ;
> teamwork:subject$subject ;
> ]
> } WHERE {}`, triple);
>
>
> HTH
> Holger
>
>
> });
> });
> });
> 
>return orphans; // Return the list of orphans after processing
> });
>
>
>
> it shows result in the change history but nothing gets added, the change 
> is empty. 
>
> Could you have a look and let me know what should be changed ?
>
>
> Thank you, 
>
> Kasia
> On Friday, January 5, 2024 at 10:53:11 AM UTC+1 Holger Knublauch wrote:
>
>> To get instances of a class and its subclasses, use this trick from 
>> further below,
>>
>> SELECT ?instance
>>>> WHERE {
>>>> ?instance rdf:type/rdfs:subClassOf* ex:SomeClass .
>>>> }
>>>>
>>>
>> This can also be r

Re: [topbraid-users] sparql query to get all objects

2024-01-05 Thread Kasia Kryczka
Hi Holger, 


I used a different thing  as I need to add a change history to all these 
objects: I used the following :


let graphURI = 'urn:x-evn-master:test';
graph.withDataGraph(graphURI, () => {
let usedURIs = graph.withDataGraph(graphURI + '.tch', () => {
return graph.select(`
SELECT DISTINCT ?uri
WHERE {
?t teamwork:subject|teamwork:predicate|teamwork:object ?uri 
.
FILTER isIRI(?uri) .
}`).bindings.map(b => b.uri.uri);
});

console.log('Found ' + usedURIs.length);
let orphans = graph.withDataGraph(dataset.withImports(graphURI), () => 
graph.select(`SELECT ?subject  WHERE { ?subject a owl:Class. 
 FILTER isIRI(?subject) }`))
.bindings
.map(b => b.subject)
  .filter(subject => !usedURIs.includes(subject.uri));

orphans.forEach((orphan) => {
console.log('Orphan is ' + orphan.uri);
let triples = graph.triples(orphan, null, null);
graph.transaction(graphURI + '.tch', 'Create dummy change for ' + 
orphan.uri, () => {
let uuid = graph.eval('STRUUID()');
let change = graph.namedNode('urn:x-change:' + uuid);
console.log('Change: ' + change.uri);
graph.update(`
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX sioc: <http://rdfs.org/sioc/ns#>
INSERT {
$change rdf:type teamwork:Change ;
rdfs:comment "Dummy change entry for ${orphan.uri}";
dcterms:created ?now ;
sioc:has_creator  ;
teamwork:status   teamwork:Committed .
}
WHERE {
BIND (NOW() AS ?now) .
}`, {
change: change
});
triples.forEach(triple => {
triple.change = change;
graph.update(`
INSERT {
$change teamwork:added [
teamwork:object $object ;
teamwork:predicate  $predicate ;
teamwork:subject$subject ;
]
} WHERE {}`, triple);
});
});
});

   return orphans; // Return the list of orphans after processing
});



it shows result in the change history but nothing gets added, the change is 
empty. 

Could you have a look and let me know what should be changed ?


Thank you, 

Kasia
On Friday, January 5, 2024 at 10:53:11 AM UTC+1 Holger Knublauch wrote:

> To get instances of a class and its subclasses, use this trick from 
> further below,
>
> SELECT ?instance
>>> WHERE {
>>> ?instance rdf:type/rdfs:subClassOf* ex:SomeClass .
>>> }
>>>
>>
> This can also be rewritten as
>
> SELECT ?instance
> WHERE {
> ?type rdfs:subClassOf* ex:SomeClass .
> ?instance a ?type .
> }
>
> Holger
>
>
> On 5 Jan 2024, at 9:32 am, Kasia Kryczka  wrote:
>
> Hi Holger, 
>
> ok, but this still doesn't give me everything I need. I get like a part of 
> all the results from imports.  Unfortynately I cannot post pictures. 
> My ontology has   owl:imports <http://datashapes.org/graphql> ;
>   owl:imports <http://topbraid.org/teamworkconstraints> ;
>   owl:imports  ;
>   owl:imports  ;
>   owl:imports  ;
>   owl:imports  ;
>   owl:imports  ;
>  
> in the class hierarchy I can see more objects sth like that :
>
> Data Object 
>  - Abstract Object 
>   - Level 2 Object 
>   -Level 3 Object 
>   -Level 2 Object 
> - Conceptual Object 
>- Level 2 Object 
>   -Level 3 Object 
>   -Level 2 Object etc.
>
>
> and all of them are from imports there are only 3 which are locally 
> defined. 
> I would like to get all with a sparql query if that's possible. 
> Hope this clarifies a bit. 
>
> Br,
>
> Kasia
> On Friday, January 5, 2024 at 9:05:47 AM UTC+1 Holger Knublauch wrote:
>
>> In ADS you can write
>>
>> let instances = graph.withDataGraph(dataset.withImports(
>> 'urn:x-evn-master:geo'), () => 
>> graph.select(`
>> SELECT ?instance
>> WHERE {
>> ?instance a skos:Concept .
>> }
>> `))
>> instances.bindings
>>
>> Holger
>>
>> On 5 Jan 2024, at 8:46 am, Kasia Kryczka  wrote:
>>
>> Hi Holger, 
>>
>> thank you for quick reply. 
>> The thing is I don't want to use the include imports checkbox. I want to 
>> have a query which I can later use in ADS.
>>

Re: [topbraid-users] sparql query to get all objects

2024-01-05 Thread Kasia Kryczka
Hi Holger, 

ok, but this still doesn't give me everything I need. I get like a part of 
all the results from imports.  Unfortynately I cannot post pictures. 
My ontology has   owl:imports <http://datashapes.org/graphql> ;
  owl:imports <http://topbraid.org/teamworkconstraints> ;
  owl:imports  ;
  owl:imports  ;
  owl:imports  ;
  owl:imports  ;
  owl:imports  ;
 
in the class hierarchy I can see more objects sth like that :

Data Object 
 - Abstract Object 
  - Level 2 Object 
  -Level 3 Object 
  -Level 2 Object 
- Conceptual Object 
   - Level 2 Object 
  -Level 3 Object 
  -Level 2 Object etc.
   

and all of them are from imports there are only 3 which are locally 
defined. 
I would like to get all with a sparql query if that's possible. 
Hope this clarifies a bit. 

Br,

Kasia
On Friday, January 5, 2024 at 9:05:47 AM UTC+1 Holger Knublauch wrote:

> In ADS you can write
>
> let instances = graph.withDataGraph(dataset.withImports(
> 'urn:x-evn-master:geo'), () => 
> graph.select(`
> SELECT ?instance
> WHERE {
> ?instance a skos:Concept .
> }
> `))
> instances.bindings
>
> Holger
>
> On 5 Jan 2024, at 8:46 am, Kasia Kryczka  wrote:
>
> Hi Holger, 
>
> thank you for quick reply. 
> The thing is I don't want to use the include imports checkbox. I want to 
> have a query which I can later use in ADS.
> Br,
>
> Kasia
>
>
> On Thursday, January 4, 2024 at 4:02:09 PM UTC+1 Holger Knublauch wrote:
>
>> Are you using the SPARQL endpoint? Then activate the Include Imports 
>> checkbox.
>>
>> From the SPARQL query panel, it would be something like
>>
>> SELECT ?instance
>> WHERE {
>> ?instance rdf:type/rdfs:subClassOf* ex:SomeClass .
>> }
>>
>> which would also get the instances of the subclasses of the given class.
>>
>> Holger
>>
>>
>>
>> On 4 Jan 2024, at 3:52 pm, Kasia Kryczka  wrote:
>>
>> Hi,
>>
>> This might be a simple question but I got stuck. 
>>
>> I want to get all object from an ontology which are of a owl:Class but 
>> which are also defined in all the includes of that particular ontology. 
>>
>> Any help would be great.
>>
>> Thanks,
>>
>> Kasia
>>
>>
>>
>> -- 
>> The topics of this mailing list include TopBraid EDG and related 
>> technologies such as SHACL.
>> To post to this group, send email to topbrai...@googlegroups.com
>> --- 
>> 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-user...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/topbraid-users/9315cc2f-a166-47b0-ab9d-7b320f2f527dn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/topbraid-users/9315cc2f-a166-47b0-ab9d-7b320f2f527dn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>>
>>
> -- 
> The topics of this mailing list include TopBraid EDG and related 
> technologies such as SHACL.
> To post to this group, send email to topbrai...@googlegroups.com
> --- 
> 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-user...@googlegroups.com.
>
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/cb28593f-90cc-4fac-8f65-6c9a85ad7a5fn%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/topbraid-users/cb28593f-90cc-4fac-8f65-6c9a85ad7a5fn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/4048808a-006c-4133-8db3-377fbcf39e5en%40googlegroups.com.


Re: [topbraid-users] sparql query to get all objects

2024-01-04 Thread Kasia Kryczka
Hi Holger, 

thank you for quick reply. 
The thing is I don't want to use the include imports checkbox. I want to 
have a query which I can later use in ADS.
Br,

Kasia


On Thursday, January 4, 2024 at 4:02:09 PM UTC+1 Holger Knublauch wrote:

> Are you using the SPARQL endpoint? Then activate the Include Imports 
> checkbox.
>
> From the SPARQL query panel, it would be something like
>
> SELECT ?instance
> WHERE {
> ?instance rdf:type/rdfs:subClassOf* ex:SomeClass .
> }
>
> which would also get the instances of the subclasses of the given class.
>
> Holger
>
>
>
> On 4 Jan 2024, at 3:52 pm, Kasia Kryczka  wrote:
>
> Hi,
>
> This might be a simple question but I got stuck. 
>
> I want to get all object from an ontology which are of a owl:Class but 
> which are also defined in all the includes of that particular ontology. 
>
> Any help would be great.
>
> Thanks,
>
> Kasia
>
>
>
> -- 
> The topics of this mailing list include TopBraid EDG and related 
> technologies such as SHACL.
> To post to this group, send email to topbrai...@googlegroups.com
> --- 
> 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-user...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/9315cc2f-a166-47b0-ab9d-7b320f2f527dn%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/topbraid-users/9315cc2f-a166-47b0-ab9d-7b320f2f527dn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/cb28593f-90cc-4fac-8f65-6c9a85ad7a5fn%40googlegroups.com.


[topbraid-users] sparql query to get all objects

2024-01-04 Thread Kasia Kryczka
Hi,

This might be a simple question but I got stuck. 

I want to get all object from an ontology which are of a owl:Class but 
which are also defined in all the includes of that particular ontology. 

Any help would be great.

Thanks,

Kasia


-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/9315cc2f-a166-47b0-ab9d-7b320f2f527dn%40googlegroups.com.


Re: [topbraid-users] ADS filtering object (Datatype:datetime)

2023-10-17 Thread Kasia Kryczka
Hi Holger,

I used graph.transaction, without that it worked just fine :)

Thanks,

Kasia
On Monday, October 16, 2023 at 4:34:27 PM UTC+2 Holger Knublauch wrote:

> If you're getting an error executing tbs.changes, you're probably calling 
> from within a graph.withDataGraph block? It should work fine if you're 
> calling it in the context of any asset collection as active graph.
>
> Holger
>
>
> On 16 Oct 2023, at 3:22 pm, Kasia Kryczka  wrote:
>
> Hi Holger,
>
> many thanks for quick reply :)
>
> I want for the the change history which will be later used for all 
> collections.
>
> with the first solution I got the following error : and I just 
> Error: Cannot execute SELECT query SELECT ?change ?comment ?time ?userId 
> ?addedCount ?deletedCount WHERE { ($about $maxTime $minTime $predicate 
> $requiredUserId $committedOnly $unlimited $originWorkflowId $returnCounts) <
> http://topbraid.org/tbs#changes> (?change ?comment ?time ?userId 
> ?addedCount ?deletedCount) }: java.lang.IllegalStateException: No TCH graph 
> can be derived from the context
>
> Br,
>
> Kasia
> On Monday, October 16, 2023 at 2:55:43 PM UTC+2 Holger Knublauch wrote:
>
>> let months = 2;
>> let maxTime = graph.eval(`NOW() - "P${months}M"^^xsd:duration`);
>> let changes = tbs.changes(null, maxTime);
>> changes;
>>
>> The above works for the change history only. If you need a general 
>> solution, you can use a corresponding SPARQL expression such as
>>
>> graph.eval('$value < $date', {
>> value: ... the object ...,
>> date: maxTime,
>> })
>>
>> HTH
>> Holger
>>
>>
>> On 16 Oct 2023, at 2:20 pm, Kasia Kryczka  wrote:
>>
>> HI,
>>
>> How can I filter the object to get for example a date older than 2 months 
>> from now ?
>> The triple looks as follows:
>>
>> object  :05.07.2023 07:24
>>
>> predicate : http://purl.org/dc/terms/created
>>
>> subject urn:x-change:2023-07-05T07-24-46.612example
>>
>> Thanks,
>>
>> Kasia
>>
>> -- 
>> The topics of this mailing list include TopBraid EDG and related 
>> technologies such as SHACL.
>> To post to this group, send email to topbrai...@googlegroups.com
>> --- 
>> 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-user...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/topbraid-users/0e126aa8-174b-4d5e-ac78-8b8fae7aacbdn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/topbraid-users/0e126aa8-174b-4d5e-ac78-8b8fae7aacbdn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>>
>>
> -- 
> The topics of this mailing list include TopBraid EDG and related 
> technologies such as SHACL.
> To post to this group, send email to topbrai...@googlegroups.com
> --- 
> 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-user...@googlegroups.com.
>
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/d8b7b95e-5b62-481f-a0b9-4a2f5cddfd66n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/topbraid-users/d8b7b95e-5b62-481f-a0b9-4a2f5cddfd66n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/b0721e16-33de-443d-8d10-7be83eb691e9n%40googlegroups.com.


Re: [topbraid-users] ADS filtering object (Datatype:datetime)

2023-10-16 Thread Kasia Kryczka
Hi Holger,

many thanks for quick reply :)

I want for the the change history which will be later used for all 
collections.

with the first solution I got the following error : and I just 
Error: Cannot execute SELECT query SELECT ?change ?comment ?time ?userId 
?addedCount ?deletedCount WHERE { ($about $maxTime $minTime $predicate 
$requiredUserId $committedOnly $unlimited $originWorkflowId $returnCounts) 
<http://topbraid.org/tbs#changes> (?change ?comment ?time ?userId 
?addedCount ?deletedCount) }: java.lang.IllegalStateException: No TCH graph 
can be derived from the context

Br,

Kasia
On Monday, October 16, 2023 at 2:55:43 PM UTC+2 Holger Knublauch wrote:

> let months = 2;
> let maxTime = graph.eval(`NOW() - "P${months}M"^^xsd:duration`);
> let changes = tbs.changes(null, maxTime);
> changes;
>
> The above works for the change history only. If you need a general 
> solution, you can use a corresponding SPARQL expression such as
>
> graph.eval('$value < $date', {
> value: ... the object ...,
> date: maxTime,
> })
>
> HTH
> Holger
>
>
> On 16 Oct 2023, at 2:20 pm, Kasia Kryczka  wrote:
>
> HI,
>
> How can I filter the object to get for example a date older than 2 months 
> from now ?
> The triple looks as follows:
>
> object  :05.07.2023 07:24
>
> predicate : http://purl.org/dc/terms/created
>
> subject urn:x-change:2023-07-05T07-24-46.612example
>
> Thanks,
>
> Kasia
>
> -- 
> The topics of this mailing list include TopBraid EDG and related 
> technologies such as SHACL.
> To post to this group, send email to topbrai...@googlegroups.com
> --- 
> 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-user...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/0e126aa8-174b-4d5e-ac78-8b8fae7aacbdn%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/topbraid-users/0e126aa8-174b-4d5e-ac78-8b8fae7aacbdn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/d8b7b95e-5b62-481f-a0b9-4a2f5cddfd66n%40googlegroups.com.


[topbraid-users] ADS filtering object (Datatype:datetime)

2023-10-16 Thread Kasia Kryczka
HI,

How can I filter the object to get for example a date older than 2 months 
from now ?
The triple looks as follows:

object  :05.07.2023 07:24

predicate : http://purl.org/dc/terms/created

subject urn:x-change:2023-07-05T07-24-46.612example

Thanks,

Kasia

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/0e126aa8-174b-4d5e-ac78-8b8fae7aacbdn%40googlegroups.com.


Re: [topbraid-users] how to

2023-09-21 Thread Kasia Kryczka
oh ok :)

Thank you!

On Thursday, September 21, 2023 at 1:49:04 PM UTC+2 Holger Knublauch wrote:

> On 21 Sep 2023, at 1:42 pm, Kasia Kryczka  wrote:
>
> Hi again,
>
> I tried to use the above example with my query:
>
> graph.select(`
> SELECT ?masterGraph
> WHERE {
> GRAPH ?masterGraph {
> ?masterGraph rdf:type teamwork:Vocabulary .}
> FILTER NOT EXISTS {
> GRAPH ?masterGraph {
>   ?s edg:subjectArea ?o .
> }
>   }
>   FILTER (STRSTARTS(STR(?masterGraph),"urn:x-evn-master:") 
> &&(!STRENDS(STR(?masterGraph),"singleton")) )}`
>   ).bindings.forEach(b => {
> let masterGraph = b.masterGraph;
>
>  console.log (b.masterGraph);
>
> graph.transaction(b.masterGraph, 'Adding comment', () => {
>
>  masterGraph.add(rdfs.comment, 'hello hello')
>
> });
>
> })
>
>
>
> You need to switch the active graph, using graph.transaction as above.
>
> HTH
> Holger
>
>
>
>
> but it only add comment to the graph from which I run the script. In the 
> change history panel in the same graph there's information that the comment 
> was added but when I go to those other graphs the comment is not visible. 
> 
>   rdfs:comment "hello hello" ;
> .
> 
>   rdfs:comment "hello hello" ;
> .
> 
>   rdfs:comment "hello hello" ;
> .
> 
>   rdfs:comment "hello hello" ;
>
>
> Can you tell me what I'm doing wrong :)
>
>
> Thanks,
>
> Kasia
>
> On Friday, September 1, 2023 at 9:27:23 AM UTC+2 Kasia Kryczka wrote:
>
>> Holger,
>>
>> thank you :)
>>
>> Br,
>>
>> Kasia
>>
>> On Thursday, August 31, 2023 at 1:35:25 PM UTC+2 Holger Knublauch wrote:
>>
>>> owl.everyClass().forEach(cls => {
>>> cls.add(rdfs.comment, 'Hello World')
>>> })
>>>
>>> or with any SPARQL:
>>>
>>> graph.select(`
>>> SELECT ?cls
>>> WHERE {
>>> ?cls rdf:type/rdfs:subClassOf* owl:Class .
>>> }`).bindings.forEach(b => {
>>> let cls = b.cls;
>>> cls.add(rdfs.comment, 'Hello World')
>>> })
>>>
>>> HTH
>>> Holger
>>>
>>>
>>> On 31 Aug 2023, at 12:19 pm, Kasia Kryczka  wrote:
>>>
>>> HI Holger,
>>>
>>> and could you show an example how to find all owl:Class with js or how 
>>> to use sparql query to insert the comment?
>>> I have the query to get all owl:Class but I don't know how to use it 
>>> with js.
>>>
>>> Thanks,
>>>
>>> Kasia
>>>
>>> On Thursday, August 24, 2023 at 10:57:52 AM UTC+2 Holger Knublauch wrote:
>>>
>>>>
>>>> On 24 Aug 2023, at 9:43 am, Kasia Kryczka  wrote:
>>>>
>>>> Hi Holger,
>>>>
>>>> we have this script :
>>>> dataset.masterGraphs().forEach(masterGraph=> {
>>>> console.log('Adding to ' + masterGraph);
>>>> graph.transaction(masterGraph + ':' +tbs.currentUserId(), 'Adding 
>>>> something', () => {
>>>> let subject =graph.namedNode(masterGraph); 
>>>> subject.add(rdfs.comment,"Added");
>>>> });
>>>> });
>>>>
>>>> just add something to the history. This adds the change only to the 
>>>> ontology level, is it possible to add the change to their classes as well 
>>>> ( 
>>>> to all lower levels) ?
>>>>
>>>>
>>>> The script above only uses masterGraph as subject. If you want to add 
>>>> triples to specific classes, you need to know the URIs of these classes, 
>>>> e.g.
>>>>
>>>> let subject = graph.namedNode('http://example.org/myOntology#MyClass";);
>>>> subject.add(rdfs.comment, "Added comment to the class");
>>>>
>>>> If you don't know the exact URI of the classes you want to modify you 
>>>> could first find all instances of owl:Class or use a SPARQL query to find 
>>>> them, then iterate over those.
>>>>
>>>> Holger
>>>>
>>>>
>>>>
>>>> Hope this helps.
>>>>
>>>> Br, 
>>>>
>>>> Kasia
>>>>
>>>> On Wednesday, August 23, 2023 at 5:40:53 PM UTC+2 Holger Knublauch 
>>>> wrote:
>>>>
>>>>> Sorry I don't understand 

Re: [topbraid-users] how to

2023-09-21 Thread Kasia Kryczka
Hi again,

I tried to use the above example with my query:

graph.select(`
SELECT ?masterGraph
WHERE {
GRAPH ?masterGraph {
?masterGraph rdf:type teamwork:Vocabulary .}
FILTER NOT EXISTS {
GRAPH ?masterGraph {
  ?s edg:subjectArea ?o .
}
  }
  FILTER (STRSTARTS(STR(?masterGraph),"urn:x-evn-master:") 
&&(!STRENDS(STR(?masterGraph),"singleton")) )}`
  ).bindings.forEach(b => {
let masterGraph = b.masterGraph;
 console.log (b.masterGraph)
 masterGraph.add(rdfs.comment, 'hello hello')
})


but it only add comment to the graph from which I run the script. In the 
change history panel in the same graph there's information that the comment 
was added but when I go to those other graphs the comment is not visible. 

  rdfs:comment "hello hello" ;
.

  rdfs:comment "hello hello" ;
.

  rdfs:comment "hello hello" ;
.

  rdfs:comment "hello hello" ;


Can you tell me what I'm doing wrong :)


Thanks,

Kasia

On Friday, September 1, 2023 at 9:27:23 AM UTC+2 Kasia Kryczka wrote:

> Holger,
>
> thank you :)
>
> Br,
>
> Kasia
>
> On Thursday, August 31, 2023 at 1:35:25 PM UTC+2 Holger Knublauch wrote:
>
>> owl.everyClass().forEach(cls => {
>> cls.add(rdfs.comment, 'Hello World')
>> })
>>
>> or with any SPARQL:
>>
>> graph.select(`
>> SELECT ?cls
>> WHERE {
>> ?cls rdf:type/rdfs:subClassOf* owl:Class .
>> }`).bindings.forEach(b => {
>> let cls = b.cls;
>> cls.add(rdfs.comment, 'Hello World')
>> })
>>
>> HTH
>> Holger
>>
>>
>> On 31 Aug 2023, at 12:19 pm, Kasia Kryczka  wrote:
>>
>> HI Holger,
>>
>> and could you show an example how to find all owl:Class with js or how to 
>> use sparql query to insert the comment?
>> I have the query to get all owl:Class but I don't know how to use it with 
>> js.
>>
>> Thanks,
>>
>> Kasia
>>
>> On Thursday, August 24, 2023 at 10:57:52 AM UTC+2 Holger Knublauch wrote:
>>
>>>
>>> On 24 Aug 2023, at 9:43 am, Kasia Kryczka  wrote:
>>>
>>> Hi Holger,
>>>
>>> we have this script :
>>> dataset.masterGraphs().forEach(masterGraph=> {
>>> console.log('Adding to ' + masterGraph);
>>> graph.transaction(masterGraph + ':' +tbs.currentUserId(), 'Adding 
>>> something', () => {
>>> let subject =graph.namedNode(masterGraph); 
>>> subject.add(rdfs.comment,"Added");
>>> });
>>> });
>>>
>>> just add something to the history. This adds the change only to the 
>>> ontology level, is it possible to add the change to their classes as well ( 
>>> to all lower levels) ?
>>>
>>>
>>> The script above only uses masterGraph as subject. If you want to add 
>>> triples to specific classes, you need to know the URIs of these classes, 
>>> e.g.
>>>
>>> let subject = graph.namedNode('http://example.org/myOntology#MyClass";);
>>> subject.add(rdfs.comment, "Added comment to the class");
>>>
>>> If you don't know the exact URI of the classes you want to modify you 
>>> could first find all instances of owl:Class or use a SPARQL query to find 
>>> them, then iterate over those.
>>>
>>> Holger
>>>
>>>
>>>
>>> Hope this helps.
>>>
>>> Br, 
>>>
>>> Kasia
>>>
>>> On Wednesday, August 23, 2023 at 5:40:53 PM UTC+2 Holger Knublauch wrote:
>>>
>>>> Sorry I don't understand the question. What do you have and what needs 
>>>> to be changed?
>>>>
>>>> Holger
>>>>
>>>>
>>>> On 23 Aug 2023, at 1:54 pm, Kasia Kryczka  wrote:
>>>>
>>>> Hi Holger,
>>>>
>>>> it seems that we need more of this script. How to make changes to 
>>>> mastergraph and on their classes as well. 
>>>>
>>>> How can we modify the script?
>>>>
>>>> Thanks,
>>>>
>>>> Kasia
>>>>
>>>> On Wednesday, July 19, 2023 at 2:59:11 PM UTC+2 Kasia Kryczka wrote:
>>>>
>>>>> Hi Holger,
>>>>>
>>>>> thank you for quick reply.
>>>>>
>>>>> I'll try do do that.
>>>>>
>>>>> Br,
>>>>>
>>>>> Kasia
>>>>>
>>>>> On Wednesday, July 19,

Re: [topbraid-users] javascript and prefixes

2023-09-20 Thread Kasia Kryczka
Holger,

Thank you :) I'll keep in mind the memory overhead.

Br,

Kasia

On Tuesday, September 19, 2023 at 10:33:18 AM UTC+2 Holger Knublauch wrote:

> There is a technique that allows you to declare any prefix for any API.
>
> Put the attached file into the workspace. It is a file ending with 
> .api.ttl. The definitions from these files are added to the ADS APIs for 
> all context graphs.
>
> Note you need to press Refresh on the files page in EDG Studio or restart 
> the server or have an admin do a workspace refresh after adding an .api.ttl 
> file.
>
> In this particular file here, I am owl:importing the base EDG namespace 
> that declares various classes and properties. The file is also declaring 
> dash:generatePrefixConstants "edg", which is important.
>
> You could use that file as a starting point and add owl:imports and 
> dash:generatePrefixConstants to other namespaces of your choice.
>
> (I have not tested what happens if you owl:import an asset collection, 
> e.g. Ontology here, and I would assume it is safer to only owl:import other 
> files)
>
> Keep in mind that this will increase the size of all generated APIs, so if 
> you have thousands of asset collections with different combinations of 
> ontologies, they may cause some memory overhead, and a small overhead in 
> API generation.
>
> Holger
>
>

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/a4d7c267-f94e-46d5-b4e6-aaed4b59b1a3n%40googlegroups.com.


Re: [topbraid-users] javascript and prefixes

2023-09-19 Thread Kasia Kryczka
Hi Holger,

It does explain a bit :) 

In my understanding in script API viewer I can see all defined prefixes. 
If I would like to add more prefixes should I define them in script editor 
and will they be visible in all collections?
The weird thing for me is that I thought if we define prefixes in the 
namespace and prefixes (in settings) they should be visible.
Or should be define the prefixes via files?

My aim is to clean data after users :) for example add comments, subject 
area or anything that is missing or assigned in a bad way etc. in a bulk so 
I would like to have the same prefixes for all collections.

Hope this helps.

Br,

Kasia


 

On Monday, September 18, 2023 at 4:32:13 PM UTC+2 Holger Knublauch wrote:

> Hi Kasia,
>
> the available constants for namespace prefixes depend on the context 
> graph. For example when a script is running from within an EDG Data Assets 
> collection it will already know about the edg prefix as a JS object, but 
> when it's executing within a Taxonomy it will know the skos prefix but not 
> the edg prefix. All this is controlled by the "generate prefix constants" 
> as mentioned in
>
> Introduction to ADS — edg-documentation 7.7.0 documentation 
> <https://archive.topquadrant.com/doc/latest/scripting/introduction.html#auto-generated-api>
> archive.topquadrant.com 
> <https://archive.topquadrant.com/doc/latest/scripting/introduction.html#auto-generated-api>
> [image: favicon.ico] 
> <https://archive.topquadrant.com/doc/latest/scripting/introduction.html#auto-generated-api>
>  
> <https://archive.topquadrant.com/doc/latest/scripting/introduction.html#auto-generated-api>
>
> This property is used in most of our EDG-related ontology files to declare 
> "edg" but if your context graph doesn't import any of them, the constants 
> will not be there, and even if you were to add a 
> dash:generatePrefixConstants, it wouldn't know about the available classes 
> and properties.
>
> Does this clarify things? If not, please let me know what context 
> (ontologies) your scripts need to run in.
>
> Holger
>
>
> On 18 Sep 2023, at 3:23 pm, Kasia Kryczka  wrote:
>
> Hi, 
> I have a probably simple question but when I use this:
> graph.select(`
> SELECT ?cls
> WHERE {
> ?cls rdf:type/rdfs:subClassOf* owl:Class .
> }`).bindings.forEach(b => {
> let cls = b.cls;
> cls.add(rdfs.comment, 'Hello World')
> })
> everything works fine but when I want to add edg.subjectArea it says that 
> the prefix is not defined but rdfs is somehow already defined. Where can I 
> define all prefixes which I can use i.e., is there a place where all the 
> prefixes are defined or we need to define then before using ?
>
> Thanks,
>
> Kasia
>
> -- 
> The topics of this mailing list include TopBraid EDG and related 
> technologies such as SHACL.
> To post to this group, send email to topbrai...@googlegroups.com
> --- 
> 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-user...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/a4c8eed5-9f9b-4fbd-8917-866330f5fc92n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/topbraid-users/a4c8eed5-9f9b-4fbd-8917-866330f5fc92n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/bf8a55f1-a3f3-44ce-9b40-edf11a494415n%40googlegroups.com.


[topbraid-users] javascript and prefixes

2023-09-18 Thread Kasia Kryczka
Hi, 
I have a probably simple question but when I use this:
graph.select(`
SELECT ?cls
WHERE {
?cls rdf:type/rdfs:subClassOf* owl:Class .
}`).bindings.forEach(b => {
let cls = b.cls;
cls.add(rdfs.comment, 'Hello World')
})
everything works fine but when I want to add edg.subjectArea it says that 
the prefix is not defined but rdfs is somehow already defined. Where can I 
define all prefixes which I can use i.e., is there a place where all the 
prefixes are defined or we need to define then before using ?

Thanks,

Kasia

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/a4c8eed5-9f9b-4fbd-8917-866330f5fc92n%40googlegroups.com.


Re: [topbraid-users] how to

2023-09-01 Thread Kasia Kryczka
Holger,

thank you :)

Br,

Kasia

On Thursday, August 31, 2023 at 1:35:25 PM UTC+2 Holger Knublauch wrote:

> owl.everyClass().forEach(cls => {
> cls.add(rdfs.comment, 'Hello World')
> })
>
> or with any SPARQL:
>
> graph.select(`
> SELECT ?cls
> WHERE {
> ?cls rdf:type/rdfs:subClassOf* owl:Class .
> }`).bindings.forEach(b => {
> let cls = b.cls;
> cls.add(rdfs.comment, 'Hello World')
> })
>
> HTH
> Holger
>
>
> On 31 Aug 2023, at 12:19 pm, Kasia Kryczka  wrote:
>
> HI Holger,
>
> and could you show an example how to find all owl:Class with js or how to 
> use sparql query to insert the comment?
> I have the query to get all owl:Class but I don't know how to use it with 
> js.
>
> Thanks,
>
> Kasia
>
> On Thursday, August 24, 2023 at 10:57:52 AM UTC+2 Holger Knublauch wrote:
>
>>
>> On 24 Aug 2023, at 9:43 am, Kasia Kryczka  wrote:
>>
>> Hi Holger,
>>
>> we have this script :
>> dataset.masterGraphs().forEach(masterGraph=> {
>> console.log('Adding to ' + masterGraph);
>> graph.transaction(masterGraph + ':' +tbs.currentUserId(), 'Adding 
>> something', () => {
>> let subject =graph.namedNode(masterGraph); 
>> subject.add(rdfs.comment,"Added");
>> });
>> });
>>
>> just add something to the history. This adds the change only to the 
>> ontology level, is it possible to add the change to their classes as well ( 
>> to all lower levels) ?
>>
>>
>> The script above only uses masterGraph as subject. If you want to add 
>> triples to specific classes, you need to know the URIs of these classes, 
>> e.g.
>>
>> let subject = graph.namedNode('http://example.org/myOntology#MyClass";);
>> subject.add(rdfs.comment, "Added comment to the class");
>>
>> If you don't know the exact URI of the classes you want to modify you 
>> could first find all instances of owl:Class or use a SPARQL query to find 
>> them, then iterate over those.
>>
>> Holger
>>
>>
>>
>> Hope this helps.
>>
>> Br, 
>>
>> Kasia
>>
>> On Wednesday, August 23, 2023 at 5:40:53 PM UTC+2 Holger Knublauch wrote:
>>
>>> Sorry I don't understand the question. What do you have and what needs 
>>> to be changed?
>>>
>>> Holger
>>>
>>>
>>> On 23 Aug 2023, at 1:54 pm, Kasia Kryczka  wrote:
>>>
>>> Hi Holger,
>>>
>>> it seems that we need more of this script. How to make changes to 
>>> mastergraph and on their classes as well. 
>>>
>>> How can we modify the script?
>>>
>>> Thanks,
>>>
>>> Kasia
>>>
>>> On Wednesday, July 19, 2023 at 2:59:11 PM UTC+2 Kasia Kryczka wrote:
>>>
>>>> Hi Holger,
>>>>
>>>> thank you for quick reply.
>>>>
>>>> I'll try do do that.
>>>>
>>>> Br,
>>>>
>>>> Kasia
>>>>
>>>> On Wednesday, July 19, 2023 at 2:22:33 PM UTC+2 Holger Knublauch wrote:
>>>>
>>>>> On 19 Jul 2023, at 1:06 pm, Kasia Kryczka  wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> When I added this comment (with the script above )and deleted it later 
>>>>> (in Script editor) it seems that this change is not saved in the change 
>>>>> history. 
>>>>>
>>>>> Where can I find that this change happened?
>>>>>
>>>>>
>>>>> The script below writes to the master graphs directly, bypassing the 
>>>>> change history.
>>>>>
>>>>> To have the changes recorded, you need to use a slightly different 
>>>>> graph, which includes the user name.
>>>>>
>>>>> One way to do that is to do something like 
>>>>>
>>>>> graph.transaction(masterGraph + ':Administrator, ...
>>>>>
>>>>> or
>>>>>
>>>>> graph.transaction(masterGraph + ':' + tbs.currentUserId(), ...
>>>>>
>>>>> This will use something like urn:x-evn-master:geo:Administrator and 
>>>>> changes to that will create change history items too.
>>>>>
>>>>> HTH
>>>>> Holger
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Thanks,
>>>

Re: [topbraid-users] how to

2023-08-31 Thread Kasia Kryczka
HI Holger,

and could you show an example how to find all owl:Class with js or how to 
use sparql query to insert the comment?
I have the query to get all owl:Class but I don't know how to use it with 
js.

Thanks,

Kasia

On Thursday, August 24, 2023 at 10:57:52 AM UTC+2 Holger Knublauch wrote:

>
> On 24 Aug 2023, at 9:43 am, Kasia Kryczka  wrote:
>
> Hi Holger,
>
> we have this script :
> dataset.masterGraphs().forEach(masterGraph=> {
> console.log('Adding to ' + masterGraph);
> graph.transaction(masterGraph + ':' +tbs.currentUserId(), 'Adding 
> something', () => {
> let subject =graph.namedNode(masterGraph); 
> subject.add(rdfs.comment,"Added");
> });
> });
>
> just add something to the history. This adds the change only to the 
> ontology level, is it possible to add the change to their classes as well ( 
> to all lower levels) ?
>
>
> The script above only uses masterGraph as subject. If you want to add 
> triples to specific classes, you need to know the URIs of these classes, 
> e.g.
>
> let subject = graph.namedNode('http://example.org/myOntology#MyClass";);
> subject.add(rdfs.comment, "Added comment to the class");
>
> If you don't know the exact URI of the classes you want to modify you 
> could first find all instances of owl:Class or use a SPARQL query to find 
> them, then iterate over those.
>
> Holger
>
>
>
> Hope this helps.
>
> Br, 
>
> Kasia
>
> On Wednesday, August 23, 2023 at 5:40:53 PM UTC+2 Holger Knublauch wrote:
>
>> Sorry I don't understand the question. What do you have and what needs to 
>> be changed?
>>
>> Holger
>>
>>
>> On 23 Aug 2023, at 1:54 pm, Kasia Kryczka  wrote:
>>
>> Hi Holger,
>>
>> it seems that we need more of this script. How to make changes to 
>> mastergraph and on their classes as well. 
>>
>> How can we modify the script?
>>
>> Thanks,
>>
>> Kasia
>>
>> On Wednesday, July 19, 2023 at 2:59:11 PM UTC+2 Kasia Kryczka wrote:
>>
>>> Hi Holger,
>>>
>>> thank you for quick reply.
>>>
>>> I'll try do do that.
>>>
>>> Br,
>>>
>>> Kasia
>>>
>>> On Wednesday, July 19, 2023 at 2:22:33 PM UTC+2 Holger Knublauch wrote:
>>>
>>>> On 19 Jul 2023, at 1:06 pm, Kasia Kryczka  wrote:
>>>>
>>>> Hi,
>>>>
>>>> When I added this comment (with the script above )and deleted it later 
>>>> (in Script editor) it seems that this change is not saved in the change 
>>>> history. 
>>>>
>>>> Where can I find that this change happened?
>>>>
>>>>
>>>> The script below writes to the master graphs directly, bypassing the 
>>>> change history.
>>>>
>>>> To have the changes recorded, you need to use a slightly different 
>>>> graph, which includes the user name.
>>>>
>>>> One way to do that is to do something like 
>>>>
>>>> graph.transaction(masterGraph + ':Administrator, ...
>>>>
>>>> or
>>>>
>>>> graph.transaction(masterGraph + ':' + tbs.currentUserId(), ...
>>>>
>>>> This will use something like urn:x-evn-master:geo:Administrator and 
>>>> changes to that will create change history items too.
>>>>
>>>> HTH
>>>> Holger
>>>>
>>>>
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> Kasia
>>>>
>>>> On Thursday, March 30, 2023 at 11:37:14 AM UTC+2 Holger Knublauch wrote:
>>>>
>>>>> From the Script Editor panel, you could run something like
>>>>>
>>>>> dataset.masterGraphs().forEach(masterGraph => {
>>>>> console.log('Adding to ' + masterGraph);
>>>>> graph.transaction(masterGraph, 'Adding something', () => {
>>>>> let subject = graph.namedNode(masterGraph);
>>>>> subject.add(rdfs.comment, "Added");
>>>>> })
>>>>> })
>>>>>
>>>>> Watch out though, the green code above is dangerous and will really 
>>>>> add triples to every asset collection. (That's also why I didn't run it 
>>>>> on 
>>>>> my machine, so I hope it works).
>>>>>
>>>>> Holger
>>>>>
>>>&g

Re: [topbraid-users] how to

2023-08-24 Thread Kasia Kryczka
Hi Holger,

we have this script :

dataset.masterGraphs().forEach(masterGraph=> {

console.log('Adding to ' + masterGraph);

graph.transaction(masterGraph + ':' +tbs.currentUserId(), 'Adding 
something', () => {

let subject =graph.namedNode(masterGraph); subject.add(rdfs.comment,
"Added");

});

});

just add something to the history. This adds the change only to the 
ontology level, is it possible to add the change to their classes as well ( 
to all lower levels) ?

Hope this helps.

Br, 

Kasia

On Wednesday, August 23, 2023 at 5:40:53 PM UTC+2 Holger Knublauch wrote:

> Sorry I don't understand the question. What do you have and what needs to 
> be changed?
>
> Holger
>
>
> On 23 Aug 2023, at 1:54 pm, Kasia Kryczka  wrote:
>
> Hi Holger,
>
> it seems that we need more of this script. How to make changes to 
> mastergraph and on their classes as well. 
>
> How can we modify the script?
>
> Thanks,
>
> Kasia
>
> On Wednesday, July 19, 2023 at 2:59:11 PM UTC+2 Kasia Kryczka wrote:
>
>> Hi Holger,
>>
>> thank you for quick reply.
>>
>> I'll try do do that.
>>
>> Br,
>>
>> Kasia
>>
>> On Wednesday, July 19, 2023 at 2:22:33 PM UTC+2 Holger Knublauch wrote:
>>
>>> On 19 Jul 2023, at 1:06 pm, Kasia Kryczka  wrote:
>>>
>>> Hi,
>>>
>>> When I added this comment (with the script above )and deleted it later 
>>> (in Script editor) it seems that this change is not saved in the change 
>>> history. 
>>>
>>> Where can I find that this change happened?
>>>
>>>
>>> The script below writes to the master graphs directly, bypassing the 
>>> change history.
>>>
>>> To have the changes recorded, you need to use a slightly different 
>>> graph, which includes the user name.
>>>
>>> One way to do that is to do something like 
>>>
>>> graph.transaction(masterGraph + ':Administrator, ...
>>>
>>> or
>>>
>>> graph.transaction(masterGraph + ':' + tbs.currentUserId(), ...
>>>
>>> This will use something like urn:x-evn-master:geo:Administrator and 
>>> changes to that will create change history items too.
>>>
>>> HTH
>>> Holger
>>>
>>>
>>>
>>>
>>> Thanks,
>>>
>>> Kasia
>>>
>>> On Thursday, March 30, 2023 at 11:37:14 AM UTC+2 Holger Knublauch wrote:
>>>
>>>> From the Script Editor panel, you could run something like
>>>>
>>>> dataset.masterGraphs().forEach(masterGraph => {
>>>> console.log('Adding to ' + masterGraph);
>>>> graph.transaction(masterGraph, 'Adding something', () => {
>>>> let subject = graph.namedNode(masterGraph);
>>>> subject.add(rdfs.comment, "Added");
>>>> })
>>>> })
>>>>
>>>> Watch out though, the green code above is dangerous and will really add 
>>>> triples to every asset collection. (That's also why I didn't run it on my 
>>>> machine, so I hope it works).
>>>>
>>>> Holger
>>>>
>>>>
>>>> On 30 Mar 2023, at 10:30 am, Kasia Kryczka  wrote:
>>>>
>>>> Hi, 
>>>>
>>>> I have about 170 collections with missing value- the collections are 
>>>> listed from the query.
>>>> I need to insert a value .
>>>> Is it possible to create a loop that goes through all listed 
>>>> collections and inserts the missing value?
>>>>
>>>> Thanks,
>>>>
>>>> Kasia
>>>>
>>>> -- 
>>>> The topics of this mailing list include TopBraid EDG and related 
>>>> technologies such as SHACL.
>>>> To post to this group, send email to topbrai...@googlegroups.com
>>>> --- 
>>>> 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-user...@googlegroups.com.
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/topbraid-users/b388bfe2-422f-42a6-9a41-11ddf6e5744an%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/topbraid-users/b388bfe2-422f-42a6-9a41-11ddf6e5744an%40googlegroups.com?utm_medium=email&

Re: [topbraid-users] how to

2023-08-23 Thread Kasia Kryczka
Hi Holger,

it seems that we need more of this script. How to make changes to 
mastergraph and on their classes as well. 

How can we modify the script?

Thanks,

Kasia

On Wednesday, July 19, 2023 at 2:59:11 PM UTC+2 Kasia Kryczka wrote:

> Hi Holger,
>
> thank you for quick reply.
>
> I'll try do do that.
>
> Br,
>
> Kasia
>
> On Wednesday, July 19, 2023 at 2:22:33 PM UTC+2 Holger Knublauch wrote:
>
>> On 19 Jul 2023, at 1:06 pm, Kasia Kryczka  wrote:
>>
>> Hi,
>>
>> When I added this comment (with the script above )and deleted it later 
>> (in Script editor) it seems that this change is not saved in the change 
>> history. 
>>
>> Where can I find that this change happened?
>>
>>
>> The script below writes to the master graphs directly, bypassing the 
>> change history.
>>
>> To have the changes recorded, you need to use a slightly different graph, 
>> which includes the user name.
>>
>> One way to do that is to do something like 
>>
>> graph.transaction(masterGraph + ':Administrator, ...
>>
>> or
>>
>> graph.transaction(masterGraph + ':' + tbs.currentUserId(), ...
>>
>> This will use something like urn:x-evn-master:geo:Administrator and 
>> changes to that will create change history items too.
>>
>> HTH
>> Holger
>>
>>
>>
>>
>> Thanks,
>>
>> Kasia
>>
>> On Thursday, March 30, 2023 at 11:37:14 AM UTC+2 Holger Knublauch wrote:
>>
>>> From the Script Editor panel, you could run something like
>>>
>>> dataset.masterGraphs().forEach(masterGraph => {
>>> console.log('Adding to ' + masterGraph);
>>> graph.transaction(masterGraph, 'Adding something', () => {
>>> let subject = graph.namedNode(masterGraph);
>>> subject.add(rdfs.comment, "Added");
>>> })
>>> })
>>>
>>> Watch out though, the green code above is dangerous and will really add 
>>> triples to every asset collection. (That's also why I didn't run it on my 
>>> machine, so I hope it works).
>>>
>>> Holger
>>>
>>>
>>> On 30 Mar 2023, at 10:30 am, Kasia Kryczka  wrote:
>>>
>>> Hi, 
>>>
>>> I have about 170 collections with missing value- the collections are 
>>> listed from the query.
>>> I need to insert a value .
>>> Is it possible to create a loop that goes through all listed collections 
>>> and inserts the missing value?
>>>
>>> Thanks,
>>>
>>> Kasia
>>>
>>> -- 
>>> The topics of this mailing list include TopBraid EDG and related 
>>> technologies such as SHACL.
>>> To post to this group, send email to topbrai...@googlegroups.com
>>> --- 
>>> 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-user...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/topbraid-users/b388bfe2-422f-42a6-9a41-11ddf6e5744an%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/topbraid-users/b388bfe2-422f-42a6-9a41-11ddf6e5744an%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>>
>>>
>> -- 
>> The topics of this mailing list include TopBraid EDG and related 
>> technologies such as SHACL.
>> To post to this group, send email to topbrai...@googlegroups.com
>> --- 
>> 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-user...@googlegroups.com.
>>
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/topbraid-users/a112e88e-4e62-41dd-af29-1762c51f98c1n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/topbraid-users/a112e88e-4e62-41dd-af29-1762c51f98c1n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>>
>>

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/db1b8b97-4332-46f1-8950-4f2d4a9f78fen%40googlegroups.com.


[topbraid-users] Prefixes disappeared

2023-08-03 Thread Kasia Kryczka
Hi,

We just discovered that prefixes from most of our collections are missing. 
The namespace and prefixes box is empty. 
Is there a way where we can add prefixes to all collections? (this happened 
in EDG 7.3 )

Thanks,

Kasia

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/7bfdb118-5355-4336-babd-a645a4aac12fn%40googlegroups.com.


Re: [topbraid-users] how to

2023-07-19 Thread Kasia Kryczka
Hi Holger,

thank you for quick reply.

I'll try do do that.

Br,

Kasia

On Wednesday, July 19, 2023 at 2:22:33 PM UTC+2 Holger Knublauch wrote:

> On 19 Jul 2023, at 1:06 pm, Kasia Kryczka  wrote:
>
> Hi,
>
> When I added this comment (with the script above )and deleted it later (in 
> Script editor) it seems that this change is not saved in the change 
> history. 
>
> Where can I find that this change happened?
>
>
> The script below writes to the master graphs directly, bypassing the 
> change history.
>
> To have the changes recorded, you need to use a slightly different graph, 
> which includes the user name.
>
> One way to do that is to do something like 
>
> graph.transaction(masterGraph + ':Administrator, ...
>
> or
>
> graph.transaction(masterGraph + ':' + tbs.currentUserId(), ...
>
> This will use something like urn:x-evn-master:geo:Administrator and 
> changes to that will create change history items too.
>
> HTH
> Holger
>
>
>
>
> Thanks,
>
> Kasia
>
> On Thursday, March 30, 2023 at 11:37:14 AM UTC+2 Holger Knublauch wrote:
>
>> From the Script Editor panel, you could run something like
>>
>> dataset.masterGraphs().forEach(masterGraph => {
>> console.log('Adding to ' + masterGraph);
>> graph.transaction(masterGraph, 'Adding something', () => {
>> let subject = graph.namedNode(masterGraph);
>> subject.add(rdfs.comment, "Added");
>> })
>> })
>>
>> Watch out though, the green code above is dangerous and will really add 
>> triples to every asset collection. (That's also why I didn't run it on my 
>> machine, so I hope it works).
>>
>> Holger
>>
>>
>> On 30 Mar 2023, at 10:30 am, Kasia Kryczka  wrote:
>>
>> Hi, 
>>
>> I have about 170 collections with missing value- the collections are 
>> listed from the query.
>> I need to insert a value .
>> Is it possible to create a loop that goes through all listed collections 
>> and inserts the missing value?
>>
>> Thanks,
>>
>> Kasia
>>
>> -- 
>> The topics of this mailing list include TopBraid EDG and related 
>> technologies such as SHACL.
>> To post to this group, send email to topbrai...@googlegroups.com
>> --- 
>> 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-user...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/topbraid-users/b388bfe2-422f-42a6-9a41-11ddf6e5744an%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/topbraid-users/b388bfe2-422f-42a6-9a41-11ddf6e5744an%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>>
>>
> -- 
> The topics of this mailing list include TopBraid EDG and related 
> technologies such as SHACL.
> To post to this group, send email to topbrai...@googlegroups.com
> --- 
> 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-user...@googlegroups.com.
>
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/a112e88e-4e62-41dd-af29-1762c51f98c1n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/topbraid-users/a112e88e-4e62-41dd-af29-1762c51f98c1n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/fc082243-68ca-476b-b98d-8668843e1ec2n%40googlegroups.com.


Re: [topbraid-users] how to

2023-07-19 Thread Kasia Kryczka
Hi,

When I added this comment (with the script above )and deleted it later (in 
Script editor) it seems that this change is not saved in the change 
history. 

Where can I find that this change happened?

Thanks,

Kasia

On Thursday, March 30, 2023 at 11:37:14 AM UTC+2 Holger Knublauch wrote:

> From the Script Editor panel, you could run something like
>
> dataset.masterGraphs().forEach(masterGraph => {
> console.log('Adding to ' + masterGraph);
> graph.transaction(masterGraph, 'Adding something', () => {
> let subject = graph.namedNode(masterGraph);
> subject.add(rdfs.comment, "Added");
> })
> })
>
> Watch out though, the green code above is dangerous and will really add 
> triples to every asset collection. (That's also why I didn't run it on my 
> machine, so I hope it works).
>
> Holger
>
>
> On 30 Mar 2023, at 10:30 am, Kasia Kryczka  wrote:
>
> Hi, 
>
> I have about 170 collections with missing value- the collections are 
> listed from the query.
> I need to insert a value .
> Is it possible to create a loop that goes through all listed collections 
> and inserts the missing value?
>
> Thanks,
>
> Kasia
>
> -- 
> The topics of this mailing list include TopBraid EDG and related 
> technologies such as SHACL.
> To post to this group, send email to topbrai...@googlegroups.com
> --- 
> 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-user...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/b388bfe2-422f-42a6-9a41-11ddf6e5744an%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/topbraid-users/b388bfe2-422f-42a6-9a41-11ddf6e5744an%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/a112e88e-4e62-41dd-af29-1762c51f98c1n%40googlegroups.com.


Re: [topbraid-users] EDG INSERT/CONSTRUCT with parameter provided by user

2023-07-07 Thread Kasia Kryczka
Hi,

well of course it worked :) 

Thank you !



On Friday, July 7, 2023 at 10:09:33 AM UTC+2 Richard Cyganiak wrote:

> Hi Kasia,
>
> I’m not 100% sure, but I think the two variables need to be different in 
> clauses like
>
> BIND(URI($provideUri) as ?provideUri )
>
> Both are called “provideUri” here, and I think that is why the clause has 
> no effect.
>
> Richard
>
>
>
> On 7 Jul 2023, at 09:04, Kasia Kryczka  wrote:
>
> Hi all,
>
> I want to create a query where the user will provide the uri in the insert 
> part.
> So the user uses a query from sparql library and provides URI in the 
> parameter.
>
> CONSTRUCT{
> ?provideUri ?p ?result
>   }
> Select *
> WHERE {
>   SELECT ?cS (GROUP_CONCAT(?pTY; SEPARATOR=', ') AS ?result) ?provideUri{
>   BIND(URI($provideUri) as ?provideUri )
>   BIND($PPTFilter as ?PPTFilter)
>   BIND($cFilter as ?cFilter )
>   BIND(teamwork:currentMasterGraph() as ?cGraph)
>  
> GRAPH ?cGraph 
>   {?cGraph owl:imports ?import}
>  
>   GRAPH ?import{
> ?d a skos:cS.
> ?d skos:hasTopConcept ?cS.
> ?PPT skos:broader ?cS.
> ?PPT ontology:PPT ?pTY .
>   }
>
>  FILTER(CONTAINS(STR(?PPT), ?PPTFilter) ||
>   (CONTAINS(STR(?cS), ?cFilter))  )
> 
>   .
> 
>   }GROUP BY ?cS ?provideUri }
>
>   BIND($PPTFilter as ?PPTFilter)
>   BIND($cFilter as ?cFilter ) these 2 are used as string and they work 
> fine 
>
> but I have a problem with the ?provideUri 
>
>  I don't know what type to use should it be string?
> when I BIND manually  it works but when I try to do it by the 
> parameter inserted is shows nothing.
>
> Is it possible to have a solution when the user insert the URI?
>
>
>
> Parameters:
> provideUri:
> Optional
> booleandatedateTimedecimalintegerstringlangStringasset of type...
>
>
>
> Parameters for SPARQL library query "test2"×
>
> Please fill in the values for the query parameters.
> provideUri2
>
>
> Br,
>
> Kasia
>
>
> -- 
> The topics of this mailing list include TopBraid EDG and related 
> technologies such as SHACL.
> To post to this group, send email to topbrai...@googlegroups.com
> --- 
> 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-user...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/d6b7b790-7df7-4c07-b5d0-f0a1ed22f4adn%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/topbraid-users/d6b7b790-7df7-4c07-b5d0-f0a1ed22f4adn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/aa79f208-7cf6-410d-a3c8-bb9d3f3173ban%40googlegroups.com.


[topbraid-users] EDG INSERT/CONSTRUCT with parameter provided by user

2023-07-07 Thread Kasia Kryczka
Hi all,

I want to create a query where the user will provide the uri in the insert 
part.
So the user uses a query from sparql library and provides URI in the 
parameter.

CONSTRUCT{
?provideUri ?p ?result
  }
Select *
WHERE {
  SELECT ?cS (GROUP_CONCAT(?pTY; SEPARATOR=', ') AS ?result) ?provideUri{
  BIND(URI($provideUri) as ?provideUri )
  BIND($PPTFilter as ?PPTFilter)
  BIND($cFilter as ?cFilter )
  BIND(teamwork:currentMasterGraph() as ?cGraph)
 
GRAPH ?cGraph 
  {?cGraph owl:imports ?import}
 
  GRAPH ?import{
?d a skos:cS.
?d skos:hasTopConcept ?cS.
?PPT skos:broader ?cS.
?PPT ontology:PPT ?pTY .
  }

 FILTER(CONTAINS(STR(?PPT), ?PPTFilter) ||
  (CONTAINS(STR(?cS), ?cFilter))  )

  .

  }GROUP BY ?cS ?provideUri }

  BIND($PPTFilter as ?PPTFilter)
  BIND($cFilter as ?cFilter ) these 2 are used as string and they work fine 

but I have a problem with the ?provideUri 

 I don't know what type to use should it be string?
when I BIND manually  it works but when I try to do it by the 
parameter inserted is shows nothing.

Is it possible to have a solution when the user insert the URI?



Parameters:
provideUri:
Optional
booleandatedateTimedecimalintegerstringlangStringasset of type...



Parameters for SPARQL library query "test2"×

Please fill in the values for the query parameters.
provideUri2


Br,

Kasia

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/d6b7b790-7df7-4c07-b5d0-f0a1ed22f4adn%40googlegroups.com.


Re: [topbraid-users] sh:in

2023-07-06 Thread Kasia Kryczka
Hi Holger,

thank you for the explanation.

I'll try to create sth on my own and surely I will come back to you with 
some additional questions :)

Br,

Kasia

On Friday, June 30, 2023 at 5:25:58 PM UTC+2 Holger Knublauch wrote:

> Ok thanks, I now understand the question better.
>
> The problem of generating rdf:Lists with SPARQL has been observed by other 
> users too and is an inherent limitation of SPARQL. It cannot be done in 
> general, although you could write INSERTs for certain list lengths, e.g. 
> produce all BNODE() for each list item up to length of three and then link 
> them together. But even that would be a terrible syntax. One problem is 
> SPARQL’s lack or recursion.
>
> To generate RDF lists or similarly complex structures, you would need to 
> use a scripting language. TopBraid EDG includes JavaScript support from its 
> Script Editor panel, see
>
> Active Data Shapes <https://datashapes.org/active/>
> datashapes.org <https://datashapes.org/active/>
> <https://datashapes.org/active/> <https://datashapes.org/active/>
>
> where you can produce even the most complex structures and use JavaScript 
> to orchestrate arbitrary SPARQL queries too.
>
> If that’s an option for you, feel free to ask follow-up questions.
>
> Holger
>
>
> On 30 Jun 2023, at 3:18 pm, Kasia Kryczka  wrote:
>
> Hi Holger, 
>
> Thank you. 
>
> Just to clarify so I fully understand because now I don't have  a sh:in 
> list  but I want to create one from  the imports that are included in the 
> cGraph:
>
> SELECT  ?product
> #  (GROUP_CONCAT(?product; SEPARATOR=', ') AS ?result)
>   {
> BIND(teamwork:currentMasterGraph() as ?cGraph)
> GRAPH ?cGraph
>   {?cGraph owl:imports ?import}
>   GRAPH ?import{
> ?d a skos:Concept.
> ?d skos:hasTopConcept ?Concept.
>   ?ProductT skos:broader ?Concept.
> ?ProductT uri:product ?product .
>   }
>   FILTER(CONTAINS(STR(?Concept),"service"))
>
> ##BIND (ui:label(?product) AS ?label) .
>  
>   }GROUP BY ?product }
>
>
> but I don't know how to insert that. 
>
> Thanks, 
>
> Kasia
>
>
> On Thursday, June 29, 2023 at 4:36:41 PM UTC+2 Holger Knublauch wrote:
>
>> The value of sh:in is an rdf:List. Lists consist of intermediate notes 
>> that are linked into a chain using rdf:first and rdf:rest. The usual trick 
>> to walk such chains is to use a SPARQL path expression. The following may 
>> work for you:L
>>
>> SELECT ?item
>> WHERE {
>>  sh:in ?list .
>> ?list rdf:rest*/rdf:first ?item .
>> }
>>
>> where rdf:rest* is walking through all list elements and rdf:first 
>> fetches the actual value of each element.
>>
>> HTH
>> Holger
>>
>>
>> On 29 Jun 2023, at 2:22 pm, Kasia Kryczka  wrote:
>>
>> Hi everyone,
>> I want insert a list of types to sh:in which would be :
>>
>> 
>>   sh:in *(*
>> *  "aaa"*
>> *  "bbb"*
>> *  "ccc"*
>> *) ;*
>>
>> my query doesn't work :
>> INSERT{
>>  sh:in ?product
>>   }
>>
>> WHERE {
>>   SELECT  ?product
>> #  (GROUP_CONCAT(?product; SEPARATOR=', ') AS ?result) 
>>   {
>>
>> BIND(teamwork:currentMasterGraph() as ?cGraph)
>>
>> GRAPH ?cGraph 
>>   {?cGraph owl:imports ?import}
>>
>>   GRAPH ?import{
>> ?d a skos:Concept.
>> ?d skos:hasTopConcept ?Concept.
>>   ?ProductT skos:broader ?Concept.
>> ?ProductT uri:product ?product .
>>   }
>>   FILTER(CONTAINS(STR(?Concept),"service"))
>>
>> ##BIND (ui:label(?product) AS ?label) .
>>  
>>   }GROUP BY ?product }
>>
>> the result with concat_group is 
>>   sh:in *(*
>> *  "aaa,**bbb, **ccc"*
>> *) ;*
>>
>> and this is not what I need. 
>>
>> Could you give me a hint how to resolve this?
>>
>> Thanks,
>>
>> Kasia
>>
>>
>> -- 
>> The topics of this mailing list include TopBraid EDG and related 
>> technologies such as SHACL.
>> To post to this group, send email to topbrai...@googlegroups.com
>> --- 
>> 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-user...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.goog

Re: [topbraid-users] sh:in

2023-06-30 Thread Kasia Kryczka
Hi Holger, 

Thank you. 

Just to clarify so I fully understand because now I don't have  a sh:in 
list  but I want to create one from  the imports that are included in the 
cGraph:

SELECT  ?product
#  (GROUP_CONCAT(?product; SEPARATOR=', ') AS ?result)
  {
BIND(teamwork:currentMasterGraph() as ?cGraph)
GRAPH ?cGraph
  {?cGraph owl:imports ?import}
  GRAPH ?import{
?d a skos:Concept.
?d skos:hasTopConcept ?Concept.
  ?ProductT skos:broader ?Concept.
?ProductT uri:product ?product .
  }
  FILTER(CONTAINS(STR(?Concept),"service"))

##BIND (ui:label(?product) AS ?label) .
 
  }GROUP BY ?product }


but I don't know how to insert that. 

Thanks, 

Kasia


On Thursday, June 29, 2023 at 4:36:41 PM UTC+2 Holger Knublauch wrote:

> The value of sh:in is an rdf:List. Lists consist of intermediate notes 
> that are linked into a chain using rdf:first and rdf:rest. The usual trick 
> to walk such chains is to use a SPARQL path expression. The following may 
> work for you:L
>
> SELECT ?item
> WHERE {
>  sh:in ?list .
> ?list rdf:rest*/rdf:first ?item .
> }
>
> where rdf:rest* is walking through all list elements and rdf:first fetches 
> the actual value of each element.
>
> HTH
> Holger
>
>
> On 29 Jun 2023, at 2:22 pm, Kasia Kryczka  wrote:
>
> Hi everyone,
> I want insert a list of types to sh:in which would be :
>
> 
>   sh:in *(*
> *  "aaa"*
> *  "bbb"*
> *  "ccc"*
> *) ;*
>
> my query doesn't work :
> INSERT{
>  sh:in ?product
>   }
>
> WHERE {
>   SELECT  ?product
> #  (GROUP_CONCAT(?product; SEPARATOR=', ') AS ?result) 
>   {
>
> BIND(teamwork:currentMasterGraph() as ?cGraph)
>
> GRAPH ?cGraph 
>   {?cGraph owl:imports ?import}
>
>   GRAPH ?import{
> ?d a skos:Concept.
> ?d skos:hasTopConcept ?Concept.
>   ?ProductT skos:broader ?Concept.
> ?ProductT uri:product ?product .
>   }
>   FILTER(CONTAINS(STR(?Concept),"service"))
>
> ##BIND (ui:label(?product) AS ?label) .
>  
>   }GROUP BY ?product }
>
> the result with concat_group is 
>   sh:in *(*
> *  "aaa,**bbb, **ccc"*
> *) ;*
>
> and this is not what I need. 
>
> Could you give me a hint how to resolve this?
>
> Thanks,
>
> Kasia
>
>
> -- 
> The topics of this mailing list include TopBraid EDG and related 
> technologies such as SHACL.
> To post to this group, send email to topbrai...@googlegroups.com
> --- 
> 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-user...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/ead4c18d-f520-47f3-8664-022c51c6c286n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/topbraid-users/ead4c18d-f520-47f3-8664-022c51c6c286n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/06dfe3ce-690c-4568-8738-46fe15f3435bn%40googlegroups.com.


[topbraid-users] sh:in

2023-06-29 Thread Kasia Kryczka
Hi everyone,
I want insert a list of types to sh:in which would be :


  sh:in *(*
*  "aaa"*
*  "bbb"*
*  "ccc"*
*) ;*

my query doesn't work :
INSERT{
 sh:in ?product
  }

WHERE {
  SELECT  ?product
#  (GROUP_CONCAT(?product; SEPARATOR=', ') AS ?result) 
  {

BIND(teamwork:currentMasterGraph() as ?cGraph)

GRAPH ?cGraph 
  {?cGraph owl:imports ?import}

  GRAPH ?import{
?d a skos:Concept.
?d skos:hasTopConcept ?Concept.
  ?ProductT skos:broader ?Concept.
?ProductT uri:product ?product .
  }
  FILTER(CONTAINS(STR(?Concept),"service"))

##BIND (ui:label(?product) AS ?label) .
 
  }GROUP BY ?product }

the result with concat_group is 
  sh:in *(*
*  "aaa,**bbb, **ccc"*
*) ;*

and this is not what I need. 

Could you give me a hint how to resolve this?

Thanks,

Kasia

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/ead4c18d-f520-47f3-8664-022c51c6c286n%40googlegroups.com.


Re: [topbraid-users] EDG insert object with delete

2023-05-19 Thread Kasia Kryczka
Hi Holger,

We'll try to check it again on our end and if it doesn't help we'll share 
some data.

Thank you!

Kasia

On Friday, May 19, 2023 at 11:17:09 AM UTC+2 Holger Knublauch wrote:

> Hi Kasia,
>
> sorry I cannot think of a reason for this problem. Unless you can send me 
> sample data to run this against, I am not sure how I could help further.
>
> Thanks,
> Holger
>
>
> On 18 May 2023, at 3:28 pm, Kasia Kryczka  wrote:
>
>
> The Select or Construct works fine  and shows everything but Insert 
> doesn't work.
>
> So we made backup in one instance and we wanted to restore data in the 
> second instance and we needed to modify roles.
>
> i also check the query on one more instance and it worked but on this 
> testing one it shows this error.
>
> Br,
>
> Kasia
> On Thursday, May 18, 2023 at 4:03:17 PM UTC+2 Holger Knublauch wrote:
>
>> Ok so would you be able to share a couple of instances where this is 
>> supposed to return something?
>>
>> Also, does the SELECT variation work?
>>
>> Holger
>>
>>
>> On 18 May 2023, at 2:43 pm, Kasia Kryczka  wrote:
>>
>> Hi Holger,
>>
>> no, only error #500 and this information.
>>
>> Br,
>>
>> Kasia
>>
>> On Thursday, May 18, 2023 at 12:34:44 PM UTC+2 Holger Knublauch wrote:
>>
>>> I don't see anything obviously wrong (although you may want to fix the 
>>> last line to be
>>>
>>>   BIND(IRI(CONCAT("urn:", ?newOB, "_Q")) AS ?newO)   
>>>
>>>
>>> i.e. drop the duplicate ::
>>>
>>> Was there anything else in the error message or log, i.e. a full stack 
>>> trace? It is hard for me to try this out without having suitable instance 
>>> data.
>>>
>>> Holger
>>>
>>>
>>> On 18 May 2023, at 10:20 am, Kasia Kryczka  wrote:
>>>
>>> Hi,
>>>
>>> I would like to replace an object with a new object via following query 
>>> (I'm using EDG):
>>>
>>> DELETE {
>>>   ?s ?p ?o .
>>> }
>>> INSERT {
>>>  ?s ?p ?newO .
>>> }
>>> #SELECT DISTINCT ?o ? newO
>>> WHERE {
>>>   ?s ?p ?o .
>>> 
>>>   FILTER(STRSTARTS(STR(?o), "urn:") && STRENDS(STR(?o), "_P_Q"))
>>>   BIND(REPLACE(STR(?o), "^(.*)ttt:(.*)_P_Q$", "$2") AS ?newOB)
>>>   BIND(IRI(CONCAT("urn::", ? newOB  , "_Q")) AS ?newO)   
>>> }
>>>
>>> but i get the following error:
>>> Failed to execute SPARQL request: org.apache.jena.graph.Node$NotLiteral: 
>>> urn:_P_Q is not a literal node
>>>
>>> Could you tell how I can correct it?
>>>
>>> Thanks,
>>>
>>> Kasia
>>>
>>>
>>> -- 
>>> The topics of this mailing list include TopBraid EDG and related 
>>> technologies such as SHACL.
>>> To post to this group, send email to topbrai...@googlegroups.com
>>> --- 
>>> 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-user...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/topbraid-users/989ec7ed-73a4-4bd6-90b1-98fff87c05b0n%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/topbraid-users/989ec7ed-73a4-4bd6-90b1-98fff87c05b0n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>>
>>>
>> -- 
>> The topics of this mailing list include TopBraid EDG and related 
>> technologies such as SHACL.
>> To post to this group, send email to topbrai...@googlegroups.com
>> --- 
>> 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-user...@googlegroups.com.
>>
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/topbraid-users/13368a35-39b2-4c57-b210-177930925a2en%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/topbraid-users/13368a35-39b2-4c57-b210-177930925a2en%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>>
>>
> -- 
> The topics of this mailing list include TopBr

Re: [topbraid-users] EDG insert object with delete

2023-05-18 Thread Kasia Kryczka

The Select or Construct works fine  and shows everything but Insert doesn't 
work.

So we made backup in one instance and we wanted to restore data in the 
second instance and we needed to modify roles.

i also check the query on one more instance and it worked but on this 
testing one it shows this error.

Br,

Kasia
On Thursday, May 18, 2023 at 4:03:17 PM UTC+2 Holger Knublauch wrote:

> Ok so would you be able to share a couple of instances where this is 
> supposed to return something?
>
> Also, does the SELECT variation work?
>
> Holger
>
>
> On 18 May 2023, at 2:43 pm, Kasia Kryczka  wrote:
>
> Hi Holger,
>
> no, only error #500 and this information.
>
> Br,
>
> Kasia
>
> On Thursday, May 18, 2023 at 12:34:44 PM UTC+2 Holger Knublauch wrote:
>
>> I don't see anything obviously wrong (although you may want to fix the 
>> last line to be
>>
>>   BIND(IRI(CONCAT("urn:", ?newOB, "_Q")) AS ?newO)   
>>
>>
>> i.e. drop the duplicate ::
>>
>> Was there anything else in the error message or log, i.e. a full stack 
>> trace? It is hard for me to try this out without having suitable instance 
>> data.
>>
>> Holger
>>
>>
>> On 18 May 2023, at 10:20 am, Kasia Kryczka  wrote:
>>
>> Hi,
>>
>> I would like to replace an object with a new object via following query 
>> (I'm using EDG):
>>
>> DELETE {
>>   ?s ?p ?o .
>> }
>> INSERT {
>>  ?s ?p ?newO .
>> }
>> #SELECT DISTINCT ?o ? newO
>> WHERE {
>>   ?s ?p ?o .
>> 
>>   FILTER(STRSTARTS(STR(?o), "urn:") && STRENDS(STR(?o), "_P_Q"))
>>   BIND(REPLACE(STR(?o), "^(.*)ttt:(.*)_P_Q$", "$2") AS ?newOB)
>>   BIND(IRI(CONCAT("urn::", ? newOB  , "_Q")) AS ?newO)   
>> }
>>
>> but i get the following error:
>> Failed to execute SPARQL request: org.apache.jena.graph.Node$NotLiteral: 
>> urn:_P_Q is not a literal node
>>
>> Could you tell how I can correct it?
>>
>> Thanks,
>>
>> Kasia
>>
>>
>> -- 
>> The topics of this mailing list include TopBraid EDG and related 
>> technologies such as SHACL.
>> To post to this group, send email to topbrai...@googlegroups.com
>> --- 
>> 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-user...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/topbraid-users/989ec7ed-73a4-4bd6-90b1-98fff87c05b0n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/topbraid-users/989ec7ed-73a4-4bd6-90b1-98fff87c05b0n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>>
>>
> -- 
> The topics of this mailing list include TopBraid EDG and related 
> technologies such as SHACL.
> To post to this group, send email to topbrai...@googlegroups.com
> --- 
> 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-user...@googlegroups.com.
>
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/13368a35-39b2-4c57-b210-177930925a2en%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/topbraid-users/13368a35-39b2-4c57-b210-177930925a2en%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/f1c6c984-8186-4e3d-b120-83ccba1282a7n%40googlegroups.com.


Re: [topbraid-users] EDG insert object with delete

2023-05-18 Thread Kasia Kryczka
Hi Holger,

no, only error #500 and this information.

Br,

Kasia

On Thursday, May 18, 2023 at 12:34:44 PM UTC+2 Holger Knublauch wrote:

> I don't see anything obviously wrong (although you may want to fix the 
> last line to be
>
>   BIND(IRI(CONCAT("urn:", ?newOB, "_Q")) AS ?newO)   
>
>
> i.e. drop the duplicate ::
>
> Was there anything else in the error message or log, i.e. a full stack 
> trace? It is hard for me to try this out without having suitable instance 
> data.
>
> Holger
>
>
> On 18 May 2023, at 10:20 am, Kasia Kryczka  wrote:
>
> Hi,
>
> I would like to replace an object with a new object via following query 
> (I'm using EDG):
>
> DELETE {
>   ?s ?p ?o .
> }
> INSERT {
>  ?s ?p ?newO .
> }
> #SELECT DISTINCT ?o ? newO
> WHERE {
>   ?s ?p ?o .
> 
>   FILTER(STRSTARTS(STR(?o), "urn:") && STRENDS(STR(?o), "_P_Q"))
>   BIND(REPLACE(STR(?o), "^(.*)ttt:(.*)_P_Q$", "$2") AS ?newOB)
>   BIND(IRI(CONCAT("urn::", ? newOB  , "_Q")) AS ?newO)   
> }
>
> but i get the following error:
> Failed to execute SPARQL request: org.apache.jena.graph.Node$NotLiteral: 
> urn:_P_Q is not a literal node
>
> Could you tell how I can correct it?
>
> Thanks,
>
> Kasia
>
>
> -- 
> The topics of this mailing list include TopBraid EDG and related 
> technologies such as SHACL.
> To post to this group, send email to topbrai...@googlegroups.com
> --- 
> 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-user...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/989ec7ed-73a4-4bd6-90b1-98fff87c05b0n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/topbraid-users/989ec7ed-73a4-4bd6-90b1-98fff87c05b0n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/13368a35-39b2-4c57-b210-177930925a2en%40googlegroups.com.


[topbraid-users] EDG insert object with delete

2023-05-18 Thread Kasia Kryczka
Hi,

I would like to replace an object with a new object via following query 
(I'm using EDG):

DELETE {
  ?s ?p ?o .
}
INSERT {
 ?s ?p ?newO .
}
#SELECT DISTINCT ?o ? newO
WHERE {
  ?s ?p ?o .

  FILTER(STRSTARTS(STR(?o), "urn:") && STRENDS(STR(?o), "_P_Q"))
  BIND(REPLACE(STR(?o), "^(.*)ttt:(.*)_P_Q$", "$2") AS ?newOB)
  BIND(IRI(CONCAT("urn::", ? newOB  , "_Q")) AS ?newO)   
}

but i get the following error:
Failed to execute SPARQL request: org.apache.jena.graph.Node$NotLiteral: 
urn:_P_Q is not a literal node

Could you tell how I can correct it?

Thanks,

Kasia

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/989ec7ed-73a4-4bd6-90b1-98fff87c05b0n%40googlegroups.com.


Re: [topbraid-users] sparql query to show current workspace

2023-04-24 Thread Kasia Kryczka
Thank you :) 
On Monday, April 24, 2023 at 2:50:09 PM UTC+2 Holger Knublauch wrote:

> Ok thanks for the clarification. I don't see any alternative to something 
> like
>
> SELECT ?this
> WHERE {
> }
>
> which would show the currently selected asset. If that happens to be class 
> then you could query the other superclasses for example using
>
> SELECT ?class
> WHERE {
> ?this rdfs:subClassOf* ?class .
> }
>
> But these queries would return different result each time.
>
> There are no other ways to query the state of the user interface from 
> SPARQL.
>
> Holger
>
>
> On 24 Apr 2023, at 1:46 pm, Kasia Kryczka  wrote:
>
>
>
> On Monday, April 24, 2023 at 2:04:59 PM UTC+2 Holger Knublauch wrote:
>
> Hi Kasia,
>
> I am not sure whether you mean TopBraid EDG or TBC, but I assume EDG. Also 
> the term "workspace" is unclear to me, so I have to speculate a bit:
>
> SPARQL queries cannot query the state of the user interface. The only 
> thing they have access to is the currently selected asset. Use the variable 
> $this to query that.
>
> If this doesn't answer your question, please provide more details, i.e. 
> what specifically you want to query.
>
> Holger
>
>
> On 24 Apr 2023, at 1:00 pm, Kasia Kryczka  wrote:
>
> Hi all, 
>
> Is it possible to show the current workspace we are in, i.e., when we open 
> a class hierarchy and go to an object I would like to use a query to show 
> exactly where I am  (not the highest level of asset collection but the 
> place I'm currently in). 
> Unfortunately, I can't upload a picture. 
>
>
>
> Is it possible to do that?
>
> Thanks,
>
> Kasia
>
>
>
> -- 
> The topics of this mailing list include TopBraid EDG and related 
> technologies such as SHACL.
> To post to this group, send email to topbrai...@googlegroups.com
> --- 
> 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-user...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/dcc57aef-3ed3-4024-846c-44f0c29dc18fn%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/topbraid-users/dcc57aef-3ed3-4024-846c-44f0c29dc18fn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>
> Hi Holger, 
>
> I'm a beginner with both TopBraid EDG and sparql so sorry for mistakes. I 
> meant  TopBraid EDG :)
> I wanted to use sparql but if it is not possible then I'll use what I have 
> :)
>
> I'll try to show this 
>
>- Data Object
>   - Conceptual Object 
>  - Conceptual Object Component
> - I'm in this place and I would like to see this URI
>  
> I know we can show the currentGraph  of the but I was just wondering if it 
> is possible to show the uri of the place we are in. 
>
> Hope this helps a little to understand what I mean.
>
> Br,
>
> Kasia
>
> -- 
> The topics of this mailing list include TopBraid EDG and related 
> technologies such as SHACL.
> To post to this group, send email to topbrai...@googlegroups.com
> --- 
> 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-user...@googlegroups.com.
>
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/59e256a6-5229-44a1-b20e-701ab2a5a089n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/topbraid-users/59e256a6-5229-44a1-b20e-701ab2a5a089n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/6ddb72f3-962a-4f91-a443-b184219c99d2n%40googlegroups.com.


Re: [topbraid-users] sparql query to show current workspace

2023-04-24 Thread Kasia Kryczka


On Monday, April 24, 2023 at 2:04:59 PM UTC+2 Holger Knublauch wrote:

Hi Kasia,

I am not sure whether you mean TopBraid EDG or TBC, but I assume EDG. Also 
the term "workspace" is unclear to me, so I have to speculate a bit:

SPARQL queries cannot query the state of the user interface. The only thing 
they have access to is the currently selected asset. Use the variable $this 
to query that.

If this doesn't answer your question, please provide more details, i.e. 
what specifically you want to query.

Holger


On 24 Apr 2023, at 1:00 pm, Kasia Kryczka  wrote:

Hi all, 

Is it possible to show the current workspace we are in, i.e., when we open 
a class hierarchy and go to an object I would like to use a query to show 
exactly where I am  (not the highest level of asset collection but the 
place I'm currently in). 
Unfortunately, I can't upload a picture. 



Is it possible to do that?

Thanks,

Kasia



-- 
The topics of this mailing list include TopBraid EDG and related 
technologies such as SHACL.
To post to this group, send email to topbrai...@googlegroups.com
--- 
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-user...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/dcc57aef-3ed3-4024-846c-44f0c29dc18fn%40googlegroups.com
 
<https://groups.google.com/d/msgid/topbraid-users/dcc57aef-3ed3-4024-846c-44f0c29dc18fn%40googlegroups.com?utm_medium=email&utm_source=footer>
.



Hi Holger, 

I'm a beginner with both TopBraid EDG and sparql so sorry for mistakes. I 
meant  TopBraid EDG :)
I wanted to use sparql but if it is not possible then I'll use what I have 
:)

I'll try to show this 

   - Data Object
  - Conceptual Object 
 - Conceptual Object Component
- I'm in this place and I would like to see this URI
 
I know we can show the currentGraph  of the but I was just wondering if it 
is possible to show the uri of the place we are in. 

Hope this helps a little to understand what I mean.

Br,

Kasia

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/59e256a6-5229-44a1-b20e-701ab2a5a089n%40googlegroups.com.


[topbraid-users] sparql query to show current workspace

2023-04-24 Thread Kasia Kryczka
Hi all, 

Is it possible to show the current workspace we are in, i.e., when we open 
a class hierarchy and go to an object I would like to use a query to show 
exactly where I am  (not the highest level of asset collection but the 
place I'm currently in). 
Unfortunately, I can't upload a picture. 



Is it possible to do that?

Thanks,

Kasia


-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/dcc57aef-3ed3-4024-846c-44f0c29dc18fn%40googlegroups.com.


[topbraid-users] how to

2023-03-30 Thread Kasia Kryczka
Hi, 

I have about 170 collections with missing value- the collections are listed 
from the query.
I need to insert a value .
Is it possible to create a loop that goes through all listed collections 
and inserts the missing value?

Thanks,

Kasia

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to topbraid-users@googlegroups.com
--- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/b388bfe2-422f-42a6-9a41-11ddf6e5744an%40googlegroups.com.