NetKernel APIs


org.ten60.netkernel.xml.xahelper
Class XAHelperImpl

java.lang.Object
  extended byorg.ten60.netkernel.xml.xahelper.XAHelperImpl
All Implemented Interfaces:
EntityResolver, URIResolver, XAHelper, XAHelperExtra

public class XAHelperImpl
extends Object
implements XAHelper, XAHelperExtra

An implementation of XAHelper, XAHelperExtra


Field Summary
 
Fields inherited from interface org.ten60.netkernel.xml.xahelper.XAHelper
OPERAND, OPERATOR, PARAMETER
 
Constructor Summary
XAHelperImpl(URRequest aRequest, XAccessor aAccessor, Map aArgumentDeclarations, boolean aKeepDependencies)
          Creates a new instance of XAHelperImpl
 
Method Summary
 Container getContainer()
          Return the container we are running in
 URI getCurrentWorkingURI()
          Return the current working URI of this request- may be null if none defined
 IURMeta getDependencyMeta(String aMimeType, int aCreationCost)
          Return a dependency meta that has as dependents all requested arguments plus the accessor itself
 DependencyMeta getDependencyMeta(String aMimeType, int aCreationCost, int aUsageCost, List aOnUsageDependencies)
           
 IXAspect getOperand()
          return an IXAspect of the operand
 IURRepresentation getOperand(Class aClass)
          return an IURRepresentation of the operand that has a particular aspect
 IXAspect getOperator()
          return an IXAspect of the operator
 IURRepresentation getOperator(Class aClass)
          return an IURRepresentation of the operator that has a particular aspect
 IXAspect getParameter()
          return an IXAspect of the parameter
 IURRepresentation getParameter(Class aClass)
          return an IURRepresentation of the parameter that has a particular aspect
 URRequest getRequest()
          Return the raw request that invoked the accessor
 IURRepresentation getResource(URI aURI, Class aClass)
          return an IURRepresentation of an abitrary URI
 String getType()
          Return the type value of the compound URI that initiated this accessor request
 URI getURI(String aArgument)
          Return the URI of a particular argument- null if it doesn't exist
 IXAspect getXResource(URI aURI)
          Return an IXAspect of an abitrary URI
 boolean hasOperand()
          Return true if the operand available
 boolean hasOperator()
          Return true if the operator available
 boolean hasParameter()
          Return true if the parameter available
 IURRepresentation requestResourceWithValues(URI aURI, Class aAspectClass, Map aURIToValue)
          Request a resource with optional pass-by-value arguments
 Source resolve(String href, String base)
          the URIResolver interface for JAXP
 InputSource resolveEntity(String aPublicId, String aSystemId)
          the EntityResolver interface for SAX
 void setResource(URI aURI, IURRepresentation aProxy)
          Sink an abitrary resource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XAHelperImpl

public XAHelperImpl(URRequest aRequest,
                    XAccessor aAccessor,
                    Map aArgumentDeclarations,
                    boolean aKeepDependencies)
             throws NetKernelException
Creates a new instance of XAHelperImpl

Method Detail

getOperand

public IXAspect getOperand()
                    throws NetKernelException
Description copied from interface: XAHelper
return an IXAspect of the operand

Specified by:
getOperand in interface XAHelper
Throws:
NetKernelException - thrown if we fail to obtain aspect for any reason

getOperand

public IURRepresentation getOperand(Class aClass)
                             throws NetKernelException
Description copied from interface: XAHelper
return an IURRepresentation of the operand that has a particular aspect

Specified by:
getOperand in interface XAHelper
Parameters:
aClass - the class of the aspect that must be available
Throws:
NetKernelException - thrown if we fail to obtain aspect for any reason

getOperator

public IXAspect getOperator()
                     throws NetKernelException
Description copied from interface: XAHelper
return an IXAspect of the operator

Specified by:
getOperator in interface XAHelper
Throws:
NetKernelException - thrown if we fail to obtain aspect for any reason

getOperator

public IURRepresentation getOperator(Class aClass)
                              throws NetKernelException
Description copied from interface: XAHelper
return an IURRepresentation of the operator that has a particular aspect

Specified by:
getOperator in interface XAHelper
Parameters:
aClass - the class of the aspect that must be available
Throws:
NetKernelException - thrown if we fail to obtain aspect for any reason

getParameter

public IXAspect getParameter()
                      throws NetKernelException
Description copied from interface: XAHelper
return an IXAspect of the parameter

Specified by:
getParameter in interface XAHelper
Throws:
NetKernelException - thrown if we fail to obtain aspect for any reason

