<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
   <channel>
      <title>Jeff Silvis&apos;s Blog</title>
      <link>http://blog.lib.umn.edu/silvi003/codenotes/</link>
      <description></description>
      <language>en</language>
      <copyright>Copyright 2012</copyright>
      <lastBuildDate>Tue, 07 Feb 2012 18:21:48 -0600</lastBuildDate>
      <generator>http://www.sixapart.com/movabletype/?v=4.31-en</generator>
      <docs>http://blogs.law.harvard.edu/tech/rss</docs> 

      
      <item>
	
         <title>Select to find ascii control characters in DSPACE (i.e. in the postgres DB)</title>
         <description><![CDATA[<h3>SQL select for CNT Chars</h3>

The command below will find DSPACE titles that contain ascii control characters (less than 31). 

<pre>
 select  handle, title, item.last_modified   from item, handle, itemsbytitle  where item.item_id = handle.resource_id  AND itemsbytitle.item_id = item.item_id AND last_modified > '2012-01-28'  AND title ~ ('[^'||chr(31)||'-'||chr(255)||']')  ;
</pre>

<h3>Reason for the Range </h3>
The site: <br>
<a href="http://www.asciitable.com/">http://www.asciitable.com/</a><br>
Shows that the control characters in ASCII are all less than 32.

<h3>Result of the search</h3>

<pre>
handle |                                                           title                                                            |       last_modified        
--------+----------------------------------------------------------------------------------------------------------------------------+----------------------------
 47226  | Pouvoir, violence et resistance en postcolonie : une lecture de en attendant le vote des betes Sauvages E’Ahmadou Kourouma | 2012-02-04 01:11:16.764-06
(1 row)
s

</pre>

<h3>Converting the title to hex and sorting </h3>
<pre>

[silvi003:~]$ echo 'Pouvoir, violence et resistance en postcolonie : une lecture de en attendant le vote des betes Sauvages E’Ahmadou Kourouma'
  | hexdump -v -e '"\\\x" 1/1 "%02x" " "' | perl -p -i -e 's/ /\n/g' | sort | uniq -c  
   1 \x0a
  18 \x20
   1 \x2c
   1 \x3a
   1 \x41
   1 \x45
   1 \x4b
   1 \x50
   1 \x53
   7 \x61
   1 \x62
   4 \x63
   4 \x64
  19 \x65
   1 \x67
   1 \x68
   4 \x69
   4 \x6c
   2 \x6d
   8 \x6e
  10 \x6f
   1 \x70
   4 \x72
   6 \x73
   9 \x74
   7 \x75
   4 \x76
   1 \x80
   1 \x99
   1 \xe2
</pre>

There is a line feed in the title (\x0a), and this happens to be the last character.


<h3>ISSUE </h3>
The regex above will select strings with a CR.  
<pre>
000 1101 	015 	13 	0D 	CR 	␍ 	^M 	\r 	Carriage return[g]
</pre>

This is bad.  I need to put in some sort of "OR" for this. 


 
]]></description>
         <link>http://blog.lib.umn.edu/silvi003/codenotes/2012/02/select_to_find_ascii_control_c.html</link>
         <guid>http://blog.lib.umn.edu/silvi003/codenotes/2012/02/select_to_find_ascii_control_c.html</guid>
         <category>dspace</category>
         <pubDate>Tue, 07 Feb 2012 18:21:48 -0600</pubDate>
      </item>
      
      <item>
	
         <title>Handles of items that have been withdrawn from DSPACE Instance of UDC</title>
         <description><![CDATA[<pre>
dspace_ir=> select handle  from item,handle   where resource_id=item_id AND resource_type_id =2 AND withdrawn='t';
 handle 
--------
 59457
 59456
 91897
 59624
 52302
 52304
 1417
 59224
 1564
 1556
 1597
 59696
 52294
 52295
 54922
 1635
 1652
 1641
 1642
 1634
 1654
 1643
 1640
 1638
 1650
 1648
 1639
 1637
 1636
 1631
 1632
 47185
 1693
 1657
 1700
 1656
 1667
 1699
 1666
 57139
 56283
 1714
 1713
 53967
 1962
 1959
 1924
 1941
 1917
 1921
 1956
 1945
 235
 52291
 52301
 52293
 52303
 52305
 52306
 2140
 4308
 2255
 4071
 52308
 2342
 4252
 2421
 2411
 2424
 2420
 2423
 4396
 47036
 3992
 4122
 2610
 2599
 2614
 46794
 2779
 2870
 2851
 2880
 5763
 56296
 3226
 3393
 3391
 3394
 3422
 48945
 3468
 4948
 5022
 5027
 1056
 1149
 1072
 56320
 54792
 59699
 4183
 47738
 4459
 4468
 57299
 4489
 4576
 57302
 92517
 45722
 4779
 4842
 4781
 53859
 4862
 4886
 4848
 4429
 50922
 56358
 103371
 5866
 4997
 57063
 53867
 5141
 57052
 104500
 57199
 57141
 107249
 109941
 100004
 97262
 98554
 50549
 48018
 104356
(139 rows)
</pre>
]]></description>
         <link>http://blog.lib.umn.edu/silvi003/codenotes/2011/12/handles_of_items_that_have_bee.html</link>
         <guid>http://blog.lib.umn.edu/silvi003/codenotes/2011/12/handles_of_items_that_have_bee.html</guid>
         <category></category>
         <pubDate>Fri, 16 Dec 2011 16:41:44 -0600</pubDate>
      </item>
      
      <item>
	
         <title>Fields in DSPACE eperson table that are empty, fixed or small </title>
         <description><![CDATA[<h2>Fields in DSPACE eperson table</h2>
<pre>
 dspace_sr=> \d eperson   
                    Table "public.eperson"
       Column        |            Type             | Modifiers 
---------------------+-----------------------------+-----------
 eperson_id          | integer                     | not null
 email               | character varying(64)       | 
 password            | character varying(64)       | 
 firstname           | character varying(64)       | 
 lastname            | character varying(64)       | 
 can_log_in          | boolean                     | 
 require_certificate | boolean                     | 
 self_registered     | boolean                     | 
 last_active         | timestamp without time zone | 
 sub_frequency       | integer                     | 
 phone               | character varying(32)       | 
 netid               | character varying(64)       | 
Indexes:
    "eperson_pkey" primary key, btree (eperson_id)
    "eperson_email_key" unique, btree (email)
    "eperson_email_idx" btree (email)
    "eperson_netid_idx" btree (netid)

</pre>

<h2>SQL to check for empty fields</h2>


<h4>field: last_active</h4>
<pre>
dspace_sr=> select last_active   from eperson where last_active ~ '.*';
 last_active 
-------------
(0 rows)
</pre>
<bold> last_active is empty </bold>



<h4>field: netid</h4>
<pre>
dspace_sr=> select netid  from eperson where netid~'.*';
 netid 
-------------
(0 rows)
</pre>
<bold> last_active is netid </bold>



<h4>field: require_certificate are all false</h4>
<pre>
dspace_sr=> select require_certificate   from eperson where require_certificate = 't';
 require_certificate 
---------------------
(0 rows)
</pre>


<h4>field: can_log_in are all true</h4>
<pre>
dspace_sr=> select can_log_in  from eperson where can_log_in = 'f' ;
 can_log_in 
------------
(0 rows)
</pre>





<h4>field: can_log_in are all true</h4>
<pre>
dspace_sr=> select can_log_in  from eperson where can_log_in = 'f' ;
 can_log_in 
------------
(0 rows)
</pre>




<h4>field: self_registered is a small group</h4>
<pre>
dspace_sr=> select *    from eperson where self_registered = 'f' ;
 eperson_id |       email        |             password             | firstname | lastname | can_log_in | require_certificate | self_registered | last_active | sub_frequency | phone | netid 
------------+--------------------+----------------------------------+-----------+----------+------------+---------------------+-----------------+-------------+---------------+-------+-------
          1 | teale003@umn.edu   | 76419c58730d9f35de7ac538c2fd6737 | Brad      | Teale    | t          | f                   | f               |             |               |       | 
          3 | jkelly@umn.edu     | 1a9bb0d26640ffb18ee06ae398d201ad | Julia     | Kelly    | t          | f                   | f               |             |               |       | 
          5 | skill@umn.edu      | fa483ad4f1d094e0d5aaa31856d618ec | Sharon    | Kill     | t          | f                   | f               |             |               |       | 
         21 | ruddy005@gmail.com | f850f3fb454e369b8b3444ad66fcd469 | Martha    | Ruddy    | t          | f                   | f               |             |               |       | 
          2 | lletnes@umn.edu    | a8113a9b4f61b178cd1fea4efa5bf4c8 | Louise    | Letnes   | t          | f                   | f               |             |               |       | 
         15 | jsilvis@umn.edu    | 7f8b6712b097089167df2fd678ae8133 | Jeff      | Silvis   | t          | f                   | f               |             |               |       | 
(6 rows)

</pre>

These people were put in by a bash script.

]]></description>
         <link>http://blog.lib.umn.edu/silvi003/codenotes/2011/12/fields_in_dspace_eperson_table.html</link>
         <guid>http://blog.lib.umn.edu/silvi003/codenotes/2011/12/fields_in_dspace_eperson_table.html</guid>
         <category></category>
         <pubDate>Thu, 15 Dec 2011 12:51:58 -0600</pubDate>
      </item>
      
      <item>
	
         <title>Number of assets per item in AgEcon </title>
         <description><![CDATA[<h3>File that contains a list of all bitstreams in Agecon</h3>

<pre>
less transfer.sh

./AssetsUDC/Assets_Found20111114_1524_60427_max/asset_61536/urepository_2.pdf
./AssetsUDC/Assets_Found20111114_1524_60427_max/asset_61536/urepository_1.pdf
./AssetsUDC/Assets_Found20111114_1524_60427_max/asset_99776/urepository_1.pdf
./AssetsUDC/Assets_Found20111114_1524_60427_max/asset_114550/urepository_2.pdf
./AssetsUDC/Assets_Found20111114_1524_60427_max/asset_114550/urepository_1.pdf
./AssetsUDC/Assets_Found20111114_1524_60427_max/asset_93451/urepository_1.pdf
./AssetsUDC/Assets_Found20111114_1524_60427_max/asset_93451/urepository_2.pdf
                                                        ^               ^
                                                        |               |
                                                    Handle            Bitstream number
handle 
</pre>





<pre>
[swadm:/swadm/assetstore_stage]$ cat transfer.sh  | perl -p -i -e 's/(.\/AssetsUDC\/Assets_Found201111.*asset_)(\d+)(\/urepository_)(\d+)(\.pdf)/\4/g' | sort | uniq -c | sort -nk 2 


Number  Assets
of       per 
Items    item 
  48971 1
  21191 2
    116 3
     13 4
      4 5
      3 6
      2 7
      1 8
      1 9
      1 10

</pre>

]]></description>
         <link>http://blog.lib.umn.edu/silvi003/codenotes/2011/11/number_of_assets_per_item_in_a.html</link>
         <guid>http://blog.lib.umn.edu/silvi003/codenotes/2011/11/number_of_assets_per_item_in_a.html</guid>
         <category>dspace</category>
         <pubDate>Fri, 18 Nov 2011 16:12:27 -0600</pubDate>
      </item>
      
      <item>
	
         <title>Cron to do mysqldump</title>
         <description><![CDATA[<h2>Create a mysql user that will do the backups </h2>

<pre>
GRANT LOCK TABLES, SELECT ON *.* TO 'backup'@'%.oit.umn.edu' IDENTIFIED BY PASSWORD;
</pre>


<h2>The Script to run under cron</h2>


<pre>
#!/usr/bin/perl

printf("Running...");

####################
# Backup settings #
###################

my $mysql_user = "backup";
my $mysql_pwd = "password";
my $mysql_server = "mysql_host";
my $dir_base = "path_to_backup_dir";

my ($y, $m, $d) = (localtime)[5,4,3];

$y += 1900;
$m += 1;

if ($m < 10) { $m = "0" . $m; }
if ($d < 10) { $d = "0" . $d; }

$stamp = $y . "_" . $m . $d;
$file_dumpname = $stamp . "_mysqldump.sql";

# Format:
#/swadm/assetstore_stage/Backups/mysql/2009_0921_mysqldump.sql
#/swadm/assetstore_stage/Backups/mysql/2009_0922_mysqldump.sql

##################
# Handling MySQL #
##################

# Making mySQL dumps
$starttime = `date`;
printf("mysqldump -h$mysql_server -u$mysql_user -p$mysql_pwd drupalstage > $dir_base/$file_dumpname\n");

`mysqldump -h$mysql_server -u$mysql_user -p$mysql_pwd drupalstage > $dir_base/$file_dumpname`;

#############################
# Chmod -- owner/group only #
#############################
`chmod 660 $dir_base/$file_dumpname`;
`gzip -fq $dir_base/$file_dumpname`;


##############
# Concluding #
##############


# The "done" message
printf("...complete.\n");
$finishtime = `date`;

####################
# Mail the results #
####################

$title='MySQL backup';
$to='your email';
$from= 'crontab@yourhost';
$subject='[cron] vm02 mySQLdump';

open(MAIL, "|/usr/sbin/sendmail -t");

## Mail Header
print MAIL "To: $to\n";
print MAIL "From: $from\n";
print MAIL "Subject: $subject\n\n";
## Mail Body
# $dumpsize = `du  -h $dir_base/${file_dumpname}.gz`;
#print MAIL "Start:\n$starttime\nFinish:\n$finishtime\nDumpsize:\n  $dumpsize";
print MAIL "Start:\n$starttime\nFinish:\n$finishtime\nFile $dir_base/${file_dumpname}.gz";
close(MAIL);

</pre>
]]></description>
         <link>http://blog.lib.umn.edu/silvi003/codenotes/2011/11/cron_to_do_mysqldump.html</link>
         <guid>http://blog.lib.umn.edu/silvi003/codenotes/2011/11/cron_to_do_mysqldump.html</guid>
         <category>HowTo</category>
         <pubDate>Wed, 16 Nov 2011 16:00:34 -0600</pubDate>
      </item>
      
      <item>
	
         <title>Metadata Field dc.type </title>
         <description><![CDATA[<h3>Sql Query to get Types of AgEcon Papers</h3>
<pre>
[silvi003:~]$ cat cmdType.sql
\f ','
\a
\t
\o outputfile.csv
select text_value from handle, metadatavalue, item  where metadatavalue.item_id=handle.resource_id AND handle.resource_type_id=2 AND 
handle.resource_id=item.item_id AND item.withdrawn='f' AND metadata_field_id=66;
\o
\q


[silvi003:~]$ psql -U dspace_sr  dspace_sr  < cmdType.sql 

</pre>


<h3>The distribution</h3>
<pre>
[silvi003:~]$ cat outputfile.csv  | sort | uniq -c | sort -n 
      1 journal article
      2 Dataset
      4 Preprint
     24 Book Item
    205 Thesis
    225 Book
    328 Thesis or Dissertation
   1096 Report
   2673 Technical Report
   3592 Working Paper
   6313 Article
   7492 Presentation
   8202 Working or Discussion Paper
   8694 Journal Article
   9294 Conference Paper

</pre>
]]></description>
         <link>http://blog.lib.umn.edu/silvi003/codenotes/2011/11/metadata_field_dctype.html</link>
         <guid>http://blog.lib.umn.edu/silvi003/codenotes/2011/11/metadata_field_dctype.html</guid>
         <category></category>
         <pubDate>Mon, 14 Nov 2011 16:20:12 -0600</pubDate>
      </item>
      
      <item>
	
         <title>DSPACE mime types for AgEcon ... Very few excel</title>
         <description><![CDATA[<h3>Below is a list of all the MIME types supported  by DSPACE</h3>


<pre>
 bitstream_format_id |           mimetype            |  short_description   |                             description                              | support_level | internal 
---------------------+-------------------------------+----------------------+----------------------------------------------------------------------+---------------+----------
                   3 | application/pdf               | PDF                  | Adobe Portable Document Format                                       |             1 | f
                   1 | application/octet-stream      | Unknown              | Unknown data format                                                  |             0 | f
                   2 | text/plain                    | License              | Item-specific license agreed upon to submission                      |             1 | t
                   4 | text/xml                      | XML                  | Extensible Markup Language                                           |             1 | f
                   5 | text/plain                    | Text                 | Plain Text                                                           |             1 | f
                   6 | text/html                     | HTML                 | Hypertext Markup Language                                            |             1 | f
                   7 | text/css                      | CSS                  | Cascading Style Sheets                                               |             1 | f
                   8 | application/msword            | Microsoft Word       | Microsoft Word                                                       |             1 | f
                   9 | application/vnd.ms-powerpoint | Microsoft Powerpoint | Microsoft Powerpoint                                                 |             1 | f
                  10 | application/vnd.ms-excel      | Microsoft Excel      | Microsoft Excel                                                      |             1 | f
                  11 | application/marc              | MARC                 | Machine-Readable Cataloging records                                  |             1 | f
                  12 | image/jpeg                    | JPEG                 | Joint Photographic Experts Group/JPEG File Interchange Format (JFIF) |             1 | f
                  13 | image/gif                     | GIF                  | Graphics Interchange Format                                          |             1 | f
                  14 | image/png                     | image/png            | Portable Network Graphics                                            |             1 | f
                  15 | image/tiff                    | TIFF                 | Tag Image File Format                                                |             1 | f
                  16 | audio/x-aiff                  | AIFF                 | Audio Interchange File Format                                        |             1 | f
                  17 | audio/basic                   | audio/basic          | Basic Audio                                                          |             1 | f
                  18 | audio/x-wav                   | WAV                  | Broadcase Wave Format                                                |             1 | f
                  19 | video/mpeg                    | MPEG                 | Moving Picture Experts Group                                         |             1 | f
                  20 | text/richtext                 | RTF                  | Rich Text Format                                                     |             1 | f
                  21 | application/vnd.visio         | Microsoft Visio      | Microsoft Visio                                                      |             1 | f
                  22 | application/x-filemaker       | FMP3                 | Filemaker Pro                                                        |             1 | f
                  23 | image/x-ms-bmp                | BMP                  | Microsoft Windows bitmap                                             |             1 | f
                  24 | application/x-photoshop       | Photoshop            | Photoshop                                                            |             1 | f
                  25 | application/postscript        | Postscript           | Postscript Files                                                     |             1 | f
                  26 | video/quicktime               | Video Quicktime      | Video Quicktime                                                      |             1 | f
                  27 | audio/x-mpeg                  | MPEG Audio           | MPEG Audio                                                           |             1 | f
                  28 | application/vnd.ms-project    | Microsoft Project    | Microsoft Project                                                    |             1 | f
                  29 | application/mathematica       | Mathematica          | Mathematica Notebook                                                 |             1 | f
                  30 | application/x-latex           | LateX                | LaTeX document                                                       |             1 | f
                  31 | application/x-tex             | TeX                  | Tex/LateX document                                                   |             1 | f
                  32 | application/x-dvi             | TeX dvi              | TeX dvi format                                                       |             1 | f
                  33 | application/sgml              | SGML                 | SGML application (RFC 1874)                                          |             1 | f
                  34 | application/wordperfect5.1    | WordPerfect          | WordPerfect 5.1 document                                             |             1 | f
                  35 | audio/x-pn-realaudio          | RealAudio            | RealAudio file                                                       |             1 | f
                  36 | image/x-photo-cd              | Photo CD             | Kodak Photo CD image                                                 |             1 | f

</pre>

<h3>A file with the wrong bitstream_format_id</h3>
<pre> 
handle | bitstream_id | bitstream_format_id |                    name                     | size_bytes |             checksum             | checksum_algorithm | description | user_format_description |                                     source                                      |               internal_id               | deleted | store_number | sequence_id 
--------+--------------+---------------------+---------------------------------------------+------------+----------------------------------+--------------------+-------------+-------------------------+---------------------------------------------------------------------------------+-----------------------------------------+---------+--------------+-------------
 95522  |        74367 |                   1 | Staff Paper P10-8--InSTePP10-04.revised pdf |     313884 | 35f4304e6a0c68e935c09c0469a9e291 | MD5                |             |                         | /dspace/assetstore/dspace-sr/upload/Staff Paper P10-8--InSTePP10-04.revised pdf | 102028865626877833459313413758816463357 | f       |            0 |           2
(1 row)

</pre>

This is labeled as Unknown, but should be PDF.  The line below changed it:

<pre> 
dspace_sr=> 
dspace_sr=> UPDATE bitstream SET bitstream_format_id = '3' WHERE bitstream_id = '74367';
UPDATE 1

</pre>
<h3>Distribution of bitstream_format_id </h3>
<h5>The sql query that pulls only live bitstreams: </h5>

<pre>
[silvi003:~]$ cat cmdMime.sql 
\f ','
\a
\t
\o outputfile.csv
SELECT bitstream_format_id  FROM handle,item, item2bundle,bitstream,bundle2bitstream WHERE  handle.resource_type_id=2 AND handle.resource_id = item2bundle.item_id AND item2bundle.bundle_id=bundle2bitstream.bundle_id AND handle.resource_id=item.item_id AND item.withdrawn='f' AND   bundle2bitstream.bitstream_id = bitstream.bitstream_id AND  bitstream.deleted = 'f'  ;
\o
\q
[silvi003:~]$ psql -U dspace_sr  dspace_sr  < cmdMime.sql
</pre>

<h5>Number count of bitstream_format_id </h5>
<pre>

[silvi003:~]$ cat outputfile.csv | sort | uniq -c | sort -n 
      # bitstream_format_id
      1 1
      2 10
  20602 2
  48265 3
</pre>



<h3>the odd bitstream_format_id </h3>
Most of the the bitstreams are PDFs ( bitstream_format_id 3) or liscense (bitstream_format_id 2).  There is one Unknown (bitstream_format_id 1) and two excel (bitstream_format_id 10).  They are shown below: </br>
<h5>bitstream_format_id =1  </h5>
 

<pre>
dspace_sr=> SELECT handle, bitstream.*  FROM handle,item2bundle,bitstream,bundle2bitstream WHERE  handle.resource_type_id=2 AND handle.resource_id = item2bundle.item_id AND item2bundle.bundle_id=bundle2bitstream.bundle_id AND handle.resource_id=item.item_id AND item.withdrawn='f' AND   bundle2bitstream.bitstream_id = bitstream.bitstream_id AND  bitstream.deleted = 'f'  AND bitstream_format_id=1;
NOTICE:  adding missing FROM-clause entry for table "item"
 handle | bitstream_id | bitstream_format_id |                          name                           | size_bytes |             checksum             | checksum_algorithm | description | user_format_description |                                           source                                            |              internal_id               | deleted | store_number | sequence_id 
--------+--------------+---------------------+---------------------------------------------------------+------------+----------------------------------+--------------------+-------------+-------------------------+---------------------------------------------------------------------------------------------+----------------------------------------+---------+--------------+-------------
 62242  |        59248 |                   1 | data appendix jayasinghe Beghin Moschini ajae 9007.xlsx |     141434 | 6f40baf7dd97f784091e69ed8714b837 | MD5                |             |                         | /dspace/assetstore/dspace-sr/upload/data appendix jayasinghe Beghin Moschini ajae 9007.xlsx | 13124464764865665476393448862247227640 | f       |            0 |           3
(1 row)


</pre>


<h5>bitstream_format_id =10  </h5>

<pre>
dspace_sr=> SELECT handle, bitstream.*  FROM handle,item2bundle,bitstream,bundle2bitstream WHERE  handle.resource_type_id=2 AND handle.resource_id = item2bundle.item_id AND item2bundle.bundle_id=bundle2bitstream.bundle_id AND handle.resource_id=item.item_id AND item.withdrawn='f' AND   bundle2bitstream.bitstream_id = bitstream.bitstream_id AND  bitstream.deleted = 'f'  AND bitstream_format_id=10;
NOTICE:  adding missing FROM-clause entry for table "item"
 handle | bitstream_id | bitstream_format_id |                  name                   | size_bytes |             checksum             | checksum_algorithm |        description         | user_format_description |                                                         source                                                          |              internal_id               | deleted | store_number | sequence_id 
--------+--------------+---------------------+-----------------------------------------+------------+----------------------------------+--------------------+----------------------------+-------------------------+-------------------------------------------------------------------------------------------------------------------------+----------------------------------------+---------+--------------+-------------
 42187  |        32967 |                  10 | MissouriUseValueCalculationsOct2007.xls |     361472 | cbefd6d4008ba5d97db49d2b9178f89f | MD5                | Excel Spreadsheet          |                         | /dspace/assetstore/dspace-sr/upload/C:\Documents and Settings\Lori\My Documents\MissouriUseValueCalculationsOct2007.xls | 87756269209817911914027269532862968326 | f       |            0 |           3
 92231  |        61062 |                  10 | stpap536.data.zip                       |     741798 | b48a9d5aa21f3d8411230bde4651e4fe | MD5                | Data in zipped Excel files |                         | /dspace/assetstore/dspace-sr/upload/stpap536.data.zip                                                                   | 28095595994115196972466977473167819715 | f       |            0 |           3
(2 rows)


</pre>]]></description>
         <link>http://blog.lib.umn.edu/silvi003/codenotes/2011/11/dspace_mime_types_for_agecon_v.html</link>
         <guid>http://blog.lib.umn.edu/silvi003/codenotes/2011/11/dspace_mime_types_for_agecon_v.html</guid>
         <category>dspace</category>
         <pubDate>Mon, 14 Nov 2011 15:11:03 -0600</pubDate>
      </item>
      
      <item>
	
         <title>Islandora was not properly pointing at https fedora sites</title>
         <description><![CDATA[<h2>The issue</h2>
When we changed to https for stage we got the white screen of death with drupal. 

<h2>Location of code</h2>
The file where the troubled code is: </br>
sites/all/modules/Islandora-islandora-6589c7c/ConnectionHelper.inc</br>
function _fixURL</br>

<h2>The bug </h2>
This is the basic problem.   The code below will yield: 
<pre>
$new_url = 'http'
</pre>
No matter what the input is.

<pre>
&lt;?php                   
   $url = 'https://ddd';
    if (strpos($url, 'http://') == 0) {
        $new_url = 'http';
    }
    elseif (strpos($url, 'https://') == 0) {
      $new_url = 'https';
    }
    else {
        drupal_set_message(t('Invalid URL: !url', array('!url' => $url)));
        return NULL;
    }
   echo $new_url . "\n";
?&gt;
</pre>

Rewrite of the code that properly selects https:

<pre>
&lt;?php                   
   $url = 'https://ddd';

    $url_start = substr ($url , 0, 5 );

    if ($url_start == 'http:') {
        $new_url = 'http';
    }
    elseif ($url_start == 'https') {
      $new_url = 'https';
    }
    else {
        drupal_set_message(t('Invalid URL: !url', array('!url' => $url)));
        return NULL;
    }
   echo $new_url . "\n";
?&gt;
</pre>

I inserted this code into the function _fixURL code of the file: </br>
sites/all/modules/Islandora-islandora-6589c7c/ConnectionHelper.inc</br>
and all is well.


]]></description>
         <link>http://blog.lib.umn.edu/silvi003/codenotes/2011/10/islandora_was_not_properly_poi.html</link>
         <guid>http://blog.lib.umn.edu/silvi003/codenotes/2011/10/islandora_was_not_properly_poi.html</guid>
         <category>fedora</category>
         <pubDate>Fri, 28 Oct 2011 11:51:08 -0600</pubDate>
      </item>
      
      <item>
	
         <title>Finding all the collections a DSPACE item belongs to </title>
         <description><![CDATA[
<h1>Multi-level tree in AgEcon</h1>

The list below gives an item that is under several layers in the DSPACE tree. </br>
<a href="http://ageconsearch.umn.edu/">AgEcon Search</a></br>
&nbsp;    <a href="http://ageconsearch.umn.edu/handle/93690">Universitaet Hohenheim></a></br>
 &nbsp;&nbsp;     <a href="http://ageconsearch.umn.edu/handle/93691">Institute of Agricultural Policy and Agricultural Markets > </a></br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     <a href="http://ageconsearch.umn.edu/handle/93692">Working Papers > </a></br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     <a href="http://ageconsearch.umn.edu/handle/110156">A 2004 Social Accounting Matrix for Israel> </a></br>





<h1>SQL to determine names of ancestors of an item</h1>
<h2>Item to collection</h2>
Starting handle = 110156 </br>
<h4>SQL for item handle to collection handle</h4>
SELECT handle FROM handle WHERE resource_type_id=3 AND resource_id=(SELECT collection.collection_id FROM collection, collection2item, item, handle WHERE collection2item.item_id=item.item_id AND collection2item.collection_id=collection.collection_id AND handle.resource_id=item.item_id AND  resource_type_id=2 AND handle = 110156) ; </br>

collection handle: 93692 </br>

<h4> Collection Name SQL</h4>
select name from handle, collection where handle = 93692 AND resource_type_id= 3  AND collection_id = handle.resource_id;</br>
<h2>Collection to Community</h2>
<h4>SQL for Collection handle to Community handle</h4>
SELECT handle FROM community2collection, handle WHERE handle.resource_type_id =4 AND  community2collection.community_id = handle.resource_id AND community2collection.collection_id = (SELECT resource_id FROM handle WHERE resource_type_id= 3 AND handle= 93692); </br>

community level 1:   93691</br>

<h4>community name SQL</h4>
select name from handle, community  where handle = 93691  AND resource_type_id= 4  AND  community_id = handle.resource_id; </br>

<h3>Next Community level</h3>

SELECT handle FROM community2collection, handle WHERE handle.resource_type_id =4 AND community2collection.community_id = handle.resource_id AND community2collection.collection_id = (SELECT resource_id FROM handle WHERE resource_type_id= 3 AND handle= 93691); </br>

 top 93690</br>

<h3>Proof that 93690 is top</h3>

SELECT handle FROM community2community, handle WHERE handle.resource_type_id =4 AND community2community.parent_comm_id = handle.resource_id AND community2community.child_comm_id = (SELECT resource_id FROM handle WHERE resource_type_id= 4sss AND handle= 93690); </br>

returns nothing
<h1>PHP code</h1>

The code below will pull the names of all the ancestors of an item.  

<pre>
#!/usr/bin/php 
<?php
//
// J. Silvis
//***************************************************************************************


// Test the code //
$item_handle = 110156;
$ancestors = array();
ancestor_names($item_handle, $ancestors);

foreach ($ancestors as $key => $value)
 echo $key.'=>'.$value."\n";

//
// Test should produce: (1 indicates a primary community, 0 is a lower level)
//
// Content-type: text/html
// X-Powered-By: PHP/4.3.9
// 
// Working Papers=>0
// Universitaet Hohenheim=>1
// Institute of Agricultural Policy and Agricultural Markets=>0


// if you are interesed in the parents of a collection call:
// process_collection 

// if you are interesed in the parents of a community call:
// process_community 


function ancestor_names($item_handle, &$ancestors){
  include("port_DSPACE_sql.inc.php");
  $dbh = open_DSPACE_DB();  // opens a connection to the DSPACE psql database

// This query will find a collection handle given an item handle
  $item_to_collection_query="SELECT handle FROM handle WHERE resource_type_id=3 AND 
          resource_id=(SELECT collection.collection_id 
          FROM collection, collection2item, item, handle 
          WHERE collection2item.item_id=item.item_id 
          AND collection2item.collection_id=collection.collection_id 
          AND handle.resource_id=item.item_id AND resource_type_id=2 
          AND handle = $item_handle) ; ";

  $result = pg_query($item_to_collection_query);
  if (!$result) {
    echo "Problem with query " . $item_to_collection_query . "\n";
    echo pg_last_error();
    exit();
  }


// Could have multiple collection parents
while ($collection_handle = pg_fetch_row($result)) {
     process_collection($collection_handle[0], $ancestors);
}
}
 
 function process_collection($collection_handle,  &$ancestors){
 $collection_title_query = "select name from handle, collection where handle = 93692 AND resource_type_id= 3 AND collection_id = handle.resource_id;";
  $result = pg_query($collection_title_query);
  if (!$result) {
    echo "Problem with query " . $collection_title_query . "\n";
    echo pg_last_error();
    exit();
  }

while ($collection_title = pg_fetch_row($result)) {
  $ancestors[$collection_title[0]] = 0;
}
   collection_to_community ($collection_handle, $ancestors);
 }

// climbs the tree from the collection to the comunity level
function collection_to_community ($collection_handle,  &$ancestors) {
  $collection_to_commuity_query="SELECT handle FROM community2collection, handle 
                                WHERE handle.resource_type_id =4 AND 
                                community2collection.community_id = handle.resource_id AND
                                community2collection.collection_id = 
                                (SELECT resource_id FROM handle WHERE 
                                resource_type_id= 3 AND handle= $collection_handle);";
  $result = pg_query($collection_to_commuity_query);
  if (!$result) {
    echo "Problem with query " . $collection_to_commuity_query . "\n";
    echo pg_last_error();
    exit();
  }

while ($community_handle = pg_fetch_row($result)) {
     process_community($community_handle[0],$ancestors);
}

}


// finds the community title and recursively finds all higher level collections
function process_community ($community_handle, &$ancestors) {
 $community_title_query = "select name from handle, community where handle = $community_handle AND resource_type_id= 4 AND community_id = handle.resource_id; ";
 
  $result = pg_query($community_title_query);
  if (!$result) {
    echo "Problem with query " . $community_title_query . "\n";
    echo pg_last_error();
    exit();
  }
$community_title="";
while ($row = pg_fetch_row($result)) {
  $community_title = $row[0] ;
}

  $community_to_community_query="SELECT handle FROM community2community, handle WHERE 
                                handle.resource_type_id =4 AND 
                                community2community.parent_comm_id = handle.resource_id AND 
                                community2community.child_comm_id = (SELECT resource_id 
                                FROM handle WHERE resource_type_id= 4 AND handle= $community_handle); ";
  $result = pg_query($community_to_community_query);
  if (!$result) {
    echo "Problem with query " . $collection_to_commuity_query . "\n";
    echo pg_last_error();
    exit();
  }
$this_community_is_top = 1;
while ($row = pg_fetch_row($result)) {
  // if we get into this loop there is a higher community
  $this_community_is_top = 0;
  process_community($row[0],$ancestors );
}
  $ancestors[$community_title] = $this_community_is_top;
}
 ?>

</pre>


<h1>Every item maps to a collection </h1>


Number of item handles: </br>

<pre>
dspace_sr=> select count (handle) from handle where resource_type_id=2;
 count 
-------
 48653
</pre>


Number of item links to collections: </br>
<pre>
dspace_sr=> select count (item_id) from collection2item;
 count 
-------
 48653
<pre>

<h1>Communities do not have multiple parents </h1>
I also checked the community2community table and there were no duplicate child_comm_id values.  This implies that the children have one and only one parent.









]]></description>
         <link>http://blog.lib.umn.edu/silvi003/codenotes/2011/10/finding_all_the_collections_a.html</link>
         <guid>http://blog.lib.umn.edu/silvi003/codenotes/2011/10/finding_all_the_collections_a.html</guid>
         <category>dspace</category>
         <pubDate>Fri, 21 Oct 2011 16:41:22 -0600</pubDate>
      </item>
      
      <item>
	
         <title>Bill&apos;s Solution to the Solr problem</title>
         <description><![CDATA[We had problems connecting SOLR to Drupal.  Here are some answers that Bill Tantzen found:

<h2>Some issues with bad characters</h2>
Hex values should be inserted in the solr REST call:

<pre>
http://128.101.146.59:8080/solr/select/?version=1.2&start=0&rows=10&indent=on&wt=standard&q=fullText:food&sort=modstitle desc&qt=mods

Should be:

http://128.101.146.59:8080/solr/select/?version=1.2&start=0&rows=10&indent=on&wt=standard&q=fullText:food++%26sort%3Dmodstitle%2Bdesc&qt=mods
<pre>

<h2>Fields that Solr searches on should be single valued</h2>
Bill found out that fields that are being used for sort must be single values.  Our title field is not.  In the past SOLR would handle multivalued fields for sort.

<h4>The MODS schema</h4>

<pre>
	&lt;titleInfo&gt;
 	 	&lt;title&gt;[dc.title]&lt;/title&gt;
 	&lt;/titleInfo&gt;
&lt;titleInfo type="translated"&gt;
 	 	&lt;title&gt;[dc.title.alternative]&lt;/title&gt;
 	&lt;/titleInfo&gt;
</pre>

<h4>The XSLT to make SOLR indices</h4>
Note the XSLT will not distinguish between different values of the type attribute, so there is more than version of title, it will no longer be single valued.

<pre>
/Users/birage/fedora/tomcat/webapps/fedoragsearch/WEB-INF/classes/config/index/GSearch_solr/demoFoxmlToSolr.xslt  

    &lt;xsl:for-each select="foxml:datastream[@ID='MODS']/foxml:datastreamVersion[last()]/foxml:xmlContent//mods:titleInfo/mods:title"&gt;
         &lt;xsl:if test="text() [normalize-space(.) ]"&gt;&lt;!--don't bother with empty space--&gt;
            &lt;field&gt;./WEB-INF/classes/config/index/GSearch_solr/demoFoxmlToSolr.xslt
               &lt;xsl:attribute name="name"&gt;
                  &lt;xsl:value-of select="concat('mods.', 'title')"/&gt;
               &lt;/xsl:attribute&gt;
               &lt;xsl:value-of select="text()"/&gt;
            &lt;/field&gt;
         &lt;/xsl:if&gt;
      &lt;/xsl:for-each&gt;
</pre>

<h2>Possible values for the type attribute of title element in MODS</h2>

From:  
<a href="http://www.loc.gov/standards/mods/v3/mods-userguide-elements.html">http://www.loc.gov/standards/mods/v3/mods-userguide-elements.html </a> </br>

		type - This attribute is applied when it is necessary to identify what type of title is recorded. </br>
        For the main title (MARC 21 field 245), no type is indicated. The following values may be used with the type attribute:</br>
		abbreviated (equivalent to MARC 21 field 210)</br>
		translated (equivalent to MARC 21 field 242, 246)</br>
		alternative (equivalent to MARC 21 fields 246, 740)</br>
		uniform (equivalent to MARC 21 fields 130, 240, 730)</br>]]></description>
         <link>http://blog.lib.umn.edu/silvi003/codenotes/2011/09/bills_solution_to_the_solr_pro.html</link>
         <guid>http://blog.lib.umn.edu/silvi003/codenotes/2011/09/bills_solution_to_the_solr_pro.html</guid>
         <category>fedora</category>
         <pubDate>Thu, 29 Sep 2011 16:56:55 -0600</pubDate>
      </item>
      
      <item>
	
         <title>Reason why Islandora could not connect to SOLR on stage</title>
         <description><![CDATA[<h2>The bug</h2>
When we tried to connect to solr from islandora we got the error:
<pre>
Unable to connect to Solr server 
</pre>
<h2>Islandora code connected to the problem</h2>
This error is generated in the Islandora file: </br>
./sites/all/modules/Islandora-islandora_solr_search-9e474f7/solr.admin.inc:

The following function is the root cause of the problem:


<pre>

/**
 *
 * @param String $solr_url
 * @return boolean
 *
 * Checks availability of Solr installation
 *
 */
function solr_available($solr_url) {
  // path from url is parsed to allow graceful inclusion or exclusion of 'http://'
  $pathParts = parse_url($solr_url); 
  $path = 'http://' . $pathParts['host'] . ':' . $pathParts['port'] . $pathParts['path'] . '/admin/file';
  $test = @fopen($path, "r");
  if ($test) {
    return true;
  }
  return false;
}
    

</pre>
<h2>The fix (upgrade SOLR) </h2>
It turns out that solr 3.1 cannot recognize the 
<pre>
"/admin/file"
</pre>
at the end of a URL.  We upgraded to SOLR 3.4 and it worked.]]></description>
         <link>http://blog.lib.umn.edu/silvi003/codenotes/2011/09/reason_why_islandora_could_not.html</link>
         <guid>http://blog.lib.umn.edu/silvi003/codenotes/2011/09/reason_why_islandora_could_not.html</guid>
         <category>fedora</category>
         <pubDate>Thu, 29 Sep 2011 12:03:44 -0600</pubDate>
      </item>
      
      <item>
	
         <title>Reason why we could not upload foxml file (agecon_top.xml)  </title>
         <description><![CDATA[We had assumed that it was the XACML permissions this was not the case.  The problem was actually due to a TN element in the foxml that was the problem.</br></br>
 Here is the contents of the </br>
/swadm/local/fedora3/server/fedora-internal-use/fedora-internal-use-repository-policies-approximating-2.0 </br>

<xmp>
deny-apim-if-not-localhost.xml
deny-inactive-or-deleted-objects-or-datastreams-if-not-administrator.xml
deny-policy-management-if-not-administrator.xml
deny-purge-datastream-if-active-or-inactive.xml
deny-purge-object-if-active-or-inactive.xml
deny-reloadPolicies-if-not-localhost.xml
deny-unallowed-file-resolution.xml
LOGPATH
permit-anything-to-administrator.xml
permit-apia-unrestricted.xml
permit-dsstate-check-unrestricted.xml
permit-oai-unrestricted.xml
permit-serverStatus-unrestricted.xml
readme.txt
</xmp>]]></description>
         <link>http://blog.lib.umn.edu/silvi003/codenotes/2011/09/reason_why_we_could_not_upload.html</link>
         <guid>http://blog.lib.umn.edu/silvi003/codenotes/2011/09/reason_why_we_could_not_upload.html</guid>
         <category>fedora</category>
         <pubDate>Fri, 23 Sep 2011 17:16:23 -0600</pubDate>
      </item>
      
      <item>
	
         <title>Switch in UDC Media filter.</title>
         <description><![CDATA[I changed the Media Filter so that it would not use the unix nice command when it launches.  This should speed up the process. </br>

<h2>Crontab</h2>

<xmp>
@reboot     /sbin/service httpd start
@reboot     sudo -u tomcat  /dspace/bin/start_tomcat.sh

# day of week (0 - 6) (Sunday=0)

10 1 * * 6 /dspace/dspace-ir/bin/media_launch.sh

30 22 * * 1  /dspace/dspace-sr/bin/index-all-cron
30 22 * * 2  /dspace/dspace-ir/bin/index-all-cron
30 22 * * 3  /dspace/dspace-sr/bin/index-all-cron
30 22 * * 4  /dspace/dspace-ir/bin/index-all-cron
30 22 * * 5  /dspace/dspace-sr/bin/index-all-cron

</xmp>



<h2>media_launch.sh</h2>
<xmp>
tstamp=`date "+%Y%m%d_%H:%M"`
echo $tstamp
nice /dspace/dspace-ir/bin/filter-media.sh > /dspace/dspace-ir/log/filter-media.sh_$tstamp.log 2>&1 
cd /dspace/dspace-ir/bin/
/dspace/dspace-ir/bin/index_check_and_email.sh
</xmp>


<h2>filter-media.sh </h2>
Note the "-n" in filter-media means that the index will not be made after each collection is OCRed. Also in the runs using "nice" the "-n" was also used.</br> 
<xmp>
#!/bin/sh

# This script grabs the handles of each collection
# in a DSpace DB instance.  Then loops through the
# handles and run the full-text indexer against each
# collection.

# This is done to fix out of memory errors,
# PDFs that are too large for full-text indexing,
# and when filter-media (java app) fails now full
# text indexing continues on other collections.

# Setup the environment
JAVA_HOME=/opt/jdk1.5.0_10
PATH=$JAVA_HOME/bin:/opt/ant/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin

export PATH JAVA_HOME

dbname="dspace_ir"
username="read_only"
hostname="strip3.oit.umn.edu"

# Determine if we have Postgres client installed
which psql > /dev/null
if [ $? -ne 0 ]
then
        echo
        echo "psql not found in your PATH, please add to your PATH and re-run script"
        echo
        exit 1
fi

print_usage()
{
	echo 1>&2 "Usage: $0 [-d dbname] [-u username]"
	exit 1;
}

while getopts d:hu: o
do	case "$o" in
	d)	dbname="$OPTARG";;
	h)	print_usage;;
	n)	hostname="$OPTARG";;
	u)	username="$OPTARG";;
	[?])	print_usage;;
	esac
