Class XsdModelConverter
- java.lang.Object
-
- org.opennms.features.config.dao.impl.util.NoopXmlSchemaVisitor
-
- org.opennms.features.config.dao.impl.util.XsdModelConverter
-
- All Implemented Interfaces:
org.apache.ws.commons.schema.walker.XmlSchemaVisitor
public class XsdModelConverter extends NoopXmlSchemaVisitor
Used to convert a XSD to a structure ofConfigItem
s. It usually uses with JaxbXmlConverter together.- See Also:
JaxbXmlConverter
-
-
Field Summary
Fields Modifier and Type Field Description static String
XML_ELEMENT_VALUE_BODY_TAG
-
Constructor Summary
Constructors Constructor Description XsdModelConverter(String xsdStr)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConfigItem
convert(String topLevelElement)
org.apache.ws.commons.schema.XmlSchemaCollection
getCollection()
ConfigItem
getConfigItemForAttribute(org.apache.ws.commons.schema.walker.XmlSchemaAttrInfo xmlSchemaAttrInfo)
Convert xsd attribute into ConfigItemString
getDocumentation(org.apache.ws.commons.schema.XmlSchemaAnnotation xmlSchemaAnnotation)
Reading documentation from xsd annotationMap<String,String>
getElementNameToValueNameMap()
ConfigItem.Type
getTypeForAttribute(org.apache.ws.commons.schema.walker.XmlSchemaAttrInfo xmlSchemaAttrInfo)
Handle xsd typevoid
onEnterElement(org.apache.ws.commons.schema.XmlSchemaElement xmlSchemaElement, org.apache.ws.commons.schema.walker.XmlSchemaTypeInfo xmlSchemaTypeInfo, boolean b)
void
onExitElement(org.apache.ws.commons.schema.XmlSchemaElement xmlSchemaElement, org.apache.ws.commons.schema.walker.XmlSchemaTypeInfo xmlSchemaTypeInfo, boolean b)
void
onVisitAttribute(org.apache.ws.commons.schema.XmlSchemaElement xmlSchemaElement, org.apache.ws.commons.schema.walker.XmlSchemaAttrInfo xmlSchemaAttrInfo)
-
Methods inherited from class org.opennms.features.config.dao.impl.util.NoopXmlSchemaVisitor
onEndAttributes, onEnterAllGroup, onEnterChoiceGroup, onEnterSequenceGroup, onEnterSubstitutionGroup, onExitAllGroup, onExitChoiceGroup, onExitSequenceGroup, onExitSubstitutionGroup, onVisitAny, onVisitAnyAttribute
-
-
-
-
Field Detail
-
XML_ELEMENT_VALUE_BODY_TAG
public static final String XML_ELEMENT_VALUE_BODY_TAG
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
XsdModelConverter
public XsdModelConverter(String xsdStr)
-
-
Method Detail
-
getCollection
public org.apache.ws.commons.schema.XmlSchemaCollection getCollection()
-
convert
public ConfigItem convert(String topLevelElement)
-
onEnterElement
public void onEnterElement(org.apache.ws.commons.schema.XmlSchemaElement xmlSchemaElement, org.apache.ws.commons.schema.walker.XmlSchemaTypeInfo xmlSchemaTypeInfo, boolean b)
- Specified by:
onEnterElement
in interfaceorg.apache.ws.commons.schema.walker.XmlSchemaVisitor
- Overrides:
onEnterElement
in classNoopXmlSchemaVisitor
-
onExitElement
public void onExitElement(org.apache.ws.commons.schema.XmlSchemaElement xmlSchemaElement, org.apache.ws.commons.schema.walker.XmlSchemaTypeInfo xmlSchemaTypeInfo, boolean b)
- Specified by:
onExitElement
in interfaceorg.apache.ws.commons.schema.walker.XmlSchemaVisitor
- Overrides:
onExitElement
in classNoopXmlSchemaVisitor
-
onVisitAttribute
public void onVisitAttribute(org.apache.ws.commons.schema.XmlSchemaElement xmlSchemaElement, org.apache.ws.commons.schema.walker.XmlSchemaAttrInfo xmlSchemaAttrInfo)
- Specified by:
onVisitAttribute
in interfaceorg.apache.ws.commons.schema.walker.XmlSchemaVisitor
- Overrides:
onVisitAttribute
in classNoopXmlSchemaVisitor
-
getDocumentation
public String getDocumentation(org.apache.ws.commons.schema.XmlSchemaAnnotation xmlSchemaAnnotation)
Reading documentation from xsd annotation- Parameters:
xmlSchemaAnnotation
-- Returns:
-
getConfigItemForAttribute
public ConfigItem getConfigItemForAttribute(org.apache.ws.commons.schema.walker.XmlSchemaAttrInfo xmlSchemaAttrInfo)
Convert xsd attribute into ConfigItem- Parameters:
xmlSchemaAttrInfo
-- Returns:
-
getTypeForAttribute
public ConfigItem.Type getTypeForAttribute(org.apache.ws.commons.schema.walker.XmlSchemaAttrInfo xmlSchemaAttrInfo)
Handle xsd type- Parameters:
xmlSchemaAttrInfo
-- Returns:
-
-