<commit_before>//$HeadURL: svn+ssh://ms<EMAIL>@svn.<EMAIL>.<EMAIL>/deegree/base/trunk/resources/eclipse/svn_classfile_header_template.xml $
/*----------------------------------------------------------------------------
 This file is part of deegree, http://deegree.org/
 Copyright (C) 2001-2009 by:
 Department of Geography, University of Bonn
 and
 lat/lon GmbH

 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.,
 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

 Contact information:

 lat/lon GmbH
 Aennchenstr. 19, 53177 Bonn
 Germany
 http://lat-lon.de/

 Department of Geography, University of Bonn
 Prof. Dr. <NAME>ve
 Postfach 1147, 53001 Bonn
 Germany
 http://www.geographie.uni-bonn.de/deegree/

 e-mail: <EMAIL>
 ----------------------------------------------------------------------------*/

package org.deegree.services.wps.describeprocess;

import static org.deegree.commons.xml.CommonNamespaces.XSINS;

import java.util.List;
import java.util.Map;

import javax.xml.bind.JAXBElement;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;

import org.deegree.commons.utils.StringUtils;
import org.deegree.commons.xml.XMLAdapter;
import org.deegree.process.jaxb.java.BoundingBoxInputDefinition;
import org.deegree.process.jaxb.java.BoundingBoxOutputDefinition;
import org.deegree.process.jaxb.java.ComplexFormatType;
import org.deegree.process.jaxb.java.ComplexInputDefinition;
import org.deegree.process.jaxb.java.ComplexOutputDefinition;
import org.deegree.process.jaxb.java.LiteralInputDefinition;
import org.deegree.process.jaxb.java.LiteralOutputDefinition;
import org.deegree.process.jaxb.java.LiteralOutputDefinition.DataType;
import org.deegree.process.jaxb.java.LiteralOutputDefinition.DefaultUOM;
import org.deegree.process.jaxb.java.LiteralOutputDefinition.OtherUOM;
import org.deegree.process.jaxb.java.ProcessDefinition;
import org.deegree.process.jaxb.java.ProcessDefinition.Metadata;
import org.deegree.process.jaxb.java.ProcessletInputDefinition;
import org.deegree.process.jaxb.java.ProcessletOutputDefinition;
import org.deegree.process.jaxb.java.Range;
import org.deegree.process.jaxb.java.ValidValueReference;
import org.deegree.services.wps.WPSProcess;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Responsible for the generation of WPS ProcessDescription documents (responses to describe process requests).
 * 
 * @author <a href="mailto:<EMAIL>"><NAME></a>
 * @author <a href="mailto:<EMAIL>"><NAME></a>
 * @author last edited by: $Author: $
 * 
 * @version $Revision: $, $Date: $
 */
public class DescribeProcessResponseXMLAdapter extends XMLAdapter {

    private static Logger LOG = LoggerFactory.getLogger( DescribeProcessResponseXMLAdapter.class );

    private static final String OGC_NS = "http://www.opengis.net/ogc";

    private static final String OGC_PREFIX = "ogc";

    private static final String OWS_NS = "http://www.opengis.net/ows/1.1";

    private static final String OWS_PREFIX = "ows";

    private static final String WPS_NS = "http://www.opengis.net/wps/1.0.0";

    private static final String WPS_PREFIX = "wps";

