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

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

Best Java code snippets using com.lyncode.xoai.dataprovider.model.Context.hasCondition (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

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");
com.lyncode.xoai.dataprovider.modelContexthasCondition

Popular methods of Context

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

Popular in Java

  • Creating JSON documents from java classes using gson
  • onRequestPermissionsResult (Fragment)
  • onCreateOptionsMenu (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • Collectors (java.util.stream)
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Option (scala)
  • Github Copilot alternatives
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