~ubuntu-branches/ubuntu/utopic/jing-trang/utopic

« back to all changes in this revision

Viewing changes to mod/validate/src/main/com/thaiopensource/validate/SchemaReader.java

  • Committer: Bazaar Package Importer
  • Author(s): Samuel Thibault
  • Date: 2009-09-01 15:53:03 UTC
  • Revision ID: james.westby@ubuntu.com-20090901155303-2kweef05h5v9j3ni
Tags: upstream-20090818
ImportĀ upstreamĀ versionĀ 20090818

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package com.thaiopensource.validate;
 
2
 
 
3
import com.thaiopensource.util.PropertyMap;
 
4
import org.xml.sax.InputSource;
 
5
import org.xml.sax.SAXException;
 
6
 
 
7
import javax.xml.transform.sax.SAXSource;
 
8
import java.io.IOException;
 
9
 
 
10
/**
 
11
 * A SchemaReader object is immutable and can thus be safely accessed
 
12
 * concurrently from multiple threads.
 
13
 */
 
14
public interface SchemaReader {
 
15
  public static final String BASE_URI = "http://www.thaiopensource.com/validate/";
 
16
  /**
 
17
   * Creates a <code>Schema</code> by reading it from an <code>InputSource</code>.
 
18
   *
 
19
   * @param source
 
20
   * @param properties a <code>PropertyMap</code> to control the schema creation;
 
21
   * must not be <code>null</code> @return a newly created <code>Schema</code>, never <code>null</code>
 
22
   * @throws IOException if an I/O error occurs
 
23
   * @throws SAXException
 
24
   * @throws IncorrectSchemaException
 
25
   *
 
26
   * @see ValidateProperty
 
27
   */
 
28
  Schema createSchema(InputSource source, PropertyMap properties)
 
29
          throws IOException, SAXException, IncorrectSchemaException;
 
30
  Schema createSchema(SAXSource source, PropertyMap properties)
 
31
          throws IOException, SAXException, IncorrectSchemaException;
 
32
 
 
33
  Option getOption(String uri);
 
34
}