Class SocialAgentProfile.Builder
java.lang.Object
com.janeirodigital.sai.core.resources.ReadableResource.Builder<T>
com.janeirodigital.sai.core.resources.CRUDResource.Builder<SocialAgentProfile.Builder>
com.janeirodigital.sai.core.agents.SocialAgentProfile.Builder
- Enclosing class:
- SocialAgentProfile
public static class SocialAgentProfile.Builder
extends CRUDResource.Builder<SocialAgentProfile.Builder>
Builder for
SocialAgentProfile 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 theSocialAgentProfileusing attributes from the Builder.getThis()Ensures that don't get an unchecked cast warning when returning from setterssetAuthorizationAgent(URI authorizationAgentUri) Set the Authorization Agent for the Social Agent.setDataset(org.apache.jena.rdf.model.Model dataset) Set the Jena model and use it to populate attributes of theSocialAgentProfile.Builder.setOidcIssuerUris(List<URI> oidcIssuerUris) Set the OpenID Connect Issuers for the Social AgentsetRegistrySet(URI registrySetUri) Set the Registry Set for the Social Agent.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 theSocialAgentProfileto buildsaiSession-SaiSessionto assign
-
-
Method Details
-
getThis
Ensures that don't get an unchecked cast warning when returning from setters- Specified by:
getThisin classReadableResource.Builder<SocialAgentProfile.Builder>- Returns:
SocialAgentProfile.Builder
-
setDataset
public SocialAgentProfile.Builder setDataset(org.apache.jena.rdf.model.Model dataset) throws SaiException Set the Jena model and use it to populate attributes of theSocialAgentProfile.Builder. Assumption is made that the corresponding resource exists.- Overrides:
setDatasetin classReadableResource.Builder<SocialAgentProfile.Builder>- Parameters:
dataset- Jena model to populate the Builder attributes with- Returns:
SocialAgentProfile.Builder- Throws:
SaiException
-
setRegistrySet
Set the Registry Set for the Social Agent.- Parameters:
registrySetUri- URI of the social agent's registry set resource- See Also:
-
setAuthorizationAgent
Set the Authorization Agent for the Social Agent.- Parameters:
authorizationAgentUri- URI of the social agent's authorization agent- See Also:
-
setOidcIssuerUris
Set the OpenID Connect Issuers for the Social Agent- Parameters:
oidcIssuerUris- List of URIs of OIDC Issuers- See Also:
-
build
Build theSocialAgentProfileusing 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:
SocialAgentProfile- Throws:
SaiException
-