Imma Subirats | 1 Dec 2009 09:26
Picon
Gravatar

Survey on Open Access in agriculture and related sciences

*Apologies for cross-posting*

Dear all,

The FAO of the United Nations is pleased to invite you to participate
in a survey on Open Access in agriculture and related sciences. This
short survey (less then 10 minutes) is designed to get a detailed
overview of the state of the art of Open Access (OA) and Open Archives
Initiative (OAI) within the Agriculture Research Community.

The survey will be open until the end of January 2010. The results
will be made available online in the CIARD Ring
http://www.ciardring.net/ to give all participants the opportunity to
take a look at and comment the results. The conclusions drawn will be
presented at the IAALD XIIIth World Congress on 26-29 April 2010,
Montpellier, France.

The survey is available in English, French and Spanish at
http://www.ciardring.net/en/survey-oa.

Feel free to forward the URL to anyone you know who may be interested
in contributing.

We would be grateful if you would take the time to complete this
questionnaire. If you have any questions please contact us on
imma.subirats@...

Thank you in advance,

Imma Subirats
(Continue reading)

Cyril Pestel | 2 Dec 2009 10:21
Picon

Mulgara datatype (dateTime)

Hi,

Is there someone who have already queries on dateTime datatype into Mulgara triplestore ?

I know there are <mulgara:before> (on mulgara website) but i wonder what is the model into dateTime are.
I try :
select $obj $pred $val $date from <#ri>
where $obj <dc:identifier> 'object:L4987'
and $obj $pred $val
and $obj <fedora-model:createdDate> '2009-12-01T14:19:44.701Z'

Which works if 'createDate' has been a string. So I guest it's well ingest with special datatype. isn't it ?

Regards, Cyril.

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Fedora-commons-users mailing list
Fedora-commons-users@...
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users
Richard Jones | 3 Dec 2009 15:37
Picon

Invalid syntax for datastream ID

Hi Folks,

I'm trying to put a file into my Fedora repository via the REST API but 
am having some problems with the filenames.  When I insert a file with 
the name "1-content-file.pdf", I get the error pasted below.

If I change this to just "contentfile.pdf", everything works just fine.

Is there some documentation somewhere which will tell me allowed 
filenames, and does anyone have any advice on how to deal with this 
problem in general, as the filenames provided will ultimately be down to 
the user, and could easily take an invalid form such as the one I used 
originally.

Any advice much appreciated,

Cheers

Richard

javax.ws.rs.WebApplicationException: 
fedora.server.errors.InvalidXMLNameException: Invalid syntax for 
datastream ID. The datastream ID of "1-content-file.pdf" isnot a valid 
XML Name
    at 
fedora.server.rest.BaseRestResource.handleException(BaseRestResource.java:144)
    at 
fedora.server.rest.DatastreamResource.addOrUpdateDatastream(DatastreamResource.java:520)
    at 
fedora.server.rest.DatastreamResource.addDatastream(DatastreamResource.java:371)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at 
com.sun.jersey.server.impl.model.method.dispatch.EntityParamDispatchProvider$ResponseOutInvoker._dispatch(EntityParamDispatchProvider.java:157)
    at 
com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:67)
    at 
com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:124)
    at 
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:111)
    at 
com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:71)
    at 
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:111)
    at 
com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:63)
    at 
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:555)
    at 
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:514)
    at 
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:505)
    at 
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:359)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at 
fedora.server.security.servletfilters.FilterRestApiFlash.doFilter(FilterRestApiFlash.java:100)
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at 
fedora.server.security.servletfilters.FilterSetup.doFilter(FilterSetup.java:256)
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at 
fedora.server.security.servletfilters.FilterSetup.doFilter(FilterSetup.java:256)
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at 
fedora.server.security.servletfilters.FilterSetup.doFilter(FilterSetup.java:256)
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at 
fedora.server.security.servletfilters.FilterSetup.doFilter(FilterSetup.java:256)
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
    at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
    at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
    at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
    at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
    at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
    at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
    at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
    at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
    at java.lang.Thread.run(Thread.java:619)
