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

2017-11-23 Thread Martynas Jusevicius
I thought spin:Template (possibly with arguments) can be used anywhere 
sp:Query can be used, including constructors?

On Thursday, November 23, 2017 at 11:44:22 PM UTC+1, Holger Knublauch wrote:
>
> 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 newResources = new ArrayList<>();
> Set reachedTypes = new HashSet<>();
> OntModel ontModel = forClass.getOntModel();
> Map> 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 topbraid-user...@googlegroups.com .
> 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 topbraid-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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, 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 topbraid-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 subscribed to the Google Groups 
"TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to topbraid-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-08-29 Thread Martynas Jusevicius
Thanks Holger.

I think a solution could be to have 2 sets of arguments: template-local (by 
default), and inheritable (defined so explicitly), or "tunneled". 
Subclasses would not see the local arguments of superclasses, and it would 
be an error to redefine tunneled arguments with a different contract.

This is the idea behind tunnel parameters in XSLT 
2.0: https://www.w3.org/TR/xslt20/#tunnel-params

On Monday, August 29, 2016 at 2:51:42 AM UTC+2, Holger Knublauch wrote:
>
> Hi Martynas,
>
> as you have found out, this scenario is not supported by SPIN. Multiple 
> declarations of the same predicate lead to undefined behavior. I am not 
> particularly keen to touch this area of code, because it is so widely used 
> and I don't want to risk regression bugs or performance degradation at this 
> stage. Given that this doesn't appear to be 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:
>
> 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 :property ;
> spl:valueType xsd:long ;
> spl:defaultValue 111
> ] .
>
> :SubTemplate a spin:Template ;
> rdfs:subClassOf :Template ;
> spin:constraint [ a spl:Argument ;
> spl:predicate :property ;
> spl:valueType xsd:long ;
> spl:defaultValue 999
> # spl:optional true
> ] .
>
> When [ a :SubTemplate ] is instantiated, what will be its :property value 
> (assuming it comes from spl:defaultValue)?
>
> I would think the subclass argument has precedence, but looking at the 
> ModuleImpl code, it seems that a List is collected from the class 
> and all its superclasses, ignoring inheritance:
>
> https://github.com/TopQuadrant/shacl/blob/master/src/main/java/org/topbraid/spin/model/impl/ModuleImpl.java
>
> But maybe the inheritance/precedence is handled somewhere else?
>
> Also, would it be illegal for the subclass to define the argument as 
> spl:optional if the superclass does not do so? Wouldn't that break the 
> template contract? I guess the same applies to redefinition of 
> spl:valueType etc.
>
> Thanks,
>
>
> Martynas
> atomgraph.com
> -- 
> You received this message because you are subscribed to the Google Group 
> "TopBraid Suite Users", the topics of which include the TopBraid Suite 
> family of products and its base technologies such as SPARQLMotion, SPARQL 
> Web Pages and SPIN.
> To post to this group, send email to topbrai...@googlegroups.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 topbraid-user...@googlegroups.com .
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
You received this message because you are subscribed to the Google Group 
"TopBraid Suite Users", the topics of which include the TopBraid Suite family 
of products and its base technologies such as SPARQLMotion, SPARQL Web Pages 
and SPIN.
To post to this group, send email to topbraid-users@googlegroups.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 topbraid-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 :property ;
spl:valueType xsd:long ;
spl:defaultValue 111
] .

:SubTemplate a spin:Template ;
rdfs:subClassOf :Template ;
spin:constraint [ a spl:Argument ;
spl:predicate :property ;
spl:valueType xsd:long ;
spl:defaultValue 999
# spl:optional true
] .

When [ a :SubTemplate ] is instantiated, what will be its :property value 
(assuming it comes from spl:defaultValue)?

I would think the subclass argument has precedence, but looking at the 
ModuleImpl code, it seems that a List is collected from the class 
and all its superclasses, ignoring inheritance:
https://github.com/TopQuadrant/shacl/blob/master/src/main/java/org/topbraid/spin/model/impl/ModuleImpl.java

But maybe the inheritance/precedence is handled somewhere else?

Also, would it be illegal for the subclass to define the argument as 
spl:optional if the superclass does not do so? Wouldn't that break the 
template contract? I guess the same applies to redefinition of 
spl:valueType etc.

Thanks,


Martynas
atomgraph.com

