Class DefaultGroup.Builder

  • All Implemented Interfaces:
    io.annot8.core.annotations.Group.Builder, io.annot8.core.helpers.builders.WithFromBuilder<io.annot8.core.annotations.Group.Builder,io.annot8.core.annotations.Group>, io.annot8.core.helpers.builders.WithIdBuilder<io.annot8.core.annotations.Group.Builder>, io.annot8.core.helpers.builders.WithNewIdBuilder<io.annot8.core.annotations.Group.Builder>, io.annot8.core.helpers.builders.WithPropertiesBuilder<io.annot8.core.annotations.Group.Builder>, io.annot8.core.helpers.builders.WithSave<io.annot8.core.annotations.Group>, io.annot8.core.helpers.builders.WithTypeBuilder<io.annot8.core.annotations.Group.Builder>
    Enclosing class:
    DefaultGroup

    public static class DefaultGroup.Builder
    extends Object
    implements io.annot8.core.annotations.Group.Builder
    AbstractContentBuilder class for DefaultGroup, using UUID for generating new IDs and InMemoryImmutableProperties or EmptyImmutableProperties for the properties.
    • Constructor Summary

      Constructors 
      Constructor Description
      Builder​(io.annot8.core.data.Item item, io.annot8.common.implementations.stores.SaveCallback<io.annot8.core.annotations.Group,io.annot8.core.annotations.Group> saver)  
      Builder​(io.annot8.core.data.Item item, String id, io.annot8.common.implementations.stores.SaveCallback<io.annot8.core.annotations.Group,io.annot8.core.annotations.Group> saver)  
    • Constructor Detail

      • Builder

        public Builder​(io.annot8.core.data.Item item,
                       io.annot8.common.implementations.stores.SaveCallback<io.annot8.core.annotations.Group,io.annot8.core.annotations.Group> saver)
      • Builder

        public Builder​(io.annot8.core.data.Item item,
                       String id,
                       io.annot8.common.implementations.stores.SaveCallback<io.annot8.core.annotations.Group,io.annot8.core.annotations.Group> saver)
    • Method Detail

      • withId

        public io.annot8.core.annotations.Group.Builder withId​(String id)
        Specified by:
        withId in interface io.annot8.core.helpers.builders.WithIdBuilder<io.annot8.core.annotations.Group.Builder>
      • withType

        public io.annot8.core.annotations.Group.Builder withType​(String type)
        Specified by:
        withType in interface io.annot8.core.helpers.builders.WithTypeBuilder<io.annot8.core.annotations.Group.Builder>
      • withProperty

        public io.annot8.core.annotations.Group.Builder withProperty​(String key,
                                                                     Object value)
        Specified by:
        withProperty in interface io.annot8.core.helpers.builders.WithPropertiesBuilder<io.annot8.core.annotations.Group.Builder>
      • withoutProperty

        public io.annot8.core.annotations.Group.Builder withoutProperty​(String key,
                                                                        Object value)
        Specified by:
        withoutProperty in interface io.annot8.core.helpers.builders.WithPropertiesBuilder<io.annot8.core.annotations.Group.Builder>
      • withoutProperty

        public io.annot8.core.annotations.Group.Builder withoutProperty​(String key)
        Specified by:
        withoutProperty in interface io.annot8.core.helpers.builders.WithPropertiesBuilder<io.annot8.core.annotations.Group.Builder>
      • withProperties

        public io.annot8.core.annotations.Group.Builder withProperties​(io.annot8.core.properties.Properties properties)
        Specified by:
        withProperties in interface io.annot8.core.helpers.builders.WithPropertiesBuilder<io.annot8.core.annotations.Group.Builder>
      • newId

        public io.annot8.core.annotations.Group.Builder newId()
        Specified by:
        newId in interface io.annot8.core.helpers.builders.WithNewIdBuilder<io.annot8.core.annotations.Group.Builder>
      • from

        public io.annot8.core.annotations.Group.Builder from​(io.annot8.core.annotations.Group from)
        Specified by:
        from in interface io.annot8.core.helpers.builders.WithFromBuilder<io.annot8.core.annotations.Group.Builder,io.annot8.core.annotations.Group>
      • save

        public io.annot8.core.annotations.Group save()
                                              throws io.annot8.core.exceptions.IncompleteException
        Specified by:
        save in interface io.annot8.core.helpers.builders.WithSave<io.annot8.core.annotations.Group>
        Throws:
        io.annot8.core.exceptions.IncompleteException
      • withAnnotation

        public io.annot8.core.annotations.Group.Builder withAnnotation​(String role,
                                                                       io.annot8.core.annotations.Annotation annotation)
        Specified by:
        withAnnotation in interface io.annot8.core.annotations.Group.Builder