Caused by: fedora.server.errors.InvalidXMLNameException: Invalid syntax 
for datastream ID. The datastream ID of "1-content-file.pdf" isnot a 
valid XML Name
    at 
fedora.server.management.DefaultManagement.addDatastream(DefaultManagement.java:409)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at 
fedora.server.messaging.NotificationInvocationHandler.invoke(NotificationInvocationHandler.java:92)
    at $Proxy0.addDatastream(Unknown Source)
    at 
fedora.server.management.ManagementModule.addDatastream(ManagementModule.java:233)
    at 
fedora.server.rest.DatastreamResource.addOrUpdateDatastream(DatastreamResource.java:455)
    ... 47 more

--

-- 
Richard Jones
Head of Repository Systems, Symplectic Limited
e: richard@...
t: 0845 026 4755
t: +44 (0)207 7334036
w: http://www.symplectic.co.uk/

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
Chris Wilper | 3 Dec 2009 16:34
Favicon
Gravatar

Re: Invalid syntax for datastream ID

Hi Richard,

Datastream IDs in Fedora must be valid "XML NCNames" (see below) and
cannot exceed 64 characters in length.  Although the "Fedora
Identifiers" document previously mentioned the XML NCName restriction,
it was not very well highlighted.  I've updated the doc to have a
"Datastream IDs" section near the top, with a pointer to a document
describing what NCName characters can be.

http://www.fedora-commons.org/confluence/display/FCR30/Fedora+Identifiers

The reason your datastream ID isn't working is that it starts with a
digit...that's not allowed for NCNames.

In general, Fedora's datastream IDs were not designed to be as
flexible as filenames, so it's better to save filename information, if
that's important to preserve, somewhere else.  A lot of people
dedicate the label of the datastream to that purpose.

There is also relevant feature coming in Fedora 3.3 which adds a
specific place (not just the "label") for saving the filename, and
also causes the repository to send filename information to the client
(e.g. browser) when the content is requested, so that it can up a
"Save As..." dialog with the preferred filename, which can be anything
you want.  For more detail on that, see:
https://fedora-commons.org/jira/browse/FCREPO-497

- Chris

On Thu, Dec 3, 2009 at 9:37 AM, Richard Jones <richard <at> symplectic.co.uk> wrote:
> Hi Folks,
>
> I'm trying to put a file into my Fedora repository via the REST API but
> am having some problems with the filenames.  When I insert a file with
> the name "1-content-file.pdf", I get the error pasted below.
>
> If I change this to just "contentfile.pdf", everything works just fine.
>
> Is there some documentation somewhere which will tell me allowed
> filenames, and does anyone have any advice on how to deal with this
> problem in general, as the filenames provided will ultimately be down to
> the user, and could easily take an invalid form such as the one I used
> originally.
>
> Any advice much appreciated,
>
> Cheers
>
> Richard
>
> javax.ws.rs.WebApplicationException:
> fedora.server.errors.InvalidXMLNameException: Invalid syntax for
> datastream ID. The datastream ID of "1-content-file.pdf" isnot a valid
> XML Name

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Fedora-commons-users mailing list
Fedora-commons-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users
Richard Green | 3 Dec 2009 15:55
Picon

Re: Invalid syntax for datastream ID

Richard

Others may comment, but my instinct is that it is not the filename that
is the problem per se but that you are also using the filename as the
datastream ID.  Datastream IDs must start with an alpha character (ie
not a numeric or a symbol).

Richard

___________________________________________________________________

Richard Green
Consultant to the University of Hull IT Systems Group
managing the CLIF and Hydra (Hull) Projects

http://edocs.hull.ac.uk 
http://www.hull.ac.uk/clif 
https://fedora-commons.org/confluence/display/hydra

