org.opensaml.xml.schema
Class SchemaBuilder

java.lang.Object
  extended by org.opensaml.xml.schema.SchemaBuilder

public final class SchemaBuilder
extends Object

A helper class for building Schema from a set of input.


Nested Class Summary
static class SchemaBuilder.SchemaLanguage
          Language of the schema files.
 
Method Summary
static Schema buildSchema(SchemaBuilder.SchemaLanguage lang, File schemaFileOrDirectory)
          Builds a schema from the given schema source.
static Schema buildSchema(SchemaBuilder.SchemaLanguage lang, File[] schemaFilesOrDirectories)
          Builds a schema from the given schema sources.
static Schema buildSchema(SchemaBuilder.SchemaLanguage lang, InputStream schemaSource)
          Builds a schema from the given schema source.
static Schema buildSchema(SchemaBuilder.SchemaLanguage lang, InputStream[] schemaSources)
          Builds a schema from the given schema sources.
protected static Schema buildSchema(SchemaBuilder.SchemaLanguage lang, Source[] schemaSources)
          Builds a schema from the given schema sources.
static Schema buildSchema(SchemaBuilder.SchemaLanguage lang, String schemaFileOrDirectory)
          Builds a schema from the given schema source.
static Schema buildSchema(SchemaBuilder.SchemaLanguage lang, String[] schemaFilesOrDirectories)
          Builds a schema from the given schema sources.
protected static void getSchemaFiles(SchemaBuilder.SchemaLanguage lang, File[] schemaFilesOrDirectories, List<File> accumulatedSchemaFiles)
          Gets all of the schema files in the given set of readable files, directories or subdirectories.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

buildSchema

public static Schema buildSchema(SchemaBuilder.SchemaLanguage lang,
                                 String schemaFileOrDirectory)
                          throws SAXException
Builds a schema from the given schema source.

Parameters:
lang - schema language, must not be null
schemaFileOrDirectory - file or directory which contains schema sources
Returns:
the constructed schema
Throws:
SAXException - thrown if there is a problem converting the schema sources in to a schema

buildSchema

public static Schema buildSchema(SchemaBuilder.SchemaLanguage lang,
                                 String[] schemaFilesOrDirectories)
                          throws SAXException
Builds a schema from the given schema sources.

Parameters:
lang - schema language, must not be null
schemaFilesOrDirectories - files or directories which contains schema sources
Returns:
the constructed schema
Throws:
SAXException - thrown if there is a problem converting the schema sources in to a schema

buildSchema

public static Schema buildSchema(SchemaBuilder.SchemaLanguage lang,
                                 File schemaFileOrDirectory)
                          throws SAXException
Builds a schema from the given schema source.

Parameters:
lang - schema language, must not be null
schemaFileOrDirectory - file or directory which contains schema sources
Returns:
the constructed schema
Throws:
SAXException - thrown if there is a problem converting the schema sources in to a schema

buildSchema

public static Schema buildSchema(SchemaBuilder.SchemaLanguage lang,
                                 File[] schemaFilesOrDirectories)
                          throws SAXException
Builds a schema from the given schema sources.

Parameters:
lang - schema language, must not be null
schemaFilesOrDirectories - files or directories which contains schema sources
Returns:
the constructed schema
Throws:
SAXException - thrown if there is a problem converting the schema sources in to a schema

buildSchema

public static Schema buildSchema(SchemaBuilder.SchemaLanguage lang,
                                 InputStream schemaSource)
                          throws SAXException
Builds a schema from the given schema source.

Parameters:
lang - schema language, must not be null
schemaSource - schema source
Returns:
the constructed schema
Throws:
SAXException - thrown if there is a problem converting the schema sources in to a schema

buildSchema

public static Schema buildSchema(SchemaBuilder.SchemaLanguage lang,
                                 InputStream[] schemaSources)
                          throws SAXException
Builds a schema from the given schema sources.

Parameters:
lang - schema language, must not be null
schemaSources - schema sources
Returns:
the constructed schema
Throws:
SAXException - thrown if there is a problem converting the schema sources in to a schema

getSchemaFiles

protected static void getSchemaFiles(SchemaBuilder.SchemaLanguage lang,
                                     File[] schemaFilesOrDirectories,
                                     List<File> accumulatedSchemaFiles)
Gets all of the schema files in the given set of readable files, directories or subdirectories.

Parameters:
lang - schema language, must not be null
schemaFilesOrDirectories - files and directories which may contain schema files
accumulatedSchemaFiles - list that accumulates the schema files

buildSchema

protected static Schema buildSchema(SchemaBuilder.SchemaLanguage lang,
                                    Source[] schemaSources)
                             throws SAXException
Builds a schema from the given schema sources.

Parameters:
lang - schema language, must not be null
schemaSources - schema sources, must not be null
Returns:
the constructed schema
Throws:
SAXException - thrown if there is a problem converting the schema sources in to a schema


Copyright © 2006-2011 Internet2. All Rights Reserved.