Re: [topbraid-users] [SPIN API] Passing arguments to constructors at runtime

2017-11-23 Thread Martynas Jusevicius
> 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 insta

[topbraid-users] [SPIN API] Passing arguments to constructors at runtime

2017-11-23 Thread Martynas Jusevicius
Hi, I am using this code to construct class instance: List newResources = new ArrayList<>(); Set reachedTypes = new HashSet<>(); OntModel ontModel = forClass.getOntModel(); Map> class2Constructor = SPINQueryFinder.getClass2QueryMap(ontModel, ontModel, property, fa

[topbraid-users] Multiple SPIN constructors on class?

2017-11-21 Thread Martynas Jusevicius
Hey, not completely clear from the SPIN spec (http://spinrdf.org/spin.html#spin-constructors) -- are multiple spin:constructor values allowed on the same class? I don't see why not, but just wanted that clarified. Thanks. Martynas atomgraph.com -- You received this message because you are s

Re: [topbraid-users] [SPIN] Overriding spl:Arguments in subclasses

2016-08-29 Thread Martynas Jusevicius
a common scenario, your > work-around is to not declare the argument twice, for example by having an > abstract superclass for both templates, where only the subclasses declare > :property. > > Holger > > > On 29/08/2016 2:06, Martynas Jusevicius wrote: > >

[topbraid-users] [SPIN] Overriding spl:Arguments in subclasses

2016-08-28 Thread Martynas Jusevicius
Hey, I have a somewhat artificial use case where both a class and its superclass each have an spl:Argument with the same predicate, but different spl:defaultValue, and possibly other properties: :Template a spin:Template ; spin:constraint [ a spl:Argument ; spl:predicate

Re: [topbraid-users] general constraint checking 'library'?

2016-06-20 Thread Martynas Jusevicius
There is also the Data Quality Constraints Library: http://semwebquality.org/ontologies/dq-constraints On Wednesday, June 8, 2016 at 6:04:45 PM UTC+2, Jack Hodges wrote: > > Thank you Holger. I was not aware that the spl had so many > constraint-related functions. I tend to look in the SPARQL Fun

[topbraid-users] [SPIN API] Constructor/constraint inheritance implementation with Jena rules?

2015-09-26 Thread Martynas Jusevicius
Hey Holger, by inspecting SPINConstructors, I have noticed that constructors (and probably constraints as well?) are "inherited" by walking up the subclass chain and looking for them. Am I right? I had a similar use case implemented as custom Jena rules. Properties can be inferred by construct

[topbraid-users] [SPIN API 1.3.1] SPINConstructors.constructInstance() calls itself?

2015-09-24 Thread Martynas Jusevicius
Hey Holger, what is up with the following method in SPINConstructors line 154: public static void constructInstance(Model queryModel, Resource instance, Resource type, Model targetModel, List newResources, Set reachedTypes, ProgressMonitor monitor) { constructInstance(queryModel, in

Re: [topbraid-users] [SPIN API] Queries using sp:text short form cannot have other properties?

2015-07-21 Thread Martynas Jusevicius
Holger, sorry to pick up an old thread. Why would you want to constrain properties on queries at all? I wouldn't think they interfere with the rest of your code, as long there is sp:text among them? What about adding simple metadata to queries, like dct:title and dct:description - how do you

Re: [topbraid-users] [SPIN API] SPINConstraints.check() returns no violations after upgrade to 1.4.0

2015-03-18 Thread Martynas Jusevicius
Thanks, everything works as expected now. On Wednesday, March 18, 2015 at 2:22:15 AM UTC+1, Holger Knublauch wrote: > > > > HTH > Holger > > > On 3/18/2015 11:20, Martynas Jusevicius wrote: > > Are you saying all the files in etc/ are now .ttl? sp.ttl, spi

Re: [topbraid-users] [SPIN API] SPINConstraints.check() returns no violations after upgrade to 1.4.0

2015-03-17 Thread Martynas Jusevicius
this file would use > the provided function SPIN.getModel(). > > Thanks > Holger > > > > On 3/17/2015 23:07, Martynas Jusevicius wrote: > > I checked the logs, and hopefully the problem is simpler than I thought: > > com.hp.hpl.jena.shared.NotFoundException: No

Re: [topbraid-users] [SPIN API] SPINConstraints.check() returns no violations after upgrade to 1.4.0

2015-03-17 Thread Martynas Jusevicius
, Martynas Jusevicius wrote: > > The instances are not in the ontology, they come from user input and then > both are added to tempModel which is validated. > > I have tried to make a standalone test case, but so far unsuccessfully. > > On Tuesday, March 17, 2015 at 2:34:02 AM UT

Re: [topbraid-users] [SPIN API] SPINConstraints.check() returns no violations after upgrade to 1.4.0

2015-03-17 Thread Martynas Jusevicius
10:05, Martynas Jusevicius wrote: > > The constrains are mostly very simple and look like this: > > spin:constraint [ a dqc:MissingProperties ; > sp:arg1 <#TemplateItem> ; > sp:arg2 gp:slug > ] ; > > > I am not seeing instances of #Template

Re: [topbraid-users] [SPIN API] SPINConstraints.check() returns no violations after upgrade to 1.4.0

2015-03-16 Thread Martynas Jusevicius
Slight correction: dqc: is imported indirectly, via gp: ontology. On Tuesday, March 17, 2015 at 1:05:05 AM UTC+1, Martynas Jusevicius wrote: > > Yes, everything is identical except the SPIN versions in POM -- yet the > behaviour is different. I just double-checked. > > In one

Re: [topbraid-users] [SPIN API] SPINConstraints.check() returns no violations after upgrade to 1.4.0

2015-03-16 Thread Martynas Jusevicius
use exactly the same RDF files? How do the constraints look like? > > Thanks, > Holger > > > On 3/17/2015 9:44, Martynas Jusevicius wrote: > > Hello, > > I have a simple piece code that validates an RDF model against SPIN > constraints: > > On

[topbraid-users] [SPIN API] SPINConstraints.check() returns no violations after upgrade to 1.4.0

2015-03-16 Thread Martynas Jusevicius
Hello, I have a simple piece code that validates an RDF model against SPIN constraints: OntModel tempModel = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM); tempModel.add(ontModel).add(model); SPINModuleRegistry.get().registerAll(tempModel, null); List cv

[topbraid-users] [SPIN API] Base URI of sp:text query

2015-03-13 Thread Martynas Jusevicius
Hey all, I have a query string in sp:text that includes relative URIs, for example: <> ?p ?o When I parse the query resource with ARQ2SPIN, what comes out instead is: ?p ?o Is there a way to control the base URI against which the relative ones are resolved? Thanks, Martynas -- You

Re: [topbraid-users] Some feedback on TBC and SPIN API

2015-01-08 Thread Martynas Jusevicius
Also looking forward to see SPIN API code on GitHub. On Wednesday, January 7, 2015 at 12:13:27 AM UTC+1, Holger Knublauch wrote: > > On 1/6/2015 19:39, Wim wrote: > > Hi, > > I'm enjoying TBC 4.6 a lot (I really like the features and the UI), as > well as the SPIN java API which is a great com

[topbraid-users] [SPIN API] From sp:text to RDF syntax

2014-12-30 Thread Martynas Jusevicius
Hey, I have defined a SPIN query using simplified syntax: [ a sp:Construct ; sp:text """ CONSTRUCT { ... } WHERE {}""" ] . I am accessing it as Jena Resource. Now how can I add the triples of the full SPIN RDF syntax? Can the same query bno

Re: [topbraid-users] Setting new ORDER BY with SPIN API

2012-06-28 Thread Martynas Jusevicius
Holger, I've built a QueryBuilder class as part of Graphity: https://github.com/Graphity/graphity-browser/blob/master/src/main/java/org/graphity/util/QueryBuilder.java I think it could be useful for many working with Jena and/or SPIN queries, but I lack expertise of SPIN API to make it robust.

Re: [topbraid-users] Re: MIME Types and URI's

2011-02-09 Thread Martynas Jusevicius
Hey Scott, I had exactly the same question couple of months ago: http://tech.groups.yahoo.com/group/jena-dev/message/45839 Couldn't get a definitive answer, so ended up using URI format which I've seen an example of somewhere. Martynas semantic-web.dk On Thu, Feb 3, 2011 at 5:02 PM, Joe wrote

Re: [topbraid-users] Re: [SPIN API] Function http://spinrdf.org/spl#instanceOf does not define a valid body

2011-01-31 Thread Martynas Jusevicius
Thanks, that would be great! I was waiting for SDB 1.3.3 because it was supposed to support min()/max() functions. Martynas On Tue, Feb 1, 2011 at 12:29 AM, Holger Knublauch wrote: > Yes, you need to downgrade again. The issue is that ARQ is evolving to track > the SPARQL 1.1 specification, le