Class AlwaysThingProvider

java.lang.Object
dev.enola.thing.repo.AlwaysThingProvider
All Implemented Interfaces:
Provider<String,Thing>, ProviderFromIRI<Thing>, ThingProvider
Direct Known Subclasses:
AlwaysThingProviderAdapter, AlwaysThingRepositoryStore

public class AlwaysThingProvider extends Object implements ThingProvider
AlwaysThingProvider is a ThingProvider which never returns null, but always a Thing.

The Thing WILL have the requested IRI - but if no such Thing is known (e.g. was pre-loaded, or could be fetched), then the returned Thing ONLY has an IRI - and no properties (nor datatypes).

This is useful in some situations where callers don't want to distinguish "non-existent" Things; e.g. to have a ThingMetadataProvider always work, or so.