Class DefaultItem

  • All Implemented Interfaces:
    io.annot8.api.data.Item, io.annot8.api.helpers.WithFilter<io.annot8.api.data.Content<?>>, io.annot8.api.helpers.WithGroups, io.annot8.api.helpers.WithId, io.annot8.api.helpers.WithMutableProperties

    public class DefaultItem
    extends Object
    implements io.annot8.api.data.Item
    • Method Detail

      • getParent

        public Optional<String> getParent()
        Specified by:
        getParent in interface io.annot8.api.data.Item
      • getContent

        public Optional<io.annot8.api.data.Content<?>> getContent​(String id)
        Specified by:
        getContent in interface io.annot8.api.data.Item
      • getContents

        public Stream<io.annot8.api.data.Content<?>> getContents()
        Specified by:
        getContents in interface io.annot8.api.data.Item
      • createContent

        public <C extends io.annot8.api.data.Content<D>,​D> io.annot8.api.data.Content.Builder<C,​D> createContent​(Class<C> clazz)
        Specified by:
        createContent in interface io.annot8.api.data.Item
      • removeContent

        public void removeContent​(String id)
        Specified by:
        removeContent in interface io.annot8.api.data.Item
      • getGroups

        public io.annot8.api.stores.GroupStore getGroups()
        Specified by:
        getGroups in interface io.annot8.api.helpers.WithGroups
      • getProperties

        public io.annot8.api.properties.MutableProperties getProperties()
        Specified by:
        getProperties in interface io.annot8.api.helpers.WithMutableProperties
      • discard

        public void discard()
        Specified by:
        discard in interface io.annot8.api.data.Item
      • isDiscarded

        public boolean isDiscarded()
        Specified by:
        isDiscarded in interface io.annot8.api.data.Item
      • getId

        public String getId()
        Specified by:
        getId in interface io.annot8.api.helpers.WithId
      • createChild

        public io.annot8.api.data.Item createChild()
        Specified by:
        createChild in interface io.annot8.api.data.Item