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

## org.apache.muse.ws.resource.properties.schema
Interface ResourcePropertiesSchemaValidation

All Known Subinterfaces:
  ResourcePropertyCollection

All Known Implementing Classes:
  SimpleResourcePropertyCollection

public interface ResourcePropertiesSchemaValidation

ResourcePropertiesSchemaValidation is a set of methods for WSRP implementations that provide schema validation and a capability delegation model.

Author:
  Dan Jemiolo (danj)

Method Summary
`void` | `addCapability(WsResourceCapability capability)` Registers the capability with the schema so that users of the schema can determine which capability is responsible for which resource properties.
`WsResourceCapability` | `getCapability(QName qname)`
`java.util.Collection` | `getPropertyNames()`
`ResourcePropertiesSchema` | `getSchema()`
`boolean` | `hasPropertyDefinition(QName qname)`
`void` | `setSchema(ResourcePropertiesSchema schema)` Applies the given XMLSchema definitions to this WS-RP document.
`void` | `validateSchema()` Iterates through every property in the WS-RP document's XMLSchema and verifies current document is valid.

Method Detail

### addCapability

    public void addCapability(WsResourceCapability capability)

  Registers the capability with the schema so that users of the schema can determine which capability is responsible for which resource properties.

  Parameters:
    `capability` -

### getCapability

    public WsResourceCapability getCapability(QName qname)

  Parameters:
    `qname` - The name of the resource property whose capability is being queried.
  Returns:
    The capability that defines the given property, or null if the property does not exist.

### getPropertyNames

    public java.util.Collection getPropertyNames()

  Returns:
    All of the resource properties defined by the schema.

### getSchema

    public ResourcePropertiesSchema getSchema()

  Returns:
    The XSD for this WS-RP document.

### hasPropertyDefinition

    public boolean hasPropertyDefinition(QName qname)

  Parameters:
    `qname` - The name of a resource property to search the schema for.
  Returns:
    True if there is a schema definition with the given name.

### setSchema

    public void setSchema(ResourcePropertiesSchema schema)

  Applies the given XMLSchema definitions to this WS-RP document. This schema will be used for all subsequent validations, including calls to validateSchema() and SetResourceProperties-like operations.
  Note that this method does not perform validation.

  Parameters:
    `schema` - The XSD properties definition for this WS-RP document.
  See Also:
    `validateSchema()`

### validateSchema

    public void validateSchema()
                        throws BaseFault

  Iterates through every property in the WS-RP document's XMLSchema and verifies current document is valid. This method should be used sparingly, as it will validate every property; for cases such as SetResourceProperties, the implementation of the operations should validate the individual property being targeted, not the whole document.

  Throws:
    `BaseFault` -
    - If the number of instances of a property is below the required minimum.
    - If the number of instances of a property is above the required maximum.
    - If an instance of the property is null (the equivalent of an empty XML element) but the property is not nillable.

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