From: <hei...@us...> - 2010-08-19 18:11:13
|
Revision: 6423 http://geonetwork.svn.sourceforge.net/geonetwork/?rev=6423&view=rev Author: heikkidoeleman Date: 2010-08-19 18:11:05 +0000 (Thu, 19 Aug 2010) Log Message: ----------- addressing IDE warnings Modified Paths: -------------- trunk/web/src/main/java/org/fao/geonet/apps/CheckLocalizedFiles.java trunk/web/src/main/java/org/fao/geonet/csw/common/CswServer.java trunk/web/src/main/java/org/fao/geonet/csw/common/exceptions/CatalogException.java trunk/web/src/main/java/org/fao/geonet/csw/common/requests/CatalogRequest.java trunk/web/src/main/java/org/fao/geonet/csw/common/requests/GetRecordsRequest.java trunk/web/src/main/java/org/fao/geonet/kernel/DataManager.java Removed Paths: ------------- trunk/web/src/main/java/org/fao/geonet/csw/common/requests/DescribeRecordRequest.java trunk/web/src/main/java/org/fao/geonet/csw/common/requests/GetCapabilitiesRequest.java trunk/web/src/main/java/org/fao/geonet/exceptions/XSDValidationErrorEx.java Modified: trunk/web/src/main/java/org/fao/geonet/apps/CheckLocalizedFiles.java =================================================================== --- trunk/web/src/main/java/org/fao/geonet/apps/CheckLocalizedFiles.java 2010-08-19 17:47:58 UTC (rev 6422) +++ trunk/web/src/main/java/org/fao/geonet/apps/CheckLocalizedFiles.java 2010-08-19 18:11:05 UTC (rev 6423) @@ -31,7 +31,6 @@ import java.io.FilenameFilter; import java.util.Enumeration; import java.util.Hashtable; -import java.util.Iterator; public class CheckLocalizedFiles { @@ -65,61 +64,56 @@ } }); println("additional languages"); - for (int i = 0; i < languages.length; i++) - println("- " + languages[i]); + for (String language1 : languages) { + println("- " + language1); + } println(); // scan main language directory println("main language files"); - Hashtable mlFiles = new Hashtable(); + Hashtable<String, File> mlFiles = new Hashtable<String, File>(); scan(mainLanguageDir, mlFiles); println(); // check additional languages - for (int i = 0; i < languages.length; i++) - { - String language = languages[i]; - File languageDir = new File(languagesDir, language); - Hashtable lFiles = new Hashtable(); - - println("scanning files for language '" + language + "'"); - scan(languageDir, lFiles); - - // for each file in main language directory - for (Enumeration keys = mlFiles.keys(); keys.hasMoreElements(); ) - { - String mlPath = (String)keys.nextElement(); - - // check if file does not exists in localized directory - File lFile = (File)lFiles.get(mlPath); - if (lFile == null) - { - println("**** file " + mlPath + " is missing for language '" + language + "'"); - continue; - } - } - // for each file in localized directory - for (Enumeration keys = lFiles.keys(); keys.hasMoreElements(); ) - { - String lPath = (String)keys.nextElement(); - - println("- " + lPath); - - File lFile = (File)lFiles.get(lPath); - - // check if file does not exists in main language directory - File mlFile = (File)mlFiles.get(lPath); - if (mlFile == null) - { - println("**** extra file " + lPath); - continue; - } - // if file is an XML file compare with main language one - if (lPath.endsWith(".xml")) - compareXML(lFile, mlFile); - } - println(); - } + for (String language : languages) { + File languageDir = new File(languagesDir, language); + Hashtable<String, File> lFiles = new Hashtable<String, File>(); + + println("scanning files for language '" + language + "'"); + scan(languageDir, lFiles); + + // for each file in main language directory + for (Enumeration<String> keys = mlFiles.keys(); keys.hasMoreElements();) { + String mlPath = keys.nextElement(); + + // check if file does not exists in localized directory + File lFile = lFiles.get(mlPath); + if (lFile == null) { + println("**** file " + mlPath + " is missing for language '" + language + "'"); + } + } + // for each file in localized directory + for (Enumeration<String> keys = lFiles.keys(); keys.hasMoreElements();) { + String lPath = keys.nextElement(); + + println("- " + lPath); + + File lFile = lFiles.get(lPath); + + // check if file does not exists in main language directory + File mlFile = mlFiles.get(lPath); + if (mlFile == null) { + println("**** extra file " + lPath); + continue; + } + // if file is an XML file compare with main language one + if (lPath.endsWith(".xml")) { + compareXML(lFile, mlFile); + } + } + println(); + } } private static void compareXML(File lFile, File mlFile) @@ -130,36 +124,30 @@ Element lElem = Xml.loadFile(lFile); // for each root child in mlElem - for (Iterator i = mlElem.getChildren().iterator(); i.hasNext(); ) - { - Element mlChild = (Element)i.next(); - String name = mlChild.getName(); - Namespace ns = mlChild.getNamespace(); - - // check if child not exists in localized document - Element lChild = lElem.getChild(name, ns); - if (lChild == null) - { - println("**** element <" + name + "> is missing"); - println("\t" + Xml.getString(mlChild)); - continue; - } - } + for (Object o : mlElem.getChildren()) { + Element mlChild = (Element) o; + String name = mlChild.getName(); + Namespace ns = mlChild.getNamespace(); + + // check if child not exists in localized document + Element lChild = lElem.getChild(name, ns); + if (lChild == null) { + println("**** element <" + name + "> is missing"); + println("\t" + Xml.getString(mlChild)); + } + } // for each root child in lElem - for (Iterator i = lElem.getChildren().iterator(); i.hasNext(); ) - { - Element lChild = (Element)i.next(); - String name = lChild.getName(); - Namespace ns = lChild.getNamespace(); - - // check if child not exists in main language document - Element mlChild = mlElem.getChild(name, ns); - if (mlChild == null) - { - println("**** extra element <" + name + ">"); - continue; - } - } + for (Object o : lElem.getChildren()) { + Element lChild = (Element) o; + String name = lChild.getName(); + Namespace ns = lChild.getNamespace(); + + // check if child not exists in main language document + Element mlChild = mlElem.getChild(name, ns); + if (mlChild == null) { + println("**** extra element <" + name + ">"); + } + } } catch (Exception e) { @@ -167,18 +155,19 @@ } } - private static void scan(File file, Hashtable paths) + private static void scan(File file, Hashtable<String, File> paths) { scan(file, file.getPath().length() + 1, paths); } - private static void scan(File file, int basePathOffset, Hashtable paths) + private static void scan(File file, int basePathOffset, Hashtable<String, File> paths) { if (file.isDirectory()) { File entries[] = file.listFiles(new RealFilenameFilter()); - for (int i = 0; i < entries.length; i++) - scan(entries[i], basePathOffset, paths); + for (File entry : entries) { + scan(entry, basePathOffset, paths); + } } else { Modified: trunk/web/src/main/java/org/fao/geonet/csw/common/CswServer.java =================================================================== --- trunk/web/src/main/java/org/fao/geonet/csw/common/CswServer.java 2010-08-19 17:47:58 UTC (rev 6422) +++ trunk/web/src/main/java/org/fao/geonet/csw/common/CswServer.java 2010-08-19 18:11:05 UTC (rev 6423) @@ -137,36 +137,31 @@ List<Element> typeNames = null; List<Element> outputFormats = null; - for(Iterator<Element> i = parameters.iterator();i.hasNext();) { - Element parameter = i.next(); - String parameterName = parameter.getAttributeValue("name"); - log("Processing parameter: " + parameterName); - if(parameterName != null && parameterName.equalsIgnoreCase("outputSchema")) { - Element outputSchemaListing = parameter; - outputSchemas = outputSchemaListing.getChildren("Value", Csw.NAMESPACE_OWS); - log("Found " + outputSchemas.size() + " outputSchemas for operation: " + name); - } + for (Element parameter : parameters) { + String parameterName = parameter.getAttributeValue("name"); + log("Processing parameter: " + parameterName); + if (parameterName != null && parameterName.equalsIgnoreCase("outputSchema")) { + outputSchemas = parameter.getChildren("Value", Csw.NAMESPACE_OWS); + log("Found " + outputSchemas.size() + " outputSchemas for operation: " + name); + } - if(parameterName != null && parameterName.equalsIgnoreCase("typeName")) { - Element typeNameListing = parameter; - typeNames = typeNameListing.getChildren("Value", Csw.NAMESPACE_OWS); - log("Found " + typeNames.size() + " typeNames for operation: " + name); - } + if (parameterName != null && parameterName.equalsIgnoreCase("typeName")) { + typeNames = parameter.getChildren("Value", Csw.NAMESPACE_OWS); + log("Found " + typeNames.size() + " typeNames for operation: " + name); + } - if(parameterName != null && parameterName.equalsIgnoreCase("outputFormat")) { - Element outputFormatListing = parameter; - outputFormats = outputFormatListing.getChildren("Value", Csw.NAMESPACE_OWS); - log("Found " + outputFormats.size() + " outputFormats for operation: " + name); - } - } + if (parameterName != null && parameterName.equalsIgnoreCase("outputFormat")) { + outputFormats = parameter.getChildren("Value", Csw.NAMESPACE_OWS); + log("Found " + outputFormats.size() + " outputFormats for operation: " + name); + } + } if(outputSchemas != null) { - for(Iterator<Element> i = outputSchemas.iterator(); i.hasNext();) { - Element outputSchema = i.next(); - String outputSchemaValue = outputSchema.getValue(); - log("Adding outputSchema: " + outputSchemaValue + " to operation: "+ name); - op.outputSchemaList.add(outputSchemaValue); - } + for (Element outputSchema : outputSchemas) { + String outputSchemaValue = outputSchema.getValue(); + log("Adding outputSchema: " + outputSchemaValue + " to operation: " + name); + op.outputSchemaList.add(outputSchemaValue); + } op.choosePreferredOutputSchema(); } else { @@ -174,24 +169,24 @@ } if(typeNames != null) { - for(Iterator<Element> i = typeNames.iterator(); i.hasNext();) { - Element typeName = i.next(); - String typeNameValue = typeName.getValue(); - log("Adding typeName: " + typeNameValue + " to operation: "+ name); - if (typeNameValue != null) op.typeNamesList.add(typeNameValue); - } + for (Element typeName : typeNames) { + String typeNameValue = typeName.getValue(); + log("Adding typeName: " + typeNameValue + " to operation: " + name); + if (typeNameValue != null) { + op.typeNamesList.add(typeNameValue); + } + } } else { log("No typeNames for operation: " + name); } if(outputSchemas != null) { - for(Iterator<Element> i = outputSchemas.iterator(); i.hasNext();) { - Element outputSchema = i.next(); - String outputSchemaValue = outputSchema.getValue(); - log("Adding outputSchema: " + outputSchemaValue + " to operation: "+ name); - op.outputSchemaList.add(outputSchemaValue); - } + for (Element outputSchema : outputSchemas) { + String outputSchemaValue = outputSchema.getValue(); + log("Adding outputSchema: " + outputSchemaValue + " to operation: " + name); + op.outputSchemaList.add(outputSchemaValue); + } op.choosePreferredOutputSchema(); } else { @@ -199,12 +194,11 @@ } if(outputFormats != null) { - for(Iterator<Element> i = outputFormats.iterator(); i.hasNext();) { - Element outputFormat = i.next(); - String outputFormatValue = outputFormat.getValue(); - log("Adding outputFormat: " + outputFormatValue + " to operation: "+ name); - op.outputFormatList.add(outputFormatValue); - } + for (Element outputFormat : outputFormats) { + String outputFormatValue = outputFormat.getValue(); + log("Adding outputFormat: " + outputFormatValue + " to operation: " + name); + op.outputFormatList.add(outputFormatValue); + } op.choosePreferredOutputFormat(); } else { @@ -230,12 +224,11 @@ } else { List<Element> serviceIdentificationMdElems = serviceIdentificationMd.getChildren(); - for(Iterator<Element> i = serviceIdentificationMdElems.iterator();i.hasNext();) { - Element value = i.next(); + for (Element value : serviceIdentificationMdElems) { String valueName = value.getName(); log("Processing value: " + valueName); - if(valueName != null && valueName.equalsIgnoreCase("ServiceTypeVersion")) { - serverVersions.add(value.getValue()); + if (valueName != null && valueName.equalsIgnoreCase("ServiceTypeVersion")) { + serverVersions.add(value.getValue()); } } } @@ -248,13 +241,12 @@ preferenceVersions.add("2.0.1"); preferenceVersions.add("2.0.0"); - for(Iterator<String> i = preferenceVersions.iterator(); i.hasNext();){ - String nextBest = i.next(); - if(serverVersions.contains(nextBest)) { - preferredServerVersion = nextBest; - break; - } - } + for (String nextBest : preferenceVersions) { + if (serverVersions.contains(nextBest)) { + preferredServerVersion = nextBest; + break; + } + } } Modified: trunk/web/src/main/java/org/fao/geonet/csw/common/exceptions/CatalogException.java =================================================================== --- trunk/web/src/main/java/org/fao/geonet/csw/common/exceptions/CatalogException.java 2010-08-19 17:47:58 UTC (rev 6422) +++ trunk/web/src/main/java/org/fao/geonet/csw/common/exceptions/CatalogException.java 2010-08-19 18:11:05 UTC (rev 6423) @@ -123,7 +123,7 @@ //--------------------------------------------------------------------------- - public static void unmarshal(Element response) throws CatalogException, Exception + public static void unmarshal(Element response) throws Exception { if (!response.getName().equals("ExceptionReport")) return; Modified: trunk/web/src/main/java/org/fao/geonet/csw/common/requests/CatalogRequest.java =================================================================== --- trunk/web/src/main/java/org/fao/geonet/csw/common/requests/CatalogRequest.java 2010-08-19 17:47:58 UTC (rev 6422) +++ trunk/web/src/main/java/org/fao/geonet/csw/common/requests/CatalogRequest.java 2010-08-19 18:11:05 UTC (rev 6423) @@ -81,7 +81,9 @@ this.port = port; setMethod(Method.POST); - state.addCookie(cookie); + Cookie cookie = new Cookie(); + HttpState state = new HttpState(); + state.addCookie(cookie); client.setState(state); client.getParams().setCookiePolicy(CookiePolicy.BROWSER_COMPATIBILITY); @@ -173,34 +175,10 @@ //--------------------------------------------------------------------------- - public boolean login(String username, String password) throws IOException, CatalogException, - JDOMException, Exception + //--------------------------------------------------------------------------- + public Element execute() throws Exception { - Element request = new Element("request") - .addContent(new Element("username").setText(username)) - .addContent(new Element("password").setText(password)); - - PostMethod post = new PostMethod(); - - postData = Xml.getString(new Document(request)); - - post.setRequestEntity(new StringRequestEntity(postData, "application/xml", "UTF8")); -// post.setFollowRedirects(true); - post.setPath(loginAddr); - - Element response = doExecute(post); - - if (Csw.NAMESPACE_ENV.getURI().equals(response.getNamespace().getURI())) - response = soapUnembed(response); - - return response.getName().equals("ok"); - } - - //--------------------------------------------------------------------------- - - public Element execute() throws IOException, CatalogException, JDOMException, Exception - { HttpMethodBase httpMethod = setupHttpMethod(); Element response = doExecute(httpMethod); @@ -214,8 +192,31 @@ return response; } - //--------------------------------------------------------------------------- + public boolean login(String username, String password) throws Exception + { + Element request = new Element("request") + .addContent(new Element("username").setText(username)) + .addContent(new Element("password").setText(password)); + + PostMethod post = new PostMethod(); + + postData = Xml.getString(new Document(request)); + + post.setRequestEntity(new StringRequestEntity(postData, "application/xml", "UTF8")); +// post.setFollowRedirects(true); + post.setPath(loginAddr); + + Element response = doExecute(post); + + if (Csw.NAMESPACE_ENV.getURI().equals(response.getNamespace().getURI())) + response = soapUnembed(response); + + return response.getName().equals("ok"); + } + + //--------------------------------------------------------------------------- + public void setCredentials(String username, String password) { this.useAuthent = true; @@ -520,7 +521,9 @@ if (response != null) receivedData += new String(response, "UTF8"); } - catch (UnsupportedEncodingException e) {} + catch (UnsupportedEncodingException e) { + // TODO what's this ? + } } //--------------------------------------------------------------------------- @@ -574,10 +577,8 @@ protected String serverVersion = Csw.CSW_VERSION; // Sets default value private HttpClient client = new HttpClient(); - private HttpState state = new HttpState(); - private Cookie cookie = new Cookie(); - private ArrayList<NameValuePair> alGetParams; + private ArrayList<NameValuePair> alGetParams; //--- transient vars Deleted: trunk/web/src/main/java/org/fao/geonet/csw/common/requests/DescribeRecordRequest.java =================================================================== --- trunk/web/src/main/java/org/fao/geonet/csw/common/requests/DescribeRecordRequest.java 2010-08-19 17:47:58 UTC (rev 6422) +++ trunk/web/src/main/java/org/fao/geonet/csw/common/requests/DescribeRecordRequest.java 2010-08-19 18:11:05 UTC (rev 6423) @@ -1,144 +0,0 @@ -//============================================================================= -//=== Copyright (C) 2001-2007 Food and Agriculture Organization of the -//=== United Nations (FAO-UN), United Nations World Food Programme (WFP) -//=== and United Nations Environment Programme (UNEP) -//=== -//=== This program is free software; you can redistribute it and/or modify -//=== it under the terms of the GNU General Public License as published by -//=== the Free Software Foundation; either version 2 of the License, or (at -//=== your option) any later version. -//=== -//=== This program is distributed in the hope that it will be useful, but -//=== WITHOUT ANY WARRANTY; without even the implied warranty of -//=== MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -//=== General Public License for more details. -//=== -//=== You should have received a copy of the GNU General Public License -//=== along with this program; if not, write to the Free Software -//=== Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA -//=== -//=== Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2, -//=== Rome - Italy. email: geo...@os... -//============================================================================== - -package org.fao.geonet.csw.common.requests; - -import jeeves.server.context.ServiceContext; -import org.fao.geonet.csw.common.Csw; -import org.fao.geonet.csw.common.TypeName; -import org.jdom.Element; - -import java.util.ArrayList; -import java.util.List; - -//============================================================================= - -/** Params: - * - outputFormat (0..1) default is 'application/xml' - * - schemaLanguage (0..1) default is 'XMLSCHEMA' - * - typeName (0..n) - */ - -public class DescribeRecordRequest extends CatalogRequest -{ - private String outputFormat; - private String schemaLang; - - private List<TypeName> alTypeNames = new ArrayList<TypeName>(); - - //--------------------------------------------------------------------------- - //--- - //--- Constructor - //--- - //--------------------------------------------------------------------------- - - public DescribeRecordRequest() { } - - public DescribeRecordRequest(ServiceContext context) { super(context); } - - //--------------------------------------------------------------------------- - //--- - //--- API methods - //--- - //--------------------------------------------------------------------------- - - public void addTypeName(TypeName name) - { - alTypeNames.add(name); - } - - //--------------------------------------------------------------------------- - - public void setOutputFormat(String format) - { - outputFormat = format; - } - - //--------------------------------------------------------------------------- - - public void setSchemaLanguage(String language) - { - schemaLang = language; - } - - //--------------------------------------------------------------------------- - //--- - //--- Protected methods - //--- - //--------------------------------------------------------------------------- - - protected String getRequestName() { return "DescribeRecord"; } - - //--------------------------------------------------------------------------- - - protected void setupGetParams() - { - addParam("request", getRequestName()); - addParam("service", Csw.SERVICE); - addParam("version", getServerVersion()); - - if (outputFormat != null) - addParam("outputFormat", outputFormat); - - if (schemaLang != null) - addParam("schemaLanguage", schemaLang); - - fill("typeName", alTypeNames, Csw.NAMESPACE_CSW.getPrefix() + ":"); - - addParam("namespace", Csw.NAMESPACE_CSW.getPrefix() +":"+ Csw.NAMESPACE_CSW.getURI()); - } - - //--------------------------------------------------------------------------- - - protected Element getPostParams() - { - Element params = new Element(getRequestName(), Csw.NAMESPACE_CSW); - - //--- 'service' and 'version' are common mandatory attributes - params.setAttribute("service", Csw.SERVICE); - params.setAttribute("version", getServerVersion()); - - if (outputFormat != null) - params.setAttribute("outputFormat", outputFormat); - - if (schemaLang != null) - params.setAttribute("schemaLanguage", schemaLang); - - //------------------------------------------------------------------------ - //--- add 'TypeName' elements - - for(TypeName typeName : alTypeNames) - { - Element el = new Element("TypeName", Csw.NAMESPACE_CSW); - el.setText(typeName.toString()); - el.setAttribute("targetNamespace", Csw.NAMESPACE_CSW.getURI()); - - params.addContent(el); - } - - return params; - } -} - -//============================================================================= - Deleted: trunk/web/src/main/java/org/fao/geonet/csw/common/requests/GetCapabilitiesRequest.java =================================================================== --- trunk/web/src/main/java/org/fao/geonet/csw/common/requests/GetCapabilitiesRequest.java 2010-08-19 17:47:58 UTC (rev 6422) +++ trunk/web/src/main/java/org/fao/geonet/csw/common/requests/GetCapabilitiesRequest.java 2010-08-19 18:11:05 UTC (rev 6423) @@ -1,138 +0,0 @@ -//============================================================================= -//=== Copyright (C) 2001-2007 Food and Agriculture Organization of the -//=== United Nations (FAO-UN), United Nations World Food Programme (WFP) -//=== and United Nations Environment Programme (UNEP) -//=== -//=== This program is free software; you can redistribute it and/or modify -//=== it under the terms of the GNU General Public License as published by -//=== the Free Software Foundation; either version 2 of the License, or (at -//=== your option) any later version. -//=== -//=== This program is distributed in the hope that it will be useful, but -//=== WITHOUT ANY WARRANTY; without even the implied warranty of -//=== MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -//=== General Public License for more details. -//=== -//=== You should have received a copy of the GNU General Public License -//=== along with this program; if not, write to the Free Software -//=== Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA -//=== -//=== Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2, -//=== Rome - Italy. email: geo...@os... -//============================================================================== - -package org.fao.geonet.csw.common.requests; - -import jeeves.server.context.ServiceContext; -import org.fao.geonet.csw.common.Csw; -import org.fao.geonet.csw.common.Section; -import org.jdom.Element; - -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -//============================================================================= - -/** Params: - * - sections (0..n) - * - updateSequence (0..1) - * - acceptFormats (0..n) - * - acceptVersions (0..n) - */ - -public class GetCapabilitiesRequest extends CatalogRequest -{ - private String sequence; - - private List<String> alVersions = new ArrayList<String>(); - private List<String> alFormats = new ArrayList<String>(); - private Set<Section> hsSections = new HashSet<Section>(); - - //--------------------------------------------------------------------------- - //--- - //--- Constructor - //--- - //--------------------------------------------------------------------------- - - public GetCapabilitiesRequest() { } - - public GetCapabilitiesRequest(ServiceContext context) { super(context); } - - //--------------------------------------------------------------------------- - //--- - //--- API methods - //--- - //--------------------------------------------------------------------------- - - public void addVersion(String version) - { - alVersions.add(version); - } - - //--------------------------------------------------------------------------- - - public void addSection(Section section) - { - hsSections.add(section); - } - - //--------------------------------------------------------------------------- - - public void addOutputFormat(String format) - { - alFormats.add(format); - } - - //--------------------------------------------------------------------------- - - public void setUpdateSequence(String sequence) - { - this.sequence = sequence; - } - - //--------------------------------------------------------------------------- - //--- - //--- Protected methods - //--- - //--------------------------------------------------------------------------- - - protected String getRequestName() { return "GetCapabilities"; } - - //--------------------------------------------------------------------------- - - protected void setupGetParams() - { - addParam("request", getRequestName()); - addParam("service", Csw.SERVICE); - - if (sequence != null) - addParam("updateSequence", sequence); - - fill("acceptVersions", alVersions); - fill("sections", hsSections); - fill("acceptFormats", alFormats); - } - - //--------------------------------------------------------------------------- - - protected Element getPostParams() - { - Element params = new Element(getRequestName(), Csw.NAMESPACE_CSW); - - params.setAttribute("service", Csw.SERVICE); - - if (sequence != null) - params.setAttribute("updateSequence", sequence); - - fill(params, "AcceptVersions", "Version", alVersions, Csw.NAMESPACE_OWS); - fill(params, "Sections", "Section", hsSections, Csw.NAMESPACE_OWS); - fill(params, "AcceptFormats", "OutputFormat", alFormats, Csw.NAMESPACE_OWS); - - return params; - } -} - -//============================================================================= - Modified: trunk/web/src/main/java/org/fao/geonet/csw/common/requests/GetRecordsRequest.java =================================================================== --- trunk/web/src/main/java/org/fao/geonet/csw/common/requests/GetRecordsRequest.java 2010-08-19 17:47:58 UTC (rev 6422) +++ trunk/web/src/main/java/org/fao/geonet/csw/common/requests/GetRecordsRequest.java 2010-08-19 18:11:05 UTC (rev 6423) @@ -152,27 +152,11 @@ //--------------------------------------------------------------------------- - public void setDistributedSearch(boolean yesno) - { - distribSearch = yesno; - } + //--------------------------------------------------------------------------- - //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- - public void setHopCount(String count) - { - hopCount = count; - } - - //--------------------------------------------------------------------------- - - public void addSortBy(String field, boolean ascend) - { - if (ascend) alSortBy.add(field +":A"); - else alSortBy.add(field +":D"); - } - - //--------------------------------------------------------------------------- + //--------------------------------------------------------------------------- //--- //--- Protected methods //--- Deleted: trunk/web/src/main/java/org/fao/geonet/exceptions/XSDValidationErrorEx.java =================================================================== --- trunk/web/src/main/java/org/fao/geonet/exceptions/XSDValidationErrorEx.java 2010-08-19 17:47:58 UTC (rev 6422) +++ trunk/web/src/main/java/org/fao/geonet/exceptions/XSDValidationErrorEx.java 2010-08-19 18:11:05 UTC (rev 6423) @@ -1,49 +0,0 @@ -//============================================================================= -//=== Copyright (C) 2001-2005 Food and Agriculture Organization of the -//=== United Nations (FAO-UN), United Nations World Food Programme (WFP) -//=== and United Nations Environment Programme (UNEP) -//=== -//=== This library is free software; you can redistribute it and/or -//=== modify it under the terms of the GNU Lesser General Public -//=== License as published by the Free Software Foundation; either -//=== version 2.1 of the License, or (at your option) any later version. -//=== -//=== This library is distributed in the hope that it will be useful, -//=== but WITHOUT ANY WARRANTY; without even the implied warranty of -//=== MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -//=== Lesser General Public License for more details. -//=== -//=== You should have received a copy of the GNU Lesser General Public -//=== License along with this library; if not, write to the Free Software -//=== Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -//=== -//=== Contact: Jeroen Ticheler - FAO - Viale delle Terme di Caracalla 2, -//=== Rome - Italy. email: Geo...@fa... -//============================================================================== - -package org.fao.geonet.exceptions; - -import jeeves.exceptions.JeevesClientEx; - -//============================================================================= - -public class XSDValidationErrorEx extends JeevesClientEx -{ - //-------------------------------------------------------------------------- - //--- - //--- Constructor - //--- - //-------------------------------------------------------------------------- - - public XSDValidationErrorEx(String name) { this(name, null); } - - public XSDValidationErrorEx(String name, Object value) - { - super(name, value); - - id = "xsd-validation-error"; - } -} - -//============================================================================= - Modified: trunk/web/src/main/java/org/fao/geonet/kernel/DataManager.java =================================================================== --- trunk/web/src/main/java/org/fao/geonet/kernel/DataManager.java 2010-08-19 17:47:58 UTC (rev 6422) +++ trunk/web/src/main/java/org/fao/geonet/kernel/DataManager.java 2010-08-19 18:11:05 UTC (rev 6423) @@ -1961,7 +1961,6 @@ Element xsdErrors = getXSDXmlReport(schema,md); if (xsdErrors != null && xsdErrors.getContent().size() > 0) { errorReport.addContent(xsdErrors); - //throw new XSDValidationErrorEx("XSD validation errors detected", xsdXPaths); } // ...then schematrons This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |