blob: 184f53001f767635905c1d2429d88bf92dafb514 (
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
/*******************************************************************************
* Copyright (c) 2001, 2004 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.wst.wsdl.validation.internal.ui.eclipse;
import java.util.Iterator;
import java.util.List;
import org.eclipse.wst.wsdl.validation.internal.resolver.IExtensibleURIResolver;
/**
* An Eclipse WSDL validator. This validator is the default validator
* used in the validation framework. There is only a single instance of
* this validator. When created, this validator registers all extension
* URI resolvers.
*/
public class WSDLValidator extends org.eclipse.wst.wsdl.validation.internal.WSDLValidator
{
private static WSDLValidator instance = null;
/**
* The constructor registers all of the URI resolvers defined via the
* WSDL URI resolver extension point with the WSDL validator.
*
*/
private WSDLValidator()
{
super();
URIResolverRegistryReader uriRR = new URIResolverRegistryReader();
List resolvers = uriRR.readRegistry();
Iterator resolverIter = resolvers.iterator();
while(resolverIter.hasNext())
{
IExtensibleURIResolver resolver = (IExtensibleURIResolver)resolverIter.next();
addURIResolver(resolver);
}
}
/**
* Get the one and only instance of this Eclipse WSDL validator.
*
* @return The one and only instance of this Eclipse WSDL validator.
*/
public static WSDLValidator getInstance()
{
if(instance == null)
{
instance = new WSDLValidator();
}
return instance;
}
// /**
// * Validate the specified WSDL file.
// *
// * @param fileURI The URI of the WSDL file.
// * @return A validation report with the validation results.
// */
// public IValidationReport validate(String fileURI)
// {
// return wsdlValidator.validate(fileURI);
// }
// /**
// * Validate the given WSDL InputStream
// *
// * @param fileURI The URI of the WSDL file.
// * @param inputStream the InputStream to validate
// * @return A validation report with the validation results.
// */
// public IValidationReport validate(String fileURI, InputStream inputStream)
// {
// return wsdlValidator.validate(fileURI, inputStream);
// }
}
|