Interface Factory


  • @Deprecated(since="2021-07-29")
    public interface Factory
    Deprecated.
    This API is deprecated as Apache Abdera is a retired project since 2017.
    The Factory interface is the primary means by which Feed Object Model instances are built. Factories are specific to parser implementations. Users will generally not have to know anything about the Factory implementation, which will be automatically selected based on the Abdera configuration options.
    • Method Detail

      • newParser

        Parser newParser()
        Deprecated.
        Create a new Parser instance.
        Returns:
        A new instance of the Parser associated with this Factory
      • newDocument

        <T extends ElementDocument<T> newDocument()
        Deprecated.
        Create a new Document instance with a root Element of type T.
        Returns:
        A new instance of a Document
      • newService

        Service newService()
        Deprecated.
        Create a new Service element.
        Returns:
        A newly created Service element
      • newService

        Service newService​(Base parent)
        Deprecated.
        Create a new Service element as a child of the given Base.
        Parameters:
        parent - The element or document to which the new Service should be added as a child
        Returns:
        A newly created Service element
      • newWorkspace

        Workspace newWorkspace()
        Deprecated.
        Create a new Workspace element.
        Returns:
        A newly created Workspace element
      • newWorkspace

        Workspace newWorkspace​(Element parent)
        Deprecated.
        Create a new Workspace element as a child of the given Element.
        Parameters:
        parent - The element to which the new Workspace should be added as a child
        Returns:
        A newly created Workspace element
      • newCollection

        Collection newCollection()
        Deprecated.
        Create a new Collection element.
        Returns:
        A newly created Collection element
      • newCollection

        Collection newCollection​(Element parent)
        Deprecated.
        Create a new Collection element as a child of the given Element.
        Parameters:
        parent - The element to which the new Collection should be added as a child
        Returns:
        A newly created Collection element
      • newFeed

        Feed newFeed()
        Deprecated.
        Create a new Feed element. A new Document containing the Feed will be created automatically
        Returns:
        A newly created Feed element.
      • newFeed

        Feed newFeed​(Base parent)
        Deprecated.
        Create a new Feed element as a child of the given Base.
        Parameters:
        parent - The element or document to which the new Feed should be added as a child
        Returns:
        A newly created Feed element
      • newEntry

        Entry newEntry()
        Deprecated.
        Create a new Entry element. A new Document containing the Entry will be created automatically
        Returns:
        A newly created Entry element
      • newEntry

        Entry newEntry​(Base parent)
        Deprecated.
        Create a new Entry element as a child of the given Base.
        Parameters:
        parent - The element or document to which the new Entry should be added as a child
        Returns:
        A newly created Entry element
      • newCategory

        Category newCategory()
        Deprecated.
        Create a new Category element.
        Returns:
        A newly created Category element
      • newCategory

        Category newCategory​(Element parent)
        Deprecated.
        Create a new Category element as a child of the given Element.
        Parameters:
        parent - The element to which the new Category should be added as a child
        Returns:
        A newly created Category element
      • newContent

        Content newContent()
        Deprecated.
        Create a new Content element.
        Returns:
        A newly created Content element with type="text"
      • newContent

        Content newContent​(Content.Type type)
        Deprecated.
        Create a new Content element of the given Content.Type.
        Parameters:
        type - The Content.Type for the newly created Content element.
        Returns:
        A newly created Content element using the specified type
      • newContent

        Content newContent​(Content.Type type,
                           Element parent)
        Deprecated.
        Create a new Content element of the given Content.Type as a child of the given Element.
        Parameters:
        type - The Content.Type for the newly created Content element.
        parent - The element to which the new Content should be added as a child
        Returns:
        A newly created Content element using the specified type
      • newContent

        Content newContent​(javax.activation.MimeType mediaType)
        Deprecated.
        Create a new Content element of the given MediaType.
        Parameters:
        mediaType - The MIME media type to be specified by the type attribute
        Returns:
        A newly created Content element using the specified MIME type
      • newContent

        Content newContent​(javax.activation.MimeType mediaType,
                           Element parent)
        Deprecated.
        Create a new Content element of the given MediaType as a child of the given Element.
        Parameters:
        mediaType - The MIME media type to be specified by the type attribute
        parent - The element to which the new Content should be added as a child
        Returns:
        A newly created Content element using the specified mediatype.
      • newPublished

        DateTime newPublished()
        Deprecated.
        Create a new published element.
        Returns:
        A newly created atom:published element
      • newPublished

        DateTime newPublished​(Element parent)
        Deprecated.
        Create a new published element as a child of the given Element.
        Parameters:
        parent - The element to which the new Published element should be added as a child
        Returns:
        A newly created atom:published element
      • newUpdated

        DateTime newUpdated()
        Deprecated.
        Create a new updated element.
        Returns:
        A newly created atom:updated element
      • newUpdated

        DateTime newUpdated​(Element parent)
        Deprecated.
        create a new updated element as a child of the given Element.
        Parameters:
        parent - The element to which the new Updated element should be added as a child
        Returns:
        A newly created atom:updated element
      • newEdited

        DateTime newEdited()
        Deprecated.
        Create a new app:edited element. The app:edited element is defined by the Atom Publishing Protocol specification for use in atom:entry elements created and edited using that protocol. The element should only ever appear as a child of atom:entry.
        Returns:
        A newly created app:edited element
      • newEdited

        DateTime newEdited​(Element parent)
        Deprecated.
        Create a new app:edited element. The app:edited element is defined by the Atom Publishing Protocol specification for use in atom:entry elements created and edited using that protocol. The element should only ever appear as a child of atom:entry.
        Parameters:
        parent - The element to which the new Edited element should be added as a child
        Returns:
        A newly created app:edited element
      • newDateTime

        DateTime newDateTime​(javax.xml.namespace.QName qname,
                             Element parent)
        Deprecated.
        Create a new DateTime element with the given QName as a child of the given Element. RFC4287 provides the abstract Atom Date Construct as a reusable component. Any extension element whose value is a Date/Time SHOULD reuse this construct to maintain consistency with the base specification.
        Parameters:
        qname - The XML QName of the Atom Date element to create
        parent - The element to which the new Atom Date element should be added as a child
        Returns:
        The newly created Atom Date Construct element
      • newDefaultGenerator

        Generator newDefaultGenerator()
        Deprecated.
        Create a new Generator with Abdera's default name and version.
        Returns:
        A newly created and pre-populated atom:generator element
      • newDefaultGenerator

        Generator newDefaultGenerator​(Element parent)
        Deprecated.
        Create a new Generator using Abdera's default name and version as a child of the given Element.
        Parameters:
        parent - The element to which the new Generator element should be added as a child
        Returns:
        A newly created and pre-populated atom:generator element
      • newGenerator

        Generator newGenerator()
        Deprecated.
        Create a new Generator element.
        Returns:
        A newly created atom:generator element
      • newGenerator

        Generator newGenerator​(Element parent)
        Deprecated.
        Create a new Generator element as a child of the given Element.
        Parameters:
        parent - The element to which the new Generator element should be added as a child
        Returns:
        A newly creatd atom:generator element
      • newID

        IRIElement newID()
        Deprecated.
        Create a new id element.
        Returns:
        A newly created atom:id element
      • newID

        IRIElement newID​(Element parent)
        Deprecated.
        Create a new id element as a child of the given Element.
        Parameters:
        parent - The element to which the new ID element should be added as a child
        Returns:
        A newly created atom:id element
      • newIcon

        IRIElement newIcon()
        Deprecated.
        Create a new icon element.
        Returns:
        A newly created atom:icon element
      • newIcon

        IRIElement newIcon​(Element parent)
        Deprecated.
        Create a new icon element as a child of the given Element.
        Parameters:
        parent - The element to which the new Icon element should be added as a child
        Returns:
        A newly created atom:icon element
      • newLogo

        IRIElement newLogo()
        Deprecated.
        Create a new logo element.
        Returns:
        A newly created atom:logo element
      • newLogo

        IRIElement newLogo​(Element parent)
        Deprecated.
        Create a new logo element as a child of the given Element.
        Parameters:
        parent - The element to which the new Logo element should be added as a child
        Returns:
        A newly created atom:logo element
      • newUri

        IRIElement newUri()
        Deprecated.
        Create a new uri element.
        Returns:
        A newly created atom:uri element
      • newUri

        IRIElement newUri​(Element parent)
        Deprecated.
        Create a new uri element as a child of the given Element.
        Parameters:
        parent - The element to which the new URI element should be added as a child
        Returns:
        A newly created atom:uri element
      • newIRIElement

        IRIElement newIRIElement​(javax.xml.namespace.QName qname,
                                 Element parent)
        Deprecated.
        Create a new IRI element with the given QName as a child of the given Element.
        Parameters:
        qname - The XML QName of the new IRI element
        parent - The element to which the new generic IRI element should be added as a child
        Returns:
        A newly created element whose text value can be an IRI
      • newLink

        Link newLink()
        Deprecated.
        Create a new Link element.
        Returns:
        A newly created atom:link element
      • newLink

        Link newLink​(Element parent)
        Deprecated.
        Create a new Link element as a child of the given Element.
        Parameters:
        parent - The element to which the new Link element should be added as a child
        Returns:
        A newly created atom:uri element
      • newAuthor

        Person newAuthor()
        Deprecated.
        Create a new author element.
        Returns:
        A newly created atom:author element
      • newAuthor

        Person newAuthor​(Element parent)
        Deprecated.
        Create a new author element as a child of the given Element.
        Parameters:
        parent - The element to which the new Author element should be added as a child
        Returns:
        A newly created atom:author element
      • newContributor

        Person newContributor()
        Deprecated.
        Create a new contributor element.
        Returns:
        A newly created atom:contributor element
      • newContributor

        Person newContributor​(Element parent)
        Deprecated.
        Create a new contributor element as a child of the given Element.
        Parameters:
        parent - The element to which the new Contributor element should be added as a child
        Returns:
        A newly created atom:contributor element
      • newPerson

        Person newPerson​(javax.xml.namespace.QName qname,
                         Element parent)
        Deprecated.
        Create a new Person element with the given QName as a child of the given Element. RFC4287 provides the abstract Atom Person Construct to represent people and other entities within an Atom Document. Extensions that wish to represent people SHOULD reuse this construct.
        Parameters:
        qname - The XML QName of the newly created Person element
        parent - The element to which the new Person element should be added as a child
        Returns:
        A newly created Atom Person Construct element
      • newSource

        Source newSource()
        Deprecated.
        Create a new Source element.
        Returns:
        A newly created atom:source element
      • newSource

        Source newSource​(Element parent)
        Deprecated.
        Create a new Source element as a child of the given Element.
        Parameters:
        parent - The element to which the new Source element should be added as a child
        Returns:
        A newly created atom:source element
      • newText

        Text newText​(javax.xml.namespace.QName qname,
                     Text.Type type)
        Deprecated.
        Create a new Text element with the given QName and Text.Type. RFC4287 provides the abstract Text Construct to represent simple Text, HTML or XHTML within a document. This construct is used by Atom core elements like atom:title, atom:summary, atom:rights, atom:subtitle, etc and SHOULD be reused by extensions that need a way of embedding text in a document.
        Parameters:
        qname - The XML QName of the Text element to create
        type - The type of text (plain text, HTML or XHTML)
        Returns:
        A newly created Atom Text Construct element
      • newText

        Text newText​(javax.xml.namespace.QName qname,
                     Text.Type type,
                     Element parent)
        Deprecated.
        Create a new Text element with the given QName and Text.Type as a child of the given Element.
        Parameters:
        qname - The XML QName of the Text element to create
        type - The type of text (plain text, HTML or XHTML)
        parent - The element to which the new Updated element should be added as a child
        Returns:
        A newly created Atom Text Construct element
      • newTitle

        Text newTitle()
        Deprecated.
        Create a new title element.
        Returns:
        A newly created atom:title element
      • newTitle

        Text newTitle​(Element parent)
        Deprecated.
        Create a new title element as a child of the given Element.
        Parameters:
        parent - The element to which the new Title element should be added as a child
        Returns:
        A newly created atom:title element
      • newTitle

        Text newTitle​(Text.Type type)
        Deprecated.
        Create a new title element with the given Text.Type.
        Parameters:
        type - The type of text used in the title (plain text, HTML, XHTML)
        Returns:
        A newly created atom:title element
      • newTitle

        Text newTitle​(Text.Type type,
                      Element parent)
        Deprecated.
        Create a new title element with the given Text.Type as a child of the given Element.
        Parameters:
        type - The type of text used in the title (plain text, HTML, XHTML)
        parent - The element to which the new Updated element should be added as a child
        Returns:
        A newly created atom:title element
      • newSubtitle

        Text newSubtitle()
        Deprecated.
        Create a new subtitle element.
        Returns:
        A newly created atom:subtitle element
      • newSubtitle

        Text newSubtitle​(Element parent)
        Deprecated.
        Create a new subtitle element as a child of the given Element.
        Parameters:
        parent - The element to which the new Subtitle element should be added as a child
        Returns:
        A newly created atom:subtitle element
      • newSubtitle

        Text newSubtitle​(Text.Type type)
        Deprecated.
        Create a new subtitle element with the given Text.Type.
        Parameters:
        type - The type of text used in the subtitle (plain text, HTML, XHTML)
        Returns:
        A newly created atom:subtitle element
      • newSubtitle

        Text newSubtitle​(Text.Type type,
                         Element parent)
        Deprecated.
        Create a new subtitle element with the given Text.Type as a child of the given Element.
        Parameters:
        type - The type of text used i the subtitle (plain text, HTML, XHTML)
        parent - The element to which the new Subtitle element should be added as a child
        Returns:
        A newly created atom:subtitle element
      • newSummary

        Text newSummary()
        Deprecated.
        Create a new summary element.
        Returns:
        A newly created atom:summary element
      • newSummary

        Text newSummary​(Element parent)
        Deprecated.
        Create a new summary element as a child of the given Element.
        Parameters:
        parent - The element to which the new Summary element should be added as a child
        Returns:
        A newly created atom:summary element
      • newSummary

        Text newSummary​(Text.Type type)
        Deprecated.
        Create a new summary element with the given Text.Type.
        Parameters:
        type - The type of text used in the summary (plain text, HTML, XHTML)
        Returns:
        A newly created atom:summary element
      • newSummary

        Text newSummary​(Text.Type type,
                        Element parent)
        Deprecated.
        Create a new summary element with the given Text.Type as a child of the given Element.
        Parameters:
        type - The type of text used in the summary (plain text, HTML, XHTML)
        parent - The element to which the new Summary element should be added as a child
        Returns:
        A newly created atom:summary element
      • newRights

        Text newRights()
        Deprecated.
        Create a new rights element.
        Returns:
        A newly created atom:rights element
      • newRights

        Text newRights​(Element parent)
        Deprecated.
        Create a new rights element as a child of the given Element.
        Parameters:
        parent - The element to which the new Rights element should be added as a child
        Returns:
        A newly created atom:rights element
      • newRights

        Text newRights​(Text.Type type)
        Deprecated.
        Create a new rights element with the given Text.Type.
        Parameters:
        type - The type of text used in the Rights (plain text, HTML, XHTML)
        Returns:
        A newly created atom:rights element
      • newRights

        Text newRights​(Text.Type type,
                       Element parent)
        Deprecated.
        Create a new rights element with the given Text.Type as a child of the given Element.
        Parameters:
        type - The type of text used in the Rights (plain text, HTML, XHTML)
        parent - The element to which the new Rights element should be added as a child
        Returns:
        A newly created atom:rights element
      • newName

        Element newName()
        Deprecated.
        Create a new name element.
        Returns:
        A newly created atom:name element
      • newName

        Element newName​(Element parent)
        Deprecated.
        Create a new name element as a child of the given Element.
        Parameters:
        parent - The element to which the new Name element should be added as a child
        Returns:
        A newly created atom:summary element
      • newEmail

        Element newEmail()
        Deprecated.
        Create a new email element.
        Returns:
        A newly created atom:email element
      • newEmail

        Element newEmail​(Element parent)
        Deprecated.
        Create a new email element as a child of the given Element.
        Parameters:
        parent - The element to which the new Email element should be added as a child
        Returns:
        A newly created atom:email element
      • newElement

        <T extends Element> T newElement​(javax.xml.namespace.QName qname)
        Deprecated.
        Create a new Element with the given QName.
        Returns:
        A newly created element
      • newElement

        <T extends Element> T newElement​(javax.xml.namespace.QName qname,
                                         Base parent)
        Deprecated.
        Create a new Element with the given QName as a child of the given Base.
        Parameters:
        qname - The XML QName of the element to create
        parent - The element or document to which the new element should be added as a child
        Returns:
        A newly created element
      • newExtensionElement

        <T extends Element> T newExtensionElement​(javax.xml.namespace.QName qname)
        Deprecated.
        Create a new extension element with the given QName.
        Parameters:
        qname - The XML QName of the element to create
        Returns:
        A newly created element
      • newExtensionElement

        <T extends Element> T newExtensionElement​(javax.xml.namespace.QName qname,
                                                  Base parent)
        Deprecated.
        Create a new extension element with the given QName as a child of the given Base.
        Parameters:
        qname - The XML QName of the element to create
        parent - The element or document to which the new element should be added as a child
        Returns:
        A newly created element
      • newControl

        Control newControl()
        Deprecated.
        Create a new Control element. The app:control element is introduced by the Atom Publishing Protocol as a means of allowing publishing clients to provide metadata to a server affecting the way an entry is published. The control element SHOULD only ever appear as a child of the atom:entry and MUST only ever appear once.
        Returns:
        A newly app:control element
      • newControl

        Control newControl​(Element parent)
        Deprecated.
        Create a new Control element as a child of the given Element.
        Parameters:
        parent - The element to which the new Control element should be added as a child
        Returns:
        A newly app:control element
      • newDiv

        Div newDiv()
        Deprecated.
        Create a new Div element.
        Returns:
        A newly xhtml:div element
      • newDiv

        Div newDiv​(Base parent)
        Deprecated.
        Create a new Div element as a child of the given Base.
        Parameters:
        parent - The element or document to which the new XHTML div element should be added as a child
        Returns:
        A newly xhtml:div element
      • registerExtension

        Factory registerExtension​(ExtensionFactory extensionFactory)
        Deprecated.
        Registers an extension factory for this Factory instance only
        Parameters:
        extensionFactory - An ExtensionFactory instance
      • newCategories

        Categories newCategories()
        Deprecated.
        Create a new Categories element. The app:categories element is introduced by the Atom Publishing Protocol as a means of providing a listing of atom:category's that can be used by entries in a collection.
        Returns:
        A newly app:categories element
      • newCategories

        Categories newCategories​(Base parent)
        Deprecated.
        Create a new Categories element. The app:categories element is introduced by the Atom Publishing Protocol as a means of providing a listing of atom:category's that can be used by entries in a collection.
        Parameters:
        parent - The element or document to which the new Categories element should be added as a child
        Returns:
        A newly app:categories element
      • newUuidUri

        java.lang.String newUuidUri()
        Deprecated.
        Generate a new random UUID URI
      • getAbdera

        Abdera getAbdera()
        Deprecated.
        Get the Abdera instance for this factory
      • getMimeType

        <T extends Base> java.lang.String getMimeType​(T base)
        Deprecated.
        Get the mime type for the specified extension element / document
      • listExtensionFactories

        java.lang.String[] listExtensionFactories()
        Deprecated.
        Returns a listing of extension factories registered