Class XsdHelper
- java.lang.Object
-
- org.opennms.features.config.dao.impl.util.XsdHelper
-
public class XsdHelper extends Object
Main helper class for all xsd related function
-
-
Constructor Summary
Constructors Constructor Description XsdHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ConfigDefinition
buildConfigDefinition(String configName, String xsdName, String topLevelElement, String basePath)
It help to convert xsd to openapi and prepare all metadata neededstatic ConfigDefinition
buildConfigDefinition(String configName, String xsdName, String topLevelElement, String basePath, boolean allowMultiple)
It help to convert xsd to openapi and prepare all metadata neededstatic ConfigConverter
getConverter(ConfigDefinition def)
Build XmlConverter from ConfigDefinitionstatic URL
getSchemaPath(String xsdName)
It will search xsds first, otherwise it will search across classpath
-
-
-
Method Detail
-
getSchemaPath
public static URL getSchemaPath(String xsdName) throws IOException
It will search xsds first, otherwise it will search across classpath- Returns:
- URL of the xsd file
- Throws:
IOException
-
buildConfigDefinition
public static ConfigDefinition buildConfigDefinition(String configName, String xsdName, String topLevelElement, String basePath)
It help to convert xsd to openapi and prepare all metadata needed- Parameters:
configName
-xsdName
-topLevelElement
-- Returns:
- ConfigDefinition
-
buildConfigDefinition
public static ConfigDefinition buildConfigDefinition(String configName, String xsdName, String topLevelElement, String basePath, boolean allowMultiple)
It help to convert xsd to openapi and prepare all metadata needed- Parameters:
configName
-xsdName
-topLevelElement
-basePath
-allowMultiple
-- Returns:
- ConfigDefinition
-
getConverter
public static ConfigConverter getConverter(ConfigDefinition def) throws IOException
Build XmlConverter from ConfigDefinition- Parameters:
def
-- Returns:
- Throws:
IOException
-
-