Database Reference
In-Depth Information
protected final static String NS = "http://hello" ;
protected final static String NS_PREFIX = "h" ;
private final static FunctionDef functions [] = {
new FunctionDef ( HelloFunctions . FNS_HELLO_WORLD , HelloFunctions . class )
};
public HelloModule ( Map < String , List <? extends Object >> parameters ) {
super ( functions , parameters );
}
@Override
public String getNamespaceURI () {
return NS ;
}
@Override
public String getDefaultPrefix () {
return NS_PREFIX ;
}
@Override
public String getDescription () {
return "Simple Hello World module" ;
}
@Override
public String getReleaseVersion () {
return "2.1" ;
}
}
Our class implements InternalModule by extending AbstractInternalModule .
We define a namespace and namespace prefix for our module.
We define the functions that will form a part of this module.
We reference a single function, which will be a function of this module. This
shows how modules and their functions are linked together: basically, the mod‐
ule has a static array of references to the functions that it provides, and it declares
these by calling the constructor of the super class.
We call the constructor of the super class, passing in the array of functions that
make up this module.
Search WWH ::




Custom Search