移除water相关同步内容,添加列出geonetwork多出数据功能
This commit is contained in:
parent
f693bc98c0
commit
ac2ce1d680
|
@ -106,8 +106,12 @@ class Admin_DataController extends Zend_Controller_Action
|
||||||
$this->db->query("update metadata set source=? where uuid=?",array($rs->source,$uuid));
|
$this->db->query("update metadata set source=? where uuid=?",array($rs->source,$uuid));
|
||||||
$this->view->msg='成功同步元数据:'.$uuid;
|
$this->view->msg='成功同步元数据:'.$uuid;
|
||||||
} else $this->view->msg='不存在此元数据:'.$uuid;
|
} else $this->view->msg='不存在此元数据:'.$uuid;
|
||||||
} elseif ($list=='water') {
|
} elseif ($list=='westdc') {
|
||||||
$sql="select uuid,title 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="select uuid,title from metadata where uuid not in (select uuid from geonetworkmetadata where schemaid='iso19115')";
|
||||||
|
$this->view->metadata=$this->db->query($sql);
|
||||||
|
} elseif ($list=='geonetwork') {
|
||||||
|
$sql="select id,uuid,(regexp_matches(data,'<resTitle>(.*)</resTitle>'))[1] as title from geonetworkmetadata
|
||||||
|
where uuid not in (select uuid from metadata)";
|
||||||
$this->view->metadata=$this->db->query($sql);
|
$this->view->metadata=$this->db->query($sql);
|
||||||
} elseif ($delete=='westdc') {
|
} elseif ($delete=='westdc') {
|
||||||
$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')";
|
||||||
|
|
|
@ -23,28 +23,28 @@
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<p>WESTDC有元数据<?php echo $this->mdcount->westdccount; ?>条,GEONETWORK有元数据<?php echo $this->mdcount->gncount; ?>条,WATER中元数据<?php echo $this->mdcount->watergncount; ?>条。</p>
|
<p>WESTDC有元数据<?php echo $this->mdcount->westdccount; ?>条,GEONETWORK有元数据<?php echo $this->mdcount->gncount; ?>条。</p>
|
||||||
<p><a href="/admin/data/sync/source/geonetwork">开始同步:从GEONETWORK同步到WESTDC,若有冲突,以GEONETWORK为准</a> </p>
|
<p><a href="/admin/data/sync/source/geonetwork">开始同步:从GEONETWORK同步到WESTDC,若有冲突,以GEONETWORK为准</a> </p>
|
||||||
<p><a href="/admin/data/sync/source/watergn">开始同步:从water同步到WESTDC,若有冲突,以water为准</a> </p>
|
|
||||||
<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/westdc">列出WESTDC中多出的数据</a></p>
|
||||||
|
<p><a href="/admin/data/sync/list/geonetwork">列出GeoNetwork中多出的元数据</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/geonetwork">删除GEONETWORK中多出的元数据</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/adminuser/geonetwork">同步帐号到GEONETWORK(仅供初始化使用)</a></p>
|
|
||||||
<form method="POST">
|
<form method="POST">
|
||||||
<p>指定元数据UUID: <input type="text" name="uuid"></p>
|
<p>指定元数据UUID: <input type="text" name="uuid"></p>
|
||||||
<button type="submit" name="submit">同步此元数据</button>
|
<button type="submit" name="submit">同步此元数据</button>
|
||||||
<button type="submit" name="watersubmit">同步WATER数据</button>
|
|
||||||
<button type="submit" name="gnsubmit">同步数据到GeoNetwork</button>
|
<button type="submit" name="gnsubmit">同步数据到GeoNetwork</button>
|
||||||
</form>
|
</form>
|
||||||
<?php if ($this->metadata) : ?>
|
<?php if ($this->metadata) : ?>
|
||||||
<ul>
|
<ul>
|
||||||
<?php foreach ($this->metadata as $md) :?>
|
<?php foreach ($this->metadata as $md) :
|
||||||
|
if (empty($md->id)) :
|
||||||
|
?>
|
||||||
<li><a href="/data/<?php echo $md->uuid; ?>"><?php echo $md->title;?></a></li>
|
<li><a href="/data/<?php echo $md->uuid; ?>"><?php echo $md->title;?></a></li>
|
||||||
<?php endforeach; ?>
|
<?php else : ?>
|
||||||
|
<li><a href="/service/geonetwork?url=metadata.show?id=<?php echo $md->id; ?>"><?php echo $md->title;?></a></li>
|
||||||
|
<?php endif;endforeach; ?>
|
||||||
</ul>
|
</ul>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
Loading…
Reference in New Issue