-- 
You received this message because you are subscribed to the Google Group 
"TopBraid Suite Users", the topics of which include the TopBraid Suite family 
of products and its base technologies such as SPARQLMotion, SPARQL Web Pages 
and SPIN.
To post to this group, send email to topbraid-users@googlegroups.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 topbraid-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 Functions 
> Reference for available functions. In my SPIN file I see imports for spin, 
> spinx, and sp, but not for spl. On the spinrdf.org/spl/spl.html there is 
> a reference to spinrdf.org/spl but I am not seeing any comprehensive 
> documentation. So as much as I appreciate your response and clarification, 
> how would I have found this on my own?
>
> I would love to play with SHACL but the TQ comments about SHACL 
> implementation in Topbraid say things like 'not even close to production 
> ready' so I've been waiting...but waiting with great anticipation 
> nonetheless.
>
> Jack
>
> On Tuesday, June 7, 2016 at 5:15:11 PM UTC-7, Holger Knublauch wrote:
>>
>> Hi Jack,
>>
>> in SPIN we have the SPL library that is supposed to contain "standard" 
>> constraint types as SPIN templates. Right now it includes:
>>
>> spl:CountPropertyConstraintTemplates
>> spl:ExistencePropertyPairConstraint
>> spl:LessThanOtherPropertyPairConstraint
>> spl:NonExistencePropertyPairConstraint
>> spl:ObjectCountPropertyConstraint
>> spl:PrimaryKeyPropertyConstraint
>> spl:PropertyConstraintTemplates
>> spl:PropertyPairConstraintTemplates
>> spl:RangePropertyConstraint
>> spl:RegexPropertyConstraint
>> spl:StringLengthPropertyConstraint
>> spl:TypePropertyConstraint
>> spl:UniquePropertyValueConstraint
>> spl:UntypedObjectPropertyConstraint
>>
>> Other than that, I would recommend looking into SHACL, which will have 
>> more support in TopBraid 5.2. Although it is still evolving it will have 
>> the advantage of being a W3C standard.
>>
>> http://w3c.github.io/data-shapes/shacl/
>>
>> HTH
>> Holger
>>
>>
>> On 8/06/2016 7:39, Jack Hodges wrote:
>>
>> Topbraid Composer has several SPIN functions that are pretty specific to 
>> defining constraints for model testing. Examples are spl:instanceOf, 
>> spl:hasValueOfType, smf:definedIn, smf:min/maxCardinality, smf:qname, 
>> spif:localName, spin:constructViolations, spin:violatesConstraints, etc. It 
>> seems clear that some effort has been expended to create functions that 
>> could be used in a generic constraints 'library' (i.e., to validate type, 
>> cardinality, value, threshold, range, ...), but does such a library of SPIN 
>> functions and ASK templates already exist? I hate to reinvent the wheel... 
>>
>> Jack
>> -- 
>> You received this message because you are subscribed to the Google Group 
>> "TopBraid Suite Users", the topics of which include the TopBraid Suite 
>> family of products and its base technologies such as SPARQLMotion, SPARQL 
>> Web Pages and SPIN.
>> To post to this group, send email to topbrai...@googlegroups.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 topbraid-user...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Group 
"TopBraid Suite Users", the topics of which include the TopBraid Suite family 
of products and its base technologies such as SPARQLMotion, SPARQL Web Pages 
and SPIN.
To post to this group, send email to topbraid-users@googlegroups.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 topbraid-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 constructing OntModelSpec with GenericRuleReasoner which 
parses the rules. They could look something like that:

  [constructors: (?class rdf:type rdfs:Class), (?class 
 ?o), (?subClass rdfs:subClassOf 
?class), noValue(?subClass ) -> 
(?subClass  ?o) ]
  [constraints: (?class rdf:type rdfs:Class), (?class 
 ?o), (?subClass rdfs:subClassOf 
?class), noValue(?subClass ) -> 
(?subClass  ?o) ]

I think that would be a cleaner approach and a better reuse of Jena's 
machinery. Would that work for SPIN API?

Martynas
graphityhq.com

-- 
You received this message because you are subscribed to the Google Group 
"TopBraid Suite Users", the topics of which include Enterprise Vocabulary 
Network (EVN), Reference Data Manager (RDM), TopBraid Composer, TopBraid Live, 
TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to topbraid-users@googlegroups.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 topbraid-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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, instance, type, targetModel, 
newResources, reachedTypes, monitor);
}

It looks like it is just calling itself? Must be a bug then?

Martynas

-- 
You received this message because you are subscribed to the Google Group 
"TopBraid Suite Users", the topics of which include Enterprise Vocabulary 
Network (EVN), Reference Data Manager (RDM), TopBraid Composer, TopBraid Live, 
TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to topbraid-users@googlegroups.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 topbraid-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 solve a use case like that?

Martynas

