[GeoNetwork-users] Functionality improvement : Metadata Workflow

Dear All,

I would like to propose the idea of an improvement to the actual Geonetwork
2.1.

The Geonetwork tool is oriented for an internet use, So for the
administrators it will be very interesting to know who create the metadatas,
and who do the last update on them for the geonetwork local node. ( For
controlling publication content as example )

So a simple Workflow functionality, witch just save the user id of the
metadata creator and metadata updater, will permit to display for the
administrators and users administrators, complementary and very interesting
information about the metadata like :

    - Creation Date : User Groups - User <with email link>
    - Update Date : User Groups - User <with email link>

Maybe a more complex development phase for validation content, metadata
versioning and other workflow's functionalities can be envisaged in a second
time?

What are you (Users, Administrators , Developers ) thinking about ?

Cordially Fabien BACHRATY
INRA Avignon France
--
View this message in context: http://www.nabble.com/Functionality-improvement-%3A-Metadata-Workflow-tf4547156s18419.html#a12975916
Sent from the geonetwork-users mailing list archive at Nabble.com.

Hello,

I know that this post will be better placed in the devel part but it is also
the answer of my previous question. That's why I publish here my code
source.

I have implemented a simple workflow using the code source of the release
2.1.
I do it because i wish to simplify the control of the metadata change :
  That permit to know who is the owner,who is the last updater and also the
date of creation and update of the the metadata using the Geonetwork web
interface.

The creation date and update date are displayed for all on the main search
page and on the last result page.

http://www.nabble.com/file/p14834966/1.jpg

And when you are logged in administrator or reviewer profile the
supplemental informations of owner name and updater name are displayed like
below

http://www.nabble.com/file/p14834966/2.jpg

And it is possible to contact the author clicking on his name.

The limit of the solution is when the user who make the last update is
deleted,
I do not add constraint between metadata table and user table for the last
updater.
So if a user is deleted the link will be breaked and the information can't
be displayed, so i display a “-”.
I do not display the group of the owner or the group of the updater because
user can be member of many groups.

(
The SQL Select is not optimised in order that the metadata will not
disappear when user who make the last update was deleted and to display a
“-” in front of a null field for the author
i use :

SELECT schemaId, createDate, changeDate, owner, lastupdater, source,
isTemplate, title, uuid, isHarvested,
Coalesce ((select name || ' ' ||surname from users where users.id =
Metadata.owner),'-') as userowner,
Coalesce ((select email from users where users.id = Metadata.owner ),'') as
owneremail,
Coalesce ((select name || ' ' ||surname from users where users.id =
Metadata.lastupdater),'-') as userupdater,
Coalesce ((select email from users where users.id = Metadata.lastupdater
),'') as updateremail
FROM Metadata WHERE Metadata.id = ?

)
1)
In the database i have added a field in the table Metadata to manage the Id
of the last updater
The owner id, the create date and the update date are already present on the
database.

ALTER TABLE metadata ADD lastupdater integer NOT NULL;

The default value can be '1' if you want as example that the lastupdater
point to the administrator for the existing metadata, you can also delete
the not null constraint and the “-” will be displayed.

2 )
in /geonetwork/branches/2.1.x/src/org/fao/geonet/constants/Edit.java
i add the fallowing constant.

public static final String OWNER = "owner";
public static final String UPDATER = "updater";
public static final String OWNER_NAME_SURNAME = "ownernamesurname";
public static final String UPDATE_NAME_SURNAME = "updaternamesurname";
public static final String OWNER_EMAIL = "owneremail";
public static final String UPDATE_EMAIL = "updateremail";

See the code source below :

http://www.nabble.com/file/p14834966/Edit.java Edit.java

3 )
in /geonetwork/branches/2.1.x/src/org/fao/geonet/kernel/DataManager.java

I have update the function updateMetadata to manage the the metadata updater
id.
Some overload have been created ...
I have update the function builInfoElem to manage the element present on the
xml sent to the xsl for the main search and last result page.
It update the select function to get and make directly the link between user
id and first and last name and their email.

See the code source below :

http://www.nabble.com/file/p14834966/DataManager.java DataManager.java

4)
/geonetwork/branches/2.1.x/src/org/fao/geonet/kernel/XmlSerializer.java

I have update the insert function to manage the new field lastupdater as a
copy of the owner at the create phases.
And also the update function to save the identifiant of the updater.

