use of net.geoprism.registry.model.GraphType in project geoprism-registry by terraframe.
the class ETLService method importEdgeJson.
@Request(RequestType.SESSION)
public void importEdgeJson(String sessionId, String relationshipType, String graphTypeCode, Date startDate, Date endDate, InputStream stream) {
try {
GraphType graphType = GraphType.getByCode(relationshipType, graphTypeCode);
EdgeJsonImporter importer = new EdgeJsonImporter(stream, graphType, startDate, endDate);
importer.importData();
} catch (JsonSyntaxException | IOException e) {
throw new ProgrammingErrorException(e);
}
}
use of net.geoprism.registry.model.GraphType 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.GraphType in project geoprism-registry by terraframe.
the class GraphService method removeChild.
@Request(RequestType.SESSION)
public void removeChild(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());
parent.removeGraphChild(child, graphType, startDate, endDate);
}
use of net.geoprism.registry.model.GraphType 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.GraphType 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