-----Original Message-----
From: Richard Jones [mailto:richard@...] 
Sent: 03 December 2009 2:38 PM
To: fedora-commons-users@...
Subject: [Fedora-commons-users] Invalid syntax for datastream ID

Hi Folks,

I'm trying to put a file into my Fedora repository via the REST API but 
am having some problems with the filenames.  When I insert a file with 
the name "1-content-file.pdf", I get the error pasted below.

If I change this to just "contentfile.pdf", everything works just fine.

Is there some documentation somewhere which will tell me allowed 
filenames, and does anyone have any advice on how to deal with this 
problem in general, as the filenames provided will ultimately be down to

the user, and could easily take an invalid form such as the one I used 
originally.

Any advice much appreciated,

Cheers

Richard

javax.ws.rs.WebApplicationException: 
fedora.server.errors.InvalidXMLNameException: Invalid syntax for 
datastream ID. The datastream ID of "1-content-file.pdf" isnot a valid 
XML Name
    at 
fedora.server.rest.BaseRestResource.handleException(BaseRestResource.jav
a:144)
    at 
fedora.server.rest.DatastreamResource.addOrUpdateDatastream(DatastreamRe
source.java:520)
    at 
fedora.server.rest.DatastreamResource.addDatastream(DatastreamResource.j
ava:371)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at 
com.sun.jersey.server.impl.model.method.dispatch.EntityParamDispatchProv
ider$ResponseOutInvoker._dispatch(EntityParamDispatchProvider.java:157)
    at 
com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispa
tcher.dispatch(ResourceJavaMethodDispatcher.java:67)
    at 
com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRul
e.java:124)
    at 
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandP
athRule.java:111)
    at 
com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceCl
assRule.java:71)
    at 
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandP
athRule.java:111)
    at 
com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(Root
ResourceClassesRule.java:63)
    at 
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest
(WebApplicationImpl.java:555)
    at 
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(
WebApplicationImpl.java:514)
    at 
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(
WebApplicationImpl.java:505)
    at 
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletCon
tainer.java:359)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:269)
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:188)
    at 
fedora.server.security.servletfilters.FilterRestApiFlash.doFilter(Filter
RestApiFlash.java:100)
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:215)
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:188)
    at 
fedora.server.security.servletfilters.FilterSetup.doFilter(FilterSetup.j
ava:256)
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:215)
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:188)
    at 
fedora.server.security.servletfilters.FilterSetup.doFilter(FilterSetup.j
ava:256)
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:215)
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:188)
    at 
fedora.server.security.servletfilters.FilterSetup.doFilter(FilterSetup.j
ava:256)
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:215)
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:188)
    at 
fedora.server.security.servletfilters.FilterSetup.doFilter(FilterSetup.j
ava:256)
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:215)
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:188)
    at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:213)
    at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:174)
    at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator
Base.java:525)
    at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:127)
    at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:117)
    at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:108)
    at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
74)
    at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:87
4)
    at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
essConnection(Http11BaseProtocol.java:665)
    at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
.java:528)
    at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
erWorkerThread.java:81)
    at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:689)
    at java.lang.Thread.run(Thread.java:619)
Caused by: fedora.server.errors.InvalidXMLNameException: Invalid syntax 
for datastream ID. The datastream ID of "1-content-file.pdf" isnot a 
valid XML Name
    at 
fedora.server.management.DefaultManagement.addDatastream(DefaultManageme
nt.java:409)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at 
fedora.server.messaging.NotificationInvocationHandler.invoke(Notificatio
nInvocationHandler.java:92)
    at $Proxy0.addDatastream(Unknown Source)
    at 
fedora.server.management.ManagementModule.addDatastream(ManagementModule
.java:233)
    at 
fedora.server.rest.DatastreamResource.addOrUpdateDatastream(DatastreamRe
source.java:455)
    ... 47 more

