Class XmlDescriptorSchemaReader


  • public class XmlDescriptorSchemaReader
    extends Object
    Reads content properties index schema from a XML document. Example schema:
    
          <key property-key="key-1">
              <extract path="content.id" type="string" />
              <extract path="content.created" type="date" />
          </key>
          <key property-key="key-2">
              <extract path="content.text" type="text" />
              <extract path="content.awesomeness" type="number" />
          </key>
     
    Since:
    5.7
    See Also:
    for valid field types, for json expression syntax
    • Constructor Detail

      • XmlDescriptorSchemaReader

        public XmlDescriptorSchemaReader()
    • Method Detail

      • read

        public ContentPropertyIndexSchema read​(org.dom4j.Element element,
                                               String pluginName,
                                               String moduleName)
        Reads content property index schema from a XML document.
        Parameters:
        element - root element of a XML document containing index schema definition
        Returns:
        read index schema representation
        Throws:
        InvalidSchemaDefinitionException - when XML document does not follow expected schema for defining content property index
      • extractUISupport

        public static com.atlassian.fugue.Option<com.atlassian.querylang.fields.UISupport> extractUISupport​(org.dom4j.Element element)