See the code source below :

http://www.nabble.com/file/p14834966/XmlSerializer.java XmlSerializer.java

5)
/geonetwork/branches/2.1.x/src/org/fao/geonet/services/metadata/EditUtils.java

I just update the call to updateMetadata to add the id of the current user
connected

See the code source below :

http://www.nabble.com/file/p14834966/EditUtils.java EditUtils.java

6)
/geonetwork/branches/2.1.x/web/geonetwork/xsl/search-results-xhtml.xsl
/geonetwork/branches/2.1.x/web/geonetwork/xsl/search-results.xsl

Add part to display the new fields

<!-- createDate & owner-->
<xsl:if test="$metadata/geonet:info/createDate">
  <tr>
  <th class="padded" valign="top"><xsl:value-of
select="/root/gui/strings/created"/></th>
  <td class="padded" valign="top" colspan="2">
  <xsl:for-each select="$metadata/geonet:info/createDate">
    <xsl:value-of select="."/>
  </xsl:for-each>
  <xsl:if test="$metadata/geonet:info/ownernamesurname">
    &#160; <xsl:value-of select="/root/gui/strings/author"/>&#160;
     mailto:{$metadata/geonet:info/owneremail} <xsl:value-of
select="$metadata/geonet:info/ownernamesurname"/>
  </xsl:if>
  </td>
  </tr>
</xsl:if>
<!-- changeDate & updater -->
<xsl:if test="$metadata/geonet:info/changeDate">
  <tr>
  <th class="padded" valign="top"><xsl:value-of
select="/root/gui/strings/updated"/></th>
  <td class="padded" valign="top" colspan="2">
  <xsl:for-each select="$metadata/geonet:info/changeDate">
    <xsl:value-of select="."/>
  </xsl:for-each>
  <xsl:if test="$metadata/geonet:info/updaternamesurname">
    &#160; <xsl:value-of select="/root/gui/strings/author"/>&#160;
     mailto:{$metadata/geonet:info/updateremail} <xsl:value-of
select="$metadata/geonet:info/updaternamesurname"/>
  </xsl:if>
  </td>
  </tr>
</xsl:if>

http://www.nabble.com/file/p14834966/search-results.xsl search-results.xsl
http://www.nabble.com/file/p14834966/search-results-xhtml.xsl
search-results-xhtml.xsl

7)
/geonetwork/branches/2.1.x/web/geonetwork/loc/en/xml/strings.xml
I update the strings.xml file for english and french to add the field bellow
<author>Author</author>
<created>Created</created>
<updated>Updated</updated>

Expecting that can be interesting for someone.

Fabien Bachraty, INRA Avignon

FBachraty wrote:

Dear All,

I would like to propose the idea of an improvement to the actual
Geonetwork 2.1.

The Geonetwork tool is oriented for an internet use, So for the
administrators it will be very interesting to know who create the
metadatas, and who do the last update on them for the geonetwork local
node. ( For controlling publication content as example )

So a simple Workflow functionality, witch just save the user id of the
metadata creator and metadata updater, will permit to display for the
administrators and users administrators, complementary and very
interesting information about the metadata like :

    - Creation Date : User Groups - User <with email link>
    - Update Date : User Groups - User <with email link>

Maybe a more complex development phase for validation content, metadata
versioning and other workflow's functionalities can be envisaged in a
second time?

What are you (Users, Administrators , Developers ) thinking about ?

Cordially Fabien BACHRATY
INRA Avignon France

--
View this message in context: http://www.nabble.com/Functionality-improvement-%3A-Metadata-Workflow-tp12975916s18419p14834966.html
Sent from the geonetwork-users mailing list archive at Nabble.com.

Hi Fabien,
Thanks for the suggested change. It would be good to hear if others also think this is a useful change. Once you see there's enough interest, I suggest you convert this into a proposal if you wish to see this go into the core of GeoNetwork.
Once that proposal is ready and you can implement it, we will make a motion to the Project Steering Committee. If it gets accepted you can get the changes into the code.
We can at that point discuss SVN access for you to apply the changes yourself (this also requires a motion).
Ciao,
Jeroen

On Jan 15, 2008, at 10:27 AM, FBachraty wrote:

Hello,

I know that this post will be better placed in the devel part but it is also
the answer of my previous question. That's why I publish here my code
source.