On Tuesday, April 29, 2014 at 1:42:47 AM UTC+2, Holger Knublauch wrote:
>
>  Yes this is implemented in ARQ2SPIN:
> 
> public static String getTextOnly(Resource spinCommand) {
> // Return sp:text if this is the only property of the command 
> apart from the rdf:type triple
> Statement s = spinCommand.getProperty(SP.text);
> if(s != null) {
> if(SPTextUtil.hasSPINRDF(spinCommand)) {
> return null;
> }
> else {
> return s.getString();
> }
> }
> return null;
> }
>
> and the crucial line is
>
> if(!RDF.type.equals(o.getPredicate()) && 
> !SP.text.equals(o.getPredicate()) && 
> !SPIN.thisUnbound.equals(o.getPredicate())) {
>
> which means that it only allows rdf:type or spin:thisUnbound apart from 
> the sp:text triple. I guess I didn't want to enumerate all possible other 
> properties that may exist, so you are running into an unexpected use case. 
> In most use cases those SPIN RDF structures are created by editing in TBC 
> and those would discard the extra triple anyway, so I am afraid this is not 
> a high priority issue for us right now. If you want to submit a patch for 
> your use case, I'd be happy to fold it into the next release. I guess we 
> could either hard-code the properties that you want to allow or otherwise 
> find a better implementation of hasSPINRDF (maybe looking for sp:where is 
> enough if that always exists - I don't know off the top of my head).
>
> Thanks,
> Holger
>
>
>
>
> On 4/29/2014 9:35, pu...@xml.lt  wrote:
>  
> Hey,
>
> I have some SPIN queries in my RDF, like this:
>
> <#DescribeProducts> a   sp:Describe ;
> sp:text """PREFIX ... """^^xsd:string .
>
> It works fine. However, if I add some more properties to the 
> <#DescribeProducts> resource (such as rdfs:isDefinedBy), 
> SPINFactory.asQuery() starts returning weird results like "DESCRIBE *", 
> which is not what the original query is.
>
> Does it mean the short query form can only have sp:text property? Is this 
> an intentional limitation?
>
>
> Martynas
> graphityhq.com
>  -- 
> -- You received this message because you are subscribed to the Google
> Group "TopBraid Suite Users", the topics of which include Enterprise 
> Vocabulary Network (EVN), TopBraid Composer, TopBraid Live, TopBraid 
> Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
> To post to this group, send email to
> topbrai...@googlegroups.com 
> To unsubscribe from this group, send email to
> topbraid-user...@googlegroups.com 
> For more options, visit this group at
> http://groups.google.com/group/topbraid-users?hl=en
> --- 
> 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 topbraid-user...@googlegroups.com .
> For more options, visit https://groups.google.com/d/optout.
>
>
>  

-- 
You received this message because you are subscribed to the Google Group 
"TopBraid Suite Users", the topics of which include Enterprise Vocabulary 
Network (EVN), Reference Data Manager (RDM), TopBraid Composer, TopBraid Live, 
TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to topbraid-users@googlegroups.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 topbraid-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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, spin.ttl, 
> spl.spin.ttl?
>
> On Tuesday, March 17, 2015 at 11:57:38 PM UTC+1, Holger Knublauch wrote: 
>>
>>  Ah that explains it. I had internally switched to a Turtle file 
>> etc/spin.ttl. I had assumed that anyone who relies on 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: Not found: etc/spin.rdf
>>
>> Were the vocabulary files removed from etc/? Is there some new location I 
>> can use for location-mapping.n3?
>>
>> On Tuesday, March 17, 2015 at 1:51:29 PM UTC+1, 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 UTC+1, Holger Knublauch wrote: 
>>>>
>>>>  On 3/17/2015 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 #TemplateItem in the files that you 
>>>> mention. Are there others?
>>>>
>>>> (Also, and not your "fault": the labelTemplate of dqc:MissingProperties 
>>>> is misleading - I don't see how empty literals would be allowed by it). 
>>>> Note that using NOT EXISTS without FILTER is no longer legal in SPARQL 1.1 
>>>> - it was just an ARQ syntax. It should be changed to FILTER NOT EXISTS in 
>>>> the long term.
>>>>
>>>> Holger
>>>>
>>>>
>>>>  
>>>> This is the main ontology:
>>>>
>>>> https://github.com/Graphity/graphity-client/blob/master/src/main/resources/org/graphity/client/vocabulary/gcs.ttl
>>>>
>>>> It imports the DQC ontology:
>>>>
>>>> https://github.com/Graphity/graphity-client/blob/master/src/main/resources/org/graphity/processor/vocabulary/dq-constraints.rdf
>>>>
>>>> On Tuesday, March 17, 2015 at 12:45:27 AM UTC+1, Holger Knublauch 
>>>> wrote: 
>>>>>
>>>>>  I am not aware of such changes, but I will need more details to 
>>>>> verify. Did you 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:
>>>>>
>>>>> OntModel tempModel = 
>>>>> ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM);
>>>>> tempModel.add(ontModel).add(model);
>>>>> SPINModuleRegistry.get().registerAll(tempModel, null);
>>>>> List cvs = 
>>>>> SPINConstraints.check(tempModel, null);
>>>>>
>>>>> After upgrade from 1.3.1 to 1.4.0, this code stopped working -- 
>>>>> meaning that no violations are returned where they were returned before.
>>>>>
>>>>> Any clues? I was hoping the API behaviour wouldn't change.
>>>>>
>>>>> Martynas
>>>>>  -- 
>>>>> You received this message because you are subscribed to the Google 
>>>>> Group "TopBraid Suite Users", the topics of which include Enterprise 
>>>>> Vocabulary Network (EVN), Reference Data Manager (RDM), TopBraid 
>>>>> Composer, 
>>>>> TopBraid Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
>>>>> To post to this group, 

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

2015-03-17 Thread Martynas Jusevicius
Are you saying all the files in etc/ are now .ttl? sp.ttl, spin.ttl, 
spl.spin.ttl?

On Tuesday, March 17, 2015 at 11:57:38 PM UTC+1, Holger Knublauch wrote:
>
>  Ah that explains it. I had internally switched to a Turtle file 
> etc/spin.ttl. I had assumed that anyone who relies on 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: Not found: etc/spin.rdf
>
> Were the vocabulary files removed from etc/? Is there some new location I 
> can use for location-mapping.n3?
>
> On Tuesday, March 17, 2015 at 1:51:29 PM UTC+1, 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 UTC+1, Holger Knublauch wrote: 
>>>
>>>  On 3/17/2015 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 #TemplateItem in the files that you 
>>> mention. Are there others?
>>>
>>> (Also, and not your "fault": the labelTemplate of dqc:MissingProperties 
>>> is misleading - I don't see how empty literals would be allowed by it). 
>>> Note that using NOT EXISTS without FILTER is no longer legal in SPARQL 1.1 
>>> - it was just an ARQ syntax. It should be changed to FILTER NOT EXISTS in 
>>> the long term.
>>>
>>> Holger
>>>
>>>
>>>  
>>> This is the main ontology:
>>>
>>> https://github.com/Graphity/graphity-client/blob/master/src/main/resources/org/graphity/client/vocabulary/gcs.ttl
>>>
>>> It imports the DQC ontology:
>>>
>>> https://github.com/Graphity/graphity-client/blob/master/src/main/resources/org/graphity/processor/vocabulary/dq-constraints.rdf
>>>
>>> On Tuesday, March 17, 2015 at 12:45:27 AM UTC+1, Holger Knublauch wrote: 
>>>>
>>>>  I am not aware of such changes, but I will need more details to 
>>>> verify. Did you 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:
>>>>
>>>> OntModel tempModel = 
>>>> ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM);
>>>> tempModel.add(ontModel).add(model);
>>>> SPINModuleRegistry.get().registerAll(tempModel, null);
>>>> List cvs = 
>>>> SPINConstraints.check(tempModel, null);
>>>>
>>>> After upgrade from 1.3.1 to 1.4.0, this code stopped working -- meaning 
>>>> that no violations are returned where they were returned before.
>>>>
>>>> Any clues? I was hoping the API behaviour wouldn't change.
>>>>
>>>> Martynas
>>>>  -- 
>>>> You received this message because you are subscribed to the Google 
>>>> Group "TopBraid Suite Users", the topics of which include Enterprise 
>>>> Vocabulary Network (EVN), Reference Data Manager (RDM), TopBraid Composer, 
>>>> TopBraid Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
>>>> To post to this group, send email to topbrai...@googlegroups.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 topbraid-user...@googlegroups.com.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>>
>>>>   -- 
>>> You received this message because you are subscribed to the Google Group 
>>> "TopBraid Suite Users", the topics of which include Enterpr

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

2015-03-17 Thread Martynas Jusevicius
I checked the logs, and hopefully the problem is simpler than I thought:

com.hp.hpl.jena.shared.NotFoundException: Not found: etc/spin.rdf

Were the vocabulary files removed from etc/? Is there some new location I 
can use for location-mapping.n3?

On Tuesday, March 17, 2015 at 1:51:29 PM UTC+1, 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 UTC+1, Holger Knublauch wrote:
>>
>>  On 3/17/2015 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 #TemplateItem in the files that you mention. 
>> Are there others?
>>
>> (Also, and not your "fault": the labelTemplate of dqc:MissingProperties 
>> is misleading - I don't see how empty literals would be allowed by it). 
>> Note that using NOT EXISTS without FILTER is no longer legal in SPARQL 1.1 
>> - it was just an ARQ syntax. It should be changed to FILTER NOT EXISTS in 
>> the long term.
>>
>> Holger
>>
>>
>>  
>> This is the main ontology:
>>
>> https://github.com/Graphity/graphity-client/blob/master/src/main/resources/org/graphity/client/vocabulary/gcs.ttl
>>
>> It imports the DQC ontology:
>>
>> https://github.com/Graphity/graphity-client/blob/master/src/main/resources/org/graphity/processor/vocabulary/dq-constraints.rdf
>>
>> On Tuesday, March 17, 2015 at 12:45:27 AM UTC+1, Holger Knublauch wrote: 
>>>
>>>  I am not aware of such changes, but I will need more details to 
>>> verify. Did you 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:
>>>
>>> OntModel tempModel = 
>>> ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM);
>>> tempModel.add(ontModel).add(model);
>>> SPINModuleRegistry.get().registerAll(tempModel, null);
>>> List cvs = SPINConstraints.check(tempModel, 
>>> null);
>>>
>>> After upgrade from 1.3.1 to 1.4.0, this code stopped working -- meaning 
>>> that no violations are returned where they were returned before.
>>>
>>> Any clues? I was hoping the API behaviour wouldn't change.
>>>
>>> Martynas
>>>  -- 
>>> You received this message because you are subscribed to the Google Group 
>>> "TopBraid Suite Users", the topics of which include Enterprise Vocabulary 
>>> Network (EVN), Reference Data Manager (RDM), TopBraid Composer, TopBraid 
>>> Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
>>> To post to this group, send email to topbrai...@googlegroups.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 topbraid-user...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>>>   -- 
>> You received this message because you are subscribed to the Google Group 
>> "TopBraid Suite Users", the topics of which include Enterprise Vocabulary 
>> Network (EVN), Reference Data Manager (RDM), TopBraid Composer, TopBraid 
>> Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
>> To post to this group, send email to topbrai...@googlegroups.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 topbraid-user...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>>  

-- 
You received this message because you are subscribed to the Google Group 
"TopBraid Suite Users", the topics of which include Enterprise Vocabulary 
Network (EVN), Reference Data Manager (RDM), TopBraid Composer, TopBraid Live, 
TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to topbraid-users@googlegroups.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 topbraid-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

2015-03-17 Thread Martynas Jusevicius
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 UTC+1, Holger Knublauch wrote:
>
>  On 3/17/2015 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 #TemplateItem in the files that you mention. 
> Are there others?
>
> (Also, and not your "fault": the labelTemplate of dqc:MissingProperties is 
> misleading - I don't see how empty literals would be allowed by it). Note 
> that using NOT EXISTS without FILTER is no longer legal in SPARQL 1.1 - it 
> was just an ARQ syntax. It should be changed to FILTER NOT EXISTS in the 
> long term.
>
> Holger
>
>
>  
> This is the main ontology:
>
> https://github.com/Graphity/graphity-client/blob/master/src/main/resources/org/graphity/client/vocabulary/gcs.ttl
>
> It imports the DQC ontology:
>
> https://github.com/Graphity/graphity-client/blob/master/src/main/resources/org/graphity/processor/vocabulary/dq-constraints.rdf
>
> On Tuesday, March 17, 2015 at 12:45:27 AM UTC+1, Holger Knublauch wrote: 
>>
>>  I am not aware of such changes, but I will need more details to verify. 
>> Did you 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:
>>
>> OntModel tempModel = 
>> ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM);
>> tempModel.add(ontModel).add(model);
>> SPINModuleRegistry.get().registerAll(tempModel, null);
>> List cvs = SPINConstraints.check(tempModel, 
>> null);
>>
>> After upgrade from 1.3.1 to 1.4.0, this code stopped working -- meaning 
>> that no violations are returned where they were returned before.
>>
>> Any clues? I was hoping the API behaviour wouldn't change.
>>
>> Martynas
>>  -- 
>> You received this message because you are subscribed to the Google Group 
>> "TopBraid Suite Users", the topics of which include Enterprise Vocabulary 
>> Network (EVN), Reference Data Manager (RDM), TopBraid Composer, TopBraid 
>> Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
>> To post to this group, send email to topbrai...@googlegroups.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 topbraid-user...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>>   -- 
> You received this message because you are subscribed to the Google Group 
> "TopBraid Suite Users", the topics of which include Enterprise Vocabulary 
> Network (EVN), Reference Data Manager (RDM), TopBraid Composer, TopBraid 
> Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
> To post to this group, send email to topbrai...@googlegroups.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 topbraid-user...@googlegroups.com .
> For more options, visit https://groups.google.com/d/optout.
>
>
>  

-- 
You received this message because you are subscribed to the Google Group 
"TopBraid Suite Users", the topics of which include Enterprise Vocabulary 
Network (EVN), Reference Data Manager (RDM), TopBraid Composer, TopBraid Live, 
TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to topbraid-users@googlegroups.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 topbraid-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 instance, with 1.3.1, SPINConstraints.check() returns 2 
> ConstraintViolation objects while with 1.4.0 it returns 0.
>
> The constrains are mostly very simple and look like this:
>
> spin:constraint [ a dqc:MissingProperties ;
> sp:arg1 <#TemplateItem> ;
> sp:arg2 gp:slug
> ] ;
>
> This is the main ontology:
>
> https://github.com/Graphity/graphity-client/blob/master/src/main/resources/org/graphity/client/vocabulary/gcs.ttl
>
> It imports the DQC ontology:
>
> https://github.com/Graphity/graphity-client/blob/master/src/main/resources/org/graphity/processor/vocabulary/dq-constraints.rdf
>
> On Tuesday, March 17, 2015 at 12:45:27 AM UTC+1, Holger Knublauch wrote:
>>
>>  I am not aware of such changes, but I will need more details to verify. 
>> Did you 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:
>>
>> OntModel tempModel = 
>> ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM);
>> tempModel.add(ontModel).add(model);
>> SPINModuleRegistry.get().registerAll(tempModel, null);
>> List cvs = SPINConstraints.check(tempModel, 
>> null);
>>
>> After upgrade from 1.3.1 to 1.4.0, this code stopped working -- meaning 
>> that no violations are returned where they were returned before.
>>
>> Any clues? I was hoping the API behaviour wouldn't change.
>>
>> Martynas
>>  -- 
>> You received this message because you are subscribed to the Google Group 
>> "TopBraid Suite Users", the topics of which include Enterprise Vocabulary 
>> Network (EVN), Reference Data Manager (RDM), TopBraid Composer, TopBraid 
>> Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
>> To post to this group, send email to topbrai...@googlegroups.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 topbraid-user...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>>  

-- 
You received this message because you are subscribed to the Google Group 
"TopBraid Suite Users", the topics of which include Enterprise Vocabulary 
Network (EVN), Reference Data Manager (RDM), TopBraid Composer, TopBraid Live, 
TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to topbraid-users@googlegroups.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 topbraid-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

2015-03-16 Thread Martynas Jusevicius
Yes, everything is identical except the SPIN versions in POM -- yet the 
behaviour is different. I just double-checked.

In one instance, with 1.3.1, SPINConstraints.check() returns 2 
ConstraintViolation objects while with 1.4.0 it returns 0.

The constrains are mostly very simple and look like this:

spin:constraint [ a dqc:MissingProperties ;
sp:arg1 <#TemplateItem> ;
sp:arg2 gp:slug
] ;

This is the main ontology:
https://github.com/Graphity/graphity-client/blob/master/src/main/resources/org/graphity/client/vocabulary/gcs.ttl

It imports the DQC ontology:
https://github.com/Graphity/graphity-client/blob/master/src/main/resources/org/graphity/processor/vocabulary/dq-constraints.rdf

On Tuesday, March 17, 2015 at 12:45:27 AM UTC+1, Holger Knublauch wrote:
>
>  I am not aware of such changes, but I will need more details to verify. 
> Did you 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:
>
> OntModel tempModel = 
> ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM);
> tempModel.add(ontModel).add(model);
> SPINModuleRegistry.get().registerAll(tempModel, null);
> List cvs = SPINConstraints.check(tempModel, 
> null);
>
> After upgrade from 1.3.1 to 1.4.0, this code stopped working -- meaning 
> that no violations are returned where they were returned before.
>
> Any clues? I was hoping the API behaviour wouldn't change.
>
> Martynas
>  -- 
> You received this message because you are subscribed to the Google Group 
> "TopBraid Suite Users", the topics of which include Enterprise Vocabulary 
> Network (EVN), Reference Data Manager (RDM), TopBraid Composer, TopBraid 
> Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
> To post to this group, send email to topbrai...@googlegroups.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 topbraid-user...@googlegroups.com .
> For more options, visit https://groups.google.com/d/optout.
>
>
>  

