Codota Logo
ListMetadataFormatsHandler
Code IndexAdd Codota to your IDE (free)

How to use
ListMetadataFormatsHandler
in
com.lyncode.xoai.dataprovider.handlers

Best Java code snippets using com.lyncode.xoai.dataprovider.handlers.ListMetadataFormatsHandler (Showing top 6 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Connection c =
  • Codota IconDataSource dataSource;dataSource.getConnection()
  • Codota IconString url;DriverManager.getConnection(url)
  • Codota IconIdentityDatabaseUtil.getDBConnection()
  • Smart code suggestions by Codota
}
origin: IQSS/dataverse

public XdataProvider (Context context, Repository repository) {
  this.repository = repository;
  this.dateProvider = new UTCDateProvider();
  this.identifyHandler = new IdentifyHandler(context, repository);
  this.listSetsHandler = new ListSetsHandler(context, repository);
  this.listMetadataFormatsHandler = new ListMetadataFormatsHandler(context, repository);
  this.listRecordsHandler = new XlistRecordsHandler(context, repository);
  this.listIdentifiersHandler = new ListIdentifiersHandler(context, repository);
  //this.getRecordHandler = new GetRecordHandler(context, repository);
  this.getRecordHandler = new XgetRecordHandler(context, repository);
  this.errorsHandler = new ErrorHandler();
}
origin: com.lyncode/xoai-data-provider

public ListMetadataFormatsHandler(Context context, Repository repository) {
  super(context, repository);
  itemRepositoryHelper = new ItemRepositoryHelper(repository.getItemRepository());
  // Static validation
  if (getContext().getMetadataFormats() == null ||
      getContext().getMetadataFormats().isEmpty())
    throw new InternalOAIException("The context must expose at least one metadata format");
}
origin: IQSS/dataverse

  break;
case ListMetadataFormats:
  response.withVerb(listMetadataFormatsHandler.handle(parameters));
  break;
case GetRecord:
origin: com.lyncode/xoai-data-provider

@Override
public ListMetadataFormats handle(OAICompiledRequest params) throws OAIException, HandlerException {
  ListMetadataFormats result = new ListMetadataFormats();
  if (params.hasIdentifier()) {
    Item item = itemRepositoryHelper.getItem(params.getIdentifier());
    List<MetadataFormat> metadataFormats = getContext().formatFor(getRepository().getFilterResolver(), item);
    if (metadataFormats.isEmpty())
      throw new NoMetadataFormatsException();
    for (MetadataFormat metadataFormat : metadataFormats) {
      com.lyncode.xoai.model.oaipmh.MetadataFormat format = new com.lyncode.xoai.model.oaipmh.MetadataFormat()
        .withMetadataPrefix(metadataFormat.getPrefix())
        .withMetadataNamespace(metadataFormat.getNamespace())
        .withSchema(metadataFormat.getSchemaLocation());
      result.withMetadataFormat(format);
    }
  } else {
    for (MetadataFormat metadataFormat : getContext().getMetadataFormats()) {
      com.lyncode.xoai.model.oaipmh.MetadataFormat format = new com.lyncode.xoai.model.oaipmh.MetadataFormat()
          .withMetadataPrefix(metadataFormat.getPrefix())
          .withMetadataNamespace(metadataFormat.getNamespace())
          .withSchema(metadataFormat.getSchemaLocation());
      result.withMetadataFormat(format);
    }
  }
  return result;
}
origin: com.lyncode/xoai-data-provider

  break;
case ListMetadataFormats:
  response.withVerb(listMetadataFormatsHandler.handle(parameters));
  break;
case GetRecord:
origin: com.lyncode/xoai-data-provider

public DataProvider (Context context, Repository repository) {
  this.repository = repository;
  this.dateProvider = new UTCDateProvider();
  this.identifyHandler = new IdentifyHandler(context, repository);
  this.listSetsHandler = new ListSetsHandler(context, repository);
  this.listMetadataFormatsHandler = new ListMetadataFormatsHandler(context, repository);
  this.listRecordsHandler = new ListRecordsHandler(context, repository);
  this.listIdentifiersHandler = new ListIdentifiersHandler(context, repository);
  this.getRecordHandler = new GetRecordHandler(context, repository);
  this.errorsHandler = new ErrorHandler();
}
com.lyncode.xoai.dataprovider.handlersListMetadataFormatsHandler

Most used methods

  • <init>
  • handle
  • getContext
  • getRepository

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getContentResolver (Context)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • Menu (java.awt)
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now