public class JsonSchemaMappingProcessor<M> extends BaseInspectionResultProcessor<M>
InspectionResultProcessor
to map attribute names from
inspection-result.xsd
to JSON Schema, ready for
XmlUtils.inspectionResultToJsonSchema
.
Consider using in conjunction with JsonTypeMappingProcessor
.
Constructor and Description |
---|
JsonSchemaMappingProcessor() |
JsonSchemaMappingProcessor(JsonSchemaMappingProcessorConfig config) |
Modifier and Type | Method and Description |
---|---|
protected void |
mapAttributes(Element element)
Map common attribute names from
inspection-result.xsd to JSON Schema. |
protected void |
processTraits(Element entity,
M metawidget,
Object toInspect,
String type,
String... names)
Process the traits of the given entity.
|
protected void |
removeAttributes(Element element)
Remove specified attributes from the JSON Schema output.
|
protected boolean |
shouldRemove(Element element)
Returns true if the given element should be removed from the returned JSON schema.
|
processAttributes, processEntity, processInspectionResult, processInspectionResultAsDom, processTrait
public JsonSchemaMappingProcessor()
public JsonSchemaMappingProcessor(JsonSchemaMappingProcessorConfig config)
protected void processTraits(Element entity, M metawidget, Object toInspect, String type, String... names)
BaseInspectionResultProcessor
processTraits
in class BaseInspectionResultProcessor<M>
entity
- the DOM Element representing the entity that contains the traitsmetawidget
- the parent Metawidget. Never null. May be useful to help processingtoInspect
- the Object being inspected. May be useful to help processingtype
- the type being inspected. May be useful to help processingnames
- the names being inspected. May be useful to help processingprotected boolean shouldRemove(Element element)
hidden
equals true
.protected void mapAttributes(Element element)
inspection-result.xsd
to JSON Schema.protected void removeAttributes(Element element)
Copyright © 2015. All Rights Reserved.