Package dev.enola.thing.namespace
Record Class ThingNamespaceRepository
java.lang.Object
java.lang.Record
dev.enola.thing.namespace.ThingNamespaceRepository
- Record Components:
thingProvider- the provider of things used to retrieve namespace information
- All Implemented Interfaces:
NamespaceRepository,Provider<String,,Namespace> ProviderFromIRI<Namespace>,Repository<Namespace>
public record ThingNamespaceRepository(ThingProvider thingProvider)
extends Record
implements NamespaceRepository
NamespaceRepository based on reading ACTIVE_NAMESPACES_IRI from a ThingProvider.
This is (much!) slower than the NamespaceRepositoryEnolaDefaults.INSTANCE, and should only
ever be used indirectly through CachingNamespaceRepository.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionThingNamespaceRepository(ThingProvider thingProvider) Creates an instance of aThingNamespaceRepositoryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.@Nullable NamespaceGet.final inthashCode()Returns a hash code value for this object.listIRI()Returns the value of thethingProviderrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface dev.enola.data.iri.namespace.repo.NamespaceRepository
matchMethods inherited from interface dev.enola.data.Repository
list, stream
-
Field Details
-
ACTIVE_NAMESPACES_IRI
- See Also:
-
-
Constructor Details
-
ThingNamespaceRepository
public ThingNamespaceRepository() -
ThingNamespaceRepository
Creates an instance of aThingNamespaceRepositoryrecord class.- Parameters:
thingProvider- the value for thethingProviderrecord component
-
-
Method Details
-
get
Description copied from interface:ProviderGet. -
getIRI
- Specified by:
getIRIin interfaceNamespaceRepository
-
listIRI
- Specified by:
listIRIin interfaceRepository<Namespace>
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
thingProvider
Returns the value of thethingProviderrecord component.- Returns:
- the value of the
thingProviderrecord component
-