On 27/02/2019 10:34 am, [email protected] wrote:

Thanks Pat - BaseURI Management was the thing i'd forgotten..

turns out i was checking for a teamwork controlled graph - but in the workspace i had a saved snapshot of the asset collection - so EDG knew nothing but it got in the way.

So - to the documentation of createProject and related functions?

other than arg:id what other arguments are avaiable?

Open teamwork.ui.ttlx or similar, and explore the declaration of teamwork:createProject.


how do you create all the right default imports for a project type if createProjects doesnt do it for you? (at the moment loading a snapshot of an empty asset collection of that type to get the owl:imports - but is that enough?)
You can either post-process the resulting graph, or pass in arg:owlImports.

how do you delete a project programatically?

teamwork:deleteProject. I have just made that and createProject officially public (removing the ui:private true) for 6.2. However, you can already use them.

Holger





On Wednesday, February 27, 2019 at 3:17:25 AM UTC+11, Pat Doyle wrote:

    I have seen it when you create a project without all of the
    parameters/metadata that is expected - essentially, through an
    initial improper create project call.  The UI doesn't know what
    type of project it is - so it is not visible on any of the project
    pages, but it still exists in the workspace, so when we try to
    create another project with the same name, it finds that one and
    appends to the uri.  I ran into this myself when running through
    automated create/import/delete tests recently.

    You'd likely see the file for the original URI on either Base URI
    management or within the Repositories folder in the workspace. You
    /may /be able to navigate to the graph in the web ui by manually
    building the URL - e.g. removing the _2 - so instead of going to
    /tbl/test_2.editor you could just go to /tbl/test.editor - then
    you should be able to go to the manage tab(if it appears, I don't
    recall) and delete it from there.

    On Tue, Feb 26, 2019 at 1:27 AM Holger Knublauch
    <[email protected] <javascript:>> wrote:


        On 26/02/2019 4:16 pm, [email protected]
        <javascript:> wrote:
        thats good info - passing in the graphid

        The issue is twofold:

        1) you cant get the graphid from a name without creating a
        project (at least i'm looking for a way to do so...) so cant
        test it exists before i've created another one with a
        different id...
        2) why is it generating "test_2" instead of "test" when
        "test" does not exist?

        I have never observed that. Are you sure there is no such
        graph in the workspace?

        Holger



        I will experiment to see if forcing the id avoids the funny
        naming behaviour...




        On Tuesday, February 26, 2019 at 4:18:39 PM UTC+11, Holger
        Knublauch wrote:


            On 26/02/2019 2:40 pm, [email protected] wrote:

            I can create new asset collections using
            teamwork:CreateProject  which is useful...

            but i have a situation where in need to predict the
            graph URI , which is generated from the name.

            I am finding that if I create something with label
            "Test"  it is generating urn:x-evn:test_2  even though
            there is no existing urn:x-evn:test

            NB : I am removing asset collections by deleting the
            repositories in TBC (its a local dev context)

            What i'd like to do would be to have createProject not
            generate a new URI i cant predict - as i will need to
            reference it in includes later.

            how then do i ?
            1) get access to the function that creates the generated
            URI from the name before if appends a suffix to make it
            unique?
            2) check for existence of such a thing
            3) delete a data asset collection

            and in the meantime

            4) force it to recognise the graph doesnt exist and not
            generate the extended URI ?

            Just to be clear: teamwork:createProject produces a
            variable binding for ?graphId which contains the
            generated ID. This is scoped to the child elements in the
            SWP script. You could then use that in includes.

            Further, you can pass in arg:id to specify a graph id
            assuming you have tested that it's unused beforehand,
            e.g. using smf:hasFile("urn:x-evn-master:geo")

            Would these options not be sufficient?

            Holger




-- 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].
            For more options, visit
            https://groups.google.com/d/optout
            <https://groups.google.com/d/optout>.

-- You received this message because you are subscribed to the
        Google Groups "TopBraid Suite Users" group.
        To unsubscribe from this group and stop receiving emails from
        it, send an email to [email protected]
        <javascript:>.
        For more options, visit https://groups.google.com/d/optout
        <https://groups.google.com/d/optout>.
-- You received this message because you are subscribed to the
        Google Groups "TopBraid Suite Users" group.
        To unsubscribe from this group and stop receiving emails from
        it, send an email to [email protected]
        <javascript:>.
        For more options, visit https://groups.google.com/d/optout
        <https://groups.google.com/d/optout>.

--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.

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

Reply via email to