Package no.unit.nva.model
Record Class SourceName
java.lang.Object
java.lang.Record
no.unit.nva.model.SourceName
- Record Components:
system- the system name of the source. e.g. "brage", "cristin" or "nva"instanceName- the instance name of the source. e.g. "194.0.0.0", "20754.0.0.0", etc
A record representing a source name.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSourceName(String system, String instanceName) Creates an instance of aSourceNamerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static SourceNameA record representing a brage source for a given instance.static SourceNamefromCristin(String instanceName) A record representing a cristin source for a given instance.final inthashCode()Returns a hash code value for this object.Returns the value of theinstanceNamerecord component.system()Returns the value of thesystemrecord component.toString()Returns a string representation of this record class.
-
Field Details
-
SEPARATOR
- See Also:
-
BRAGE_SYSTEM
- See Also:
-
CRISTIN_SYSTEM
- See Also:
-
-
Constructor Details
-
SourceName
Creates an instance of aSourceNamerecord class.- Parameters:
system- the value for thesystemrecord componentinstanceName- the value for theinstanceNamerecord component
-
-
Method Details
-
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. -
fromBrage
A record representing a brage source for a given instance.- Parameters:
instanceName- the instance name of the source. e.g. "194.0.0.0", "20754.0.0.0", etc
-
fromCristin
A record representing a cristin source for a given instance.- Parameters:
instanceName- the instance name of the source. e.g. "194.0.0.0", "20754.0.0.0", etc
-
hashCode
public final int 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). -
system
Returns the value of thesystemrecord component.- Returns:
- the value of the
systemrecord component
-
instanceName
Returns the value of theinstanceNamerecord component.- Returns:
- the value of the
instanceNamerecord component
-