org.compass.core.mapping.xsem.builder
Class XSEM

java.lang.Object
  extended by org.compass.core.mapping.xsem.builder.XSEM

public abstract class XSEM
extends Object

Static builder allowing to construct XSEM (XML to Search Engine Mapping) definitions.

Here is an exmaple how it can be used:

 import static org.compass.core.mapping.xsem.builder.XSEM.*;


 conf.addMapping(
      xml("a")
          .add(id("/xml-fragment/data/id/@value").indexName("id"))
          .add(property("/xml-fragment/data/data1/@value"))
          .add(property("/xml-fragment/data/data1").indexName("eleText"))
 );
 

Author:
kimchy

Method Summary
static XmlAllMappingBuilder all()
          Constructs a new all mapping definition that can be added to a xml mapping builder using XmlMappingBuilder.all(XmlAllMappingBuilder).
static XmlAnalyzerMappingBuilder analyzer(String name, String xpath)
          Constructs a new xml analyzer mapping using the name and the xpath defined.
static XmlBoostMappingBuilder boost(String name, String xpath)
          Constructs a new xml boost mapping using the name and the xpath defined.
static XmlContentMappingBuilder content(String name)
          Constructs a new XML content mapping using the specified name.
static XmlContractMappingBuilder contract(String alias)
          Constrcuts a new contract xml mapping builder that can later be extended by other contracts / xml mappings.
static XmlIdMappingBuilder id(String xpath)
          Constructs a new xml id mapping using the specified xpath.
static XmlPropertyMappingBuilder property(String xpath)
          Constructs a new xml property mapping using the specified xpath.
static XmlMappingBuilder xml(String alias)
          Constructs a new xml based mapping for the specific alias.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

xml

public static XmlMappingBuilder xml(String alias)
Constructs a new xml based mapping for the specific alias. Note, at least one id mapping must be added to the xml mapping.


contract

public static XmlContractMappingBuilder contract(String alias)
Constrcuts a new contract xml mapping builder that can later be extended by other contracts / xml mappings. Contract mappings allow to share common mapping definitions.


id

public static XmlIdMappingBuilder id(String xpath)
Constructs a new xml id mapping using the specified xpath. Can then be added to a root xml mapping builder using XmlMappingBuilder.add(XmlIdMappingBuilder).


property

public static XmlPropertyMappingBuilder property(String xpath)
Constructs a new xml property mapping using the specified xpath. Can then be added to a root xml mapping builder using XmlMappingBuilder.add(XmlPropertyMappingBuilder).


analyzer

public static XmlAnalyzerMappingBuilder analyzer(String name,
                                                 String xpath)
Constructs a new xml analyzer mapping using the name and the xpath defined. Can be added to a root xml mapping builder using XmlMappingBuilder.add(XmlAnalyzerMappingBuilder)


boost

public static XmlBoostMappingBuilder boost(String name,
                                           String xpath)
Constructs a new xml boost mapping using the name and the xpath defined. Can be added to a root xml mapping builder using XmlMappingBuilder.add(XmlBoostMappingBuilder)


content

public static XmlContentMappingBuilder content(String name)
Constructs a new XML content mapping using the specified name. Can be added to xml mapping builder using XmlMappingBuilder.add(XmlContentMappingBuilder).


all

public static XmlAllMappingBuilder all()
Constructs a new all mapping definition that can be added to a xml mapping builder using XmlMappingBuilder.all(XmlAllMappingBuilder).



Copyright (c) 2004-2009 The Compass Project.