Representational Aspects
System Development Guides
Release Notes
Developing with NetKernel
Module Development Guide
Active Accessor Guide
Data Accessor Guide
Request Guide
Universal Resource Infrastructure Design
Universal Resource Request Design
Representational Aspects
Transreptor Development Guide
Session Guide
Mod DB Guide
Compound URI Guide
License
Change History
NetKernel History
Acknowledgements

Representational Aspects

Guide to using Representational Aspects

Aspects- what and why?

When a resource is to processed by NetKernel an accessor will bring that resource into memory as a Representation. However, in the general case, there is no single universally applicable representation for any particular type of resource. The best examples are XML resources. XML can be considered as an unparsed sequence of characters, as a stream of SAX events or as a tree based DOM model to name a few. We consider these forms as Aspects. Accessors are free to create the simplest/easiest aspect. Transreptors can create new Aspects from an existing representation.

Creating new Aspects

New Aspects can be created to handle custom datatypes. Aspects must implement interface com.ten60.netkernel.urii.IURAspect but should contain addition methods to expose their unique API. For Aspects to be useful they will need to be created by accessors or transreptors.

Out of the Box

The Aspects that come shipped with this distribution are:

Kernel Aspects
com.ten60.netkernel.urii.aspect.IAspectVoid An aspect with no data.
com.ten60.netkernel.urii.aspect.IAspectBoolean An aspect exposing a boolean value as a native java boolean
com.ten60.netkernel.urii.aspect.IAspectString An aspect exposing a java.lang.String
com.ten60.netkernel.urii.aspect.IAspectBinaryStream An aspect exposing a stream of bytes that can be pushed onto a client.
com.ten60.netkernel.urii.aspect.IAspectReadableBinaryStream A subclass of IAspectBinaryStream that can also provide a java.io.InputStream over the bytes.
com.ten60.netkernel.urii.aspect.IAspectNetKernelException An aspect exposing a NetKernelException, the baseclass of all exceptions generated and handled by the NetKernel.
Layer1 Aspects
org.ten60.netkernel.layer1.representation.IAspectMultipart An aspect that is a container of sub-representations.
org.ten60.netkernel.layer1.representation.IAspectNVP An aspect holding a set of name value pairs, a property set.
ext_xml Aspects
org.ten60.netkernel.xml.representation.IAspectDOM An aspect exposing an org.w3c.dom.Document
org.ten60.netkernel.xml.representation.IAspectSAX An aspect that can push SAX events to an org.xml.sax.ContentHandler.
org.ten60.netkernel.xml.representation.IAspectXDA An aspect that can expose an XML document with the XDA API.
org.ten60.netkernel.xml.representation.IXAspect A subclass of IAspectDOM and IAspectXDA.
tpt_http Aspects
org.ten60.transport.http.cookie.representation.IAspectCookie An aspect that can expose a javax.servlet.http.Cookie
org.ten60.transport.http.request.representation.IAspectRequestHeader An aspect that exposes header fields of a HTTP request.

1060® NetKernelTM Documentation
(C) 2003-2004 1060 Research Limited

Send Feedback

© 2003,2004, 1060® Research Limited
1060 registered trademark, NetKernel trademark of 1060 Research Limited