nl.vpro.domain.gtaa.GTAARepository Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gtaa-domain Show documentation
Show all versions of gtaa-domain Show documentation
Contains java bindings for the objects served out by Openskos/GTAA
/*
* 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;
}
}
}