getParameter

public IURRepresentation getParameter(Class aClass)
                               throws NetKernelException
Description copied from interface: XAHelper
return an IURRepresentation of the parameter that has a particular aspect

Specified by:
getParameter in interface XAHelper
Parameters:
aClass - the class of the aspect that must be available
Throws:
NetKernelException - thrown if we fail to obtain aspect for any reason

hasOperand

public boolean hasOperand()
Description copied from interface: XAHelper
Return true if the operand available

Specified by:
hasOperand in interface XAHelper

hasOperator

public boolean hasOperator()
Description copied from interface: XAHelper
Return true if the operator available

Specified by:
hasOperator in interface XAHelper

hasParameter

public boolean hasParameter()
Description copied from interface: XAHelper
Return true if the parameter available

Specified by:
hasParameter in interface XAHelper

getURI

public URI getURI(String aArgument)
           throws URISyntaxException
Description copied from interface: XAHelper
Return the URI of a particular argument- null if it doesn't exist

Specified by:
getURI in interface XAHelper
Throws:
URISyntaxException

getType

public String getType()
Description copied from interface: XAHelper
Return the type value of the compound URI that initiated this accessor request

Specified by:
getType in interface XAHelper

getCurrentWorkingURI

public URI getCurrentWorkingURI()
Description copied from interface: XAHelper
Return the current working URI of this request- may be null if none defined

Specified by:
getCurrentWorkingURI in interface XAHelper

getDependencyMeta

public IURMeta getDependencyMeta(String aMimeType,
                                 int aCreationCost)
Description copied from interface: XAHelper
Return a dependency meta that has as dependents all requested arguments plus the accessor itself

Specified by:
getDependencyMeta in interface XAHelper
Parameters:
aMimeType - the mimetype of the meta
aCreationCost - the creation cost for the meta

getDependencyMeta

public DependencyMeta getDependencyMeta(String aMimeType,
                                        int aCreationCost,
                                        int aUsageCost,
                                        List aOnUsageDependencies)

getXResource

public IXAspect getXResource(URI aURI)
                      throws NetKernelException
Description copied from interface: XAHelper
Return an IXAspect of an abitrary URI

Specified by:
getXResource in interface XAHelper
Throws:
NetKernelException - thrown if we fail to obtain aspect for any reason

getResource

public IURRepresentation getResource(URI aURI,
                                     Class aClass)
                              throws NetKernelException
Description copied from interface: XAHelper
return an IURRepresentation of an abitrary URI

Specified by:
getResource in interface XAHelper
Parameters:
aClass - the class of the aspect that must be available
Throws:
NetKernelException - thrown if we fail to obtain aspect for any reason

setResource

public void setResource(URI aURI,
                        IURRepresentation aProxy)
                 throws NetKernelException
Description copied from interface: XAHelper
Sink an abitrary resource

Specified by:
setResource in interface XAHelper
Parameters:
aURI - the URI of the resource to sink to
aProxy - the IURRepresentation containing the state to sink
Throws:
NetKernelException - thrown if we fail to obtain aspect for any reason

resolveEntity

public InputSource resolveEntity(String aPublicId,
                                 String aSystemId)
                          throws SAXException,
                                 IOException
Description copied from interface: XAHelper
the EntityResolver interface for SAX

Specified by:
resolveEntity in interface XAHelper
Throws:
SAXException
IOException

resolve

public Source resolve(String href,
                      String base)
               throws TransformerException
Description copied from interface: XAHelper
the URIResolver interface for JAXP

Specified by:
resolve in interface XAHelper
Throws:
TransformerException

getRequest

public URRequest getRequest()
Description copied from interface: XAHelperExtra
Return the raw request that invoked the accessor

Specified by:
getRequest in interface XAHelperExtra

getContainer

public Container getContainer()
Description copied from interface: XAHelperExtra
Return the container we are running in

Specified by:
getContainer in interface XAHelperExtra

requestResourceWithValues

public IURRepresentation requestResourceWithValues(URI aURI,
                                                   Class aAspectClass,
                                                   Map aURIToValue)
                                            throws NetKernelException
Request a resource with optional pass-by-value arguments

Specified by:
requestResourceWithValues in interface XAHelperExtra
Parameters:
aURI - the type component of the active uri
aAspectClass - the result must have this aspect
aURIToValue - a map of URI to IURRepresentation
Returns:
A Representation of the requested resource
Throws:
NetKernelException - thrown if we fail to request the resource sucessfully

NetKernel APIs


Copyright © 2002-2004 1060 Research Ltd. All Rights Reserved.