Tabnine Logo
Context.formatFor
Code IndexAdd Tabnine to your IDE (free)

How to use
formatFor
method
in
com.lyncode.xoai.dataprovider.model.Context

Best Java code snippets using com.lyncode.xoai.dataprovider.model.Context.formatFor (Showing top 1 results out of 315)

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;
}
com.lyncode.xoai.dataprovider.modelContextformatFor

Popular methods of Context

  • <init>
  • formatForPrefix
  • getCondition
  • hasCondition
  • withMetadataFormat
  • getMetadataFormats
  • getSet
  • getSets
  • getTransformer
  • hasSet
  • hasTransformer
  • isStaticSet
  • hasTransformer,
  • isStaticSet

Popular in Java

  • Finding current android device location
  • getExternalFilesDir (Context)
  • putExtra (Intent)
  • getApplicationContext (Context)
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now