I have implemented a simple workflow using the code source of the release
2.1.
I do it because i wish to simplify the control of the metadata change :
  That permit to know who is the owner,who is the last updater and also the
date of creation and update of the the metadata using the Geonetwork web
interface.

The creation date and update date are displayed for all on the main search
page and on the last result page.

http://www.nabble.com/file/p14834966/1.jpg

And when you are logged in administrator or reviewer profile the
supplemental informations of owner name and updater name are displayed like
below

http://www.nabble.com/file/p14834966/2.jpg

And it is possible to contact the author clicking on his name.

The limit of the solution is when the user who make the last update is
deleted,
I do not add constraint between metadata table and user table for the last
updater.
So if a user is deleted the link will be breaked and the information can't
be displayed, so i display a “-”.
I do not display the group of the owner or the group of the updater because
user can be member of many groups.

Hi Jeroen,

I confess that i do not know the procedure used with Geonetwork to make
proposal.
In fact i do my first post in 1 October to see if that idea interest others,
but i have no feedback.

But this functionality was mandatory for my European project (The person who
publish is responsible of the content ), and so I do not wait, as you see i
have already implement it.

So I just publish the implementation for people interested and obviously for
the GN team to not do the work twice if they are interested too.

Concerning how to do proposal and SVN access to apply the changes in the
core, i am interesting to learn how this work, for this one if you want, and
for futures ideas :wink:

Fabien.

Jeroen Ticheler-3 wrote:

Hi Fabien,
Thanks for the suggested change. It would be good to hear if others
also think this is a useful change. Once you see there's enough
interest, I suggest you convert this into a proposal if you wish to
see this go into the core of GeoNetwork.
Once that proposal is ready and you can implement it, we will make a
motion to the Project Steering Committee. If it gets accepted you can
get the changes into the code.
We can at that point discuss SVN access for you to apply the changes
yourself (this also requires a motion).
Ciao,
Jeroen

--
View this message in context: http://www.nabble.com/Functionality-improvement-%3A-Metadata-Workflow-tp12975916s18419p14835839.html
Sent from the geonetwork-users mailing list archive at Nabble.com.

Hi Fabien, some comments for discussion
FBachraty wrote:

Hello,

I know that this post will be better placed in the devel part but it is also
the answer of my previous question. That's why I publish here my code
source.

I have implemented a simple workflow using the code source of the release
2.1.
I do it because i wish to simplify the control of the metadata change :
  That permit to know who is the owner,who is the last updater and also the
date of creation and update of the the metadata using the Geonetwork web
interface.

Instead of adding a link between metadata and user table, to get the
author/updater of the metadata, you could use the metadata itself (ie.
the XML document). In the metadata section (in "advanced view",
"metadata" tab), you could add one or more metadata author. Then maybe
role could have been used to make a distinction between the main author
and other contributors. This will also allow to have more than 2
contributors to the metadata...

Updating automatically the XML metadata author when editing using
information comming from the user table could be a nice feature also !

my two cents

Francois

The creation date and update date are displayed for all on the main search
page and on the last result page.

http://www.nabble.com/file/p14834966/1.jpg

And when you are logged in administrator or reviewer profile the
supplemental informations of owner name and updater name are displayed like
below

http://www.nabble.com/file/p14834966/2.jpg

And it is possible to contact the author clicking on his name.

The limit of the solution is when the user who make the last update is
deleted,
I do not add constraint between metadata table and user table for the last
updater.
So if a user is deleted the link will be breaked and the information can't
be displayed, so i display a “-”.
I do not display the group of the owner or the group of the updater because
user can be member of many groups.

(
The SQL Select is not optimised in order that the metadata will not
disappear when user who make the last update was deleted and to display a
“-” in front of a null field for the author
i use :

SELECT schemaId, createDate, changeDate, owner, lastupdater, source,
isTemplate, title, uuid, isHarvested,
Coalesce ((select name || ' ' ||surname from users where users.id =
Metadata.owner),'-') as userowner,
Coalesce ((select email from users where users.id = Metadata.owner ),'') as
owneremail,
Coalesce ((select name || ' ' ||surname from users where users.id =
Metadata.lastupdater),'-') as userupdater,
Coalesce ((select email from users where users.id = Metadata.lastupdater
),'') as updateremail
FROM Metadata WHERE Metadata.id = ?

)
1)
In the database i have added a field in the table Metadata to manage the Id
of the last updater
The owner id, the create date and the update date are already present on the
database.