-- 
Richard Jones
Head of Repository Systems, Symplectic Limited
e: richard@...
t: 0845 026 4755
t: +44 (0)207 7334036
w: http://www.symplectic.co.uk/

------------------------------------------------------------------------
------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Fedora-commons-users mailing list
Fedora-commons-users@...
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users
*****************************************************************************************
To view the terms under which this email is distributed, please go to http://www.hull.ac.uk/legal/email_disclaimer.html
*****************************************************************************************
------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Fedora-commons-users mailing list
Fedora-commons-users@...
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users
Richard Jones | 3 Dec 2009 18:20
Picon

Re: Invalid syntax for datastream ID

Hi Chris, Richard, thanks for your feedback.

> Datastream IDs in Fedora must be valid "XML NCNames" (see below) and
> cannot exceed 64 characters in length.  Although the "Fedora
> Identifiers" document previously mentioned the XML NCName restriction,
> it was not very well highlighted.  I've updated the doc to have a
> "Datastream IDs" section near the top, with a pointer to a document
> describing what NCName characters can be.
>
> http://www.fedora-commons.org/confluence/display/FCR30/Fedora+Identifiers
>
> The reason your datastream ID isn't working is that it starts with a
> digit...that's not allowed for NCNames.
>   

Thanks for that, much appreciated.

Having read over this page, I have a question to clarify exactly what I 
should be doing with my filenames and datastream ids:

The documentation says that PIDs are limited to 64 characters in length, 
and that datastreams ids are also limited to the same length.  Does this 
mean that the combined identifier for the two can be up to 128 
characters in length? Thus:

info:fedora/[pid]/[dsid]

or is the [pid]/[dsid] fragment above considered to be the datastream id?

> In general, Fedora's datastream IDs were not designed to be as
> flexible as filenames, so it's better to save filename information, if
> that's important to preserve, somewhere else.  A lot of people
> dedicate the label of the datastream to that purpose.
>
> There is also relevant feature coming in Fedora 3.3 which adds a
> specific place (not just the "label") for saving the filename, and
> also causes the repository to send filename information to the client
> (e.g. browser) when the content is requested, so that it can up a
> "Save As..." dialog with the preferred filename, which can be anything
> you want.  For more detail on that, see:
> https://fedora-commons.org/jira/browse/FCREPO-497
>   

Ah yes, I saw that going past.  I have had to, in the mean time, put a 
proxy service in place to add the filenames to requested datastreams, so 
this will be useful.

Thanks very much,

Richard

>   
>> Hi Folks,
>>
>> I'm trying to put a file into my Fedora repository via the REST API but
>> am having some problems with the filenames.  When I insert a file with
>> the name "1-content-file.pdf", I get the error pasted below.
>>
>> If I change this to just "contentfile.pdf", everything works just fine.
>>
>> Is there some documentation somewhere which will tell me allowed
>> filenames, and does anyone have any advice on how to deal with this
>> problem in general, as the filenames provided will ultimately be down to
>> the user, and could easily take an invalid form such as the one I used
>> originally.
>>
>> Any advice much appreciated,
>>
>> Cheers
>>
>> Richard
>>
>> javax.ws.rs.WebApplicationException:
>> fedora.server.errors.InvalidXMLNameException: Invalid syntax for
>> datastream ID. The datastream ID of "1-content-file.pdf" isnot a valid
>> XML Name
>>     

--

-- 
Richard Jones
Head of Repository Systems, Symplectic Limited
e: richard@...
t: 0845 026 4755
t: +44 (0)207 7334036
w: http://www.symplectic.co.uk/

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
Chris Wilper | 3 Dec 2009 19:30
Favicon
Gravatar

Re: Invalid syntax for datastream ID

Hi Richard,

