Search in sources :

Example 16 with ServerParentTreeNode

use of net.geoprism.registry.model.ServerParentTreeNode in project geoprism-registry by terraframe.

the class ValueOverTimeParentTest method testGetParentAtTime.

/**
 * Imported data completely consumes existing data, and the values are different.
 */
@Test
@Request
public void testGetParentAtTime() {
    ServerGeoObjectIF go = TEST_GO.getServerObject();
    go.addParent(BELIZE.getServerObject(), FastTestDataset.HIER_ADMIN.getServerObject(), addDay(TestDataSet.DEFAULT_OVER_TIME_DATE, -5), addDay(TestDataSet.DEFAULT_END_TIME_DATE, 5));
    go.apply(false);
    go = TEST_GO.getServerObject();
    ServerParentTreeNode node = go.getParentsForHierarchy(FastTestDataset.HIER_ADMIN.getServerObject(), false, TestDataSet.DEFAULT_OVER_TIME_DATE);
    Assert.assertEquals(1, node.getParents().size());
    ServerGeoObjectIF value = node.getParents().get(0).getGeoObject();
    Assert.assertEquals(BELIZE.getCode(), value.getCode());
}
Also used : ServerGeoObjectIF(net.geoprism.registry.model.ServerGeoObjectIF) ServerParentTreeNode(net.geoprism.registry.model.ServerParentTreeNode) Test(org.junit.Test) Request(com.runwaysdk.session.Request)

Aggregations

ServerParentTreeNode (net.geoprism.registry.model.ServerParentTreeNode)16 ServerGeoObjectIF (net.geoprism.registry.model.ServerGeoObjectIF)9 ServerHierarchyType (net.geoprism.registry.model.ServerHierarchyType)9 ServerGeoObjectType (net.geoprism.registry.model.ServerGeoObjectType)7 EdgeObject (com.runwaysdk.business.graph.EdgeObject)5 Request (com.runwaysdk.session.Request)5 Entry (java.util.Map.Entry)4 JsonObject (com.google.gson.JsonObject)3 VertexObject (com.runwaysdk.business.graph.VertexObject)3 MdVertexDAOIF (com.runwaysdk.dataaccess.MdVertexDAOIF)3 LineString (com.vividsolutions.jts.geom.LineString)3 MultiLineString (com.vividsolutions.jts.geom.MultiLineString)3 MultiPoint (com.vividsolutions.jts.geom.MultiPoint)3 Point (com.vividsolutions.jts.geom.Point)3 Date (java.util.Date)3 VertexServerGeoObject (net.geoprism.registry.model.graph.VertexServerGeoObject)3 LocalizedValue (org.commongeoregistry.adapter.dataaccess.LocalizedValue)3 GraphObject (com.runwaysdk.business.graph.GraphObject)2 GraphQuery (com.runwaysdk.business.graph.GraphQuery)2 MdEdgeDAOIF (com.runwaysdk.dataaccess.MdEdgeDAOIF)2