ALTER TABLE metadata ADD lastupdater integer NOT NULL;

The default value can be '1' if you want as example that the lastupdater
point to the administrator for the existing metadata, you can also delete
the not null constraint and the “-” will be displayed.

2 )
in /geonetwork/branches/2.1.x/src/org/fao/geonet/constants/Edit.java
i add the fallowing constant.

public static final String OWNER = "owner";
public static final String UPDATER = "updater";
public static final String OWNER_NAME_SURNAME = "ownernamesurname";
public static final String UPDATE_NAME_SURNAME = "updaternamesurname";
public static final String OWNER_EMAIL = "owneremail";
public static final String UPDATE_EMAIL = "updateremail";

See the code source below :

http://www.nabble.com/file/p14834966/Edit.java Edit.java

3 )
in /geonetwork/branches/2.1.x/src/org/fao/geonet/kernel/DataManager.java

I have update the function updateMetadata to manage the the metadata updater
id.
Some overload have been created ...
I have update the function builInfoElem to manage the element present on the
xml sent to the xsl for the main search and last result page.
It update the select function to get and make directly the link between user
id and first and last name and their email.

See the code source below :

http://www.nabble.com/file/p14834966/DataManager.java DataManager.java

4)
/geonetwork/branches/2.1.x/src/org/fao/geonet/kernel/XmlSerializer.java

I have update the insert function to manage the new field lastupdater as a
copy of the owner at the create phases.
And also the update function to save the identifiant of the updater.

See the code source below :

http://www.nabble.com/file/p14834966/XmlSerializer.java XmlSerializer.java

5)
/geonetwork/branches/2.1.x/src/org/fao/geonet/services/metadata/EditUtils.java

I just update the call to updateMetadata to add the id of the current user
connected

See the code source below :

http://www.nabble.com/file/p14834966/EditUtils.java EditUtils.java

6)
/geonetwork/branches/2.1.x/web/geonetwork/xsl/search-results-xhtml.xsl
/geonetwork/branches/2.1.x/web/geonetwork/xsl/search-results.xsl

Add part to display the new fields

<!-- createDate & owner-->
<xsl:if test="$metadata/geonet:info/createDate">
  <tr>
  <th class="padded" valign="top"><xsl:value-of
select="/root/gui/strings/created"/></th>
  <td class="padded" valign="top" colspan="2">
  <xsl:for-each select="$metadata/geonet:info/createDate">
    <xsl:value-of select="."/>
  </xsl:for-each>
  <xsl:if test="$metadata/geonet:info/ownernamesurname">
    &#160; <xsl:value-of select="/root/gui/strings/author"/>&#160;
     mailto:{$metadata/geonet:info/owneremail} <xsl:value-of
select="$metadata/geonet:info/ownernamesurname"/>
  </xsl:if>
  </td>
  </tr>
</xsl:if>
<!-- changeDate & updater -->
<xsl:if test="$metadata/geonet:info/changeDate">
  <tr>
  <th class="padded" valign="top"><xsl:value-of
select="/root/gui/strings/updated"/></th>
  <td class="padded" valign="top" colspan="2">
  <xsl:for-each select="$metadata/geonet:info/changeDate">
    <xsl:value-of select="."/>
  </xsl:for-each>
  <xsl:if test="$metadata/geonet:info/updaternamesurname">
    &#160; <xsl:value-of select="/root/gui/strings/author"/>&#160;
     mailto:{$metadata/geonet:info/updateremail} <xsl:value-of
select="$metadata/geonet:info/updaternamesurname"/>
  </xsl:if>
  </td>
  </tr>
</xsl:if>

http://www.nabble.com/file/p14834966/search-results.xsl search-results.xsl
http://www.nabble.com/file/p14834966/search-results-xhtml.xsl
search-results-xhtml.xsl

7)
/geonetwork/branches/2.1.x/web/geonetwork/loc/en/xml/strings.xml
I update the strings.xml file for english and french to add the field bellow
<author>Author</author>
<created>Created</created>
<updated>Updated</updated>

Expecting that can be interesting for someone.

Fabien Bachraty, INRA Avignon

FBachraty wrote:

Dear All,

I would like to propose the idea of an improvement to the actual
Geonetwork 2.1.

