Search in sources :

Example 11 with EntityDefinition

use of org.apache.jena.query.text.EntityDefinition in project jena by apache.

the class TestEntityMapAssembler method EntityHasPrimaryField.

@Test
public void EntityHasPrimaryField() {
    EntityDefinitionAssembler entDefAssem = new EntityDefinitionAssembler();
    EntityDefinition entityDef = entDefAssem.open(null, spec1, null);
    assertEquals(SPEC1_DEFAULT_FIELD, entityDef.getPrimaryField());
}
Also used : EntityDefinition(org.apache.jena.query.text.EntityDefinition) Test(org.junit.Test)

Example 12 with EntityDefinition

use of org.apache.jena.query.text.EntityDefinition in project jena by apache.

the class TestEntityMapAssembler method EntityHasMapEntryWithStandardAnalyzerAndStopWords.

@Test
public void EntityHasMapEntryWithStandardAnalyzerAndStopWords() {
    EntityDefinitionAssembler entDefAssem = new EntityDefinitionAssembler();
    EntityDefinition entityDef = entDefAssem.open(Assembler.general, spec4, null);
    assertEquals(StandardAnalyzer.class, entityDef.getAnalyzer(SPEC1_DEFAULT_FIELD).getClass());
}
Also used : EntityDefinition(org.apache.jena.query.text.EntityDefinition) Test(org.junit.Test)

Example 13 with EntityDefinition

use of org.apache.jena.query.text.EntityDefinition in project jena by apache.

the class TestEntityMapAssembler method EntityHasEntityField.

@Test
public void EntityHasEntityField() {
    EntityDefinitionAssembler entDefAssem = new EntityDefinitionAssembler();
    EntityDefinition entityDef = entDefAssem.open(null, spec1, null);
    assertEquals(SPEC1_ENTITY_FIELD, entityDef.getEntityField());
}
Also used : EntityDefinition(org.apache.jena.query.text.EntityDefinition) Test(org.junit.Test)

Aggregations

EntityDefinition (org.apache.jena.query.text.EntityDefinition)13 Test (org.junit.Test)9 TextIndexConfig (org.apache.jena.query.text.TextIndexConfig)3 HashMap (java.util.HashMap)2 TextIndexException (org.apache.jena.query.text.TextIndexException)2 Node (org.apache.jena.graph.Node)1 Resource (org.apache.jena.rdf.model.Resource)1 Analyzer (org.apache.lucene.analysis.Analyzer)1 Directory (org.apache.lucene.store.Directory)1 RAMDirectory (org.apache.lucene.store.RAMDirectory)1