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 withuriandsaiSession -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build theRegistrySetusing attributes from the Builder.getThis()Ensures that don't get an unchecked cast warning when returning from setterssetAgentRegistry(URI agentRegistryUri) Set the URI of theAgentRegistrysetAuthorizationRegistry(URI authorizationRegistryUri) Set the URI of theAuthorizationRegistrysetDataRegistries(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 withuriandsaiSession- Parameters:
uri- URI of theRegistrySetto buildsaiSession-SaiSessionto assign
-
-
Method Details
-
getThis
Ensures that don't get an unchecked cast warning when returning from setters- Specified by:
getThisin 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:
setDatasetin 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 theAgentRegistryto set- Returns:
RegistrySet.Builder
-
setAuthorizationRegistry
Set the URI of theAuthorizationRegistry- Parameters:
authorizationRegistryUri- URI of theAuthorizationRegistryto set- Returns:
RegistrySet.Builder
-
setDataRegistries
Set the URIs of associated Data Registries- Parameters:
dataRegistryUris- List of Data Registry URIs- Returns:
RegistrySet.Builder
-
build
Build theRegistrySetusing 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
-