use of net.geoprism.registry.model.ServerGraphNode in project geoprism-registry by terraframe.
the class GraphService method getChildren.
@Request(RequestType.SESSION)
public JsonObject getChildren(String sessionId, String parentCode, String parentGeoObjectTypeCode, String graphTypeCode, Boolean recursive, Date date) {
ServerGeoObjectService service = ServiceFactory.getGeoObjectService();
ServerGeoObjectIF parent = service.getGeoObjectByCode(parentCode, parentGeoObjectTypeCode, true);
GraphType graphType = this.getGraphType(graphTypeCode);
// ServiceFactory.getGeoObjectRelationshipPermissionService().enforceCanAddChild(ht.getOrganization().getCode(),
// parent.getType(), child.getType());
ServerGraphNode node = parent.getGraphChildren(graphType, recursive, date);
return node.toJSON();
}
use of net.geoprism.registry.model.ServerGraphNode in project geoprism-registry by terraframe.
the class GraphService method addChild.
@Request(RequestType.SESSION)
public JsonObject addChild(String sessionId, String parentCode, String parentGeoObjectTypeCode, String childCode, String childGeoObjectTypeCode, String graphTypeCode, Date startDate, Date endDate) {
ServerGeoObjectService service = ServiceFactory.getGeoObjectService();
ServerGeoObjectIF parent = service.getGeoObjectByCode(parentCode, parentGeoObjectTypeCode, true);
ServerGeoObjectIF child = service.getGeoObjectByCode(childCode, childGeoObjectTypeCode, true);
GraphType graphType = this.getGraphType(graphTypeCode);
// ServiceFactory.getGeoObjectRelationshipPermissionService().enforceCanAddChild(ht.getOrganization().getCode(),
// parent.getType(), child.getType());
ServerGraphNode node = parent.addGraphChild(child, graphType, startDate, endDate);
return node.toJSON();
}
use of net.geoprism.registry.model.ServerGraphNode in project geoprism-registry by terraframe.
the class GraphService method getParents.
@Request(RequestType.SESSION)
public JsonObject getParents(String sessionId, String childCode, String childGeoObjectTypeCode, String graphTypeCode, Boolean recursive, Date date) {
ServerGeoObjectService service = ServiceFactory.getGeoObjectService();
ServerGeoObjectIF child = service.getGeoObjectByCode(childCode, childGeoObjectTypeCode, true);
GraphType graphType = this.getGraphType(graphTypeCode);
// ServiceFactory.getGeoObjectRelationshipPermissionService().enforceCanAddChild(ht.getOrganization().getCode(),
// parent.getType(), child.getType());
ServerGraphNode node = child.getGraphParents(graphType, recursive, date);
return node.toJSON();
}
Aggregations