Search in sources :

Example 1 with ConstructorFL

use of org.eclipse.wst.xml.xpath2.processor.internal.function.ConstructorFL 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);
}
Also used : FnFunctionLibrary(org.eclipse.wst.xml.xpath2.processor.function.FnFunctionLibrary) FunctionLibrary(org.eclipse.wst.xml.xpath2.processor.internal.function.FunctionLibrary) ConstructorFL(org.eclipse.wst.xml.xpath2.processor.internal.function.ConstructorFL)

Example 2 with ConstructorFL

use of org.eclipse.wst.xml.xpath2.processor.internal.function.ConstructorFL 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);
}
Also used : FunctionLibrary(org.eclipse.wst.xml.xpath2.processor.internal.function.FunctionLibrary) ConstructorFL(org.eclipse.wst.xml.xpath2.processor.internal.function.ConstructorFL) Map(java.util.Map)

Aggregations

ConstructorFL (org.eclipse.wst.xml.xpath2.processor.internal.function.ConstructorFL)2 FunctionLibrary (org.eclipse.wst.xml.xpath2.processor.internal.function.FunctionLibrary)2 Map (java.util.Map)1 FnFunctionLibrary (org.eclipse.wst.xml.xpath2.processor.function.FnFunctionLibrary)1