Hello all,
Here a fast overview about some recents works done on geonetwork for our
particulars needs and also fixs.
If you are interested on some of this work I can publish the files updated.
1 ) autorisation management
Change the way of autorisation management because we want that editor can
publish metadata and data to the groups they are not member
--- src/org/fao/geonet/services/metadata/GetAdminOper.java (révision 1371)
+++ src/org/fao/geonet/services/metadata/GetAdminOper.java (copie de
travail)
@@ -106,13 +106,16 @@
String sGrpId = el.getChildText("id");
+ //fbachraty unmask not member group for authorisation setting for
reviewer and editor
+ /*
if (!userGroups.contains(sGrpId))
{
el.detach();
i--;
continue;
}
-
+ */
+
int grpId = Integer.parseInt(sGrpId);
String query = "SELECT operationId FROM OperationAllowed WHERE
metadataId=? AND groupId=?";
http://www.nabble.com/file/p18356140/groupautorisation.jpg
2 ) Group search
For me there is a problem in the group search on geonetwork 2.2 because
there is a confusion between group and groupowner in the lucene indexation.
Group represent the autorisation for a group (_op0) on the metadata and
groupowner is the group how is the owner of the metadata, so for the group
search this is what we are looking for, isn't it ?
Anyway the 2.2 release dont manage the group_owner parameters.
I update it to do that.
The list of all available group must also be available for all user even if
they are not member of the group...
I make some changes on
-/src/org/fao/geonet/kernel/search/LuceneSearcher.java
To delete the original group element and a new one with the term groupowner
@@ -201,6 +204,16 @@
Dbms dbms = (Dbms)
srvContext.getResourceManager().open(Geonet.Res.MAIN_DB);
Set<String> hs = gc.getAccessManager().getUserGroups(dbms,
srvContext.getUserSession(), srvContext.getIpAddress());
+ //F Bachraty update the group selection parameter to search distinct
group owner
+ if ( request.getChildText("group") != null )
+ {
+ //add groupowner not group
+ request.addContent(new
Element("groupowner").setText(request.getChildText("group")));
+ //delete the original group element
+ request.removeContent( request.getChild("group") );
+ }
+ //F Bachraty update the group selection parameter to search distinct
group owner
+
for (String group : hs)
request.addContent(new Element("group").addContent(group));
+/src/org/fao/geonet/guiservices/groups/Getall.java
The search form call the get mine service to get the group of the user, i
create a GetAll.java file to implement the same service to get all groups.
And i change the config.xml file
-/geonetwork/branches/2.2.x/web/geonetwork/WEB-INF/Config.xml
@@ -200,7 +213,7 @@
<output sheet="searchform_advanced.xsl">
<call name="searchDefaults" class=".guiservices.search.GetDefaults" />
<call name="keywords" class=".guiservices.keywords.Get" />
- <call name="groups" class=".guiservices.groups.GetMine" />
+ <call name="groups" class=".guiservices.groups.GetAll" />
<call name="services" class="jeeves.guiservices.services.Get" />
To link the search embeded service to the GetAll service.
-/web/geonetwork/WEB-INF/Config.xml
And i update the lucene.xsl file to customise the lucene query
-/web/geonetwork/xml/search/lucene.xsl
@@ -248,6 +248,17 @@
</BooleanQuery>
</BooleanClause>
+ <!-- F Bachraty Update lucene query to manage groupowner parameters-->
+ <xsl:for-each select="/request/groupowner">
+ <BooleanClause required="true" prohibited="false">
+ <BooleanQuery>
+ <BooleanClause required="true" prohibited="false">
+ <TermQuery fld="_groupOwner" txt="{string(.)}"/>
+ </BooleanClause>
+ </BooleanQuery>
+ </BooleanClause>
+ </xsl:for-each>
+ <!-- F Bachraty Update lucene query to manage groupowner parameters-->
</xsl:otherwise>
3 ) workflow management
src :
-/home/fbachraty/Geonetwork/geonetwork/branches/2.1.x/src/org/fao/geonet/constants/Edit.java
-/home/fbachraty/Geonetwork/geonetwork/branches/2.1.x/src/org/fao/geonet/kernel/DataManager.java
-/home/fbachraty/Geonetwork/geonetwork/branches/2.1.x/src/org/fao/geonet/kernel/XmlSerializer.java
-/home/fbachraty/Geonetwork/geonetwork/branches/2.1.x/src/org/fao/geonet/services/metadata/EditUtils.java
web :
-/home/fbachraty/Geonetwork/geonetwork/branches/2.1.x/web/geonetwork/loc/en/xml/strings.xml
-/home/fbachraty/Geonetwork/geonetwork/branches/2.1.x/web/geonetwork/loc/fr/xml/strings.xml
-/home/fbachraty/Geonetwork/geonetwork/branches/2.1.x/web/geonetwork/xsl/search-results-xhtml.xsl
-/home/fbachraty/Geonetwork/geonetwork/branches/2.1.x/web/geonetwork/xsl/search-results.xsl
A little too long for me to describe the change but that part complete a
previous post i do before on workflow :
For reviewer, useradmin and administrator we display supplemental
information on the result
they can have information on metadata editor and what is the status of
medata review and data publication :
For us a metadata is reviewed if the last updater is admin,reviewer or user
admin.
Metadata dark green : Metadata reviewed and publish on internet
Metadata green : Metadata reviewed and publish in all internal groups
Metadata orange : Reviewed but not publish for all internal groups
Metadata red : not reviewed
Data dark green : data present and download available for internet
Data green : data present and download available for all internal groups
Data orange : data present and download not available for internal groups or
data not present
Data red : data present but not shared 18 month after the metadata creation.
To complete this part when an editor save a metadata the publish
autorisation for internet and intranet is deleted, and the autorisation
publish for all internal group is set.
When a reviewer, or admin save a metadata the autorisation of publication is
also set for internet group.
4 ) delete button in red
There is confusion for the users betweens add button and delete button
because it's use cross symbole in the both case.
Very simple but very usefull for the user !
5 ) Thesaurus and term definition
The definition wasnt' diplayed every time on thesaurus consultation.
The first term displayed using the thesaurus seach engine display the
definition but related term dont.
--- src/org/fao/geonet/kernel/search/KeywordsSearcher.java (révision 1371)
+++ src/org/fao/geonet/kernel/search/KeywordsSearcher.java (copie de
travail)
@@ -93,6 +93,13 @@
if (value != null) {
sValue = value.toString();
}
+
+ // fbachraty add definition in id search
+ Value def = resultsTable.getValue(0, 1);
+ String sDef = "";
+ if (def != null) {
+ sDef = def.toString();
+ }
// uri (= id in RDF file != id in list)
Value uri = resultsTable.getValue(0, 2);
@@ -102,7 +109,7 @@
}
KeywordBean kb = new KeywordBean(idKeyword, sValue,
- "", sUri, "", "", "", "",
+ sDef, sUri, "", "", "", "",
sThesaurusName, false, _lang);
idKeyword++;
6 ) Thesaurus display with metadata etidion
sources :
-/home/fbachraty/Geonetwork/geonetwork/branches/2.1.x/src/org/fao/geonet/constants/Edit.java
-/home/fbachraty/Geonetwork/geonetwork/branches/2.1.x/src/org/fao/geonet/kernel/DataManager.java
-/home/fbachraty/Geonetwork/geonetwork/branches/2.1.x/src/org/fao/geonet/kernel/XmlSerializer.java
-/home/fbachraty/Geonetwork/geonetwork/branches/2.1.x/src/org/fao/geonet/services/metadata/EditUtils.java
config web :
-/home/fbachraty/Geonetwork/geonetwork/branches/2.1.x/web/geonetwork/loc/en/xml/strings.xml
-/home/fbachraty/Geonetwork/geonetwork/branches/2.1.x/web/geonetwork/loc/fr/xml/strings.xml
-/home/fbachraty/Geonetwork/geonetwork/branches/2.1.x/web/geonetwork/xsl/search-results-xhtml.xsl
-/home/fbachraty/Geonetwork/geonetwork/branches/2.1.x/web/geonetwork/xsl/search-results.xsl
One more time it's a little long but i can send this file if necessary.
I have already post some work to update the thesaurus search engine to do
related, broader and narrower search with keyword, and also how to update
the script to display the definition and the origine of keyword during the
edition.
Here is a little complement using the thesaurus display of the tool to help
user during the keyword typing in. (help them to know what are the available
words in a thesaurus)
One probleme here in the conception of geonetwork is the fact that the same
service is used to consult and to edit metadata.
I update the web/geonetwork/xml/user-profiles.xml to allow editor to use the
thesaurus consultation
<allow service="thesaurus.editelement"/>
But that is not perfect because editor are allowed to update the
thesaurus...
A second problem is du to the fact that there is no keyword id on metadata
for the moment i implement supplemental service to find keyword by keyword
starting with broader and after with narrower ( and not by id as it is done
on thesaurus classic search ).
Anyway that is not too bad and the result look usefull for editor because
just clicking right a keyword during the metadata edition, they can see what
are the narrower elements availables.
7 ) Password encryption
-/home/fbachraty/Geonetwork/geonetwork/branches/2.2.x/src/org/fao/geonet/services/login/Login.java
-/home/fbachraty/Geonetwork/geonetwork/branches/2.2.x/src/org/fao/geonet/services/user/PwUpdate.java
-/home/fbachraty/Geonetwork/geonetwork/branches/2.2.x/src/org/fao/geonet/services/user/Update.java
-/home/fbachraty/Geonetwork/geonetwork/branches/2.2.x/src/org/fao/geonet/services/util/MainUtil.java
I also change the password encryption in order to be able to read them with
php and md5
Thats all for the moment,
Expecting that can be usefull ...
Regards,
Fabien Bachraty
--
View this message in context: http://www.nabble.com/Some-customisation-work-done-tp18356140p18356140.html
Sent from the geonetwork-devel mailing list archive at Nabble.com.