Hi,
SPIN constructors don't have a facility for parameters, making their use
rather limited. Given that SPIN is not an official standard anyway, why
not make up your own property and do what you want there?
Holger
On 24/11/2017 4:25, Martynas Jusevicius wrote:
Hi,
I am using this code to construct class instance:
List<Resource> newResources = new ArrayList<>();
Set<Resource> reachedTypes = new HashSet<>();
OntModel ontModel = forClass.getOntModel();
Map<Resource, List<CommandWrapper>> class2Constructor =
SPINQueryFinder.getClass2QueryMap(ontModel, ontModel, property, false,
false);
SPINConstructors.constructInstance(ontModel, instance,
forClass, targetModel, newResources, reachedTypes, class2Constructor,
null, null, null);
Is it possible to pass initial binding(s) to constructors at runtime?
Something that would correspond to:
:ConstructorWithBase a spin:Template ;
spin:body :OriginalConstructor ;
spin:constraint [ a spl:Argument ;
spl:predicate :base ;
spl:valueType rdfs:Resource
] ;
Does that mean I have to walk all the constructors and turn them into
spin:Templates with arguments as above? Which would require me to copy
the model, as it is reused by different applications passing different
arguments.
Ultimately I am looking for a way to pass a base URI into the query
(in a generic way). Right now I have written my own version of
constructInstance() that simply accepts and sets BASE on the query,
but I would like to reuse SPIN machinery if possible, and a binding
would work as well.
Martynas
atomgraph.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 [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.