添加删除GEONETWORK多余元数据功能
This commit is contained in:
parent
7264944669
commit
dc887db3bc
|
@ -113,6 +113,16 @@ class Admin_DataController extends Zend_Controller_Action
|
||||||
$sql="delete from metadata where uuid not in (select uuid from geonetworkmetadata where schemaid='iso19115')";
|
$sql="delete from metadata where uuid not in (select uuid from geonetworkmetadata where schemaid='iso19115')";
|
||||||
$this->db->query($sql);
|
$this->db->query($sql);
|
||||||
$this->view->msg='已删除WESTDC中多出的元数据!';
|
$this->view->msg='已删除WESTDC中多出的元数据!';
|
||||||
|
} elseif ($delete=='geonetwork') {
|
||||||
|
//dblink view中删除多条有问题,暂时用单条删除替代
|
||||||
|
//$sql="delete from geonetworkmetadata where uuid not in (select uuid from metadata)";
|
||||||
|
$sql="select uuid from geonetworkmetadata where uuid not in (select uuid from metadata)";
|
||||||
|
$rows=$this->db->fetchAll($sql);
|
||||||
|
foreach($rows as $row)
|
||||||
|
{
|
||||||
|
$this->db->exec($this->db->quoteInto("delete from geonetworkmetadata where uuid=?",$row->uuid));
|
||||||
|
}
|
||||||
|
$this->view->msg='已删除GEONETWORK中多出的元数据!';
|
||||||
} elseif ($delete=='water') {
|
} elseif ($delete=='water') {
|
||||||
$sql="delete from metadata where uuid not in (select uuid from watergn where schemaid='iso19115') and uuid not in (select uuid from geonetworkmetadata where schemaid='iso19115')";
|
$sql="delete from metadata where uuid not in (select uuid from watergn where schemaid='iso19115') and uuid not in (select uuid from geonetworkmetadata where schemaid='iso19115')";
|
||||||
$this->db->query($sql);
|
$this->db->query($sql);
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
<p><a href="/admin/data/sync/source/westdc">开始同步:从WESTDC同步到GEONETWORK</a> </p>
|
<p><a href="/admin/data/sync/source/westdc">开始同步:从WESTDC同步到GEONETWORK</a> </p>
|
||||||
<p><a href="/admin/data/sync/list/water">列出WESTDC中多出的WATER元数据</a></p>
|
<p><a href="/admin/data/sync/list/water">列出WESTDC中多出的WATER元数据</a></p>
|
||||||
<p><a href="/admin/data/sync/delete/westdc">删除WESTDC中多出的元数据</a></p>
|
<p><a href="/admin/data/sync/delete/westdc">删除WESTDC中多出的元数据</a></p>
|
||||||
|
<p><a href="/admin/data/sync/delete/geonetwork">删除GEONETWORK中多出的元数据</a></p>
|
||||||
<p><a href="/admin/data/sync/delete/water">删除WESTDC中多出的WATER元数据</a></p>
|
<p><a href="/admin/data/sync/delete/water">删除WESTDC中多出的WATER元数据</a></p>
|
||||||
<p><a href="/admin/data/sync/thumb/geonetwork">同步GEONETWORK中的缩略图</a></p>
|
<p><a href="/admin/data/sync/thumb/geonetwork">同步GEONETWORK中的缩略图</a></p>
|
||||||
<p><a href="/admin/data/sync/thumb/water">同步WATER中的缩略图</a></p>
|
<p><a href="/admin/data/sync/thumb/water">同步WATER中的缩略图</a></p>
|
||||||
|
|
Loading…
Reference in New Issue