FileDocCategorySizeDatePackage
XSImplementationImpl.javaAPI DocJava SE 6 API4001Tue Jun 10 00:22:46 BST 2008com.sun.org.apache.xerces.internal.impl.xs

XSImplementationImpl

public class XSImplementationImpl extends CoreDOMImplementationImpl implements XSImplementation
Implements XSImplementation interface that allows one to retrieve an instance of XSLoader. This interface should be implemented on the same object that implements DOMImplementation.
xerces.internal
author
Elena Litani, IBM
version
$Id: XSImplementationImpl.java,v 1.2.6.1 2005/09/09 07:30:56 sunithareddy Exp $

Fields Summary
static XSImplementationImpl
singleton
Dom implementation singleton.
Constructors Summary
Methods Summary
public com.sun.org.apache.xerces.internal.xs.XSLoadercreateXSLoader(com.sun.org.apache.xerces.internal.xs.StringList versions)

    	XSLoader loader = new XSLoaderImpl();
    	if (versions == null){
			return loader;
    	}
    	for (int i=0; i<versions.getLength();i++){
    		if (!versions.item(i).equals("1.0")){
				String msg =
					DOMMessageFormatter.formatMessage(
						DOMMessageFormatter.DOM_DOMAIN,
						"FEATURE_NOT_SUPPORTED",
						new Object[] { versions.item(i) });
				throw new XSException(XSException.NOT_SUPPORTED_ERR, msg);
    		}
    	}
    	return loader;
    
public static org.w3c.dom.DOMImplementationgetDOMImplementation()
NON-DOM: Obtain and return the single shared object


    //
    // Public methods
    //

             
        
        return singleton;
    
public com.sun.org.apache.xerces.internal.xs.StringListgetRecognizedVersions()

        StringListImpl list = new StringListImpl(new String[]{"1.0"}, 1);
        return list;
    
public booleanhasFeature(java.lang.String feature, java.lang.String version)
Test if the DOM implementation supports a specific "feature" -- currently meaning language and level thereof.

param
feature The package name of the feature to test. In Level 1, supported values are "HTML" and "XML" (case-insensitive). At this writing, com.sun.org.apache.xerces.internal.dom supports only XML.
param
version The version number of the feature being tested. This is interpreted as "Version of the DOM API supported for the specified Feature", and in Level 1 should be "1.0"
return
true iff this implementation is compatable with the specified feature and version.

    	
        return (feature.equalsIgnoreCase("XS-Loader") && (version == null || version.equals("1.0")) ||
		super.hasFeature(feature, version));