Search in sources :

Example 6 with EntityDefinition

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

the class TestEntityDefinitionAssembler method EntityHasEntityField.

@Test
public void EntityHasEntityField() {
    EntityDefinitionAssembler emAssembler = new EntityDefinitionAssembler();
    EntityDefinition entityDef = emAssembler.open(null, spec0, null);
    assertEquals(SPEC0_ENTITY_FIELD, entityDef.getEntityField());
}
Also used : EntityDefinition(org.apache.jena.query.spatial.EntityDefinition) Test(org.junit.Test)

Example 7 with EntityDefinition

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

the class TestEntityDefinitionAssembler method EntityHasPair.

@Test
public void EntityHasPair() {
    EntityDefinitionAssembler emAssembler = new EntityDefinitionAssembler();
    EntityDefinition entityDef = emAssembler.open(null, spec1, null);
    assertEquals(1, entityDef.getCustomSpatialPredicatePairCount());
    assertEquals(true, entityDef.hasSpatialPredicatePair(SPEC1_LATITUDE.asNode(), SPEC1_LONGITUDE.asNode()));
}
Also used : EntityDefinition(org.apache.jena.query.spatial.EntityDefinition) Test(org.junit.Test)

Aggregations

EntityDefinition (org.apache.jena.query.spatial.EntityDefinition)7 Test (org.junit.Test)5 SpatialIndexException (org.apache.jena.query.spatial.SpatialIndexException)2 Resource (org.apache.jena.rdf.model.Resource)2 File (java.io.File)1 IOException (java.io.IOException)1 SpatialVocab.pDirectory (org.apache.jena.query.spatial.assembler.SpatialVocab.pDirectory)1 Model (org.apache.jena.rdf.model.Model)1 RDFNode (org.apache.jena.rdf.model.RDFNode)1 Directory (org.apache.lucene.store.Directory)1 FSDirectory (org.apache.lucene.store.FSDirectory)1 RAMDirectory (org.apache.lucene.store.RAMDirectory)1