001 //$HeadURL: https://svn.wald.intevation.org/svn/deegree/base/branches/2.4_testing/src/org/deegree/ogcwebservices/wfs/operation/transaction/Native.java $
002 /*----------------------------------------------------------------------------
003 This file is part of deegree, http://deegree.org/
004 Copyright (C) 2001-2009 by:
005 Department of Geography, University of Bonn
006 and
007 lat/lon GmbH
008
009 This library is free software; you can redistribute it and/or modify it under
010 the terms of the GNU Lesser General Public License as published by the Free
011 Software Foundation; either version 2.1 of the License, or (at your option)
012 any later version.
013 This library is distributed in the hope that it will be useful, but WITHOUT
014 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
015 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
016 details.
017 You should have received a copy of the GNU Lesser General Public License
018 along with this library; if not, write to the Free Software Foundation, Inc.,
019 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
020
021 Contact information:
022
023 lat/lon GmbH
024 Aennchenstr. 19, 53177 Bonn
025 Germany
026 http://lat-lon.de/
027
028 Department of Geography, University of Bonn
029 Prof. Dr. Klaus Greve
030 Postfach 1147, 53001 Bonn
031 Germany
032 http://www.geographie.uni-bonn.de/deegree/
033
034 e-mail: info@deegree.org
035 ----------------------------------------------------------------------------*/
036 package org.deegree.ogcwebservices.wfs.operation.transaction;
037
038 import java.util.List;
039
040 import org.deegree.datatypes.QualifiedName;
041 import org.w3c.dom.Element;
042
043 /**
044 * Represents a <code>Native</code> operation as a part of a {@link Transaction} request.
045 *
046 * @author <a href="mailto:deshmukh@lat-lon.de">Anup Deshmukh </a>
047 * @author <a href="mailto:schneider@lat-lon.de">Markus Schneider </a>
048 * @author last edited by: $Author: mschneider $
049 *
050 * @version $Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18. Jun 2009) $
051 */
052 public class Native extends TransactionOperation {
053
054 private Element vendorSpecificData;
055
056 private String vendorId;
057
058 private boolean safeToIgnore;
059
060 /**
061 * Creates a new <code>Native</code> instance.
062 *
063 * @param handle
064 * optional identifier for the operation (for error messsages)
065 * @param vendorSpecificData
066 * vendor specific information (as a DOM element)
067 * @param vendorId
068 * vendor identifier
069 * @param safeToIgnore
070 * true, if the operation may be ignored without problems, false if the surrounding
071 * request depends on it (and must fail if the native operation cannot be executed)
072 */
073 public Native( String handle, Element vendorSpecificData, String vendorId, boolean safeToIgnore ) {
074 super( handle );
075 this.vendorSpecificData = vendorSpecificData;
076 this.vendorId = vendorId;
077 this.safeToIgnore = safeToIgnore;
078 }
079
080 /**
081 * Returns the vendor specific data that describes the operation to be performed.
082 *
083 * @return the vendor specific data that describes the operation to be performed.
084 */
085 public Element getVendorSpecificData() {
086 return this.vendorSpecificData;
087 }
088
089 /**
090 * Returns the vendor identifier.
091 *
092 * @return the vendor identifier.
093 */
094 public String getVendorId() {
095 return this.vendorId;
096 }
097
098 /**
099 * Returns whether the surrounding transaction request must fail if the operation can
100 * not be executed.
101 *
102 * @return true, if the operation may be ignored safely, false otherwise.
103 */
104 public boolean isSafeToIgnore() {
105 return this.safeToIgnore;
106 }
107
108 /**
109 * Returns the names of the feature types that are affected by the operation.
110 *
111 * @return the names of the affected feature types.
112 */
113 @Override
114 public List<QualifiedName> getAffectedFeatureTypes() {
115 throw new UnsupportedOperationException( "getAffectFeatureTypes() is not supported "
116 + "for Native operations." );
117 }
118 }