Class RegistrySet.Builder
java.lang.Object
com.janeirodigital.sai.core.resources.ReadableResource.Builder<T>
com.janeirodigital.sai.core.resources.CRUDResource.Builder<RegistrySet.Builder>
com.janeirodigital.sai.core.agents.RegistrySet.Builder
- Enclosing class:
- RegistrySet
Builder for
RegistrySet
instances.-
Field Summary
Fields inherited from class com.janeirodigital.sai.core.resources.ReadableResource.Builder
contentType, dataset, exists, jsonLdContext, resource, saiSession, unprotected, uri
-
Constructor Summary
ConstructorsConstructorDescriptionBuilder
(URI uri, SaiSession saiSession) Initialize builder withuri
andsaiSession
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build theRegistrySet
using attributes from the Builder.getThis()
Ensures that don't get an unchecked cast warning when returning from setterssetAgentRegistry
(URI agentRegistryUri) Set the URI of theAgentRegistry
setAuthorizationRegistry
(URI authorizationRegistryUri) Set the URI of theAuthorizationRegistry
setDataRegistries
(List<URI> dataRegistryUris) Set the URIs of associated Data RegistriessetDataset
(org.apache.jena.rdf.model.Model dataset) Set the Jena model and use it to populate attributes of theRegistrySet.Builder
.Methods inherited from class com.janeirodigital.sai.core.resources.ReadableResource.Builder
setContentType, setDataset, setJsonLdContext, setUnprotected
-
Constructor Details
-
Builder
Initialize builder withuri
andsaiSession
- Parameters:
uri
- URI of theRegistrySet
to buildsaiSession
-SaiSession
to assign
-
-
Method Details
-
getThis
Ensures that don't get an unchecked cast warning when returning from setters- Specified by:
getThis
in classReadableResource.Builder<RegistrySet.Builder>
- Returns:
RegistrySet.Builder
-
setDataset
Set the Jena model and use it to populate attributes of theRegistrySet.Builder
. Assumption is made that the corresponding resource exists.- Overrides:
setDataset
in classReadableResource.Builder<RegistrySet.Builder>
- Parameters:
dataset
- Jena model to populate the Builder attributes with- Returns:
RegistrySet.Builder
- Throws:
SaiException
-
setAgentRegistry
Set the URI of theAgentRegistry
- Parameters:
agentRegistryUri
- URI of theAgentRegistry
to set- Returns:
RegistrySet.Builder
-
setAuthorizationRegistry
Set the URI of theAuthorizationRegistry
- Parameters:
authorizationRegistryUri
- URI of theAuthorizationRegistry
to set- Returns:
RegistrySet.Builder
-
setDataRegistries
Set the URIs of associated Data Registries- Parameters:
dataRegistryUris
- List of Data Registry URIs- Returns:
RegistrySet.Builder
-
build
Build theRegistrySet
using attributes from the Builder. If no Jena dataset has been provided, then the dataset will be populated using the attributes from the Builder withpopulateDataset()
.- Returns:
RegistrySet
- Throws:
SaiException
-