On Thu, Dec 3, 2009 at 12:20 PM, Richard Jones <richard <at> symplectic.co.uk> wrote:
>[..]
> Having read over this page, I have a question to clarify exactly what I
> should be doing with my filenames and datastream ids:
>
> The documentation says that PIDs are limited to 64 characters in length, and
> that datastreams ids are also limited to the same length.  Does this mean
> that the combined identifier for the two can be up to 128 characters in
> length? Thus:
>
> info:fedora/[pid]/[dsid]
>
> or is the [pid]/[dsid] fragment above considered to be the datastream id?

The pid and dsid parts of the overall URI are subject to their own
individual length constraints.

So the maximum length for full URIs of the form above is 13 (for
"info:fedora/" + "/") + 64 (pid part) + 64 (datastreamId part).

...which turns out to be 141.

The datastreamId and PIDs are validated individually any time you try
to ingest an object or add a datastream; the maximum length of the URI
is really just fallout from that.

- Chris

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Fedora-commons-users mailing list
Fedora-commons-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users
Darren Love | 3 Dec 2009 23:18
Picon
Favicon

multicast journaling not working

Hello, I was wondering if someone could point me in the right direction. 
I'm currently trying to write journal files to my local server as well 
as my follower server. I'm running 2 identical VMs with Ubuntu 9.10 
Server, Fedora 3.2.1 and Islandora. Currently the journal files are 
writing fine to my leader server but not to my follower server. The 
follower server is running RmiJournalReceiver-3.2.jar (not as a 
service). When the receiver is running it shows that 'RmiJournalReceiver 
is ready'. Ports 1099 and 1100 are open on the follower server but it 
seems like contact is never made on the follower server from the leader 
as nothing is logged on the follower unless I restart the receiver. Any 
suggestions would be appreciated.

The leader VM has the following in the fedora.fcfg file:

<module role="fedora.server.management.Management"
     class="fedora.server.journal.Journaler">
  <param name="journalDirectory"
     value="/usr/local/journals/journalFiles"/>
<param name="journalWriterClassname"

value="fedora.server.journal.readerwriter.multicast.MulticastJournalWriter"/>
  <param name="transport.local.classname"

value="fedora.server.journal.readerwriter.multicast.LocalDirectoryTransport"/>
  <param name="transport.local.directoryPath" 
value="/usr/local/journals/archiveFiles"/>
  <param name="transport.local.crucial" value="true"/>
  <param name="transport.follow1.classname"
     value="fedora.server.journal.readerwriter.multicast.rmi.RmiTransport"/>
  <param name="transport.follow1.crucial" value="false"/>
  <param name="transport.follow1.hostName" value="LeaderIPaddressIsHere"/>
  <param name="transport.follow1.service" value="RmiJournalReceiver"/>
  <param name="journalFileSizeLimit" value="100M" />
  <param name="journalFileAgeLimit" value="1H" />
</module>
<module role="fedora.server.management.ManagementDelegate"
     class="fedora.server.management.ManagementModule">
 <comment>The management subsystem. This implements the methods necessary
        to fulfill API-M requests without regard to:
                 - how the service is exposed
                 - how bytestreams and java types might be 
marshalled/demarshalled over the wire
                 - how the storage subsystem is implemented.</comment>
    <param name="decorator1" 
value="fedora.server.messaging.NotificationInvocationHandler"/>
    <param name="autoChecksum" value="false">
      <comment>Controls whether a checksum is automatically computed for
            every datastream as the datastream is added to the 
repository. This
            will allow the integrity of datastream contents to be 
periodically
            checked to insure the object is not corrupted.</comment>
    </param>
    <param name="checksumAlgorithm" value="MD5">
      <comment>Specifies which checksumming algorithm is to be used when
            automatically computing checksums as specified by the above
            parameter. Valid values are: MD5  SHA-1  SHA-256  SHA-384  
