Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sf.saxon
Class AugmentedSource

    java.lang.Object
      net.sf.saxon.AugmentedSource

All Implemented Interfaces:
  javax.xml.transform.Source

public class AugmentedSource
extends java.lang.Object
implements javax.xml.transform.Source

This class wraps a JAXP Source object to provide an extended Source object that contains options indicating how the Source should be processed: for example, whether or not it should be validated against a schema. Other options that can be set include the SAX XMLReader to be used, and the choice of whether a source in the form of an existing tree should be copied or wrapped.

Method Summary
`javax.xml.transform.Source` | `getContainedSource()` Get the Source object wrapped by this AugmentedSource
`int` | `getSchemaValidation()` Get whether or not schema validation of this source is required
`java.lang.String` | `getSystemId()` Get the System ID.
`java.lang.Boolean` | `getWrapDocument()` Assuming that the contained Source is a node in a tree, determine whether a tree will be created as a view of this supplied tree, or as a copy.
`org.xml.sax.XMLReader` | `getXMLReader()`
`static AugmentedSource` | `makeAugmentedSource(javax.xml.transform.Source source)` Create an AugmentedSource that wraps a given Source object (which must not itself be an AugmentedSource)
`void` | `setSchemaValidationMode(int option)` Set whether or not schema validation of this source is required
`void` | `setSystemId(java.lang.String id)` Set the System ID.
`void` | `setWrapDocument(java.lang.Boolean wrap)` Assuming that the contained Source is a node in a tree, indicate whether a tree should be created as a view of this supplied tree, or as a copy.
`void` | `setXMLReader(org.xml.sax.XMLReader parser)`

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

Method Detail

### makeAugmentedSource

    public static AugmentedSource makeAugmentedSource(javax.xml.transform.Source source)

  Create an AugmentedSource that wraps a given Source object (which must not itself be an AugmentedSource)

  Parameters:
    `source` - the Source object to be wrapped
  Throws:
    `java.lang.IllegalArgumentException` - if the wrapped source is an AugmentedSource

### getContainedSource

    public javax.xml.transform.Source getContainedSource()

  Get the Source object wrapped by this AugmentedSource

  Returns:
    the contained Source object

### setSchemaValidationMode

    public void setSchemaValidationMode(int option)

  Set whether or not schema validation of this source is required

  Parameters:
    `option` - one of `Validation.STRICT`, `Validation.LAX`, `Validation.STRIP`, `Validation.PRESERVE`, `Validation.DEFAULT`

### getSchemaValidation

    public int getSchemaValidation()

  Get whether or not schema validation of this source is required

  Returns:
    the validation mode requested, or `Validation.DEFAULT` to use the default validation mode from the Configuration.

### setXMLReader

    public void setXMLReader(org.xml.sax.XMLReader parser)

### getXMLReader

    public org.xml.sax.XMLReader getXMLReader()

### setWrapDocument

    public void setWrapDocument(java.lang.Boolean wrap)

  Assuming that the contained Source is a node in a tree, indicate whether a tree should be created as a view of this supplied tree, or as a copy.

  Parameters:
    `wrap` - if true, the node in the supplied Source is wrapped, to create a view. If false, the node and its contained subtree is copied. If null, the system default is chosen.

### getWrapDocument

    public java.lang.Boolean getWrapDocument()

  Assuming that the contained Source is a node in a tree, determine whether a tree will be created as a view of this supplied tree, or as a copy.

  Returns:
    if true, the node in the supplied Source is wrapped, to create a view. If false, the node and its contained subtree is copied. If null, the system default is chosen.

### setSystemId

    public void setSystemId(java.lang.String id)

  Set the System ID. This sets the System Id on the underlying Source object.

  Specified by:
    `setSystemId` in interface `javax.xml.transform.Source`
  Parameters:
    `id` - the System ID.

### getSystemId

    public java.lang.String getSystemId()

  Get the System ID. This gets the System Id on the underlying Source object.

  Specified by:
    `getSystemId` in interface `javax.xml.transform.Source`
  Returns:
    the System ID.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD