Class SimpleDSORelationsConverterPlugin

java.lang.Object
org.dspace.rdf.conversion.SimpleDSORelationsConverterPlugin
All Implemented Interfaces:
ConverterPlugin

public class SimpleDSORelationsConverterPlugin extends Object implements ConverterPlugin
Author:
Pascal-Nicolas Becker (dspace -at- pascal -hyphen- becker -dot- de)
  • Field Details

  • Constructor Details

    • SimpleDSORelationsConverterPlugin

      public SimpleDSORelationsConverterPlugin()
  • Method Details

    • getPrefixes

      protected org.apache.jena.rdf.model.Model getPrefixes()
      Loads the prefixes that should be used by the SimpleDSORelationsConverterPlugin. Please remember to close the model returned by this method.
      Returns:
      A model containing the content of the file used to configure the RDF-Prefixes that should be used by this plugin.
    • setConfigurationService

      public void setConfigurationService(ConfigurationService configurationService)
      Specified by:
      setConfigurationService in interface ConverterPlugin
    • convert

      public org.apache.jena.rdf.model.Model convert(Context context, DSpaceObject dso) throws SQLException
      Description copied from interface: ConverterPlugin
      Convert the specified DSpaceObject or a part of it into RDF.
      Specified by:
      convert in interface ConverterPlugin
      Parameters:
      context - Please check the READ permission for the provided context before converting any data!
      dso - The DSpaceObject that should be converted.
      Returns:
      A Jena Model containing the generated RDF.
      Throws:
      SQLException - An exception that provides information on a database access error or other errors.
    • convertSite

      public org.apache.jena.rdf.model.Model convertSite(Context context, Site site) throws SQLException
      Throws:
      SQLException
    • convertCommunity

      public org.apache.jena.rdf.model.Model convertCommunity(Context context, Community community) throws SQLException
      Throws:
      SQLException
    • convertCollection

      public org.apache.jena.rdf.model.Model convertCollection(Context context, Collection collection) throws SQLException
      Throws:
      SQLException
    • convertItem

      public org.apache.jena.rdf.model.Model convertItem(Context context, Item item) throws SQLException
      Throws:
      SQLException
    • bitstreamURI

      public String bitstreamURI(Context context, Bitstream bitstream) throws SQLException
      This methods generates a link to the provided Bitstream. As bitstreams currently don't get Persistent Identifier in DSpace, we have to link them using a link to the repository.
      Parameters:
      context - The relevant DSpace Context.
      bitstream - Bitstream for which a URL should be generated.
      Returns:
      The link to the URL or null if the Bitstream is a Community or Collection logo.
      Throws:
      SQLException - if database error
    • supports

      public boolean supports(int type)
      Description copied from interface: ConverterPlugin
      Returns all type of DSpaceObjects that are supported by this plugin.
      Specified by:
      supports in interface ConverterPlugin
      Parameters:
      type - Resource type as defined in org.dspace.core.Constants.
      Returns:
      A boolean whether the requested type is supported by this plugin.
      See Also: