Class DefaultAnnotation.Builder

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

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

      Constructors 
      Constructor Description
      Builder​(String content, io.annot8.common.implementations.stores.SaveCallback<io.annot8.core.annotations.Annotation,io.annot8.core.annotations.Annotation> saver)  
    • Constructor Detail

      • Builder

        public Builder​(String content,
                       io.annot8.common.implementations.stores.SaveCallback<io.annot8.core.annotations.Annotation,io.annot8.core.annotations.Annotation> saver)
    • Method Detail

      • withId

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

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

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

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

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

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

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

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

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

        public io.annot8.core.annotations.Annotation.Builder withBounds​(io.annot8.core.bounds.Bounds bounds)
        Specified by:
        withBounds in interface io.annot8.core.annotations.Annotation.Builder