SHA-512.</comment>
    </param>
    <param name="purgeDelayInMillis" value="60000">
      <comment>Optional, default is 60000 (1 minute).
            This specifies the amount of time between checks to remove
            temporary files uploaded via the API-M upload interface.  During
            each check, old files whose age exceeds uploadStorageMinutes
            will be removed.</comment>
    </param>
    <param name="uploadStorageMinutes" value="5">
      <comment>Optional, default is 5.
            This specifies the minimum amount of time that each uploaded
            file should be kept in temporary storage.</comment>
    </param>
</module>

The follower fedora.fcfg file contains:

<module role="fedora.server.management.Management"
        class="fedora.server.journal.Journaler">
  <param name="journalMode" value="recover" />
  <param name="journalDirectory"
         value="/usr/local/journals/journalFiles"/>
  <param name="archiveDirectory"
         value="/usr/local/journals/archiveFiles"/>
  <param name="journalReaderClassname"

value="fedora.server.journal.readerwriter.multifile.LockingFollowingJournalReader"/>
  <param name="lockRequestedFilename"
     value="/usr/local/journals/StopAcceptingJournals.lock"/>
  <param name="lockAcceptedFilename"
         value="/usr/local/journals/AcceptedJournalStop.lock"/>
  <param name="journalRecoveryLogClassname"

value="fedora.server.journal.recoverylog.RenamingJournalRecoveryLog"/>
  <param name="recoveryLogFilename" 
value="/usr/local/journals/journal.recovery.log"/>
  <param name="followPollingInterval" value="10"/>
</module>
<module role="fedora.server.management.ManagementDelegate"
        class="fedora.server.management.ManagementModule">
 <comment>The management subsystem. This implements the methods necessary
        to fulfill API-M requests without regard to:
                 - how the service is exposed
                 - how bytestreams and java types might be 
marshalled/demarshalled over the wire
                 - how the storage subsystem is implemented.</comment>
    <param name="decorator1" 
value="fedora.server.messaging.NotificationInvocationHandler"/>
    <param name="autoChecksum" value="false">
      <comment>Controls whether a checksum is automatically computed for
            every datastream as the datastream is added to the 
repository. This
            will allow the integrity of datastream contents to be 
periodically
            checked to insure the object is not corrupted.</comment>
    </param>
    <param name="checksumAlgorithm" value="MD5">
      <comment>Specifies which checksumming algorithm is to be used when
            automatically computing checksums as specified by the above
            parameter. Valid values are: MD5  SHA-1  SHA-256  SHA-384  
SHA-512.</comment>
    </param>
    <param name="purgeDelayInMillis" value="60000">
      <comment>Optional, default is 60000 (1 minute).
            This specifies the amount of time between checks to remove
            temporary files uploaded via the API-M upload interface.  During
            each check, old files whose age exceeds uploadStorageMinutes
            will be removed.</comment>
    </param>
    <param name="uploadStorageMinutes" value="5">
      <comment>Optional, default is 5.
            This specifies the minimum amount of time that each uploaded
            file should be kept in temporary storage.</comment>
    </param>
</module>

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
Jens Pelzetter | 4 Dec 2009 13:39
Picon
Favicon

Problem setting up LdapFilterForGroups

Hello,

I'am trying to setup the LdapFilterForAttributes and LdapFilterForGroups
for a Fedora Repository. The first works (I think), but the the
LdapFilterForGroups seems not to work. 

In the Fedora Server log I can see the following output:

INFO 2009-12-04 13:17:05.179 [http-8080-1] (Cache) Authenticating user
[jdoe]
INFO 2009-12-04 13:17:05.185 [http-8080-1] (Cache) Authenticating user
[jdoe]
INFO 2009-12-04 13:17:05.185 [http-8080-1] (FilterLdap) A
getNamingEnumeration() -binding- individual user
INFO 2009-12-04 13:17:05.215 [http-8080-1] (FilterLdap) G
getNamingEnumeration() -binding- individual user
ERROR 2009-12-04 13:17:05.221 [http-8080-1] (FilterLdap) G
populateCacheElement() unexpected null ne w/o exception thrown
ERROR 2009-12-04 13:17:05.223 [http-8080-1] (FilterLdap) G
populateCacheElement() accept to mean failed bind, so false

