Currently, there are three interfaces by which an ADL client can access an ADL node (i.e., a middleware server): via HTTP, via RMI, and, if the client is running within the same Java VM as the node, via direct Java method calls. The HTTP interface is the most universally accessible of the three, but it is also the least convenient since it requires marshaling every interaction as a protocol request/response. The Java and RMI interfaces are more convenient— if the client is implemented in Java, of course. All three interfaces suffer from the fundamental inconvenience of information being represented in XML as opposed to more programmatically friendly data structures.
Here's a design for a fourth, object-oriented interface based on some earlier ideas by Dave Valentine and Peter Slaughter. The interface consists of a number of "client objects" (i.e., objects that run in the context of the client) that hide the remoteness of ADL nodes and that make ADL services available as native methods. It differs from the RMI interface in that it is not XML-based.
Some general comments about the interface:
Collection,
ResultSet, etc.) are proxies for library objects. They
store the information necessary to connect to and stay synchronized
with their library counterparts. They do so by employing existing
middleware services via the middleware's HTTP and/or RMI
interfaces.Client object definitions follow.
LibraryRepresents an ADL node, i.e., an ADL middleware server. Stores:
Methods:
getP()getCollections()Collection objects.getStatus()query(query)ResultSet object.
The query is specified in the ADL query language.query(collections,
constraint [,
rankingMethod] [,
maximumResults])Collection objects and the query is
specified by a QueryConstraint object representing
the root constraint.CollectionRepresents a collection. Stores:
Library
object representing the ADL node that hosts the collection.Methods:
getMetadata()Additional methods return individual components of the collection's metadata represented as data structures, but specification of these methods is deferred until the ADL collection metadata standard has been upgraded to support the collection discovery service.
query(query)ResultSet object.
The query is specified in the ADL query language (the list of
collections in query is ignored in this case).query(constraint
[, rankingMethod] [,
maximumResults])QueryConstraint object
representing the root constraint.QueryConstraintA query constraint. This class is an abstract base class; concrete
subclasses (BooleanConstraint,
SpatialConstraint, TemporalConstraint, etc.)
represent the different kinds of query constraints as in middleware
class Query.
ResultSetRepresents a result set. Stores:
Library
object representing the ADL node that stores the result set.Methods:
cancelQuery()getResult(index)Item object
representing the query result at index index.getResults(from,
to)Item
objects representing the query results between indices from
(inclusive) and to (exclusive).Additional methods follow those defined in middleware class
ResultSet.
ItemRepresents an item (a.k.a. resource or holding) in a collection. Stores:
Collection object representing the
collection to which the item belongs.Methods:
getSupportedViews()getView(view)getAllBucketMappings()BucketMapping objects representing
the item's bucket mappings.getBucketMappings(bucket)BucketMapping objects representing
the item's mappings to a specified bucket.getBrowseRepresentations()BrowseRepresentation objects
representing the item's browse representations.getRootAccessPoint()AccessPoint
object representing the item's root access point.BucketMappingRepresents one of an item's bucket mappings. This class is an
abstract base class; concrete subclasses represent mappings to the
different bucket types (SpatialBucketMapping,
TemporalBucketMapping, etc.). Stores:
Item
object representing the item to which the bucket mapping
belongs.Subclasses store additional information specific to the bucket type.
BrowseRepresentationRepresents one of an item's browse representations. This class is
an abstract base class; concrete subclasses represent the different
kinds of browse representations. Currently there is only one,
BrowseImage. Stores:
Item
object representing the item to which the browse representation
belongs.Subclasses store additional information specific to the kind of browse representation.
AccessPointRepresents one of an item's access points. This class is an
abstract base class; concrete subclasses
(DownloadAccessPoint, ServiceAccessPoint,
etc.) represent the different kinds of access points. Stores:
Item
object representing the item to which the access point
belongs.Subclasses store additional information specific to the kind of
access point. In particular, MultipartAccessPoint and
AlternativesAccessPoint store references to the multiple
AccessPoint objects they
comprise. The additional information stored by
OfflineAccessPoint is necessarily XML since its format is
not defined by ADL.
created 2003-06-24; last modified 2009-01-14 09:08