All Downloads are FREE. Search and download functionalities are using the official Maven repository.

nl.vpro.domain.gtaa.GTAARepository Maven / Gradle / Ivy

There is a newer version: 8.3.0
Show newest version
/*
 * Copyright (C) 2015 Licensed under the Apache License, Version 2.0
 * VPRO The Netherlands
 */
package nl.vpro.domain.gtaa;

import lombok.Getter;

import java.time.Instant;
import java.util.List;
import java.util.Optional;

import nl.vpro.openarchives.oai.Record;
import nl.vpro.util.CountedIterator;
import nl.vpro.w3.rdf.Description;

/**
 * @author Roelof Jan Koekoek
 * @since 3.7
 */
public interface GTAARepository {

    CountedIterator getPersonUpdates(Instant from, Instant until);

    CountedIterator getGeoLocationsUpdates(Instant from, Instant until);

    CountedIterator getAllUpdates(Instant from, Instant until);

    List findPersons(String input, Integer max);

      T  submit(S thesaurusObject, String creator);

    List findAnything(String input, Integer max);

    List findForSchemes(String input, Integer max, SchemeOrNot... schemes);

    Optional retrieveConceptStatus(String id);

    Optional get(String id);


    @Getter
    class SchemeOrNot {
        final String scheme;
        final boolean not;

        public SchemeOrNot(String scheme, boolean not) {
            this.scheme = scheme;
            this.not = not;
        }
        public SchemeOrNot(String scheme) {
            this(scheme, false);
        }
        public SchemeOrNot(Scheme scheme) {
            this(scheme.getUrl());
        }

        public static SchemeOrNot of(Scheme scheme) {
            return new SchemeOrNot(scheme);
        }

        public SchemeOrNot not() {
            return new SchemeOrNot(scheme, ! not);
        }

        @Override
        public String toString() {
            return (not ? "!" : "") + scheme;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy