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

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] 
> <mailto:[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/00141DB6-AAA5-4D74-B3C0-9F298C8A389B%40topquadrant.com.

Reply via email to