done

echo_cmd="echo SELECT handle FROM handle WHERE resource_type_id=3;"
psql_cmd="psql -t -U $username -h $hostname $dbname"

BINDIR=`dirname $0`

for handle in `$echo_cmd | $psql_cmd`
do
   $BINDIR/filter-media -n -i $handle
done

$BINDIR/index-all


</xmp>
]]></description>
         <link>http://blog.lib.umn.edu/silvi003/codenotes/2011/09/switch_in_udc_media_filter.html</link>
         <guid>http://blog.lib.umn.edu/silvi003/codenotes/2011/09/switch_in_udc_media_filter.html</guid>
         <category>dspace</category>
         <pubDate>Fri, 23 Sep 2011 16:47:53 -0600</pubDate>
      </item>
      
      <item>
	
         <title>items in DSAPCE with in_archive =f and withdrawn = f </title>
         <description><![CDATA[<h3>Problem</h3>
Louise told me that the following two purls produced an error when accessed: </br>
http://purl.umn.edu/114817</br>
http://purl.umn.edu/113790</br>

<h3>The cause</h3>
It turns our that both in_archive and withdrawn are set to false.  </br>

<pre>
dspace_sr=> select * from handle where handle = 113790;
 handle_id | handle | resource_type_id | resource_id 
-----------+--------+------------------+-------------
     51427 | 113790 |                2 |       53352


dspace_sr=> select * from item where item_id = 53352;

 item_id | submitter_id | in_archive | withdrawn |       last_modified        | owning_collection 
---------+--------------+------------+-----------+----------------------------+-------------------
   53352 |         2680 | f          | f         | 2011-08-25 12:58:34.912-05 |                  
(1 row)
</pre>

I think that both variables should not be set to f.  </br>


<h3>The solution</h3>
Set withdrawn to t and the Louise can resubmit the metadata:

 <pre>
UPDATE item SET withdrawn = 'T' WHERE item_id = 53352;

</pre>
]]></description>
         <link>http://blog.lib.umn.edu/silvi003/codenotes/2011/09/items_in_dsapce_with_in_archiv.html</link>
         <guid>http://blog.lib.umn.edu/silvi003/codenotes/2011/09/items_in_dsapce_with_in_archiv.html</guid>
         <category>dspace</category>
         <pubDate>Thu, 15 Sep 2011 11:17:01 -0600</pubDate>
      </item>
      
      <item>
	
         <title>Varios curls for fedora RDF (REST interface)</title>
         <description><![CDATA[
<h2>List of datastreams in a Fedora Object</h2>
  <h4>curl example</h4>
<xmp> curl  --user user:password  http://128.101.146.59:8080/fedora/objects/urepository:97023/datastreams </xmp>
 <h4>browser example</h4>
<xmp> http://128.101.146.59:8080/fedora/objects/urepository:97023/datastreams </xmp>

 <h2>MODs Datastream</h2>
  <h4>curl example</h4>
<xmp> curl  --user user:password  http://128.101.146.59:8080/fedora/objects/urepository:97023/datastreams/MODS/content </xmp>
 <h4>browser example</h4>
<xmp> http://128.101.146.59:8080/fedora/objects/urepository:97023/datastreams/MODS/contentss </xmp>

 <h2>RDF Datastream</h2>
  <h4>curl example</h4>
 <xmp> curl  --user user:password http://128.101.146.59:8080/fedora/objects/urepository:97023/datastreams/RELS-EXT/content </xmp>
 
 <h4>browser example</h4>
 <xmp> http://128.101.146.59:8080/fedora/objects/urepository:97023/datastreams/RELS-EXT/content </xmp>

 <h2>Get all triples</h2>
 <h4>curl example</h4>

<xmp> curl  --user user:password  http://128.101.146.59:8080/fedora/risearch?type=triples\&lang=spo\&format=N-Triples\&stream=on\&query=*+*+* </xmp>

 <h4>browser example</h4>

<xmp>http://128.101.146.59:8080/fedora/risearch?type=triples&lang=spo&format=N-Triples&stream=on&query=*+*+* </xmp>

 <h2>All triples with 36284 handle as a predicate</h2>

 <h4>curl example</h4>
<xmp> curl  --user user:password  http://128.101.146.59:8080/fedora/risearch?type=triples\&lang=spo\&format=N-Triples\&stream=on\&query=*+*+\<info:fedora/urepository:36284\> </xmp>


 <h4>browser example</h4>

<xmp>http://128.101.146.59:8080/fedora/risearch?type=triples&lang=spo&format=N-Triples&stream=on&query=*+*+<info:fedora/urepository:36284> </xmp>


<h2>All triples with 36284 handle as a subject</h2>

 <h4>curl example</h4>

<xmp> curl  --user user:password  http://128.101.146.59:8080/fedora/risearch?type=triples\&lang=spo\&format=N-Triples\&stream=on\&query=\<info:fedora/urepository:36284\>+*+* </xmp>


 <h4>browser example</h4>

<xmp>http://128.101.146.59:8080/fedora/risearch?type=triples&lang=spo&format=N-Triples&stream=on&query=<info:fedora/urepository:36284>+*+* </xmp>

 <h2>Determine if 36284 is a collection</h2>
 <h4>curl example</h4>

<xmp> curl  --user user:password  http://128.101.146.59:8080/fedora/risearch?type=triples\&lang=spo\&format=N-Triples\&stream=on\&query=*+\<info:fedora/fedora-system:def/relations-external#isMemberOfCollection\>+\<info:fedora/urepository:36284\> </xmp>

 


 <h2>Find the title of 36284</h2>

 <xmp> curl  --user user:password http://128.101.146.59:8080/fedora/risearch?type=triples\&lang=spo\&format=n-triples\&stream=on\&query=\<info:fedora/urepository:36284\>+\<http://purl.org/dc/elements/1.1/title\>+* </xmp>

]]></description>
         <link>http://blog.lib.umn.edu/silvi003/codenotes/2011/09/varios_curls_for_fedora_rdf_re.html</link>
         <guid>http://blog.lib.umn.edu/silvi003/codenotes/2011/09/varios_curls_for_fedora_rdf_re.html</guid>
         <category>fedora</category>
         <pubDate>Tue, 06 Sep 2011 16:40:07 -0600</pubDate>
      </item>
      
   </channel>
</rss>