The Geonetwork tool is oriented for an internet use, So for the
administrators it will be very interesting to know who create the
metadatas, and who do the last update on them for the geonetwork local
node. ( For controlling publication content as example )

So a simple Workflow functionality, witch just save the user id of the
metadata creator and metadata updater, will permit to display for the
administrators and users administrators, complementary and very
interesting information about the metadata like :

    - Creation Date : User Groups - User <with email link>
    - Update Date : User Groups - User <with email link>

Maybe a more complex development phase for validation content, metadata
versioning and other workflow's functionalities can be envisaged in a
second time?

What are you (Users, Administrators , Developers ) thinking about ?

Cordially Fabien BACHRATY
INRA Avignon France

Hi Everyone,
After a fairly painful upgrade process, I have managed to get Geonetwork 2.1 up and running again, for the most part. Thanks for all the hard work to the developers! A few more problems, but I will send this later in a seperate mail. :slight_smile:

I have a quick question regarding the behavior of the search window. Currently when I type in a search field in the simple search window (labeled What? in the stock version) and press return, nothing happens, and the page simply reloads. This was not the behavior of the previous version. When I press the "Search" button, everything works fine, and my search results are returned. It would seem that the runSimpleSearch(); function is being run twice. When I use Firebug to step through the Javascript, I actually get some metadata which then disappears, once the runSimpleSearch function is executed again.

Javascript is not my forte, so any help would be appreciated.

My geonetwork is up at http://www.who.int/geoentwork for reference.

Thanks and best regards,
Jason

Hi,

Francois-Xavier Prunayre-2 wrote:

Instead of adding a link between metadata and user table, to get the
author/updater of the metadata, you could use the metadata itself (ie. the
XML document).
In the metadata section (in "advanced view", "metadata" tab), you could
add one or more metadata author.
Then maybe role could have been used to make a distinction between the
main author and other contributors.
This will also allow to have more than 2 contributors to the metadata...

Yes it could be interesting to have the complete list of all contributors
and why not also the date of update for all contributions.

We can think that it can also be interesting to have a real versionning
management.
  With saving of older version
  With diff functionality
  And possibility to go back if necessary.

We also can think about a real validation workflow that allow metadata to be
available only if they are validated by the reviewers.
( The major problem for me is that for the moment the reviewer can allow the
publish authorisation on the internet, but there is no tag on metadata to
make focus on metadata not reviewed. The reviewer connected don't know the
new metadata or updated metadata he have to control, and moreover if a
metadata is allowed for internet the editor can update it after with no
control !
To do it well it induce the management of two version one publish and one in
validation waiting ).

But i think some of this point need an important development work.
I don't know what is the priority :

Maybe the point concerning the tag to advertise the reviewer of new created
and updated metadata ?

Francois-Xavier Prunayre-2 wrote:

Updating automatically the XML metadata author when editing using
information coming from the user table could be a nice feature also ! my
two cents Francois

It's a good idea but as example a reviewer update a metadata but is not
necessary considered as an author.

Best Regards,
Fabien Bachraty
--
View this message in context: http://www.nabble.com/Functionality-improvement-%3A-Metadata-Workflow-tp12975916s18419p14875970.html
Sent from the geonetwork-users mailing list archive at Nabble.com.

Hi list!

I have a problem when I try to perform a spatial search in the Intermap embedded map. It seems that if the metadata extent is "narrow" (the bounding box is "small"), then if I select an area that overlaps that extent by a little (but actually overlaps it!), I have no results. On the other hand, if the selected area is large enough, then I get the enclosed metadata.

e.g.: in my geonetwork installation, which is located

http://195.251.137.115:8080/geonetwork/ (login + password: admin)

I have a metadata located (metadata ID: ID0003) at

North bound latitude: 39.15154, West bound longitude: 26.08592, East bound longitude: 26.11581,
  South bound latitude: 39.10866

but if I go to a little larger extent and do a spatial search, e.g. N: 40, W: 25, E: 27, S: 38, region: any, I get no result, whereas if I make the spatial box larger, e.g. N: 42, W: 20, E: 28, S: 35. This extent is very large, though, but encloses the extent of Greece, which is the country that the metadata is located.

Does this mean that the spatial search functionality has a bug, or do I make a mistake in my spatial searches? Do I have to add a new region in order to perform "finer" spatial searches?

Thanx a lot!

Mimis