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

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

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

origin: com.lyncode/xoai-data-provider

private List<ScopedFilter> getScopedFilters(Context context, String metadataPrefix) throws CannotDisseminateFormatException {
  List<ScopedFilter> filters = new ArrayList<ScopedFilter>();
  if (context.hasCondition())
    filters.add(new ScopedFilter(context.getCondition(), Scope.Context));
  MetadataFormat metadataFormat = context.formatForPrefix(metadataPrefix);
  if (metadataFormat.hasCondition())
    filters.add(new ScopedFilter(metadataFormat.getCondition(), Scope.MetadataFormat));
  return filters;
}
origin: IQSS/dataverse

@Override
public GetRecord handle(OAICompiledRequest parameters) throws OAIException, HandlerException {        
  MetadataFormat format = getContext().formatForPrefix(parameters.getMetadataPrefix());
  Item item = getRepository().getItemRepository().getItem(parameters.getIdentifier());
  if (getContext().hasCondition() &&
      !getContext().getCondition().getFilter(getRepository().getFilterResolver()).isItemShown(item))
    throw new IdDoesNotExistException("This context does not include this item");
  if (format.hasCondition() &&
      !format.getCondition().getFilter(getRepository().getFilterResolver()).isItemShown(item))
    throw new CannotDisseminateRecordException("Format not applicable to this item");
  
  Xrecord record = this.createRecord(parameters, item);
  GetRecord result = new XgetRecord(record);
  
  return result;
}

origin: com.lyncode/xoai-data-provider

  !getContext().getCondition().getFilter(getRepository().getFilterResolver()).isItemShown(item))
throw new IdDoesNotExistException("This context does not include this item");
com.lyncode.xoai.dataprovider.modelContextgetCondition

Popular methods of Context

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

Popular in Java

  • Creating JSON documents from java classes using gson
  • getResourceAsStream (ClassLoader)
  • findViewById (Activity)
  • getSystemService (Context)
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • JFrame (javax.swing)
  • Option (scala)
  • Best plugins for Eclipse
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