2008.5.16_1 IBM Intern

来源:互联网 发布:人工智能的未来 epub 编辑:程序博客网 时间:2024/06/05 08:56
Apache Abdera

Introduction

Apache Abdera provides an implementation of the IETF Atom Syndication Format and Atom Publishing Protocol standards.

Abdera is composed of a number of individual modules:

  • Core: Provides the core interfaces used throughout Abdera:
    • Feed Object Model - A set of Java interfaces and abstract classes modeled after the various document and element types defined by the Atom specifications.
    • Parser and Factory interfaces - Interfaces that provide the mechanisms for creating and consuming Atom documents.
    • ExtensionFactory - The primary means by which extensions to the Atom format are integrated into Abdera. Extension Factories are used by both the Parser and Factory.
    • Writer - The means by which Feed Object Model objects are serialized into XML or other formats
    • ParseFilter - Provides a means of filtering the stream of parse events
    • Converter - Base interfaces and utilities for converting objects into Feed Object Model objects
    • XPath - Base interface for navigating the Feed Object Model using XPath
  • Dependencies: Contains all of the other jars and code Abdera depends on
  • Parser: Provide an implementation of the Feed Object Model based on the Apache Axiom project
  • Protocol: Provides the base interfaces and utility classes used for the RFC 5023 (Atompub) implementation
  • Server: Provides framework code used to build Atompub servers
  • Client: Provides an Atompub client implementation that is based on the Apache Commons HTTP Client.
  • Spring: Extends the Server module by adding support for the Spring framework
  • Security: Provides support for XML Digital Signatures and XML Encryption
  • Extensions: Provides support for a number of standard and non-standard extensions to the Atom format
    • Atom Threading Extensions
    • Atom License Extension
    • Atompub Feature Discovery
    • Atom Bidi Attribute
    • Feed Paging and Archiving
    • GeoRSS
    • Simple Sharing Extensions
    • MediaRSS
    • OpenSearch
    • GData and WSSE Autbentication
    code snippets from lotus quickr admin test unit
    .........
    ClientResponse response = client.get(url);
    assertEquals(HTTP_STATUS_OK, response.getStatus());
    Document entryDoc = response.getDocument();
    response.release();
    assertTrue( entryDoc.getRoot() instanceof Feed);
    FeedlibEntry = (Feed)entryDoc.getRoot();
    String uuidStr = libEntry.getSimpleExtension(ResponseWriter.qnameUuid);
    uuid = UUID.fromString(uuidStr);
    .........

    notes:
         client.get(url)  will return CommonResponse object  which inherits from AbstractClientResponse implementing ClientResponse interface.
         response.release() will release the resource associated with the response;
         UUID is a unique identity which represents an immutable universally unique identifier (UUID). A UUID represents a 128-bit value.