diff options
Diffstat (limited to 'branches/sca-equinox/modules/contribution/src/main')
2 files changed, 13 insertions, 13 deletions
diff --git a/branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultValidatingXMLInputFactory.java b/branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultValidatingXMLInputFactory.java index 6b9eaeab8d..9258a837d8 100644 --- a/branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultValidatingXMLInputFactory.java +++ b/branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultValidatingXMLInputFactory.java @@ -44,10 +44,13 @@ import javax.xml.transform.stream.StreamSource; import javax.xml.validation.Schema; import javax.xml.validation.SchemaFactory; +import org.apache.tuscany.sca.core.ExtensionPointRegistry; +import org.apache.tuscany.sca.core.FactoryExtensionPoint; +import org.apache.tuscany.sca.core.UtilityExtensionPoint; import org.apache.tuscany.sca.monitor.Monitor; +import org.apache.tuscany.sca.monitor.MonitorFactory; import org.apache.tuscany.sca.monitor.Problem; import org.apache.tuscany.sca.monitor.Problem.Severity; -import org.apache.tuscany.sca.monitor.impl.ProblemImpl; import org.xml.sax.SAXException; import org.xml.sax.SAXParseException; @@ -66,6 +69,15 @@ public class DefaultValidatingXMLInputFactory extends ValidatingXMLInputFactory private boolean hasSchemas; private Schema aggregatedSchema; + public DefaultValidatingXMLInputFactory(ExtensionPointRegistry registry) { + FactoryExtensionPoint factoryExtensionPoint = registry.getExtensionPoint(FactoryExtensionPoint.class); + XMLInputFactory factory = factoryExtensionPoint.getFactory(XMLInputFactory.class); + this.inputFactory = factory; + this.schemas = registry.getExtensionPoint(ValidationSchemaExtensionPoint.class); + this.monitor = + registry.getExtensionPoint(UtilityExtensionPoint.class).getUtility(MonitorFactory.class).createMonitor(); + } + /** * Constructs a new XMLInputFactory. * diff --git a/branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/ValidatingXMLInputFactory.java b/branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/ValidatingXMLInputFactory.java index da249a09e4..c0eef5a7a8 100644 --- a/branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/ValidatingXMLInputFactory.java +++ b/branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/ValidatingXMLInputFactory.java @@ -27,16 +27,4 @@ import javax.xml.stream.XMLInputFactory; * @version $Rev$ $Date$ */ public abstract class ValidatingXMLInputFactory extends XMLInputFactory { - - /** - * Create a new default validating XML input factory. - * @return - */ - public static ValidatingXMLInputFactory newInstance() { - return new DefaultValidatingXMLInputFactory( - XMLInputFactory.newInstance(), - new DefaultValidationSchemaExtensionPoint(), - null); - } - } |