NetKernel APIs


org.ten60.netkernel.xml.xahelper
Interface XAHelper

All Superinterfaces:
EntityResolver, URIResolver
All Known Implementing Classes:
XAHelperImpl

public interface XAHelper
extends URIResolver, EntityResolver

An interface containing all the methods needed for implementing a subclass of XAccessor. It is passed to the XAccessor.source method.


Field Summary
static String OPERAND
          argument constant for operand
static String OPERATOR
          argument constant for operator
static String PARAMETER
          argument constant for parameter
 
Method Summary
 URI getCurrentWorkingURI()
          Return the current working URI of this request- may be null if none defined
 IURMeta getDependencyMeta(String aMimeType, int aCost)
          Return a dependency meta that has as dependents all requested arguments plus the accessor itself
 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
 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
 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 aRepresentation)
          Sink an abitrary resource
 

Field Detail

OPERAND

public static final String OPERAND
argument constant for operand

See Also:
Constant Field Values

OPERATOR

public static final String OPERATOR
argument constant for operator

See Also:
Constant Field Values

PARAMETER

public static final String PARAMETER
argument constant for parameter

See Also:
Constant Field Values
Method Detail

getOperand

public IXAspect getOperand()
                    throws NetKernelException
return an IXAspect of the operand

Throws:
NetKernelException - thrown if we fail to obtain aspect for any reason

getOperand

public IURRepresentation getOperand(Class aClass)
                             throws NetKernelException
return an IURRepresentation of the operand that has a particular aspect

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
return an IXAspect of the operator

Throws:
NetKernelException - thrown if we fail to obtain aspect for any reason

getOperator

public IURRepresentation getOperator(Class aClass)
                              throws NetKernelException
return an IURRepresentation of the operator that has a particular aspect

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
return an IXAspect of the parameter

Throws:
NetKernelException - thrown if we fail to obtain aspect for any reason

getParameter

public IURRepresentation getParameter(Class aClass)
                               throws NetKernelException
return an IURRepresentation of the parameter that has a particular aspect

Parameters:
aClass - the class of the aspect that must be available
Throws:
NetKernelException - thrown if we fail to obtain aspect for any reason

getXResource

public IXAspect getXResource(URI aURI)
                      throws NetKernelException
Return an IXAspect of an abitrary URI

Throws:
NetKernelException - thrown if we fail to obtain aspect for any reason

getResource

public IURRepresentation getResource(URI aURI,
                                     Class aClass)
                              throws NetKernelException
return an IURRepresentation of an abitrary URI

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()
Return true if the operand available


hasOperator

public boolean hasOperator()
Return true if the operator available


hasParameter

public boolean hasParameter()
Return true if the parameter available


getURI

public URI getURI(String aArgument)
           throws URISyntaxException
Return the URI of a particular argument- null if it doesn't exist

Throws:
URISyntaxException

getType

public String getType()
Return the type value of the compound URI that initiated this accessor request


getCurrentWorkingURI

public URI getCurrentWorkingURI()
Return the current working URI of this request- may be null if none defined


getDependencyMeta

public IURMeta getDependencyMeta(String aMimeType,
                                 int aCost)
Return a dependency meta that has as dependents all requested arguments plus the accessor itself

Parameters:
aMimeType - the mimetype of the meta
aCost - the creation cost for the meta

setResource

public void setResource(URI aURI,
                        IURRepresentation aRepresentation)
                 throws NetKernelException
Sink an abitrary resource

Parameters:
aURI - the URI of the resource to sink to
aRepresentation - 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
the EntityResolver interface for SAX

Specified by:
resolveEntity in interface EntityResolver
Throws:
SAXException
IOException

resolve

public Source resolve(String href,
                      String base)
               throws TransformerException
the URIResolver interface for JAXP

Specified by:
resolve in interface URIResolver
Throws:
TransformerException

NetKernel APIs


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