Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Alpha5
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.modeshape.sequencer.sramp
Class AbstractResolvingReader

    java.lang.Object
      org.modeshape.sequencer.sramp.AbstractResolvingReader

Direct Known Subclasses:
  WsdlReader, XsdReader

    public abstract class AbstractResolvingReader

extends Object

Base class for the S-RAMP based readers, which hold the functionality for resolving references and registering namespaces

Author:
  Horia Chiorean

Field Summary
`protected Sequencer.Context` | `context`
`protected Logger` | `logger`

Constructor Summary
`AbstractResolvingReader(Sequencer.Context context)`
`AbstractResolvingReader(Sequencer.Context context, SymbolSpaceResolvers resolvers)`

Method Summary
`Sequencer.Context` | `getContext()` Get the sequencing context in which this reader is being used.
`SymbolSpaceResolvers` | `getResolvers()`
`abstract void` | `read(InputSource source, Node outputNode)` Read the document from the supplied stream, and produce the derived content.
`void` | `read(InputStream stream, Node outputNode)` Read the document from the supplied stream, and produce the derived content.
`protected void` | `registerForSymbolSpace(SymbolSpace symbolSpace, String namespace, String name, String identifier)`
`protected String` | `registerNamespace(NamespaceRegistry registry, String namespaceUri, String defaultPrefix)`
`void` | `resolveReferences()` Attempt to resolve any references that remain unresolved.
`protected String` | `setReference(Node node, String propertyName, SymbolSpace kind, String namespace, String name)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### context

    protected final Sequencer.Context context

### logger

    protected final Logger logger

Constructor Detail

### AbstractResolvingReader

    public AbstractResolvingReader(Sequencer.Context context,
                                   SymbolSpaceResolvers resolvers)

### AbstractResolvingReader

    public AbstractResolvingReader(Sequencer.Context context)

Method Detail

### getResolvers

    public SymbolSpaceResolvers getResolvers()

### getContext

    public Sequencer.Context getContext()

  Get the sequencing context in which this reader is being used.

  Returns:
    context the context; never null

### read

    public void read(InputStream stream,
                     Node outputNode)
              throws Exception

  Read the document from the supplied stream, and produce the derived content.

  Parameters:
    `stream` - the stream; may not be null
    `outputNode` - the parent node at which the derived content should be written; may not be null
  Throws:
    `Exception` - if there is a problem reading the XSD content

### read

    public abstract void read(InputSource source,
                              Node outputNode)
                       throws Exception

  Read the document from the supplied stream, and produce the derived content.

  Parameters:
    `source` - the input source of the document; may not be null
    `outputNode` - the parent node at which the derived content should be written; may not be null
  Throws:
    `Exception` - if there is a problem reading the XSD content

### registerForSymbolSpace

    protected void registerForSymbolSpace(SymbolSpace symbolSpace,
                                          String namespace,
                                          String name,
                                          String identifier)

  Parameters:
    `symbolSpace` - the symbol space; may not be null
    `namespace` - the namespace URI; may not be null
    `name` - the name
    `identifier` - the identifier
  See Also:
    `NamespaceEntityResolver.register(String, String, String)`

### registerNamespace

    protected String registerNamespace(NamespaceRegistry registry,
                                       String namespaceUri,
                                       String defaultPrefix)
                                throws RepositoryException

  Throws:
    `RepositoryException`

### resolveReferences

    public void resolveReferences()
                           throws RepositoryException

  Attempt to resolve any references that remain unresolved. This should be called if sharing a `SymbolSpaceResolvers` with multiple `AbstractResolvingReader` instances.

  Throws:
    `RepositoryException` - if there is a problem resolving references in the repository

### setReference

    protected String setReference(Node node,
                                  String propertyName,
                                  SymbolSpace kind,
                                  String namespace,
                                  String name)
                           throws RepositoryException

  Throws:
    `RepositoryException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Alpha5
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.