    /**
     * Exports the given {@link ProcessDefinition}s as a WPS 1.0.0 compliant <code>wps:ProcessDescriptions</code>
     * element.
     * 
     * @param writer
     * @param processes
     * @param processDefToWSDLUrl
     * @throws XMLStreamException
     */
    public static void export100( XMLStreamWriter writer, List<WPSProcess> processes,
                                  Map<ProcessDefinition, String> processDefToWSDLUrl )
                            throws XMLStreamException {

        writer.writeStartElement( WPS_PREFIX, WPS_NS, "ProcessDescriptions" );
        writer.writeNamespace( WPS_PREFIX, WPS_NS );
        writer.writeNamespace( OWS_PREFIX, OWS_NS );<commit_msg>Adapting XML writers to solve regressions after turning IS_REPAIRING_NAMESPACES off. See http://tracker.deegree.org/deegree-services/ticket/304<commit_after>//$HeadURL: svn+ssh://<EMAIL>/deegree/base/trunk/resources/eclipse/svn_classfile_header_template.xml $
/*----------------------------------------------------------------------------
 This file is part of deegree, http://deegree.org/
 Copyright (C) 2001-2009 by:
 Department of Geography, University of Bonn
 and
 lat/lon GmbH

 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.,
 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

 Contact information:

 lat/lon GmbH
 Aennchenstr. 19, 53177 Bonn
 Germany
 http://lat-lon.de/

 Department of Geography, University of Bonn
 Prof. Dr. <NAME>
 Postfach 1147, 53001 Bonn
 Germany
 http://www.geographie.uni-bonn.de/deegree/

 e-mail: <EMAIL>
 ----------------------------------------------------------------------------*/

package org.deegree.services.wps.describeprocess;

import static org.deegree.commons.xml.CommonNamespaces.XSINS;

import java.util.List;
import java.util.Map;

import javax.xml.bind.JAXBElement;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;

import org.deegree.commons.utils.StringUtils;
import org.deegree.commons.xml.XMLAdapter;
import org.deegree.process.jaxb.java.BoundingBoxInputDefinition;
import org.deegree.process.jaxb.java.BoundingBoxOutputDefinition;
import org.deegree.process.jaxb.java.ComplexFormatType;
import org.deegree.process.jaxb.java.ComplexInputDefinition;
import org.deegree.process.jaxb.java.ComplexOutputDefinition;
import org.deegree.process.jaxb.java.LiteralInputDefinition;
import org.deegree.process.jaxb.java.LiteralOutputDefinition;
import org.deegree.process.jaxb.java.LiteralOutputDefinition.DataType;
import org.deegree.process.jaxb.java.LiteralOutputDefinition.DefaultUOM;
import org.deegree.process.jaxb.java.LiteralOutputDefinition.OtherUOM;
import org.deegree.process.jaxb.java.ProcessDefinition;
import org.deegree.process.jaxb.java.ProcessDefinition.Metadata;
import org.deegree.process.jaxb.java.ProcessletInputDefinition;
import org.deegree.process.jaxb.java.ProcessletOutputDefinition;
import org.deegree.process.jaxb.java.Range;
import org.deegree.process.jaxb.java.ValidValueReference;
import org.deegree.services.wps.WPSProcess;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Responsible for the generation of WPS ProcessDescription documents (responses to describe process requests).
 * 
 * @author <a href="mailto:<EMAIL>"><NAME></a>
 * @author <a href="mailto:<EMAIL>"><NAME></a>
 * @author last edited by: $Author: $
 * 
 * @version $Revision: $, $Date: $
 */
public class DescribeProcessResponseXMLAdapter extends XMLAdapter {

    private static Logger LOG = LoggerFactory.getLogger( DescribeProcessResponseXMLAdapter.class );

    private static final String OGC_NS = "http://www.opengis.net/ogc";

    private static final String OGC_PREFIX = "ogc";

    private static final String OWS_NS = "http://www.opengis.net/ows/1.1";

    private static final String OWS_PREFIX = "ows";

    private static final String WPS_NS = "http://www.opengis.net/wps/1.0.0";

    private static final String WPS_PREFIX = "wps";

    /**
     * Exports the given {@link ProcessDefinition}s as a WPS 1.0.0 compliant <code>wps:ProcessDescriptions</code>
     * element.
     * 
     * @param writer
     * @param processes
     * @param processDefToWSDLUrl
     * @throws XMLStreamException
     */
    public static void export100( XMLStreamWriter writer, List<WPSProcess> processes,
                                  Map<ProcessDefinition, String> processDefToWSDLUrl )
                            throws XMLStreamException {

        writer.setPrefix( WPS_PREFIX, WPS_NS );
        writer.writeStartElement( WPS_NS, "ProcessDescriptions" );
        writer.writeNamespace( WPS_PREFIX, WPS_NS );
        writer.writeNamespace( OWS_PREFIX, OWS_NS );
{'fraction_non_alphanumeric': 0.1257784697508897, 'fraction_numerical': 0.01212188612099644, 'mean_word_length': 3.642746515229737, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 8, 'xml': 12}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '426184', 'n_tokens_mistral': 2731, 'n_tokens_neox': 2607, 'n_words': 691}