I've also edited the source of the LdapFilter a bit, so that the
exceptions is logged also. The exception looks like this:

javax.naming.NamingException: [LDAP: error code 49 - Bind failed:
expected some
        at
fedora.server.security.servletfilters.ldap.FilterLdap.getNamingEnumeration(FilterLdap.java:594)
        at
fedora.server.security.servletfilters.ldap.FilterLdap.populateCacheElement(FilterLdap.java:795)
        at
fedora.server.security.servletfilters.CacheElement.getNamedValues(CacheElement.java:199)
        at
fedora.server.security.servletfilters.Cache.getNamedValues(Cache.java:221)
        at
fedora.server.security.servletfilters.BaseCaching.contributeAttributes(BaseCaching.java:314)
        at
fedora.server.security.servletfilters.BaseCaching.contributeAuthenticatedAttributes(BaseCaching.java:342)
        at
fedora.server.security.servletfilters.BaseContributing.doThisSubclass(BaseContributing.java:252)
        at
fedora.server.security.servletfilters.FilterSetup.doFilter(FilterSetup.java:211)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
fedora.server.security.servletfilters.FilterSetup.doFilter(FilterSetup.java:234)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
fedora.server.security.servletfilters.FilterSetup.doFilter(FilterSetup.java:234)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
fedora.server.security.servletfilters.FilterSetup.doFilter(FilterSetup.java:234)
        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.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
        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:293)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
        at org.apache.coyote.http11.Http11Protocol
$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at org.apache.tomcat.util.net.JIoEndpoint
$Worker.run(JIoEndpoint.java:454)
        at java.lang.Thread.run(Thread.java:619)

My filter configurations:

<filter>
  <filter-name>LdapFilterForAttributes</filter-name>

<filter-class>fedora.server.security.servletfilters.ldap.FilterLdap</filter-class>
      <init-param>
	<param-name>version</param-name>
	<param-value>3</param-value>
      </init-param>
      <init-param>
	<param-name>authenticate</param-name>
	<param-value>true</param-value>
      </init-param>
      <init-param>
	<param-name>security-authentication</param-name>
	<param-value>simple</param-value>
      </init-param>
      <init-param>
	<param-name>id-attribute</param-name>
	<param-value>uid</param-value>	
      </init-param>
      <init-param>
	<param-name>bind-filter</param-name>

<param-value>uid={0},ou=people,dc=project,dc=example,dc=org</param-value>	
      </init-param>
      <init-param>
	<param-name>url</param-name>
	<param-value>ldap://localhost:389</param-value>
      </init-param>
      <init-param>
	<param-name>search-base</param-name>
	<param-value>ou=people,dc=project,dc=example,dc=org</param-value>
      </init-param>
      <init-param>
	<param-name>search-filter</param-name>
	<param-value>(uid={0})</param-value>
      </init-param>
      <init-param>
	<param-name>attributes</param-name>
	<param-value>cn</param-value>
      </init-param>
    </filter> 
    <filter>
      <filter-name>LdapFilterForGroups</filter-name>

<filter-class>fedora.server.security.servletfilters.ldap.FilterLdap</filter-class>
      <init-param>
	<param-name>associated-filters</param-name>
	<param-value>LdapFilterForAttributes,LdapFilterForGroups</param-value>
      </init-param>
      <init-param>
	<param-name>version</param-name>
	<param-value>3</param-value>
      </init-param>
      <init-param>
	<param-name>authenticate</param-name>
	<param-value>true</param-value>
      </init-param>
      <init-param>  
	<param-name>security-authentication</param-name>
	<param-value>simple</param-value>
      </init-param>
      <init-param>
	<param-name>id-attribute</param-name>
	<param-value>uid</param-value>
      </init-param>
      <init-param>
	<param-name>bind-filter</param-name>                     

