aboutsummaryrefslogtreecommitdiffstats
path: root/container-core/src/main/java/com/yahoo/container/xml/providers/SchemaFactoryProvider.java
blob: f9115874fb6a2e7194858f6a8e4e77bad75eb290 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.container.xml.providers;

import com.yahoo.container.di.componentgraph.Provider;

import javax.xml.XMLConstants;
import javax.xml.validation.SchemaFactory;

/**
 * @author <a href="mailto:einarmr@yahoo-inc.com">Einar M R Rosenvinge</a>
 * @since 5.1.29
 */
public class SchemaFactoryProvider implements Provider<SchemaFactory> {
    public static final String FACTORY_CLASS = "com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory";

    @Override
    public SchemaFactory get() {
        return SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI,
                                         FACTORY_CLASS,
                                         this.getClass().getClassLoader());
    }

    @Override
    public void deconstruct() { }
}