java.lang.Object
com.espertech.esper.common.internal.event.xml.SchemaUtil

public class SchemaUtil extends Object
Utility class for querying schema information via Xerces implementation classes.
Author:
pablo
  • Field Details

  • Constructor Details

    • SchemaUtil

      public SchemaUtil()
  • Method Details

    • toReturnType

      public static EPTypeClass toReturnType(SchemaItem item, EventTypeXMLXSDHandler xmlxsdHandler)
      Returns the Class-type of the schema item.
      Parameters:
      item - to to determine type for
      xmlxsdHandler - xml-xsd handler
      Returns:
      type
    • toReturnType

      public static EPTypeClass toReturnType(QName resultType, EPTypeClass optionalCastToType)
      Returns the native type based on XPathConstants qname and an optional cast-to type, if provided.
      Parameters:
      resultType - qname
      optionalCastToType - null or cast-to type
      Returns:
      return type
    • findRootElement

      public static SchemaElementComplex findRootElement(SchemaModel schema, String namespace, String elementName)
      Returns the root element for a given schema given a root element name and namespace.
      Parameters:
      schema - is the schema to interrogate
      namespace - is the namespace of the root element
      elementName - is the name of the root element
      Returns:
      declaration of root element
    • findPropertyMapping

      public static SchemaItem findPropertyMapping(SchemaElementComplex def, String property)
      Finds an apropiate definition for the given property, starting at the * given definition. First look if the property es an attribute. If not, look at simple and then child element definitions.
      Parameters:
      def - the definition to start looking
      property - the property to look for
      Returns:
      schema element or null if not found
    • serialize

      public static String serialize(Node doc)
      Serialize the given node.
      Parameters:
      doc - node to serialize
      Returns:
      serialized node string