Hi Steve.

I did a little more testing. If the object is purged, the current label is
purged, however it appears that "the bad" triples persist. Nothing of
interest appears in the logs, although I didn't have the logs in debug
mode. It appears to occur when using new lines in the label (and perhaps
other special characters, but specifically new lines in my case).

The repository I am working with happens to be 3.4.2, and I haven't tested
this in 3.5 yet.

Steps:

   1. Ingest the foxml file attached to this message, it is fairly simple
   except for a newline in the label
   2. Run ITQL query:
   select $title from <#ri> where <info:fedora/test:object1>
   <fedora-model:label> $title
   3. Results:

   <?xml version="1.0" encoding="UTF-8"?>
   <sparql xmlns="http://www.w3.org/2001/sw/DataAccess/rf1/result";>
     <head>
       <variable name="title"/>
     </head>
     <results>
       <result>
         <title>test with a
   newline</title>
       </result>

     </results>
   </sparql>

   4. Change the label using the fedora flash admin client
   5. Run same query

   <?xml version="1.0" encoding="UTF-8"?>
   <sparql xmlns="http://www.w3.org/2001/sw/DataAccess/rf1/result";>
     <head>
       <variable name="title"/>
     </head>
     <results>
       <result>
         <title>test with a
   newline</title>
       </result>

       <result>
         <title>test without newline</title>
       </result>
     </results>
   </sparql>

   6. Purge Object
   7. Run same query:

   <?xml version="1.0" encoding="UTF-8"?>
   <sparql xmlns="http://www.w3.org/2001/sw/DataAccess/rf1/result";>
     <head>
       <variable name="title"/>
     </head>
     <results>
       <result>
         <title>test with a
   newline</title>
       </result>

     </results>
   </sparql>



Cheers,
Jonathan


On Mon, Jan 30, 2012 at 12:47 PM, Stephen Bayliss <
stephen.bayl...@acuityunlimited.net> wrote:

> **
> Hi Jonathan
>
> It would be interesting to see what happens if the object is purged - do
> all (both) of the label triples disappear?  And if you then re-ingest it,
> do you then have the correct number of labels?
>
> It does look like there may have been a failure to remove an old version.
>
> Which version of the label was the first one?  Maybe you could do a test
> first adding the old version and then the new one to see if there are any
> errors reported (I'd doubt there was an issue with these two values but it
> would be good to check just in case).
>
> Regards
> Steve
>
>  -----Original Message-----
> *From:* Jonathan Green [mailto:jonat...@discoverygarden.ca]
> *Sent:* 30 January 2012 15:03
> *To:* Support and info exchange list for Fedora users.
> *Subject:* [fcrepo-user] Multiple Labels in Resource Index
>
> Hello.
>
> I was wondering if anyone has seen this before. I am having trouble where
> a query for fedora label is returning multiple different labels.
>
> Query:
> select $title from <#ri> where <info:fedora/test:object>
> <fedora-model:label> $title
>
> Results:
> <sparql xmlns="http://www.w3.org/2001/sw/DataAccess/rf1/result";>
> <head>
> <variable name="object"/>
> <variable name="title"/>
> </head>
> <results>
> <result>
> <object uri="info:fedora/test:object"/>
> <title>
> -test
> </title>
> </result>
> <result>
> <object uri="info:fedora/test:object"/>
> <title>test:object</title>
> </result>
> <result>
> <object uri="info:fedora/test:object"/>
> <title>
> test
> </title>
> </result>
> </results>
> </sparql>
>
> It only seems to happen sporadically its like the other labels aren't
> getting deleted when a new label is created, but it is happening often
> enough that it is causing some problems.
>
> As a short term solution: Is there a way to reindex specific pids into the
> resource index?
>
> Thanks.
>
> --
> Jonathan Green
> DiscoveryGarden Inc.
> Sims Office Suites Building, 3rd Floor, 118 Sydney Street
> Charlottetown, PE C1A 1G4
> 902.367.3851 discoverygarden.ca
> jonat...@discoverygarden.ca
> skype: jonathan.edwards.green
>
>
>
> ------------------------------------------------------------------------------
> Try before you buy = See our experts in action!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-dev2
> _______________________________________________
> Fedora-commons-users mailing list
> Fedora-commons-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fedora-commons-users
>
>


-- 
Jonathan Green
DiscoveryGarden Inc.
Sims Office Suites Building, 3rd Floor, 118 Sydney Street
Charlottetown, PE C1A 1G4
902.367.3851 discoverygarden.ca
jonat...@discoverygarden.ca
skype: jonathan.edwards.green
<?xml version="1.0" encoding="UTF-8"?>
<foxml:digitalObject xmlns:foxml="info:fedora/fedora-system:def/foxml#" xmlns="info:fedora/fedora-system:def/foxml#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; VERSION="1.1" PID="test:object1" xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd";>
  <foxml:objectProperties>
    <foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="A"/>
    <foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="test with a&#13;&#10;newline"/>
    <foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="admin"/>
  </foxml:objectProperties>
</foxml:digitalObject>
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Fedora-commons-users mailing list
Fedora-commons-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fedora-commons-users

Reply via email to