public interface SchemaBuilder
SchemaFactory of Java into a builder. It also
offers the ability to load schema using Spring's ResourceLoader.| Modifier and Type | Method and Description |
|---|---|
static SchemaBuilder |
builder()
Creates a new schema builder.
|
default Schema |
buildSchema(Collection<? extends Source> sources)
Builds schema.
|
Schema |
buildSchema(File file)
Builds schema.
|
default Schema |
buildSchema(Source source)
Builds schema.
|
Schema |
buildSchema(Source[] sources)
Builds schema.
|
default Schema |
buildSchema(String... locations)
Retrieves the schema files of the specified locations and builds the schema.
|
Schema |
buildSchema(URL url)
Builds schema.
|
SchemaBuilder |
copy()
Copy schema builder.
|
List<Source> |
fetchSchemaSources(Collection<String> locations)
Retrieves the schema files of the specified locations.
|
default List<Source> |
fetchSchemaSources(String... locations)
Retrieves the schema files of the specified locations.
|
SchemaBuilder |
withClassLoader(ClassLoader classLoader)
Specifies the class loader to use.
|
SchemaBuilder |
withErrorHandler(ErrorHandler errorHandler)
Specifies the error handler to use.
|
SchemaBuilder |
withFactory(String factoryClassName)
Specifies the factory to use.
|
SchemaBuilder |
withFeature(String name,
Boolean value)
Adds a feature to the schema factory.
|
SchemaBuilder |
withProperty(String name,
Object value)
Adds a property to the schema factory.
|
SchemaBuilder |
withResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
Specifies the resource loader to use.
|
SchemaBuilder |
withResourceResolver(LSResourceResolver resourceResolver)
Specifies the resource resolver to use.
|
SchemaBuilder |
withSchemaLanguage(String schemaLanguage)
Specifies the schema language.
|
SchemaBuilder copy()
SchemaBuilder withSchemaLanguage(String schemaLanguage)
Default is javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI
("http://www.w3.org/2001/XMLSchema").
schemaLanguage - specifies the schema language which the used schema factory will
understandSchemaFactory.newInstance(String)SchemaBuilder withFactory(String factoryClassName)
factoryClassName - the factory class nameSchemaFactory.newInstance(String, String, ClassLoader)SchemaBuilder withClassLoader(ClassLoader classLoader)
classLoader - the class loaderSchemaFactory.newInstance(String, String, ClassLoader)SchemaBuilder withResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
fetchSchemaSources(String...)).
Default is DefaultResourceLoader.
resourceLoader - the resource loaderSchemaBuilder withResourceResolver(LSResourceResolver resourceResolver)
resourceResolver - the resource resolverSchemaFactory.setResourceResolver(LSResourceResolver)SchemaBuilder withErrorHandler(ErrorHandler errorHandler)
errorHandler - the error handlerSchemaFactory.setErrorHandler(ErrorHandler)SchemaBuilder withFeature(String name, Boolean value)
name - the namevalue - the valueSchemaFactory.setFeature(String, boolean)SchemaBuilder withProperty(String name, Object value)
name - the namevalue - the valueSchemaFactory.setProperty(String, Object)default List<Source> fetchSchemaSources(String... locations)
The location can have any format that is supported by the ResourceLoader.
locations - the locationswithResourceLoader(ResourceLoader)List<Source> fetchSchemaSources(Collection<String> locations)
The location can have any format that is supported by the ResourceLoader.
locations - the locationswithResourceLoader(ResourceLoader)default Schema buildSchema(String... locations)
The location can have any format that is supported by the ResourceLoader.
locations - the locationsSchema buildSchema(URL url)
url - the urlSchemaFactory.newSchema(URL)Schema buildSchema(File file)
file - the fileSchemaFactory.newSchema(File)default Schema buildSchema(Source source)
source - the sourceSchemaFactory.newSchema(Source)Schema buildSchema(Source[] sources)
sources - the sourcesSchemaFactory.newSchema(Source[])default Schema buildSchema(Collection<? extends Source> sources)
sources - the sourcesSchemaFactory.newSchema(Source[])static SchemaBuilder builder()
Copyright © 2020 bremersee.org. All rights reserved.