<param-value>uid={0},ou=people,dc=project,dc=example,dc=org</param-value>
      </init-param>
      <init-param>
	<param-name>url</param-name>
	<param-value>ldap://localhost:389</param-value>
      </init-param>
      <init-param>
	<param-name>search-base</param-name>
	<param-value>ou=groups,dc=project,dc=example,dc=org</param-value>	
      </init-param>
      <init-param>
	<param-name>search-filter</param-name>

<param-value>(memberUid=uid={0},ou=people,dc=project,dc=example,dc=org)</param-value>	
      </init-param>
      <init-param>
	<param-name>attributes</param-name>
	<param-value>cn</param-value>
      </init-param>
      <init-param>
	<param-name>attributes-common-name</param-name>
	<param-value>groups</param-value>
      </init-param>
    </filter>

I've used the configuration on this page as a template:
http://www.fedora-commons.org/confluence/display/FCKB/Authenticating
+Fedora+2.2+against+LDAP

We are using Fedora 3.2, but as far as I can tell, the configuration on
this page is still valid. 

Anyone who can give me a hint what is wrong with the configuration?

Thanks.

Jens Pelzetter

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
Cyril Pestel | 4 Dec 2009 14:09
Picon

Re: Mulgara datatype (dateTime)

Thank Eddie for the answer. That's exactly what I was looking for.

But i'm wondering why this is not like the mulgara example. To my mind, since the example is :

select $doc from <rmi://mysite.com/server1#model>
where $doc <dc:date> $date
and $date <mulgara:before> '2000-01-01' in <rmi://mysite.com/server1#xsd>
and $date <mulgara:after> '1899-12-31' in <rmi://mysite.com/server1#xsd>;

your example should be :

select $s $o from <#ri>
where $s <fedora-view:lastModifiedDate> $o
and $o <mulgara:before> '2005-07-02T05:09:43.125Z' in <#xsd>;

without specify the w3 datatype.

Anyway I'm glade to know how to query on date. Thanks again.

Cyril.

On Thu, Dec 3, 2009 at 3:38 PM, Edwin Shin <eddie-Q8OOP6iM8xAfKs1Zo1OMJx2eb7JE58TQ@public.gmane.org> wrote:
Cyril,

Fedora dateTimes are indeed typed. It sounds like you've already seen the Mulgara docs, but for reference:
http://docs.mulgara.org/itqloperations/dafedora-commons-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.orgtatypingmodels.html

An example query against Fedora's risearch that uses xsd dateTimes:
select $s $o from <#ri>
where $s <fedora-view:lastModifiedDate> $o
and $o <mulgara:before> '2005-07-02T05:09:43.125Z'^^<xsd:dateTime> in <#xsd>;

Hope that helps,
Eddie

On 2 Dec 2009, at 10:21 AM, Cyril Pestel wrote:

> Hi,
>
> Is there someone who have already queries on dateTime datatype into Mulgara triplestore ?
>
> I know there are <mulgara:before> (on mulgara website) but i wonder what is the model into dateTime are.
> I try :
> select $obj $pred $val $date from <#ri>
> where $obj <dc:identifier> 'object:L4987'
> and $obj $pred $val
> and $obj <fedora-model:createdDate> '2009-12-01T14:19:44.701Z'
>
> Which works if 'createDate' has been a string. So I guest it's well ingest with special datatype. isn't it ?
>
> Regards, Cyril.
> ------------------------------------------------------------------------------
> Join us December 9, 2009 for the Red Hat Virtual Experience,
> a free event focused on virtualization and cloud computing.
> Attend in-depth sessions from your desk. Your couch. Anywhere.
> http://p.sf.net/sfu/redhat-sfdev2dev_______________________________________________
> Fedora-commons-users mailing list
> Fedora-commons-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/fedora-commons-users


------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Fedora-commons-users mailing list
Fedora-commons-users@...
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users

Gmane