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 ofConfigItems. It usually uses with JaxbXmlConverter together.- See Also:
JaxbXmlConverter
-
-
Field Summary
Fields Modifier and Type Field Description static StringXML_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 ConfigItemconvert(String topLevelElement)org.apache.ws.commons.schema.XmlSchemaCollectiongetCollection()ConfigItemgetConfigItemForAttribute(org.apache.ws.commons.schema.walker.XmlSchemaAttrInfo xmlSchemaAttrInfo)Convert xsd attribute into ConfigItemStringgetDocumentation(org.apache.ws.commons.schema.XmlSchemaAnnotation xmlSchemaAnnotation)Reading documentation from xsd annotationMap<String,String>getElementNameToValueNameMap()ConfigItem.TypegetTypeForAttribute(org.apache.ws.commons.schema.walker.XmlSchemaAttrInfo xmlSchemaAttrInfo)Handle xsd typevoidonEnterElement(org.apache.ws.commons.schema.XmlSchemaElement xmlSchemaElement, org.apache.ws.commons.schema.walker.XmlSchemaTypeInfo xmlSchemaTypeInfo, boolean b)voidonExitElement(org.apache.ws.commons.schema.XmlSchemaElement xmlSchemaElement, org.apache.ws.commons.schema.walker.XmlSchemaTypeInfo xmlSchemaTypeInfo, boolean b)voidonVisitAttribute(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:
onEnterElementin interfaceorg.apache.ws.commons.schema.walker.XmlSchemaVisitor- Overrides:
onEnterElementin classNoopXmlSchemaVisitor
-
onExitElement
public void onExitElement(org.apache.ws.commons.schema.XmlSchemaElement xmlSchemaElement, org.apache.ws.commons.schema.walker.XmlSchemaTypeInfo xmlSchemaTypeInfo, boolean b)- Specified by:
onExitElementin interfaceorg.apache.ws.commons.schema.walker.XmlSchemaVisitor- Overrides:
onExitElementin classNoopXmlSchemaVisitor
-
onVisitAttribute
public void onVisitAttribute(org.apache.ws.commons.schema.XmlSchemaElement xmlSchemaElement, org.apache.ws.commons.schema.walker.XmlSchemaAttrInfo xmlSchemaAttrInfo)- Specified by:
onVisitAttributein interfaceorg.apache.ws.commons.schema.walker.XmlSchemaVisitor- Overrides:
onVisitAttributein 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:
-
-