|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.modeshape.sequencer.wsdl.WsdlReader<T>
T
- the type of object returned by the parser@NotThreadSafe public abstract class WsdlReader<T>
A class that can parse WSDL definitions, derive a graph structure from the content, and output that graph structure to a
supplied SequencerOutput
.
This class is intended to be subclassed by supplying implementations for the parse(InputSource,String)
and
process(Object, Path, long)
methods.
Nested Class Summary | |
---|---|
protected class |
WsdlReader.ResolveFuture
|
Field Summary | |
---|---|
protected StreamSequencerContext |
context
|
protected Logger |
logger
|
protected Map<Path,Multimap<Name,Integer>> |
namesByParentPath
|
protected SequencerOutput |
output
|
protected List<WsdlReader.ResolveFuture> |
resolveFutures
|
protected XsdResolvers |
resolvers
|
static String |
UNBOUNDED
|
Constructor Summary | |
---|---|
protected |
WsdlReader(SequencerOutput output,
StreamSequencerContext context)
|
Method Summary | |
---|---|
StreamSequencerContext |
getContext()
Get the sequencing context in which this reader is being used. |
protected Name |
name(String name)
|
protected Name |
name(String namespaceUri,
String name)
|
protected Path |
nextPath(Path parentPath,
Name name)
|
protected abstract T |
parse(InputSource source,
String baseUri)
Parse the supplied source (which contains either a Reader or an InputStream ) and produce a representation
of the WSDL definition. |
protected Path |
path(Path parentPath,
Name segment)
|
protected Path |
path(Path parentPath,
Path subpath)
|
protected Path |
path(Path parentPath,
String segment)
|
protected Path |
path(String path)
|
protected String |
prefixForNamespace(String namespaceUri,
String defaultPrefix)
|
protected abstract void |
process(T parsedForm,
Path docPath,
long sizeOfFile)
Process the supplied representation of the WSDL definition that was returned from the parse(InputSource, String)
method, derive the output content, and write that derived output content to the SequencerOutput . |
void |
read(InputSource source,
Path docPath)
Read the XML Schema Document from the supplied source, and produce the derived content. |
void |
read(InputStream stream,
Path docPath)
Read the XML Schema Document from the supplied stream, and produce the derived content. |
void |
read(String xsdContent,
Path docPath)
Read the XML Schema Document from the supplied string, and produce the derived content. |
protected void |
resolveReferences()
|
protected UUID |
setReference(Path path,
Name propertyName,
XsdResolvers.SymbolSpace kind,
String namespace,
String name)
|
protected UUID |
setUuid(Path path)
|
protected String |
string(Object value)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String UNBOUNDED
protected final SequencerOutput output
protected final StreamSequencerContext context
protected final Logger logger
protected final Map<Path,Multimap<Name,Integer>> namesByParentPath
protected final XsdResolvers resolvers
protected List<WsdlReader.ResolveFuture> resolveFutures
Constructor Detail |
---|
protected WsdlReader(SequencerOutput output, StreamSequencerContext context)
Method Detail |
---|
public StreamSequencerContext getContext()
public void read(String xsdContent, Path docPath)
context's
problems
.
xsdContent
- the stream containing the XSD content; may not be nulldocPath
- the path at which the derived content for the XSD should be written (usually this path represents the XSD
file itself); may not be nullpublic void read(InputStream stream, Path docPath)
context's
problems
.
stream
- the stream containing the XSD content; may not be nulldocPath
- the path at which the derived content for the XSD should be written (usually this path represents the XSD
file itself); may not be nullpublic void read(InputSource source, Path docPath)
context's
problems
.
source
- the input source containing the XSD content; may not be nulldocPath
- the path at which the derived content for the XSD should be written (usually this path represents the XSD
file itself); may not be nullprotected abstract T parse(InputSource source, String baseUri) throws Exception
Reader
or an InputStream
) and produce a representation
of the WSDL definition.
source
- the source containing the WSDL stream; never nullbaseUri
- the URI of the document being read; never null or empty
Exception
- if there is a problem during parsingprotected abstract void process(T parsedForm, Path docPath, long sizeOfFile) throws Exception
parse(InputSource, String)
method, derive the output content, and write that derived output content to the SequencerOutput
.
parsedForm
- the representation of the WSDL definition, which will always be the value returned from
parse(InputSource, String)
docPath
- the path at which this method should generate the output structure derived from the WSDL representationsizeOfFile
- the size of the WSDL stream, in bytes
Exception
- if there is a problem during processingprotected Path nextPath(Path parentPath, Name name)
protected Path path(Path parentPath, Path subpath)
protected Path path(Path parentPath, Name segment)
protected Path path(Path parentPath, String segment)
protected Path path(String path)
protected Name name(String name)
protected Name name(String namespaceUri, String name)
protected String string(Object value)
protected UUID setUuid(Path path)
protected void resolveReferences()
protected String prefixForNamespace(String namespaceUri, String defaultPrefix)
protected UUID setReference(Path path, Name propertyName, XsdResolvers.SymbolSpace kind, String namespace, String name)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |