Atom Publishing Protocol (AtomPub) Overview
The Atom Publishing Protocol (AtomPub) is an application-level protocol for publishing and editing Web resources. The protocol is based on HTTP transport of Atom-formatted representations. The Atom format is documented in the Atom Syndication Format.
Data Model
Apache Wink provides an Atom Publishing Protocol data model for producing Service Documents (application/atomsvc+xml) and Categories Documents (application/atomcat+xml). All of the model classes are located under the org.apache.wink.common.model.app package.
Important Note
The APP data model can also be used to produce Service and Categories documents in HTML (text/html) and JSON (application/json) formats. For more details regarding HTML see section HTML (TBD). For JSON format see section (TBD)
APP Service Document Support
TBD
|
Supported |
Media Types |
Data Model |
Provider registration |
---|---|---|---|---|
Read |
Yes |
NA |
org.apache.wink.common.model.app.AppService |
Not required. Registered by default |
Write |
Yes |
application/atomsvc+xml |
|
Not required. Registered by default |
APP Categories Document Support
TBD
|
Supported |
Media Types |
Data Model |
Provider registration |
---|---|---|---|---|
Read |
Yes |
NA |
application/atomcat+xml |
Not required. Registered by default |
Write |
Yes |
application/atomcat+xml |
|
Not required. Registered by default |
Examples
TBD
Producing an APP Service Document
TBD
@GET @Produces(MediaTypeUtils.ATOM_SERVICE_DOCUMENT) public AppService getServiceDocument() { AppService serviceDocument = new AppService(); List<AppWorkspace> workspaces = serviceDocument.getWorkspace(); AppWorkspace workspace1 = new AppWorkspace(); workspace1.setTitle(new AtomText("Workspace1")); List<AppCollection> collections = workspace1.getCollection(); AppCollection collection = new AppCollection(); collection.setTitle(new AtomText("Collection1")); collections.add(collection); workspaces.add(workspace1); ... return serviceDocument; }