Package com.yahoo.config
Class ModelReference
java.lang.Object
com.yahoo.config.ModelReference
An immutable reference to a model.
This is a file path when read by a client but is set in a config instance either as a
path, url or id resolved to an url during deployment.
- Author:
- bratseth
-
Constructor Summary
ConstructorDescriptionModelReference
(Path resolved) ModelReference
(Optional<String> modelId, Optional<UrlReference> url, Optional<FileReference> path) -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
hashCode()
modelId()
path()
toString()
Returns this on the format accepted by valueOfurl()
value()
Returns the path to the file containing this model, or null if not available.static ModelReference
Creates a model reference from a three-part string on the formmodelId url path
Each of the elements is either a value not containing space, or empty represented by "".static ModelReference
Creates a model reference resolved to a Path to the local file.withModelId
(Optional<String> modelId) withPath
(Optional<FileReference> path) withUrl
(Optional<UrlReference> url)
-
Constructor Details
-
ModelReference
-
ModelReference
public ModelReference(Optional<String> modelId, Optional<UrlReference> url, Optional<FileReference> path)
-
-
Method Details
-
modelId
-
url
-
path
-
withModelId
-
withUrl
-
withPath
-
value
Returns the path to the file containing this model, or null if not available. -
equals
-
hashCode
public int hashCode() -
toString
Returns this on the format accepted by valueOf -
valueOf
Creates a model reference resolved to a Path to the local file. -
valueOf
Creates a model reference from a three-part string on the formmodelId url path
Each of the elements is either a value not containing space, or empty represented by "".
-