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 <[email protected]> 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 [email protected]
> --- 
> You received this message because you are subscribed to the Google Groups 
> "TopBraid Suite Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/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 [email protected]
--- 
You received this message because you are subscribed to the Google Groups 
"TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/bf8a55f1-a3f3-44ce-9b40-edf11a494415n%40googlegroups.com.

Reply via email to