« February 2010 | Main | May 2010 »

April 27, 2010

Batch Ingest into DSPACE based on EXCEL

Introduction

Below is a procedure for ingesting data into DSPACE based on excel. Basically the user inputs a zip file that has an excel file with the metadata in it and also a subdirectory with the assets. This is converted into subdirectories with dc xml and the corresponding asset, that can be consumed by the DSPACE ingest system. Finally a perl script calls the ItemIngest class and all the metadata and assets are ingested. ExcelBatchIngest.jpg

Files

DCBatch.java.html
batch_ingest.pl.html
Sample Excel file
IngestMetaData.xls

April 22, 2010

Part of the fedora API-M methods that deal with rdf

addRelationship
Creates a new relationship in the object. Adds the specified relationship to the object's RELS-EXT or RELS-INT Datastream. If the Resource Index is enabled, the relationship will be added to the Resource Index.
A rdf tuple consist of an object or datastream (the subject), having a predicate relating it to a target (the object). The object can either be a literal value, or a URI (which can identify for example a Fedora object or a datastream).
Input parameters: • String subject The subject. Either a Fedora object URI (eg info:fedora/demo:333) or a datastream URI (eg info:fedora/demo:333/DS1).
• String relationship The predicate.
• String object The object (target).
• boolean isLiteral A boolean value indicating whether the object is a literal.
• String datatype The datatype of the literal. Optional.
Returns:
• boolean True if and only if the relationship was added.

getRelationships
Get the relationships asserted in the object's RELS-EXT or RELS-INT Datastream that match the given criteria.
Input parameters:
• String subject The subject. Either a Fedora object URI (eg info:fedora/demo:333) or a datastream URI (eg info:fedora/demo:333/DS1).
• String relationship The predicate to match. A null value matches all predicates. Returns:
• RelationshipTuple[]** String subject - The subject of the relation. Either a Fedora object URI (eg info:fedora/demo:333) or a datastream URI (eg info:fedora/demo:333/DS1).
• String predicate - The predicate relating the subject and the object. Includes the namespace of the relation.
• String object - The URI of the object (target) of the relation
• boolean isLiteral - If true, the subject should be read as a literal value, not a URI
• String datatype - If the subject is a literal, the datatype to parse the value as. Optional.
purgeRelationship
Delete the specified relationship. This method will remove the specified relationship(s) from the RELS-EXT or RELS-INT datastream. If the Resource Index is enabled, this will also delete the corresponding triples from the Resource Index.
Input parameters:
• String subject The subject.  Either a Fedora object URI (eg info:fedora/demo:333) or a datastream URI (eg info:fedora/demo:333/DS1).
• String relationship The predicate, null matches any predicate.
• String object The object, null matches any object.
• boolean isLiteral A boolean value indicating whether the object is a literal.
• String datatype The datatype of the literal. Optional.
Returns:
• boolean True if and only if the relationship was purged.

Extracted from here