[GitHub] jena pull request: JENA-967: afn:Sprintf implementation
Github user asfgit closed the pull request at: https://github.com/apache/jena/pull/132 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[jira] [Commented] (JENA-967) Suggested ARQ Extension function: afn:printf(...)
[ https://issues.apache.org/jira/browse/JENA-967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15234893#comment-15234893 ] ASF GitHub Bot commented on JENA-967: - Github user asfgit closed the pull request at: https://github.com/apache/jena/pull/132 > Suggested ARQ Extension function: afn:printf(...) > - > > Key: JENA-967 > URL: https://issues.apache.org/jira/browse/JENA-967 > Project: Apache Jena > Issue Type: New Feature > Components: ARQ >Reporter: Stuart Williams >Priority: Minor > > There are situations where it would be useful to be able to format strings > bound to variable. In particular I have wanted to create some zero-filled > numeric strings. > I've accomplished the task with a pair of BINDs as follows where {{?code}} is > bound to a numeric string: > {noformat} >BIND( "00" as ?zfill ) >BIND( > concat(if(strlen(?code)>=strlen(?zfill),"",substr(?zfill,strlen(?code)+1)),?code) > as ?reg_notation) > {noformat} > But it would have been nice to be able to use something less opaque like: > {noformat} >BIND( afn:printf("%06d",?code) as ?reg_notation) > {noformat} > So 'improvement'/'new feature' suggestion is an additional ARQ Extension > function that exposes java {{printf}} method. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (JENA-967) Suggested ARQ Extension function: afn:printf(...)
[ https://issues.apache.org/jira/browse/JENA-967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15234895#comment-15234895 ] ASF GitHub Bot commented on JENA-967: - Github user afs commented on the pull request: https://github.com/apache/jena/pull/132#issuecomment-208295483 Looks good and I've merged it into master. Thanks! (I've added t the documentation for the function library.) > Suggested ARQ Extension function: afn:printf(...) > - > > Key: JENA-967 > URL: https://issues.apache.org/jira/browse/JENA-967 > Project: Apache Jena > Issue Type: New Feature > Components: ARQ >Reporter: Stuart Williams >Priority: Minor > > There are situations where it would be useful to be able to format strings > bound to variable. In particular I have wanted to create some zero-filled > numeric strings. > I've accomplished the task with a pair of BINDs as follows where {{?code}} is > bound to a numeric string: > {noformat} >BIND( "00" as ?zfill ) >BIND( > concat(if(strlen(?code)>=strlen(?zfill),"",substr(?zfill,strlen(?code)+1)),?code) > as ?reg_notation) > {noformat} > But it would have been nice to be able to use something less opaque like: > {noformat} >BIND( afn:printf("%06d",?code) as ?reg_notation) > {noformat} > So 'improvement'/'new feature' suggestion is an additional ARQ Extension > function that exposes java {{printf}} method. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[GitHub] jena pull request: JENA-967: afn:Sprintf implementation
Github user afs commented on the pull request: https://github.com/apache/jena/pull/132#issuecomment-208295483 Looks good and I've merged it into master. Thanks! (I've added t the documentation for the function library.) --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[jira] [Commented] (JENA-967) Suggested ARQ Extension function: afn:printf(...)
[ https://issues.apache.org/jira/browse/JENA-967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15234904#comment-15234904 ] Andy Seaborne commented on JENA-967: NB: the function is called `afn:sprintf`. > Suggested ARQ Extension function: afn:printf(...) > - > > Key: JENA-967 > URL: https://issues.apache.org/jira/browse/JENA-967 > Project: Apache Jena > Issue Type: New Feature > Components: ARQ >Reporter: Stuart Williams >Priority: Minor > > There are situations where it would be useful to be able to format strings > bound to variable. In particular I have wanted to create some zero-filled > numeric strings. > I've accomplished the task with a pair of BINDs as follows where {{?code}} is > bound to a numeric string: > {noformat} >BIND( "00" as ?zfill ) >BIND( > concat(if(strlen(?code)>=strlen(?zfill),"",substr(?zfill,strlen(?code)+1)),?code) > as ?reg_notation) > {noformat} > But it would have been nice to be able to use something less opaque like: > {noformat} >BIND( afn:printf("%06d",?code) as ?reg_notation) > {noformat} > So 'improvement'/'new feature' suggestion is an additional ARQ Extension > function that exposes java {{printf}} method. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Resolved] (JENA-967) Suggested ARQ Extension function: afn:printf(...)
[ https://issues.apache.org/jira/browse/JENA-967?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andy Seaborne resolved JENA-967. Resolution: Done Assignee: Andy Seaborne Fix Version/s: Jena 3.1.0 Contribution from GitHub user ales004 - thanks! > Suggested ARQ Extension function: afn:printf(...) > - > > Key: JENA-967 > URL: https://issues.apache.org/jira/browse/JENA-967 > Project: Apache Jena > Issue Type: New Feature > Components: ARQ >Reporter: Stuart Williams >Assignee: Andy Seaborne >Priority: Minor > Fix For: Jena 3.1.0 > > > There are situations where it would be useful to be able to format strings > bound to variable. In particular I have wanted to create some zero-filled > numeric strings. > I've accomplished the task with a pair of BINDs as follows where {{?code}} is > bound to a numeric string: > {noformat} >BIND( "00" as ?zfill ) >BIND( > concat(if(strlen(?code)>=strlen(?zfill),"",substr(?zfill,strlen(?code)+1)),?code) > as ?reg_notation) > {noformat} > But it would have been nice to be able to use something less opaque like: > {noformat} >BIND( afn:printf("%06d",?code) as ?reg_notation) > {noformat} > So 'improvement'/'new feature' suggestion is an additional ARQ Extension > function that exposes java {{printf}} method. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
Re: CMS diff: Jena tutorials
On 26/03/16 13:00, Anonymous CMS User wrote: Clone URL (Committers only): https://cms.apache.org/redirect?new=anonymous;action=diff;uri=http://jena.apache.org/tutorials%2Findex.mdtext Index: trunk/content/tutorials/index.mdtext === --- trunk/content/tutorials/index.mdtext(revision 1655891) +++ trunk/content/tutorials/index.mdtext(working copy) @@ -27,6 +27,6 @@ - [Manipulando SPARQL usando ARQ](/documentation/query/manipulating_sparql_using_arq_pt.html) - [Usando o Jena com o Eclipse](using_jena_with_eclipse_pt.html) -Traditional Chinese: +Simplified Chinese: - [RDF 和 Jena RDF API 入门](http://domdong.blogspot.com.au/2013/04/an-introduction-to-rdf-and-jena-rdf-api.html) Done - thanks. Andy
[GitHub] jena pull request: Fix Jena initialization in OSGi environments
Github user afs commented on the pull request: https://github.com/apache/jena/pull/134#issuecomment-208348383 I have applied this fix and pushed the result to branch "osgi-fix-init" It builds with `mvn clean install` and because this fixes something that is otherwise broken, it seems better to me to apply it to master in the current state and then continue refining it if need be. There are some changes and comment POM lines that it would be good to sort out: I'd like help with: * checking it works in an OSGi environment. * assessing `jena-osgi-test` * Can we remove the ``? The `JenaSubsystemRegistryBasic` has been changed. * `` and `` for Xerces. Jena uses internal features of Xerces and is sentisite to the version (OK - it rarely changes these days). Also, Xerces can be a endorsed jar making version management by the app not work. Is it necessary to `Import` it? The branch does not pass the tests in `jena-osgi-test`. Note that `jena-osgi-test` is not in the build because of [JENA-913](https://issues.apache.org/jira/browse/JENA-913) and [JENA-1037](https://issues.apache.org/jira/browse/JENA-1037) so the test failures are probably unrelated. For the record: steps take to integrate the diff: * Add license header to `Activator.java` * De-tabbed the pom files and sorted out trailing white space. * Some formatting "bit rot" had set in. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
[jira] [Commented] (JENA-913) jena-osgi-test breaks a build of Jena with "maven clean verify" starting with an empty repo.
[ https://issues.apache.org/jira/browse/JENA-913?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15235100#comment-15235100 ] ASF GitHub Bot commented on JENA-913: - Github user afs commented on the pull request: https://github.com/apache/jena/pull/134#issuecomment-208348383 I have applied this fix and pushed the result to branch "osgi-fix-init" It builds with `mvn clean install` and because this fixes something that is otherwise broken, it seems better to me to apply it to master in the current state and then continue refining it if need be. There are some changes and comment POM lines that it would be good to sort out: I'd like help with: * checking it works in an OSGi environment. * assessing `jena-osgi-test` * Can we remove the ``? The `JenaSubsystemRegistryBasic` has been changed. * `` and `` for Xerces. Jena uses internal features of Xerces and is sentisite to the version (OK - it rarely changes these days). Also, Xerces can be a endorsed jar making version management by the app not work. Is it necessary to `Import` it? The branch does not pass the tests in `jena-osgi-test`. Note that `jena-osgi-test` is not in the build because of [JENA-913](https://issues.apache.org/jira/browse/JENA-913) and [JENA-1037](https://issues.apache.org/jira/browse/JENA-1037) so the test failures are probably unrelated. For the record: steps take to integrate the diff: * Add license header to `Activator.java` * De-tabbed the pom files and sorted out trailing white space. * Some formatting "bit rot" had set in. > jena-osgi-test breaks a build of Jena with "maven clean verify" starting with > an empty repo. > > > Key: JENA-913 > URL: https://issues.apache.org/jira/browse/JENA-913 > Project: Apache Jena > Issue Type: Bug > Components: OSGi >Reporter: Andy Seaborne > > jena-osgi-test assumes that an "install" has been done of jena-osgi, either > previously or in the current build. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[GitHub] jena pull request: Fix Jena initialization in OSGi environments
Github user jpullmann commented on the pull request: https://github.com/apache/jena/pull/134#issuecomment-208368153 Thank you. I'll do the testing tomorrow, here my quick response: Neither Require-Capability, nor SPI-* headers are needed any more. Same for Bundle activator, but I'll leave it for extension purposes. In the former approach using SPI Fly there were issues with inline Xerces. Using an embedded version makes it more selfcontained, alernatively it may require import of its particular Xerces version. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---
Re: Contributing to the code
Hi, I was looking around but I have not found any other task. If someone has in mind another task that I can do just let me know. Regards, Alessandro 2016-04-01 8:21 GMT+02:00 Alessandro Seganti : > Hi Andy, > I finally managed to make the pull request ( > https://github.com/apache/jena/pull/132)! > Let me know what you think. > > > > 2016-03-18 17:46 GMT+01:00 Andy Seaborne : > >> Hi Alessandro, >> >> On 18/03/16 06:39, Alessandro Seganti wrote: >> >>> Hi, >>> I forgot another thing: is there a way to get the locale that should be >>> used for string conversion inside the >>> jena-arq/.../sparql/expr/nodevalue/XSDFuncOp class? I need this to >>> convert >>> numbers to strings (using or not the dot). >>> >> >> In XSD, any number to string should be happening locale-independent, ie >> Locale.ROOT so the issue has never come up before. You need to get the >> Locale in force. >> >> >> 2016-03-17 21:28 GMT+01:00 Alessandro Seganti < >>> alessandro.sega...@gmail.com> >>> Hi Andy, it took me some time to understand how the code is organized but I think that I have completed the JENA-967 task. I have still some doubts but I need to show you the code to explain my problem. I wanted to make a pull request on github but I was denied access. Do I need to do something lese before having access to the repository? My github account is under ciceron...@hotmail.com. >>> >> What should work is to fork http://github.com/apache/jena in github, >> work on the clone ("git:" URL) cloned to the local machine, then do a >> github UI "pull request". Is that what you tried? What access denied did >> you get? >> >> Andy >> >> >
TransactionalNotSupportedMixin vs. Transactional vs. TransactionalComponent
A separation was recently introduced by Andy between Transactional (application-side interface) and TransactionalComponent (system-side interface) interfaces, which I believe I understand and definitely support. Additionally, a TransactionalNotSupportedMixin interface was introduced in order to support "un-Transactional" behavior. It extends Transactional and provides default implementations for the methods in Transactional that throw UnsupportedOperationExceptions. My question: should TransactionalNotSupportedMixin actually be the "override" for Transactional (as it currently is), or for TransactionalComponent, or oddly, for both? Would it be more appropriate to introduce a new NonTransactionalComponent mixin or the like? I suspect that it would be, because we want Transactional and TransactionalComponent to be able to evolve with some real independence, but I also suspect that I am missing something here. {grin} (For context, this came up for me looking at JENA-1084 as I try to tease apart different kinds of behavior in the TxnInMem dataset impl and amongst them, transactionality. That impl uses a design wherein tuple tables, each for a particular order of columns, are coupled up into multiplex tables that can support all queries. So the question of how to correctly combine transactional and non-transactional code is practical. I started using TransactionalNotSupportedMixin to mark non-transactional implementation code, but now I'm confident that I was wrong and that the "override" for TransactionalComponent is what I really want, but it's not there! {grin}) --- A. Soroka The University of Virginia Library
[GitHub] jena pull request: Fix Jena initialization in OSGi environments
Github user afs commented on the pull request: https://github.com/apache/jena/pull/134#issuecomment-208531897 Thanks for the quick response. Things are looking good for this. As Jena calls into the details of Xerces, not just the XML APIs, even a particular version can cause problems. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---