use of net.geoprism.registry.model.ServerGeoObjectIF in project geoprism-registry by terraframe.
the class RegistryService method updateGeoObject.
@Request(RequestType.SESSION)
public GeoObject updateGeoObject(String sessionId, String jGeoObj, Date startDate, Date endDate) {
GeoObject geoObject = GeoObject.fromJSON(adapter, jGeoObj);
ServerGeoObjectIF object = service.apply(geoObject, startDate, endDate, false, false);
return object.toGeoObject(startDate);
}
use of net.geoprism.registry.model.ServerGeoObjectIF in project geoprism-registry by terraframe.
the class RegistryService method getGeoObjectByCode.
@Request(RequestType.SESSION)
public GeoObject getGeoObjectByCode(String sessionId, String code, String typeCode, Date date) {
ServerGeoObjectIF object = service.getGeoObjectByCode(code, typeCode, true);
ServiceFactory.getGeoObjectPermissionService().enforceCanRead(object.getType().getOrganization().getCode(), object.getType());
return object.toGeoObject(date);
}
use of net.geoprism.registry.model.ServerGeoObjectIF in project geoprism-registry by terraframe.
the class RegistryService method getGeoObjectOverTime.
@Request(RequestType.SESSION)
public GeoObjectOverTime getGeoObjectOverTime(String sessionId, String id, String typeCode) {
ServerGeoObjectIF object = this.service.getGeoObject(id, typeCode);
if (object == null) {
net.geoprism.registry.DataNotFoundException ex = new net.geoprism.registry.DataNotFoundException();
ex.setTypeLabel(GeoObjectMetadata.get().getClassDisplayLabel());
ex.setDataIdentifier(id);
ex.setAttributeLabel(GeoObjectMetadata.get().getAttributeDisplayLabel(DefaultAttribute.UID.getName()));
throw ex;
}
ServiceFactory.getGeoObjectPermissionService().enforceCanRead(object.getType().getOrganization().getCode(), object.getType());
return object.toGeoObjectOverTime();
}
use of net.geoprism.registry.model.ServerGeoObjectIF in project geoprism-registry by terraframe.
the class RelationshipVisualizationService method processChildNode.
private void processChildNode(ServerChildGraphNode root, GraphType graphType, JsonArray jaEdges, JsonArray jaVerticies, Set<String> setVerticies) {
final ServerGeoObjectIF vertexGo = root.getGeoObject();
root.getChildren().forEach(node -> {
if (node.getOid() != null) {
ServerGeoObjectIF relatedGO = node.getGeoObject();
if (!setVerticies.contains(relatedGO.getCode())) {
jaVerticies.add(serializeVertex(relatedGO, "CHILD"));
setVerticies.add(relatedGO.getCode());
}
if (!setVerticies.contains(node.getOid())) {
jaEdges.add(serializeEdge(vertexGo, relatedGO, graphType, node));
}
}
this.processChildNode(node, graphType, jaEdges, jaVerticies, setVerticies);
});
}
use of net.geoprism.registry.model.ServerGeoObjectIF in project geoprism-registry by terraframe.
the class TestGeoObjectInfo method apply.
/**
* Applies the GeoObject which is represented by this test data into the
* database.
*
* @postcondition Subsequent calls to this.getBusiness will return the
* business object which stores additional CGR attributes on
* this GeoObject
* @postcondition Subsequent calls to this.getGeoEntity will return the
* GeoEntity which backs this GeoObject
* @postcondition The applied GeoObject's status will be equal to ACTIVE
*/
@Request
public void apply() {
ServerGeoObjectIF localServerGO = applyInTrans(date);
this.registryId = localServerGO.getUid();
this.isNew = false;
}
Aggregations