Top Description Fields Constructors Methods
com.sun.msv.reader.xmlschema

public Class WSDLGrammarReaderController

extends Object
implements GrammarReaderController2, LSResourceResolver
Class Inheritance
All Implemented Interfaces
org.w3c.dom.ls.LSResourceResolver, com.sun.msv.reader.GrammarReaderController2, com.sun.msv.reader.GrammarReaderController, org.xml.sax.EntityResolver
Imports
java.util.Map, org.w3c.dom.ls.LSInput, .LSResourceResolver, org.xml.sax.InputSource, .Locator, com.sun.msv.reader.GrammarReaderController2

Catch error messages and resolve schema locations.

Field Summary

Modifier and TypeField and Description
private String
private GrammarReaderController2
private Map<String, EmbeddedSchema>

Constructor Summary

AccessConstructor and Description
public
WSDLGrammarReaderController(GrammarReaderController2 nextController, String
URI of the WSDL.
baseURI
,
Map<String, EmbeddedSchema> sources)

create the resolving controller.

Method Summary

Modifier and TypeMethod and Description
public void
public LSResourceResolver
public InputSource
resolveEntity(String
The public identifier of the external entity being referenced, or null if none was supplied.
publicId
,
String
The system identifier of the external entity being referenced.
systemId
)

Implements org.xml.sax.EntityResolver.resolveEntity.

Allow the application to resolve external entities.
public LSInput
resolveResource(String
The type of the resource being resolved. For XML [XML 1.0] resources (i.e. entities), applications must use the value "http://www.w3.org/TR/REC-xml". For XML Schema [XML Schema Part 1] , applications must use the value "http://www.w3.org/2001/XMLSchema". Other types of resources are outside the scope of this specification and therefore should recommend an absolute URI in order to use this method.
type
,
String
The namespace of the resource being resolved, e.g. the target namespace of the XML Schema [XML Schema Part 1] when resolving XML Schema resources.
namespaceURI
,
String
The public identifier of the external entity being referenced, or null if no public identifier was supplied or if the resource is not an entity.
publicId
,
String
The system identifier, a URI reference [IETF RFC 2396], of the external resource being referenced, or null if no system identifier was supplied.
systemId
,
String
The absolute base URI of the resource being parsed, or null if there is no base URI.
baseURI
)

Implements org.w3c.dom.ls.LSResourceResolver.resolveResource.

Allow the application to resolve external resources.
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

baseURIback to summary
private String baseURI
nextControllerback to summary
private GrammarReaderController2 nextController
schemasback to summary
private Map<String, EmbeddedSchema> schemas

Constructor Detail

WSDLGrammarReaderControllerback to summary
public WSDLGrammarReaderController(GrammarReaderController2 nextController, String baseURI, Map<String, EmbeddedSchema> sources)

create the resolving controller.

Parameters
baseURI:String

URI of the WSDL.

Method Detail

errorback to summary
public void error(Locator[] locs, String msg, Exception nestedException)

Implements com.sun.msv.reader.GrammarReaderController.error.

getLSResourceResolverback to summary
public LSResourceResolver getLSResourceResolver()

Implements com.sun.msv.reader.GrammarReaderController2.getLSResourceResolver.

resolveEntityback to summary
public InputSource resolveEntity(String publicId, String systemId)

Implements org.xml.sax.EntityResolver.resolveEntity.

Doc from org.xml.sax.EntityResolver.resolveEntity.

Allow the application to resolve external entities.

The parser will call this method before opening any external entity except the top-level document entity. Such entities include the external DTD subset and external parameter entities referenced within the DTD (in either case, only if the parser reads external parameter entities), and external general entities referenced within the document element (if the parser reads external general entities). The application may request that the parser locate the entity itself, that it use an alternative URI, or that it use data provided by the application (as a character or byte input stream).

Application writers can use this method to redirect external system identifiers to secure and/or local URIs, to look up public identifiers in a catalogue, or to read an entity from a database or other input source (including, for example, a dialog box). Neither XML nor SAX specifies a preferred policy for using public or system IDs to resolve resources. However, SAX specifies how to interpret any InputSource returned by this method, and that if none is returned, then the system ID will be dereferenced as a URL.

If the system identifier is a URL, the SAX parser must resolve it fully before reporting it to the application.

Parameters
publicId:String

The public identifier of the external entity being referenced, or null if none was supplied.

systemId:String

The system identifier of the external entity being referenced.

Returns:InputSource

An InputSource object describing the new input source, or null to request that the parser open a regular URI connection to the system identifier.

resolveResourceback to summary
public LSInput resolveResource(String type, String namespaceURI, String publicId, String systemId, String baseURI)

Implements org.w3c.dom.ls.LSResourceResolver.resolveResource.

Doc from org.w3c.dom.ls.LSResourceResolver.resolveResource.

Allow the application to resolve external resources.
The LSParser will call this method before opening any external resource, including the external DTD subset, external entities referenced within the DTD, and external entities referenced within the document element (however, the top-level document entity is not passed to this method). The application may then request that the LSParser resolve the external resource itself, that it use an alternative URI, or that it use an entirely different input source.
Application writers can use this method to redirect external system identifiers to secure and/or local URI, to look up public identifiers in a catalogue, or to read an entity from a database or other input source (including, for example, a dialog box).

Parameters
type:String

The type of the resource being resolved. For XML [XML 1.0] resources (i.e. entities), applications must use the value "http://www.w3.org/TR/REC-xml". For XML Schema [XML Schema Part 1] , applications must use the value "http://www.w3.org/2001/XMLSchema". Other types of resources are outside the scope of this specification and therefore should recommend an absolute URI in order to use this method.

namespaceURI:String

The namespace of the resource being resolved, e.g. the target namespace of the XML Schema [XML Schema Part 1] when resolving XML Schema resources.

publicId:String

The public identifier of the external entity being referenced, or null if no public identifier was supplied or if the resource is not an entity.

systemId:String

The system identifier, a URI reference [IETF RFC 2396], of the external resource being referenced, or null if no system identifier was supplied.

baseURI:String

The absolute base URI of the resource being parsed, or null if there is no base URI.

Returns:LSInput

A LSInput object describing the new input source, or null to request that the parser open a regular URI connection to the resource.

warningback to summary
public void warning(Locator[] locs, String errorMessage)

Implements com.sun.msv.reader.GrammarReaderController.warning.