-- 
You received this message because you are subscribed to the Google Group 
"TopBraid Suite Users", the topics of which include Enterprise Vocabulary 
Network (EVN), Reference Data Manager (RDM), TopBraid Composer, TopBraid Live, 
TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to topbraid-users@googlegroups.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 topbraid-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 cvs = SPINConstraints.check(tempModel, 
null);

After upgrade from 1.3.1 to 1.4.0, this code stopped working -- meaning 
that no violations are returned where they were returned before.

Any clues? I was hoping the API behaviour wouldn't change.

Martynas

-- 
You received this message because you are subscribed to the Google Group 
"TopBraid Suite Users", the topics of which include Enterprise Vocabulary 
Network (EVN), Reference Data Manager (RDM), TopBraid Composer, TopBraid Live, 
TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to topbraid-users@googlegroups.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 topbraid-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 received this message because you are subscribed to the Google Group 
"TopBraid Suite Users", the topics of which include Enterprise Vocabulary 
Network (EVN), Reference Data Manager (RDM), TopBraid Composer, TopBraid Live, 
TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to topbraid-users@googlegroups.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 topbraid-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 companion for automating some 
> tasks. But there are a couple of (minor) things I've noticed which, at 
> least from my perspective, would be useful to fix/enhance:
>  
>
> Thanks for your feedback!
>
>
>  
>- When I specify rules in TBC that contain nodes of the default 
>namespace (i.e. :myNode instead of myNS:myNode) then SPIN API complains 
>about these rules. Don't know if this is a problem of TBC (should sp:text 
>only contain fully qualified nodes?) or of SPIN API. 
>
>  
> What error message are you getting when you use the default namespace? In 
> general, I would advise anyone against using default namespaces, because 
> they can easily lead to confusion depending on the order of subgraphs in a 
> union graph. It is also often confusing to the algorithms to pick the right 
> choice when a namespace is abbreviated both with "" and another prefix.
>
>  
>- It would be nice if more "useable" information is sent to the SPIN 
>API ProgressMonitor, such as the iteration number as an integer and rule 
>name as a string. Now the only way to extract this information, seems to 
>parse the so-called subtask label. 
>
>  
> Good idea, now recorded on our bug tracker.
>
>  
>- Inferencing with SPIN API is a lot faster than inferencing with TBC 
>(factor 8 or so). Perhaps the constant updating of the TBC progress widget 
>is the culprit? If this is the case, maybe it makes sense to provide the 
>possibility to turn off these widget updates? Or better yet, perhaps a 
> more 
>advanced progress widget would allow the possibility to show only "high 
>level" information such as the current iteration number, and would show 
>additional information such as a progress bar, busy time, etc.?
> 
>  
> Weird, we will investigate.
>
>  
>- In TBC, suppose you create a new ontology that imports other 
>ontologies, and you create subclasses of existing (imported) classes. In 
>this case, it would be nice to visualize in the Classes View which "paths" 
>contain subclasses of the currently active ontology, and which don't. Just 
>like individuals can be found very easily due to the "()" suffix, 
>it would be nice to see which classes lead to subclasses of the currently 
>active ontology, and which don't. Perhaps the imported classes that don't 
>contain subclasses of the currently active ontology could have a gray font 
>instead of a black one? 
>
>  
> In addition to the suggestion by Irene you may also find "Model > Find all 
> locally defined resources" useful.
>
>  
>- Not sure if it's a legitimate remark or not, but I for one wouldn't 
>be unhappy to see SPIN API appearing on GitHub...
> 
>  
> Absolutely. I have recently started work on a next generation of SPIN as a 
> candidate proposal for the ongoing Shapes W3C group, and plan to publish 
> that version as a public github project once the group signals interest in 
> this work. The complication is that we also need a copy of this for the 
> TopBraid code base, and branching etc would become very complicating if 
> this were spanning multiple github projects. My approach would be to make 
> the edits on the TopBraid code base first, and periodically copy over the 
> changed files to the public repository. This will hopefully also allow us 
> to more easily receive external contributions.
>
> But for now I need to ask for patience until the W3C direction has been 
> clarified.
>
> Thanks again,
> Holger
>
>  

