From f25a072fd1c3b131d5f2f15689942ca7c55a62c0 Mon Sep 17 00:00:00 2001
From: "(no author)" <(no author)@d688527b-c9ab-4aba-bd8d-4036d912da1d>
Date: Mon, 6 Aug 2007 14:26:08 +0000
Subject: This commit was manufactured by cvs2svn to create tag
'Build-ID-1_4_0'.
git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/tags/Build-ID-1_4_0@907 d688527b-c9ab-4aba-bd8d-4036d912da1d
---
.../server/iaik/xml/Base64TransformationImpl.java | 43 ------
.../server/iaik/xml/ByteArrayDataObjectImpl.java | 54 -------
.../server/iaik/xml/ByteStreamDataObjectImpl.java | 49 ------
.../spss/server/iaik/xml/CanonicalizationImpl.java | 43 ------
.../moa/spss/server/iaik/xml/DataObjectImpl.java | 87 -----------
.../xml/EnvelopedSignatureTransformationImpl.java | 42 ------
.../iaik/xml/ExclusiveCanonicalizationImpl.java | 76 ----------
.../moa/spss/server/iaik/xml/SigningTimeImpl.java | 34 -----
.../spss/server/iaik/xml/TransformationImpl.java | 43 ------
.../spss/server/iaik/xml/XMLDataObjectImpl.java | 46 ------
.../server/iaik/xml/XMLNodeListDataObjectImpl.java | 47 ------
.../moa/spss/server/iaik/xml/XMLSignatureImpl.java | 43 ------
.../moa/spss/server/iaik/xml/XPath2FilterImpl.java | 116 --------------
.../server/iaik/xml/XPath2TransformationImpl.java | 82 ----------
.../server/iaik/xml/XPathTransformationImpl.java | 98 ------------
.../server/iaik/xml/XSLTTransformationImpl.java | 168 ---------------------
16 files changed, 1071 deletions(-)
delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/Base64TransformationImpl.java
delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/ByteArrayDataObjectImpl.java
delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/ByteStreamDataObjectImpl.java
delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/CanonicalizationImpl.java
delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/DataObjectImpl.java
delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/EnvelopedSignatureTransformationImpl.java
delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/ExclusiveCanonicalizationImpl.java
delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/SigningTimeImpl.java
delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/TransformationImpl.java
delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/XMLDataObjectImpl.java
delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/XMLNodeListDataObjectImpl.java
delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/XMLSignatureImpl.java
delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/XPath2FilterImpl.java
delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/XPath2TransformationImpl.java
delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/XPathTransformationImpl.java
delete mode 100644 spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/XSLTTransformationImpl.java
(limited to 'spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml')
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/Base64TransformationImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/Base64TransformationImpl.java
deleted file mode 100644
index e076fe1eb..000000000
--- a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/Base64TransformationImpl.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package at.gv.egovernment.moa.spss.server.iaik.xml;
-
-import iaik.server.modules.xml.Base64Transformation;
-
-/**
- * An implementation of the Base64Transformation
- * Transformation
type.
- *
- * @author Patrick Peck
- * @version $Id$
- */
-public class Base64TransformationImpl
- extends TransformationImpl
- implements Base64Transformation {
-
- /**
- * Create a new Base64TransformationImpl
.
- *
- * @see java.lang.Object#Object()
- */
- public Base64TransformationImpl() {
- setAlgorithmURI(Base64Transformation.BASE64_DECODING);
- }
-
- /**
- * Compare this Base64Transformation
to another.
- *
- * @param other The object to compare thisBase64Transformation
- * to.
- * @return true
, if other
is a
- * Base64Transformation
and the algorithm URIs match, otherwise
- * false
.
- * @see java.lang.Object#equals(Object)
- */
- public boolean equals(Object other) {
- if (other instanceof Base64Transformation) {
- Base64Transformation transform = (Base64Transformation) other;
- return getAlgorithmURI().equals(transform.getAlgorithmURI());
- }
- return false;
- }
-
-}
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/ByteArrayDataObjectImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/ByteArrayDataObjectImpl.java
deleted file mode 100644
index 921b10cb6..000000000
--- a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/ByteArrayDataObjectImpl.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package at.gv.egovernment.moa.spss.server.iaik.xml;
-
-import java.io.ByteArrayInputStream;
-import java.io.InputStream;
-
-import iaik.server.modules.xml.BinaryDataObject;
-
-/**
- * A BinaryDataObject
encapsulating Base64 data.
- *
- * @author Patrick Peck
- * @version $Id$
- */
-public class ByteArrayDataObjectImpl
- extends DataObjectImpl
- implements BinaryDataObject {
-
- /** The binary data contained in this BinaryDataObject
. */
- private byte[] bytes;
-
- /**
- * Create a new ByteArrayDataObjectImpl
.
- *
- * @param bytes The binary data contained in this
- * BinaryDataObject
.
- */
- public ByteArrayDataObjectImpl(byte[] bytes) {
- setBytes(bytes);
- }
-
- /**
- * Set the Base64 data.
- *
- * @param bytes The binary data contained in this
- * BinaryDataObject
.
- */
- public void setBytes(byte[] bytes) {
- this.bytes = bytes;
- }
-
- /**
- * Return the binary data encoded in the Base64 String
as a
- * stream.
- *
- * @return The binary data contained in this object, as a
- * InputStream
. Repeated calls to this function will return a
- * new stream to the Base64 data.
- * @see iaik.server.modules.xml.BinaryDataObject#getInputStream()
- */
- public InputStream getInputStream() {
- return new ByteArrayInputStream(bytes);
- }
-
-}
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/ByteStreamDataObjectImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/ByteStreamDataObjectImpl.java
deleted file mode 100644
index ce400e61a..000000000
--- a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/ByteStreamDataObjectImpl.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package at.gv.egovernment.moa.spss.server.iaik.xml;
-
-import java.io.InputStream;
-
-import iaik.server.modules.xml.BinaryDataObject;
-
-/**
- * A BinaryDataObject
encapsulating binary data from a stream.
- *
- * @author Patrick Peck
- * @version $Id$
- */
-public class ByteStreamDataObjectImpl
- extends DataObjectImpl
- implements BinaryDataObject {
-
- /** The InputStream
containing the binary data. */
- private InputStream inputStream;
-
- /**
- * Create a new ByteStreamDataObjectImpl
.
- *
- * @param inputStream The stream from which to read the binary data.
- */
- public ByteStreamDataObjectImpl(InputStream inputStream) {
- setInputStream(inputStream);
- }
-
- /**
- * Set the input stream from which to read the binary data.
- *
- * @param inputStream The input stream from which to read the binary data.
- */
- public void setInputStream(InputStream inputStream) {
- this.inputStream = inputStream;
- }
-
- /**
- * Return the binary data from this object as a stream.
- *
- * @return The stream containing the binary data. Calling this function
- * repeatedly will always return the same InputStream
.
- * @see iaik.server.modules.xml.BinaryDataObject#getInputStream()
- */
- public InputStream getInputStream() {
- return inputStream;
- }
-
-}
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/CanonicalizationImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/CanonicalizationImpl.java
deleted file mode 100644
index a597b214d..000000000
--- a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/CanonicalizationImpl.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package at.gv.egovernment.moa.spss.server.iaik.xml;
-
-import iaik.server.modules.xml.Canonicalization;
-
-/**
- * An implementation of the CanonicalizationTransform
- * Transformation
type.
- *
- * @author Patrick Peck
- * @version $Id$
- */
-public class CanonicalizationImpl
- extends TransformationImpl
- implements Canonicalization {
-
- /**
- * Create a new CanonicalizationTransformImpl
object.
- *
- * @param algorithmURI The canonicalization algorithm URI.
- */
- public CanonicalizationImpl(String algorithmURI) {
- setAlgorithmURI(algorithmURI);
- }
-
- /**
- * Compare this object to another Canonicalization
.
- *
- * @param other The object to compare this
- * Canonicalization
to.
- * @return true
, if other
is a
- * Canonicalization
and the algorithm URIs match, otherwise
- * false
.
- * @see java.lang.Object#equals(Object)
- */
- public boolean equals(Object other) {
- if (other instanceof Canonicalization) {
- Canonicalization c14n = (Canonicalization) other;
- return getAlgorithmURI().equals(c14n.getAlgorithmURI());
- }
- return false;
- }
-
-}
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/DataObjectImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/DataObjectImpl.java
deleted file mode 100644
index 875d82613..000000000
--- a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/DataObjectImpl.java
+++ /dev/null
@@ -1,87 +0,0 @@
-package at.gv.egovernment.moa.spss.server.iaik.xml;
-
-import iaik.server.modules.xml.DataObject;
-
-/**
- * Abstract base implementation for the classes derived from
- * DataObject
.
- *
- * @author Patrick Peck
- * @version $Id$
- */
-public abstract class DataObjectImpl implements DataObject {
-
- /** The MIME type of the data object. */
- private String mimeType;
- /** The refernce ID. */
- private String referenceID;
- /** The URI of the type. */
- private String typeURI;
- /** The URI identifying the data. */
- private String URI;
-
- /**
- * @see iaik.server.modules.xml.DataObject#getMimeType()
- */
- public String getMimeType() {
- return mimeType;
- }
-
- /**
- * Set the mime type.
- *
- * @param mimeType The mime type to set.
- */
- public void setMimeType(String mimeType) {
- this.mimeType = mimeType;
- }
-
- /**
- * @see iaik.server.modules.xml.DataObject#getReferenceID()
- */
- public String getReferenceID() {
- return referenceID;
- }
-
- /**
- * Set the reference ID.
- *
- * @param referenceID The reference ID.
- */
- public void setReferenceID(String referenceID) {
- this.referenceID = referenceID;
- }
-
- /**
- * @see iaik.server.modules.xml.DataObject#getTypeURI()
- */
- public String getTypeURI() {
- return typeURI;
- }
-
- /**
- * Set the type URI.
- *
- * @param typeURI The type URI.
- */
- public void setTypeURI(String typeURI) {
- this.typeURI = typeURI;
- }
-
- /**
- * @see iaik.server.modules.xml.DataObject#getURI()
- */
- public String getURI() {
- return URI;
- }
-
- /**
- * Set the URI.
- *
- * @param URI The URI.
- */
- public void setURI(String URI) {
- this.URI = URI;
- }
-
-}
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/EnvelopedSignatureTransformationImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/EnvelopedSignatureTransformationImpl.java
deleted file mode 100644
index 41a47d0a1..000000000
--- a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/EnvelopedSignatureTransformationImpl.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package at.gv.egovernment.moa.spss.server.iaik.xml;
-
-import iaik.server.modules.xml.EnvelopedSignatureTransformation;
-
-/**
- * An implementation of the EnvelopedSignatureTransformation
- * Transformation
type.
- *
- * @author Patrick Peck
- * @version $Id$
- */
-public class EnvelopedSignatureTransformationImpl
- extends TransformationImpl
- implements EnvelopedSignatureTransformation {
-
- /**
- * Create a new EnvelopedSignatureTransformationImpl
.
- */
- public EnvelopedSignatureTransformationImpl() {
- setAlgorithmURI(EnvelopedSignatureTransformation.ENVELOPED_SIGNATURE);
- }
-
- /**
- * Compare this object to another EnvelopedSignatureTransformation
.
- *
- * @param other The object to compare this
- * EnvelopedSignatureTransformation
to.
- * @return true
, if other
is a
- * EnvelopedSignatureTransformation
, otherwise
- * false
.
- * @see java.lang.Object#equals(Object)
- */
- public boolean equals(Object other) {
- if (other instanceof EnvelopedSignatureTransformation) {
- EnvelopedSignatureTransformation transform =
- (EnvelopedSignatureTransformation) other;
- return getAlgorithmURI().equals(transform.getAlgorithmURI());
- }
- return false;
- }
-
-}
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/ExclusiveCanonicalizationImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/ExclusiveCanonicalizationImpl.java
deleted file mode 100644
index b38fbe128..000000000
--- a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/ExclusiveCanonicalizationImpl.java
+++ /dev/null
@@ -1,76 +0,0 @@
-package at.gv.egovernment.moa.spss.server.iaik.xml;
-
-import java.util.List;
-
-import iaik.server.modules.xml.ExclusiveCanonicalization;
-
-/**
- * An implementation of the ExclusiveCanonicalization
type
- * of Transformation
.
- *
- * @author Patrick Peck
- * @version $Id$
- */
-public class ExclusiveCanonicalizationImpl
- extends TransformationImpl
- implements ExclusiveCanonicalization {
-
- /** The prefixes of the namespaces to treat according to canonical XML. */
- private List inclusiveNamespacePrefixes;
-
- /**
- * Create a new ExclusiveCanonicalizationImpl
object.
- *
- * @param algorithmURI The exclusive canonicalization algorithm URI.
- * @param inclusiveNamespacePrefixes The namespace prefixes to be processed
- * according to canonical XML.
- */
- public ExclusiveCanonicalizationImpl(
- String algorithmURI,
- List inclusiveNamespacePrefixes) {
- setAlgorithmURI(algorithmURI);
- setInclusiveNamespacePrefixes(inclusiveNamespacePrefixes);
- }
-
- /**
- * Sets the namespace prefixes to be processed according to canonical XML.
- *
- * @param inclusiveNamespacePrefixes The prefixes of the namespaces to treat
- * according to canonical XML.
- */
- protected void setInclusiveNamespacePrefixes(List inclusiveNamespacePrefixes) {
- this.inclusiveNamespacePrefixes = inclusiveNamespacePrefixes;
- }
-
- /**
- * @see iaik.server.modules.xml.ExclusiveCanonicalization#getInclusiveNamespacePrefixes()
- */
- public List getInclusiveNamespacePrefixes() {
- return inclusiveNamespacePrefixes;
- }
-
- /**
- * Compare this object to another CanonicalizationTransform
.
- *
- * @param other The object to compare this
- * ExclusiveCanonicalization
to.
- * @return true
, if other
is a
- * ExclusiveCanonicalization
and the algorithm URIs match,
- * otherwise false
.
- * @see java.lang.Object#equals(Object)
- */
- public boolean equals(Object other) {
- if (other instanceof ExclusiveCanonicalization) {
- ExclusiveCanonicalization eC14n =
- (ExclusiveCanonicalization) other;
- boolean algURIEquals = getAlgorithmURI().equals(eC14n.getAlgorithmURI());
- boolean inclNSPrefs =
- (getInclusiveNamespacePrefixes() == null || getInclusiveNamespacePrefixes().isEmpty())
- ? eC14n.getInclusiveNamespacePrefixes() == null || eC14n.getInclusiveNamespacePrefixes().isEmpty()
- : getInclusiveNamespacePrefixes().equals(eC14n.getInclusiveNamespacePrefixes());
- return algURIEquals && inclNSPrefs;
- }
- return false;
- }
-
-}
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/SigningTimeImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/SigningTimeImpl.java
deleted file mode 100644
index 19ca3dadf..000000000
--- a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/SigningTimeImpl.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package at.gv.egovernment.moa.spss.server.iaik.xml;
-
-import java.util.Date;
-
-import iaik.server.modules.xml.SigningTime;
-
-/**
- * An implementation of the SigningTime
Property
.
- *
- * @author Patrick Peck
- * @version $Id$
- */
-public class SigningTimeImpl implements SigningTime {
-
- /** The signing time. */
- private Date signingTime;
-
- /**
- * Create a new SigningTimeImpl
.
- *
- * @param signingTime The signing time.
- */
- public SigningTimeImpl(Date signingTime) {
- this.signingTime = signingTime;
- }
-
- /**
- * @see iaik.server.modules.xml.SigningTime#getSigningTime()
- */
- public Date getSigningTime() {
- return signingTime;
- }
-
-}
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/TransformationImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/TransformationImpl.java
deleted file mode 100644
index 59a414b69..000000000
--- a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/TransformationImpl.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package at.gv.egovernment.moa.spss.server.iaik.xml;
-
-import iaik.server.modules.xml.Transformation;
-
-/**
- * Base implementation class for Transformation
derived classes.
- *
- * @author Patrick Peck
- * @version $Id$
- */
-public abstract class TransformationImpl implements Transformation {
-
- /** The algorithm URI identifying the transformation algorithm. */
- private String algorithmURI;
-
- /**
- * @see iaik.server.modules.xml.Transformation#getAlgorithmURI()
- */
- public String getAlgorithmURI() {
- return algorithmURI;
- }
-
- /**
- * Sets the algorithm URI.
- *
- * @param algorithmURI The algorithm URI to set.
- */
- protected void setAlgorithmURI(String algorithmURI) {
- this.algorithmURI = algorithmURI;
- }
-
- /**
- * Returns the hash code of the algorithm URI. Should be overridden if a
- * transformation distinguishes itself from others by more than just the
- * algorithm URI.
- *
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return getAlgorithmURI().hashCode();
- }
-
-}
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/XMLDataObjectImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/XMLDataObjectImpl.java
deleted file mode 100644
index bc31d694e..000000000
--- a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/XMLDataObjectImpl.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package at.gv.egovernment.moa.spss.server.iaik.xml;
-
-import org.w3c.dom.Element;
-
-import iaik.server.modules.xml.XMLDataObject;
-
-/**
- * A DataObject
containing a single DOM element.
- *
- * @author Patrick Peck
- * @version $Id$
- */
-public class XMLDataObjectImpl
- extends DataObjectImpl
- implements XMLDataObject {
-
- /** The XML data contained in this XMLDataObject
. */
- private Element element;
-
- /**
- * Create a new XMLDataObjectImpl
.
- *
- * @param element The DOM element contained in this
- * XMLDataObject
.
- */
- public XMLDataObjectImpl(Element element) {
- setElement(element);
- }
-
- /**
- * @see iaik.server.modules.xml.XMLDataObject#getElement()
- */
- public Element getElement() {
- return element;
- }
-
- /**
- * Set the DOM element contained in this XMLDataObject
.
- *
- * @param element The DOM element to set.
- */
- public void setElement(Element element) {
- this.element = element;
- }
-
-}
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/XMLNodeListDataObjectImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/XMLNodeListDataObjectImpl.java
deleted file mode 100644
index c855a922a..000000000
--- a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/XMLNodeListDataObjectImpl.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package at.gv.egovernment.moa.spss.server.iaik.xml;
-
-import org.w3c.dom.NodeList;
-
-import iaik.server.modules.xml.XMLNodeListDataObject;
-
-/**
- * A DataObject
containing a list of DOM nodes.
- *
- * @author Patrick Peck
- * @version $Id$
- */
-public class XMLNodeListDataObjectImpl
- extends DataObjectImpl
- implements XMLNodeListDataObject {
-
- /** The nodes contained in this XMLNodeListDataObject
. */
- private NodeList nodeList;
-
- /**
- * Create a new XMLNodeListDataObjectImpl
.
- *
- * @param nodeList The list of DOM nodes contained in this
- * XMLNodeListDataObject
.
- */
- public XMLNodeListDataObjectImpl(NodeList nodeList) {
- setNodeList(nodeList);
- }
-
- /**
- * Set the list of DOM nodes contained in this
- * XMLNodeListDataObject
.
- *
- * @param nodeList The list of DOM nodes to set.
- */
- public void setNodeList(NodeList nodeList) {
- this.nodeList = nodeList;
- }
-
- /**
- * @see iaik.server.modules.xml.XMLNodeListDataObject#getNodeList()
- */
- public NodeList getNodeList() {
- return nodeList;
- }
-
-}
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/XMLSignatureImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/XMLSignatureImpl.java
deleted file mode 100644
index 4fca907f3..000000000
--- a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/XMLSignatureImpl.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package at.gv.egovernment.moa.spss.server.iaik.xml;
-
-import org.w3c.dom.Element;
-
-import iaik.server.modules.xml.XMLSignature;
-
-/**
- * An object containing an XMLDsig signature in the form of a
- * dsig:Signature
DOM element.
- *
- * @author Patrick Peck
- * @version $Id$
- */
-public class XMLSignatureImpl implements XMLSignature {
- /** The signature DOM element. */
- private Element element;
-
- /**
- * Create a new XMLSignatureImpl
.
- *
- * @param element The dsig:Signature
DOM element.
- */
- public XMLSignatureImpl(Element element) {
- setElement(element);
- }
-
- /**
- * Set the dsig:Signature
DOM element.
- *
- * @param element The dsig:Signature
element to set.
- */
- public void setElement(Element element) {
- this.element = element;
- }
-
- /**
- * @see iaik.server.modules.xml.XMLSignature#getElement()
- */
- public Element getElement() {
- return element;
- }
-
-}
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/XPath2FilterImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/XPath2FilterImpl.java
deleted file mode 100644
index 034d4b653..000000000
--- a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/XPath2FilterImpl.java
+++ /dev/null
@@ -1,116 +0,0 @@
-package at.gv.egovernment.moa.spss.server.iaik.xml;
-
-import java.util.Map;
-
-import iaik.server.modules.xml.XPath2Transformation;
-import iaik.server.modules.xml.XPath2Transformation.XPath2Filter;
-
-/**
- * An object encapsulating an XPath-Filter2 expression.
- *
- * @author Patrick Peck
- * @version $Id$
- */
-public class XPath2FilterImpl implements XPath2Filter {
-
- /** The type of this filter. */
- private String filterType;
- /** The XPath expression of this filter. */
- private String xPathExpression;
- /** The namespace prefix to URI mapping to use for evaluating the XPath. */
- private Map namespaceDeclarations;
-
- /**
- * Create a new XPath2FilterImpl
object.
- *
- * @param filterType The type of filter. Must be one of the filter type
- * constants declared in iaik.server.modules.xml.XPath2Transformation.XPath2Filter
- * @param xPathExpression The XPath expression belonging to this filter.
- * @param namespaceDeclarations The namespace declarations visible for this
- * XPath2Filter.
- */
- public XPath2FilterImpl(
- String filterType,
- String xPathExpression,
- Map namespaceDeclarations) {
-
- setFilterType(filterType);
- setXPathExpression(xPathExpression);
- setNamespaceDeclarations(namespaceDeclarations);
- }
-
- /**
- * @see iaik.server.modules.xml.XPath2Transformation.XPath2Filter#getFilterType()
- */
- public String getFilterType() {
- return filterType;
- }
-
- /**
- * Set the filter type.
- *
- * @param filterType The filter type to set.
- */
- protected void setFilterType(String filterType) {
- this.filterType = filterType;
- }
-
- /**
- * @see iaik.server.modules.xml.XPath2Transformation.XPath2Filter#getXPathExpression()
- */
- public String getXPathExpression() {
- return xPathExpression;
- }
-
- /**
- * Set the XPath expression.
- *
- * @param xPathExpression The XPath expression to set.
- */
- protected void setXPathExpression(String xPathExpression) {
- this.xPathExpression = xPathExpression;
- }
-
- /**
- * @see iaik.server.modules.xml.XPath2Transformation.XPath2Filter#getNamespaceDeclarations()
- */
- public Map getNamespaceDeclarations() {
- return namespaceDeclarations;
- }
-
- /**
- * Set the namespace declarations.
- *
- * @param namespaceDeclarations The mapping between namespace prefixes and
- * their associated URI.
- */
- protected void setNamespaceDeclarations(Map namespaceDeclarations) {
- this.namespaceDeclarations = namespaceDeclarations;
- }
-
- /**
- * Compare this object to another.
- *
- * @param other The object to compare this XPath2Filter
to.
- * @return true
, if other
is a
- * XPath2Filter
and the filter types match and the XPath
- * expressions match. Otherwise false
is returned.
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object other) {
- if (other instanceof XPath2Transformation.XPath2Filter) {
- XPath2Filter filter = (XPath2Transformation.XPath2Filter) other;
- return getFilterType().equals(filter.getFilterType())
- && getXPathExpression().equals(filter.getXPathExpression());
- }
- return false;
- }
-
- /**
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return getXPathExpression().hashCode() * 31 + getFilterType().hashCode();
- }
-
-}
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/XPath2TransformationImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/XPath2TransformationImpl.java
deleted file mode 100644
index c7496c2cd..000000000
--- a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/XPath2TransformationImpl.java
+++ /dev/null
@@ -1,82 +0,0 @@
-package at.gv.egovernment.moa.spss.server.iaik.xml;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import iaik.server.modules.xml.XPath2Transformation;
-
-/**
- * An object encapsulating a Transformation
containing several
- * XPath-Filter2 expressions.
- *
- * @author Patrick Peck
- * @version $Id$
- */
-public class XPath2TransformationImpl
- extends TransformationImpl
- implements XPath2Transformation {
-
- /** The filters contained in this XPath2Transformation
*/
- private List xPathFilters = new ArrayList();
-
- /**
- * Create a new XPath2TransformationImpl
.
- *
- * The list of XPath-Filter2 expression is initially empty.
- */
- public XPath2TransformationImpl() {
- setAlgorithmURI(XPath2Transformation.XPATH2);
- }
-
- /**
- * @see iaik.server.modules.xml.XPath2Transformation#getXPathFilters()
- */
- public List getXPathFilters() {
- return xPathFilters;
- }
-
- /**
- * Add an XPath-Filter2 expression to the list of filters.
- *
- * @param filter The filter to add.
- */
- public void addXPathFilter(XPath2Filter filter) {
- xPathFilters.add(filter);
- }
-
- /**
- * Compare this XPath2Transformation
to another.
- *
- * @param other The object to compare this
- * XPath2Transformation
to.
- * @return true
, if other
is an
- * XPath2Transformation
and getXPathFilters()
equals
- * other.getXPathFilters()
. Otherwise false
is
- * returned.
- * @see java.lang.Object#equals(Object)
- */
- public boolean equals(Object other) {
- if (other instanceof XPath2Transformation) {
- XPath2Transformation transform = (XPath2Transformation) other;
-
- return getXPathFilters().equals(transform.getXPathFilters());
- }
- return false;
- }
-
- /**
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- Iterator iter = getXPathFilters().iterator();
- int hashCode = 0;
-
- while (iter.hasNext()) {
- hashCode ^= iter.next().hashCode();
- }
-
- return hashCode;
- }
-
-}
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/XPathTransformationImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/XPathTransformationImpl.java
deleted file mode 100644
index ccedbadb2..000000000
--- a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/XPathTransformationImpl.java
+++ /dev/null
@@ -1,98 +0,0 @@
-package at.gv.egovernment.moa.spss.server.iaik.xml;
-
-import java.util.Map;
-
-import iaik.server.modules.xml.XPathTransformation;
-
-/**
- * A Transformation
containing an XPath expression.
- *
- * @author Patrick Peck
- * @version $Id$
- */
-public class XPathTransformationImpl
- extends TransformationImpl
- implements XPathTransformation {
-
- /** The XPath expression. */
- private String xPathExpression;
- /** The namespace prefix to URI mapping to use for XPath evaluation. */
- private Map namespaceDeclarations;
-
- /**
- * Create a new XPathTransformationImpl
.
- *
- * The namespace declarations are initialized empty.
- *
- * @param xPathExpression The XPath expression this object will contain.
- * @param namespaceDeclarations The namespace declarations visible for this
- * XPath.
- */
- public XPathTransformationImpl(
- String xPathExpression,
- Map namespaceDeclarations) {
-
- setAlgorithmURI(XPathTransformation.XPATH);
- setXPathExpression(xPathExpression);
- setNamespaceDeclarations(namespaceDeclarations);
- }
-
- /**
- * Set the XPath expression.
- *
- * @param xPathExpression The XPath expression.
- */
- protected void setXPathExpression(String xPathExpression) {
- this.xPathExpression = xPathExpression;
- }
-
- /**
- * @see iaik.server.modules.xml.XPathTransformation#getXPathExpression()
- */
- public String getXPathExpression() {
- return xPathExpression;
- }
-
- /**
- * @see iaik.server.modules.xml.XPathTransformation#getNamespaceDeclarations()
- */
- public Map getNamespaceDeclarations() {
- return namespaceDeclarations;
- }
-
- /**
- * Set the namespace declarations.
- *
- * @param namespaceDeclarations The mapping between namespace prefixes and
- * their associated URI.
- */
- protected void setNamespaceDeclarations(Map namespaceDeclarations) {
- this.namespaceDeclarations = namespaceDeclarations;
- }
-
- /**
- * Compare this XPathTransformation
to another.
- *
- * @param other The object to compare this
- * XPathTransformation
to.
- * @return true
, if other
is an
- * XPathTransformation
and if this object contains the same XPath
- * expression as other
. Otherwise false
is returned.
- * @see java.lang.Object#equals(Object)
- */
- public boolean equals(Object other) {
- if (other instanceof XPathTransformation) {
- XPathTransformation transform = (XPathTransformation) other;
- return getXPathExpression().equals(transform.getXPathExpression());
- }
- return false;
- }
-
- /**
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- return getXPathExpression().hashCode();
- }
-
-}
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/XSLTTransformationImpl.java b/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/XSLTTransformationImpl.java
deleted file mode 100644
index d38da650b..000000000
--- a/spss.server/src/at/gv/egovernment/moa/spss/server/iaik/xml/XSLTTransformationImpl.java
+++ /dev/null
@@ -1,168 +0,0 @@
-package at.gv.egovernment.moa.spss.server.iaik.xml;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Collections;
-
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-
-import iaik.ixsil.algorithms.CanonicalizationAlgorithm;
-import iaik.ixsil.algorithms.CanonicalizationAlgorithmImplExclusiveCanonicalXML;
-import iaik.ixsil.exceptions.AlgorithmException;
-import iaik.server.modules.xml.XSLTTransformation;
-
-import at.gv.egovernment.moa.util.NodeListAdapter;
-import at.gv.egovernment.moa.util.StreamUtils;
-import at.gv.egovernment.moa.util.XPathException;
-import at.gv.egovernment.moa.util.XPathUtils;
-
-
-/**
- * A Transformation
containing an XSLT transformation.
- *
- * @author Patrick Peck
- * @version $Id$
- */
-public class XSLTTransformationImpl
- extends TransformationImpl
- implements XSLTTransformation {
-
- /** The XSLT stylesheet. */
- private Element styleSheetElement;
- /** The hash code of the canonicalized stylesheet. If calculated, this value
- * should be != 0. */
- private int hashCode;
-
- /**
- * Create a new XSLTTransformationImpl
object.
- *
- * @param styleSheetElement The XSLT stylesheet element.
- */
- public XSLTTransformationImpl(Element styleSheetElement) {
- setAlgorithmURI(XSLTTransformation.XSLT);
- setStyleSheetElement(styleSheetElement);
- }
-
- /**
- * Set the XSLT stylesheet element.
- *
- * @param styleSheetElement The XSLT stylesheet element to set.
- */
- protected void setStyleSheetElement(Element styleSheetElement) {
- this.styleSheetElement = styleSheetElement;
- this.hashCode = 0;
- }
-
- /**
- * @see iaik.server.modules.xml.XSLTTransformation#getStylesheetElement()
- */
- public Element getStylesheetElement() {
- return styleSheetElement;
- }
-
- /**
- * Compare this XSLTTransformation
to another.
- *
- * @param other The object to compare this
- * XSLTTransformation
to.
- * @return true
, if other
is an
- * XSLTTransformation
and if the canonicalized representations of
- * the stylesheets contained in this
and other
- * match. Otherwise, false
is returned.
- * @see java.lang.Object#equals(Object)
- */
- public boolean equals(Object other) {
- if (other instanceof XSLTTransformation) {
- XSLTTransformation xslt = (XSLTTransformation) other;
-
- return compareElements(
- getStylesheetElement(),
- xslt.getStylesheetElement());
- }
- return false;
- }
-
- /**
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- if (hashCode == 0) {
- hashCode = calculateHashCode(getStylesheetElement());
- }
- return hashCode;
- }
-
- /**
- * Calculate the hash code for a DOM element by canonicalizing it.
- *
- * @param element The DOM element for which the hash code is to be calculated.
- * @return int The hash code, or 0
, if it could not be
- * calculated.
- */
- private static int calculateHashCode(Element element) {
- try {
- InputStream is = canonicalize(element);
- byte[] buf = new byte[256];
- int hashCode = 1;
- int length;
- int i;
-
- while ((length = is.read(buf)) > 0) {
- for (i = 0; i < length; i++) {
- hashCode += buf[i] * 31 + i;
- }
- }
- is.close();
- return hashCode;
- } catch (AlgorithmException e) {
- return 0;
- } catch (IOException e) {
- return 0;
- }
- }
-
- /**
- * Compare two DOM elements by canonicalizing their contents and comparing the
- * resulting byte stream.
- *
- * @param elem1 The 1st element to compare.
- * @param elem2 The 2nd element to compare.
- * @return boolean true
, if the elements are considered equal
- * after canonicalization. Otherwise false
is returned.
- */
- private static boolean compareElements(Element elem1, Element elem2) {
- try {
- InputStream is1 = canonicalize(elem1);
- InputStream is2 = canonicalize(elem2);
- return StreamUtils.compareStreams(is1, is2);
- } catch (AlgorithmException e) {
- return false;
- } catch (IOException e) {
- return false;
- }
- }
-
- /**
- * Canonicalize a DOM element.
- *
- * @param element The element to canonicalize.
- * @return InputStream A stream with the canonicalized data.
- * @throws AlgorithmException An error occurred canonicalizing the element.
- */
- private static InputStream canonicalize(Element element)
- throws AlgorithmException {
- CanonicalizationAlgorithm c14n =
- new CanonicalizationAlgorithmImplExclusiveCanonicalXML();
- NodeList nodeList;
-
- try {
- nodeList = XPathUtils.selectNodeList(element, XPathUtils.ALL_NODES_XPATH);
- } catch (XPathException e) {
- nodeList = new NodeListAdapter(Collections.EMPTY_LIST);
- }
- c14n.setInput(nodeList);
- return c14n.canonicalize();
- }
-
-}
--
cgit v1.2.3