@Test public void testMatterhornInlinedMetadataProvider() throws Exception { runChecks(OaiPmhConstants.VERB_LIST_RECORDS, repo(oaiPmhPersistenceMock(searchResultItem("id-1", utcDate(2011, 5, 1), false), searchResultItem("id-2", utcDate(2011, 6, 1), true)), Granularity.DAY) .selectVerb(params("ListRecords", null, "matterhorn-inlined", null, null, null)), some(IsValid), list(hasXPath(" hasXPath(" hasXPath(" hasXPath(" hasXPath(" hasXPath(" hasXPath("count( hasXPath("count( hasXPath("count( }
public XmlGen selectVerb(Params p) { if (p.isVerbListIdentifiers()) { return handleListIdentifiers(p); } else if (p.isVerbListRecords()) { return handleListRecords(p); } else if (p.isVerbGetRecord()) { return handleGetRecord(p); } else if (p.isVerbIdentify()) { return handleIdentify(p); } else if (p.isVerbListMetadataFormats()) { return handleListMetadataFormats(p); } else if (p.isVerbListSets()) { return handleListSets(p); } else { return createErrorResponse( "badVerb", Option.<String>none(), p.getRepositoryUrl(), "Illegal OAI verb or verb is missing."); } }
OaiPmhRepository { public XmlGen selectVerb(Params p) { if (p.isVerbListIdentifiers()) { return handleListIdentifiers(p); } else if (p.isVerbListRecords()) { return handleListRecords(p); } else if (p.isVerbGetRecord()) { return handleGetRecord(p); } else if (p.isVerbIdentify()) { return handleIdentify(p); } else if (p.isVerbListMetadataFormats()) { return handleListMetadataFormats(p); } else if (p.isVerbListSets()) { return handleListSets(p); } else { return createErrorResponse( "badVerb", Option.<String>none(), p.getRepositoryUrl(), "Illegal OAI verb or verb is missing."); } } }
OaiPmhRepository { public XmlGen selectVerb(Params p) { if (p.isVerbListIdentifiers()) { return handleListIdentifiers(p); } else if (p.isVerbListRecords()) { return handleListRecords(p); } else if (p.isVerbGetRecord()) { return handleGetRecord(p); } else if (p.isVerbIdentify()) { return handleIdentify(p); } else if (p.isVerbListMetadataFormats()) { return handleListMetadataFormats(p); } else if (p.isVerbListSets()) { return handleListSets(p); } else { return createErrorResponse( "badVerb", Option.<String>none(), p.getRepositoryUrl(), "Illegal OAI verb or verb is missing."); } }  }
OaiPmhRepository { public XmlGen selectVerb(Params p) { if (p.isVerbListIdentifiers()) { return handleListIdentifiers(p); } else if (p.isVerbListRecords()) { return handleListRecords(p); } else if (p.isVerbGetRecord()) { return handleGetRecord(p); } else if (p.isVerbIdentify()) { return handleIdentify(p); } else if (p.isVerbListMetadataFormats()) { return handleListMetadataFormats(p); } else if (p.isVerbListSets()) { return handleListSets(p); } else { return createErrorResponse( "badVerb", Option.<String>none(), p.getRepositoryUrl(), "Illegal OAI verb or verb is missing."); } }  abstract Granularity getRepositoryTimeGranularity(); abstract String getRepositoryName(); abstract String getRepositoryId(); abstract OaiPmhDatabase getPersistence(); abstract String getAdminEmail(); abstract String saveQuery(ResumableQuery query); abstract Option<ResumableQuery> getSavedQuery(String resumptionToken); abstract int getResultLimit(); abstract List<MetadataProvider> getRepositoryMetadataProviders(); Date currentDate(); final List<MetadataProvider> getMetadataProviders(); void addItem(MediaPackage mp); XmlGen selectVerb(Params p); Option<MetadataProvider> getMetadataProvider(final String metadataPrefix); static Date granulate(Granularity g, Date d); }
OaiPmhRepository { public XmlGen selectVerb(Params p) { if (p.isVerbListIdentifiers()) { return handleListIdentifiers(p); } else if (p.isVerbListRecords()) { return handleListRecords(p); } else if (p.isVerbGetRecord()) { return handleGetRecord(p); } else if (p.isVerbIdentify()) { return handleIdentify(p); } else if (p.isVerbListMetadataFormats()) { return handleListMetadataFormats(p); } else if (p.isVerbListSets()) { return handleListSets(p); } else { return createErrorResponse( "badVerb", Option.<String>none(), p.getRepositoryUrl(), "Illegal OAI verb or verb is missing."); } }  abstract Granularity getRepositoryTimeGranularity(); abstract String getRepositoryName(); abstract String getRepositoryId(); abstract OaiPmhDatabase getPersistence(); abstract String getAdminEmail(); abstract String saveQuery(ResumableQuery query); abstract Option<ResumableQuery> getSavedQuery(String resumptionToken); abstract int getResultLimit(); abstract List<MetadataProvider> getRepositoryMetadataProviders(); Date currentDate(); final List<MetadataProvider> getMetadataProviders(); void addItem(MediaPackage mp); XmlGen selectVerb(Params p); Option<MetadataProvider> getMetadataProvider(final String metadataPrefix); static Date granulate(Granularity g, Date d);  }