-- 
You received this message because you are subscribed to the Google Group 
"TopBraid Suite Users", the topics of which include Enterprise Vocabulary 
Network (EVN), Reference Data Manager (RDM), TopBraid Composer, TopBraid Live, 
TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to topbraid-users@googlegroups.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 topbraid-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 bnode be reused somehow, or do I 
need to re-parse the sp:text value with ARQ2SPIN?

Thanks.

Martynas
graphityhq.com

-- 
-- You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary 
Network (EVN), TopBraid Composer, TopBraid Live, TopBraid Insight, 
SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to
topbraid-users@googlegroups.com
To unsubscribe from this group, send email to
topbraid-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en
--- 
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 topbraid-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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.

Here's where I use it:
https://github.com/Graphity/graphity-browser/blob/master/src/main/java/org/graphity/browser/Resource.java
 

Could you help me out with this?

Martynas
graphity.org

On Wednesday, June 27, 2012 2:15:55 AM UTC+2, Holger Knublauch wrote:
>
>  On 6/26/2012 20:26, Martynas wrote:
>  
> Holger, 
>
>  I have a SPIN query for which I want to change the ORDER BY expression 
> -- say change the ?var name, or change ASC to DESC for example.
>
>  I have implemented the following method:
>
>  public QueryBuilder orderBy(Variable var, boolean desc)
> {
>  spinQuery.removeAll(SP.orderBy); // does not have effect??
>  
>
> If not, then are you perhaps in a MultiUnion graph where the triple is not 
> in the base graph? Also note that the removeAll won't delete any rdf:List 
> triples, so they may be left as orphans.
>
> Hard to say without the full source code.
>
> In general, have you thought about using the Jena Query model API instead 
> here, i.e. manipulate the Jena objects and then use ARQ2SPIN to replace the 
> bnodes of the select?
>
> Holger
>
>  

-- You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary 
Network (EVN), TopBraid Composer, TopBraid Live,
TopBraid Ensemble, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to
topbraid-users@googlegroups.com
To unsubscribe from this group, send email to
topbraid-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en

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:
> I was attempting to use Dublin Core's format property to define the
> type of file cited as a source.  Dubline Core calls for the object of
> this predicate to be a resource, and even goes as far as to recommend
> using iana's controlled medai types.  Only problem is, these are
> literals and there doesn't seem to be a recognized way of referencing
> them in a "semantic-web" way.
>
> Maybe I'm just too much of a purist - yes, using literals will work
> and that would be a pragmatic way to go, but it seems to run counter
> to the idea of linked data, since these mime types are defined in
> pretty serious detail, including RFC's etc...  OK, ok, i'll just shut
> up and use the literal.
>
> Term Name: format
> URI:    http://purl.org/dc/terms/format
> Label:  Format
> Definition:     The file format, physical medium, or dimensions of the
> resource.
> Comment:        Examples of dimensions include size and duration.
> Recommended best practice is to use a controlled vocabulary such as
> the list of Internet Media Types [MIME].
> References:     [MIME] http://www.iana.org/assignments/media-types/
> Type of Term:   Property
> Refines:        http://purl.org/dc/elements/1.1/format
> Has Range:      http://purl.org/dc/terms/MediaTypeOrExtent
> Version:        http://dublincore.org/usage/terms/history/#formatT-001
>
> On Feb 2, 10:07 am, Scott Henninger 
> wrote:
>> Hello Joe; I'm not aware of any efforts to create URIs for MIME
>> types.  I'm not clear on the rationale or need for this, so maybe a
>> bit more description on the problem you are trying to solve will
>> help.  In my experience a literal for the MIME type suffices and is
>> usually preferred because the entity needing the MIME type will
>> recognize the literal.
>>
>> -- Scott
>>
>> On Feb 1, 8:40 pm, Joe  wrote:
>>
>> > Not a Top Braid question so much as one on proper nomenclature.
>>
>> > I'm trying to determine whether or not there is any standard out there
>> > on how to reference MIME Types using fully qualified URI's?  In
>> > particular "text/xml".
>>
>> > I know there are several "ad-hoc" ways of doing this, but I'm looking
>> > for something published by a reputable working group or consortium.
>>
>> > Any and all advice welcome!
>> > Thanks,
>> > Joe
>
> --
> You received this message because you are subscribed to the Google
> Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
> TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
> To post to this group, send email to
> topbraid-users@googlegroups.com
> To unsubscribe from this group, send email to
> topbraid-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/topbraid-users?hl=en
>

-- 
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
To post to this group, send email to
topbraid-users@googlegroups.com
To unsubscribe from this group, send email to
topbraid-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en


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, leading to internal changes that are sometimes 
> incompatible. SPIN depends on ARQ and thus trails a bit behind, but I'll 
> release an update as soon as I believe it's stable. Meanwhile, if you are 
> desperate, I will send you a copy of my current snapshot off list, in a few 
> minutes.
>
> Holger
>
>
>
> On Feb 1, 2011, at 9:24 AM, Martynas wrote:
>
>> Hey Holger,
>>
>> well, SDB 1.3.3 includes Jena 2.6.4 and ARQ 2.8.7.
>> But I'm still not sure how to go about this. Do you mean I have to
>> downgrade SDB again, so that these versions match those mentioned with
>> SPIN 1.1.2? :(
>>
>> Martynas
>>
>> On Feb 1, 12:15 am, Holger Knublauch  wrote:
>>> Hi Martynas,
>>>
>>> this is due to internal changes to ARQ since the latest release of the SPIN 
>>> API. You need to use matching versions of Jena and ARQ APIs mentioned on 
>>> the SPIN API page.
>>>
>>> I have adjusted the SPIN API for the upcoming 3.5 release of TopBraid to 
>>> work with the latest ARQ, but this version is not published/stable yet.
>>>
>>> Regards
>>> Holger
>>>
>>> On Feb 1, 2011, at 8:56 AM, Martynas wrote:
>>>
 Hey,
>>>
 I'm using SPIN API 1.1.2.
 Since updating SDB from 1.3.0 to 1.3.3 (I think that was the reason),
 I'm getting an exception where there was none before:
>>>
 java.lang.IllegalArgumentException: 
 Functionhttp://spinrdf.org/spl#instanceOf
 does not define a valid body
        at
 org.topbraid.spin.arq.SPINARQFunction.(SPINARQFunction.java:69)
        at
 org.topbraid.spin.system.SPINModuleRegistry.registerARQFunction(SPINModuleRegistry.java:
 204)
        at
 org.topbraid.spin.system.SPINModuleRegistry.register(SPINModuleRegistry.java:
 157)
        at
 org.topbraid.spin.system.SPINModuleRegistry.registerFunctions(SPINModuleRegistry.java:
 238)
        at
 org.topbraid.spin.system.SPINModuleRegistry.registerAll(SPINModuleRegistry.java:
 188)
        at
 org.topbraid.spin.system.SPINModuleRegistry.init(SPINModuleRegistry.java:
 137)
        at
 frontend.controller.resource.report.ReportListResource.saveModel(ReportListResource.java:
 222)
        at
 frontend.controller.resource.report.ReportListResource.save(ReportListResource.java:
 179)
        at
 frontend.controller.resource.report.ReportListResource.doPost(ReportListResource.java:
 100)
        at
 dk.semantic_web.diy.controller.Controller.process(Controller.java:55)
        at controller.Controller.process(Controller.java:41)
        at controller.Controller.doPost(Controller.java:91)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:
 637)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:
 717)
        at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
 290)
        at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
 206)
        at
 org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:
 390)
        at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
 235)
        at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
 206)
        at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
 233)
        at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
 191)
        at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
 128)
        at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
 102)
        at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
 109)
        at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
 286)
        at
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
 845)
        at org.apache.coyote.http11.Http11Protocol
 $Http11ConnectionHandler.process(Http11Protocol.java:583)
        at org.apache.tomcat.util.net.JIoEndpoint
 $Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:619)
 Caused by: com.hp.hpl.jena.query.QueryParseException: Encountered "
  "-2 "" at line 18, column 36.
 Was expecting one of:
     ...
    "}" ...
>>>
        at
 com.hp.hpl.jena.sparql.lang.ParserARQ.perform(ParserARQ.java:86)
        at com.hp.hpl.jena.sparql.lang.ParserARQ.parse(ParserARQ