use of org.eclipse.wst.xml.xpath2.processor.internal.function.FunctionLibrary in project webtools.sourceediting by eclipse.
the class DefaultStaticContext method make_atomic.
/**
* Creates an atomic from a specific type name initialized with a default
* value.
*
* @param name
* name of type to create
* @return Atomic type of desired type.
*/
public AnyAtomicType make_atomic(QName name) {
String ns = name.namespace();
if (!_functions.containsKey(ns))
return null;
FunctionLibrary fl = (FunctionLibrary) _functions.get(ns);
if (!(fl instanceof ConstructorFL))
return null;
ConstructorFL cfl = (ConstructorFL) fl;
return cfl.atomic_type(name);
}
use of org.eclipse.wst.xml.xpath2.processor.internal.function.FunctionLibrary in project webtools.sourceediting by eclipse.
the class SeqType method make_atomic.
private AnyAtomicType make_atomic(StaticContext sc, QName qname) {
String ns = qname.namespace();
Map functionLibraries = sc.getFunctionLibraries();
if (!functionLibraries.containsKey(ns))
return null;
FunctionLibrary fl = (FunctionLibrary) functionLibraries.get(ns);
if (!(fl instanceof ConstructorFL))
return null;
ConstructorFL cfl = (ConstructorFL) fl;
return cfl.atomic_type(qname);
}
use of org.eclipse.wst.xml.xpath2.processor.internal.function.FunctionLibrary in project webtools.sourceediting by eclipse.
the class DefaultStaticContext method function_exists.
/**
* Check for existance of function.
*
* @param name
* function name.
* @param arity
* arity of function.
* @return true if function exists. False otherwise.
*/
public boolean function_exists(QName name, int arity) {
String ns = name.namespace();
if (!_functions.containsKey(ns))
return false;
FunctionLibrary fl = (FunctionLibrary) _functions.get(ns);
return fl.function_exists(name, arity);
}
use of org.eclipse.wst.xml.xpath2.processor.internal.function.FunctionLibrary in project webtools.sourceediting by eclipse.
the class DefaultStaticContext method function.
public Function function(QName name, int arity) {
String ns = name.namespace();
if (!_functions.containsKey(ns))
return null;
FunctionLibrary fl = (FunctionLibrary) _functions.get(ns);
return fl.function(name, arity);
}
Aggregations