public abstract class AbstractModelParser extends Object
Modifier and Type | Field and Description |
---|---|
protected SchemaFactory |
schemaFactory |
protected Map<String,Schema> |
schemas |
Modifier | Constructor and Description |
---|---|
protected |
AbstractModelParser() |
Modifier and Type | Method and Description |
---|---|
protected void |
addSchema(String namespaceURI,
Schema schema) |
protected void |
configureFactory(DocumentBuilderFactory dbf)
allows subclasses to configure the
DocumentBuilderFactory . |
protected abstract ModelInstance |
createModelInstance(DomDocument document) |
protected Schema |
createSchema(String location,
ClassLoader classLoader) |
ModelInstance |
getEmptyModel() |
protected Schema |
getSchema(DomDocument document) |
ModelInstance |
parseModelFromStream(InputStream inputStream) |
void |
validateModel(DomDocument document)
Validate DOM document
|
protected SchemaFactory schemaFactory
protected void configureFactory(DocumentBuilderFactory dbf)
DocumentBuilderFactory
.dbf
- the factory to configurepublic ModelInstance parseModelFromStream(InputStream inputStream)
public ModelInstance getEmptyModel()
public void validateModel(DomDocument document)
document
- the DOM document to validateprotected Schema getSchema(DomDocument document)
protected Schema createSchema(String location, ClassLoader classLoader)
protected abstract ModelInstance createModelInstance(DomDocument document)
Copyright © 2019. All rights reserved.