You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@marmotta.apache.org by Jesus <je...@gmail.com> on 2016/05/17 07:59:19 UTC

Re: Prefixes fn and lfm: URLs broken&In-Reply-To=

Hi Sergio,

I get two two differents errors through two possible scenes, declaring or
not the URL namespace definitions explicitly:


** Code option 1 (namespaces explicitly defined) **

@prefix dc: <http://purl.org/dc/elements/1.1/> ;
@prefix fn: <http://www.newmedialab.at/lmf/functions/1.0/> ;
@prefix lmf: <http://www.newmedialab.at/lmf/types/1.0/> ;
id = . :: xsd:string ;
title = dc:title :: xsd:string ;
file = fn:content(.) :: lmf:text_es ;

** Exception obtained **

org.apache.marmotta.ldpath.exception.LDPathParseException: error while
parsing path expression
at org.apache.marmotta.ldpath.LDPath.programQuery(LDPath.java:246)
...
Caused by: org.apache.marmotta.ldpath.parser.ParseException: Encountered "
"@prefix" "@prefix "" at line 2, column 1.
Was expecting:
    <EOF>

at
org.apache.marmotta.ldpath.parser.LdPathParser.generateParseException(LdPathParser.java:2550)
at
org.apache.marmotta.ldpath.parser.LdPathParser.jj_consume_token(LdPathParser.java:2440)
at
org.apache.marmotta.ldpath.parser.LdPathParser.Program(LdPathParser.java:409)
at
org.apache.marmotta.ldpath.parser.LdPathParser.parseProgram(LdPathParser.java:112)
at org.apache.marmotta.ldpath.LDPath.programQuery(LDPath.java:235)
... 47 more



** Code option 2 **

@prefix dc: <http://purl.org/dc/elements/1.1/> ;
id = . :: xsd:string ;
title = dc:title :: xsd:string ;
file = fn:content(.) :: lmf:text_es ;

** Exception obtained **

org.apache.marmotta.ldpath.exception.LDPathParseException: error while
parsing path expression at
org.apache.marmotta.ldpath.LDPath.programQuery(LDPath.java:246)
...
Caused by: org.apache.marmotta.ldpath.parser.ParseException: function with
URI http://www.newmedialab.at/lmf/functions/1.0/content does not exist
at
org.apache.marmotta.ldpath.parser.LdPathParser.getFunction(LdPathParser.java:213)
at
org.apache.marmotta.ldpath.parser.LdPathParser.FunctionSelector(LdPathParser.java:852)
at
org.apache.marmotta.ldpath.parser.LdPathParser.AtomicSelector(LdPathParser.java:686)
at
org.apache.marmotta.ldpath.parser.LdPathParser.Selector(LdPathParser.java:607)
at
org.apache.marmotta.ldpath.parser.LdPathParser.Rule(LdPathParser.java:441)
at
org.apache.marmotta.ldpath.parser.LdPathParser.Program(LdPathParser.java:406)
at
org.apache.marmotta.ldpath.parser.LdPathParser.parseProgram(LdPathParser.java:112)
at org.apache.marmotta.ldpath.LDPath.programQuery(LDPath.java:235)
... 47 more


Any ideas?

Cheers,
Jesus



On 2016-05-17 06:55, Sergio Fern�ndez <s....@redlink.co> wrote:
> BTW, Marmotta lists all LDPath functions currently registered at>
> http://host/to/marmotta/ldpath/admin/functions.html>
>
> On Tue, May 17, 2016 at 6:47 AM, Sergio Fern�ndez <wi...@apache.org>
wrote:>
>
> > Jes�s, can you please share with us the whole LDPath
expression/program?>
> >>
> > I guess you are not using the right syntax, because there is no need
to>
> > explicitly declare those prefixes for functions, as>
> > https://marmotta.apache.org/ldpath/language.html#Namespace_Definitions>
> > explains.>
> >>
> > See>
> >
https://github.com/apache/marmotta/blob/develop/libraries/ldpath/ldpath-backend-file/src/test/resources/org/apache/marmotta/ldpath/backend/file/stanbol.search#L22
for>
> > an usage example.>
> >>
> > BTW, I noticed we need to work on thart section of the documentation:>
> > https://marmotta.apache.org/ldpath/functions.html>
> >>
> >>
> >>
> > On Mon, May 16, 2016 at 4:01 PM, Jesus <je...@gmail.com>>
> > wrote:>
> >>
> >> Hi dev,>
> >>>
> >> Using LDPath for selecting rdf properties, I get a ParseException
using>
> >> *fn* and *lfm *prefixes because namespace URLs are broken (I guess).>
> >>>
> >> lmf: <http://www.newmedialab.at/lmf/types/1.0/>    (LMF extended index
datatypes)>
> >> fn: <http://www.newmedialab.at/lmf/functions/1.0/> (LMF index
functions)>
> >>>
> >>>
> >> This is an example using *fn:content*:>
> >>>
> >> [image: Im�genes integradas 1]>
> >>>
> >> Cheers,>
> >>>
> >> Jesus>
> >>>
> >>
> >>
> >>
> > -->
> > Sergio Fern�ndez>
> > Partner Technology Manager>
> > Redlink GmbH>
> > m:  43 6602747925>
> > e: sergio.fernandez@redlink.co>
> > w: http://redlink.co>
> >>
>
>
>
> -- >
> Sergio Fern�ndez>
> Partner Technology Manager>
> Redlink GmbH>
> m:  43 6602747925>
> e: sergio.fernandez@redlink.co>
> w: http://redlink.co>
>