From 0872d2d8a64fd701776b272f49222428d8def07f Mon Sep 17 00:00:00 2001 From: Andreas Fitzek Date: Tue, 3 Nov 2015 14:38:34 +0100 Subject: initial commit --- .../moa/spss/api/common/Base64Transform.java | 37 +++++++++ .../spss/api/common/CanonicalizationTransform.java | 41 ++++++++++ .../moa/spss/api/common/CheckResult.java | 49 ++++++++++++ .../egovernment/moa/spss/api/common/Content.java | 71 +++++++++++++++++ .../moa/spss/api/common/ContentBinary.java | 45 +++++++++++ .../moa/spss/api/common/ContentLocRef.java | 41 ++++++++++ .../moa/spss/api/common/ContentReference.java | 35 ++++++++ .../moa/spss/api/common/ContentXML.java | 43 ++++++++++ .../moa/spss/api/common/ElementSelector.java | 52 ++++++++++++ .../api/common/EnvelopedSignatureTransform.java | 39 +++++++++ .../common/ExclusiveCanonicalizationTransform.java | 51 ++++++++++++ .../egovernment/moa/spss/api/common/InputData.java | 71 +++++++++++++++++ .../egovernment/moa/spss/api/common/MetaInfo.java | 61 ++++++++++++++ .../moa/spss/api/common/SignerInfo.java | 92 ++++++++++++++++++++++ .../moa/spss/api/common/TSLConfiguration.java | 82 +++++++++++++++++++ .../egovernment/moa/spss/api/common/Transform.java | 40 ++++++++++ .../moa/spss/api/common/X509IssuerSerial.java | 49 ++++++++++++ .../spss/api/common/XMLDataObjectAssociation.java | 49 ++++++++++++ .../moa/spss/api/common/XPathFilter.java | 62 +++++++++++++++ .../moa/spss/api/common/XPathFilter2Transform.java | 49 ++++++++++++ .../moa/spss/api/common/XPathTransform.java | 54 +++++++++++++ .../moa/spss/api/common/XSLTTransform.java | 47 +++++++++++ 22 files changed, 1160 insertions(+) create mode 100644 moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/Base64Transform.java create mode 100644 moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/CanonicalizationTransform.java create mode 100644 moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/CheckResult.java create mode 100644 moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/Content.java create mode 100644 moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentBinary.java create mode 100644 moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentLocRef.java create mode 100644 moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentReference.java create mode 100644 moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentXML.java create mode 100644 moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/ElementSelector.java create mode 100644 moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/EnvelopedSignatureTransform.java create mode 100644 moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/ExclusiveCanonicalizationTransform.java create mode 100644 moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/InputData.java create mode 100644 moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/MetaInfo.java create mode 100644 moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/SignerInfo.java create mode 100644 moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/TSLConfiguration.java create mode 100644 moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/Transform.java create mode 100644 moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/X509IssuerSerial.java create mode 100644 moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/XMLDataObjectAssociation.java create mode 100644 moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/XPathFilter.java create mode 100644 moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/XPathFilter2Transform.java create mode 100644 moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/XPathTransform.java create mode 100644 moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/XSLTTransform.java (limited to 'moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common') diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/Base64Transform.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/Base64Transform.java new file mode 100644 index 0000000..6050d5b --- /dev/null +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/Base64Transform.java @@ -0,0 +1,37 @@ +/* + * Copyright 2003 Federal Chancellery Austria + * MOA-SPSS has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ + + +package at.gv.egovernment.moa.spss.api.common; + +/** + * A Transform performing a Base64 decoding. + * + * @author Patrick Peck + * @version $Id$ + */ +public interface Base64Transform extends Transform { + /** Algorithm URI of the Base64 Transform type. */ + public static final String BASE64_DECODING = + "http://www.w3.org/2000/09/xmldsig#base64"; +} diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/CanonicalizationTransform.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/CanonicalizationTransform.java new file mode 100644 index 0000000..988c5bc --- /dev/null +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/CanonicalizationTransform.java @@ -0,0 +1,41 @@ +/* + * Copyright 2003 Federal Chancellery Austria + * MOA-SPSS has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ + + +package at.gv.egovernment.moa.spss.api.common; + +import at.gv.egovernment.moa.util.Constants; + +/** + * A canonicalization type of Transform. + * + * @author Patrick Peck + * @version $Id$ + */ +public interface CanonicalizationTransform extends Transform { + /** Algorithm URI of canonical XML. */ + public static final String CANONICAL_XML = Constants.C14N_URI; + /** Algorithm URI of canonical XML with comments. */ + public static final String CANONICAL_XML_WITH_COMMENTS = + Constants.C14N_WITH_COMMENTS_URI; +} diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/CheckResult.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/CheckResult.java new file mode 100644 index 0000000..5c94981 --- /dev/null +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/CheckResult.java @@ -0,0 +1,49 @@ +/* + * Copyright 2003 Federal Chancellery Austria + * MOA-SPSS has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ + + +package at.gv.egovernment.moa.spss.api.common; + +import org.w3c.dom.NodeList; + +/** + * Object encapsulating the result of a signature verification. + * + * @author Patrick Peck + * @author Stephan Grill + * @version $Id$ + */ +public interface CheckResult { + /** + * Gets the result code. + * + * @return The result code. + */ + public int getCode(); + /** + * Gets descriptive information. + * + * @return Descriptive information. + */ + public NodeList getInfo(); +} diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/Content.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/Content.java new file mode 100644 index 0000000..efde1eb --- /dev/null +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/Content.java @@ -0,0 +1,71 @@ +/* + * Copyright 2003 Federal Chancellery Austria + * MOA-SPSS has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ + + +package at.gv.egovernment.moa.spss.api.common; + +/** + * Encapsulates content data. + * + * @author Patrick Peck + * @author Stephan Grill + * @author Gregor Karlinger + * @version $Id$ + */ +public interface Content { + + /** + * Indicates that this object contains a URI reference to some content. + */ + public static final int REFERENCE_CONTENT = 0; + + /** + * Indicates that this object contains binary content. + */ + public static final int BINARY_CONTENT = 1; + + /** + * Indicates that this object contains XML content. + */ + public static final int XML_CONTENT = 2; + + /** + * Indicates that this object contains a location reference content. + */ + public static final int LOCREF_CONTENT = 3; + + /** + * Gets the type of content contained in this object. + * + * @return The type of content, one of BINARY_CONTENT, XML_CONTENT, + * REFERENCE_CONTENT or LOCREF_CONTENT. + */ + public int getContentType(); + + /** + * Gets the reference to the content data (a URI). + * + * @return The reference to the content data. + */ + public String getReference(); +} diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentBinary.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentBinary.java new file mode 100644 index 0000000..77ec9dd --- /dev/null +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentBinary.java @@ -0,0 +1,45 @@ +/* + * Copyright 2003 Federal Chancellery Austria + * MOA-SPSS has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ + + +package at.gv.egovernment.moa.spss.api.common; + +import java.io.InputStream; + +/** + * Encapsulates binary content. + * + * @author Patrick Peck + * @author Stephan Grill + * @version $Id$ + */ +public interface ContentBinary extends Content { + /** + * Get the binary content. + * + * @return An InputStream from which the binary content can + * be read. + */ + public InputStream getBinaryContent(); + +} diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentLocRef.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentLocRef.java new file mode 100644 index 0000000..d1ef096 --- /dev/null +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentLocRef.java @@ -0,0 +1,41 @@ +/* + * Copyright 2003 Federal Chancellery Austria + * MOA-SPSS has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ + + +package at.gv.egovernment.moa.spss.api.common; + +/** + * Encapsulates location reference content. + * + * @author Gregor Karlinger + * @version $Id$ + */ +public interface ContentLocRef extends Content +{ + /** + * Gets the location reference URI pointing to the actual remote location of the content. + * + * @return the location reference URI. + */ + public String getLocationReferenceURI(); +} diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentReference.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentReference.java new file mode 100644 index 0000000..8c4a658 --- /dev/null +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentReference.java @@ -0,0 +1,35 @@ +/* + * Copyright 2003 Federal Chancellery Austria + * MOA-SPSS has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ + + +package at.gv.egovernment.moa.spss.api.common; + +/** + * Content containing a reference to content data. + * + * @author Patrick Peck + * @version $Id$ + */ +public interface ContentReference extends Content { + +} diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentXML.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentXML.java new file mode 100644 index 0000000..d41f6a6 --- /dev/null +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentXML.java @@ -0,0 +1,43 @@ +/* + * Copyright 2003 Federal Chancellery Austria + * MOA-SPSS has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ + + +package at.gv.egovernment.moa.spss.api.common; + +import org.w3c.dom.NodeList; + +/** + * Encapsulates arbitrary XML content. + * + * @author Patrick Peck + * @author Stephan Grill + * @version $Id$ + */ +public interface ContentXML extends Content { + /** + * Gets the XML content stored in this object. + * + * @return The XML content. + */ + public NodeList getXMLContent(); +} diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/ElementSelector.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/ElementSelector.java new file mode 100644 index 0000000..b446c5f --- /dev/null +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/ElementSelector.java @@ -0,0 +1,52 @@ +/* + * Copyright 2003 Federal Chancellery Austria + * MOA-SPSS has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ + + +package at.gv.egovernment.moa.spss.api.common; + +import java.util.Map; + +/** + * A class containing data for selecting single elements using an XPath + * expression. + * + * Derived classes are used to point to the CreateSignatureLocation + * and the VerifySignatureLocation. + * + * @author Patrick Peck + * @version $Id$ + */ +public interface ElementSelector { + /** + * Gets the XPath expression pointing to a single element. + * + * @return The XPath expression to select the signature parent element. + */ + public String getXPathExpression(); + /** + * Gets the namespace prefix to URI mapping to use when evaluating the XPath. + * + * @return The namespace prefix to URI mapping. + */ + public Map getNamespaceDeclarations(); +} diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/EnvelopedSignatureTransform.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/EnvelopedSignatureTransform.java new file mode 100644 index 0000000..8e6de87 --- /dev/null +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/EnvelopedSignatureTransform.java @@ -0,0 +1,39 @@ +/* + * Copyright 2003 Federal Chancellery Austria + * MOA-SPSS has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ + + +package at.gv.egovernment.moa.spss.api.common; + +/** + * An enveloped signature type of Transform. + * + * @author Patrick Peck + * @version $Id$ + */ +public interface EnvelopedSignatureTransform extends Transform { + /** + * Algorithm URI of the enveloped signature type of Transform. + */ + public static final String ENVELOPED_SIGNATURE = + "http://www.w3.org/2000/09/xmldsig#enveloped-signature"; +} diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/ExclusiveCanonicalizationTransform.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/ExclusiveCanonicalizationTransform.java new file mode 100644 index 0000000..5c2b633 --- /dev/null +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/ExclusiveCanonicalizationTransform.java @@ -0,0 +1,51 @@ +/* + * Copyright 2003 Federal Chancellery Austria + * MOA-SPSS has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ + + +package at.gv.egovernment.moa.spss.api.common; + +import java.util.List; + +import at.gv.egovernment.moa.util.Constants; + +/** + * An exclusive canonicalization type of Transform. + * + * @author Patrick Peck + * @version $Id$ + */ +public interface ExclusiveCanonicalizationTransform extends Transform { + /** Algorithm URI of exclusive canonical XML. */ + public static final String EXCLUSIVE_CANONICAL_XML = Constants.EXC_C14N_URI; + /** Algorithm URI of exclusive canonical XML with comments. */ + public static final String EXCLUSIVE_CANONICAL_XML_WITH_COMMENTS = + Constants.EXC_C14N_WITH_COMMENTS_URI; + + /** + * Sets the namespace prefixes that are handled in the same manner as in + * canonical XML. + * + * @return The inclusive namespace prefixes. + */ + public List getInclusiveNamespacePrefixes(); +} diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/InputData.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/InputData.java new file mode 100644 index 0000000..8c940cd --- /dev/null +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/InputData.java @@ -0,0 +1,71 @@ +/* + * Copyright 2003 Federal Chancellery Austria + * MOA-SPSS has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ + + +package at.gv.egovernment.moa.spss.api.common; + +/** + * Interface specifying accessors for two attributes needed for returning + * HashInputData and ReferenceInputData information + * as part of VerifyXMLSignatureResponse. + * + * @author Gregor Karlinger + * + * @version $Id$ + */ +public interface InputData extends Content +{ + /** + * Possible value returned by {@link #getPartOf}. + */ + public static String CONTAINER_SIGNEDINFO_ = "SignedInfo"; + + /** + * Possible value returned by {@link #getPartOf}. + */ + public static String CONTAINER_XMLDSIGMANIFEST_ = "XMLDSIGManifest"; + + /** + * Value returned by {link getReferringReferenceNumber}, signalling that the + * attribute is not used. + */ + public static int REFERER_NONE_ = -1; + + /** + * Returns a String signalling what kind of container the + * XMLDSIG Reference this InputData belongs + * to is part of. + * + * @return the kind of container. + */ + public String getPartOf(); + + /** + * If this InputData belongs to an XMLDSIG Reference + * being part of either a XMLDSIGManifest or a SignatureManifest, this method + * returns a positive int value signalling the particular Reference + * of the XMLDSIG SignedInfo referring to the XMLDSIGManifest or + * SignatureManifest respectively. + */ + public int getReferringReferenceNumber(); +} diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/MetaInfo.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/MetaInfo.java new file mode 100644 index 0000000..2413229 --- /dev/null +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/MetaInfo.java @@ -0,0 +1,61 @@ +/* + * Copyright 2003 Federal Chancellery Austria + * MOA-SPSS has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ + + +package at.gv.egovernment.moa.spss.api.common; + +import org.w3c.dom.NodeList; + +/** + * Object encapsulating descriptive meta information. + * + * @author Patrick Peck + * @author Stephan Grill + * @version $Id$ + */ +public interface MetaInfo { + /** + * Gets the mime type of the associated object. + * + * @return The mimetype of the associated object. + */ + public String getMimeType(); + /** + * Gets the descriptive information (URI). + * + * @return URI referencing the descriptive information. + */ + public String getDescription(); + /** + * Gets the elemental informations. + * + * @return The elemental informations. + */ + public NodeList getAnyElements(); + /** + * Gets the XML signature creation type information of the associated object. + * + * @return the XML signature creation type information of the associated object. + */ + public String getType(); +} diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/SignerInfo.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/SignerInfo.java new file mode 100644 index 0000000..777365a --- /dev/null +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/SignerInfo.java @@ -0,0 +1,92 @@ +/* + * Copyright 2003 Federal Chancellery Austria + * MOA-SPSS has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ + + +package at.gv.egovernment.moa.spss.api.common; + +import java.security.cert.X509Certificate; + + +/** + * Contains information about the signer. + * + * @author Patrick Peck + * @author Stephan Grill + * @version $Id$ + */ +public interface SignerInfo { + /** + * Gets the signer certificate. + * + * @return The signer certificate. + */ + public X509Certificate getSignerCertificate(); + /** + * Checks, whether the certificate contained in this object is qualified. + * + * @return true, if the certificate is qualified, otherwise + * false. + */ + public boolean isQualifiedCertificate(); + + + /** + * Checks, whether the signature is based on a SSCD. + * + * @return true, if the signature is based on a SSCD, otherwise + * false. + */ + public boolean isSSCD(); + + /** + * Returns the source of the SSCD check (TSL or Certificate) * + */ + public String getSSCDSource(); + + /** + * Returns the source of the QC check (TSL or Certificate) * + */ + public String getQCSource(); + + /** + * Returns the signer certificate issuer country code + * @return + */ + public String getIssuerCountryCode(); + /** + * Checks, whether the certificate contained in this object is a + * public authority certificate. + * + * @return true, if the certificate is a public authority + * certificate, otherwise false. + */ + public boolean isPublicAuthority(); + /** + * Gets the public authority ID, if the certificate contained in this + * object is from a public authority. + * + * @return The public authority ID. + */ + public String getPublicAuhtorityID(); + +} diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/TSLConfiguration.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/TSLConfiguration.java new file mode 100644 index 0000000..0e0c82c --- /dev/null +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/TSLConfiguration.java @@ -0,0 +1,82 @@ +/* + * Copyright 2003 Federal Chancellery Austria + * MOA-SPSS has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ + + +package at.gv.egovernment.moa.spss.api.common; + + +import iaik.xml.crypto.utils.URI; + +import java.util.Date; + + +/** + * Contains TSL configuration information. + * + * @author kstranacher + */ +public interface TSLConfiguration { + + /** Default URL of EU TSL */ + public String DEFAULT_EU_TSL_URL = "https://ec.europa.eu/information_society/policy/esignature/trusted-list/tl-mp.xml"; + + /** Default period (1day=86400000 msec) for update schedule */ + public String DEFAULT_UPDATE_SCHEDULE_PERIOD = "86400000"; + + /** Default start time (2:00 AM) for update schedule */ + public String DEFAULT_UPDATE_SCHEDULE_STARTTIME = "02:00:00"; + + public String DEFAULT_WORKING_DIR = "tslworking"; + + /** + * Gets the EU TSL URL. + * + * @return The EU TSL URL. + */ + public String getEuTSLUrl(); + + /** + * + * @return + */ + public Date getUpdateScheduleStartTime(); + + /** + * + * @return + */ + public long getUpdateSchedulePeriod(); + + /** + * + * @return + */ + public String getWorkingDirectory(); + + /** + * + * @return + */ + public URI getWorkingDirectoryAsURI(); + +} diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/Transform.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/Transform.java new file mode 100644 index 0000000..ad050b4 --- /dev/null +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/Transform.java @@ -0,0 +1,40 @@ +/* + * Copyright 2003 Federal Chancellery Austria + * MOA-SPSS has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ + + +package at.gv.egovernment.moa.spss.api.common; + +/** + * Base class for XMLDsig Transform elements. + * + * @author Patrick Peck + * @version $Id$ + */ +public interface Transform { + /** + * Gets the algorithm URI of this Transform. + * + * @return The algorithm URI of this Transform. + */ + public String getAlgorithmURI(); +} diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/X509IssuerSerial.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/X509IssuerSerial.java new file mode 100644 index 0000000..39ec807 --- /dev/null +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/X509IssuerSerial.java @@ -0,0 +1,49 @@ +/* + * Copyright 2003 Federal Chancellery Austria + * MOA-SPSS has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ + + +package at.gv.egovernment.moa.spss.api.common; + +import java.math.BigInteger; + +/** + * Contains an X.509 issuer distinguished name/serial number pair. + * + * @author Patrick Peck + * @author Stephan Grill + * @version $Id$ + */ +public interface X509IssuerSerial { + /** + * Gets the issuer distinguished name. + * + * @return The issuer distinguished name. + */ + public String getX509IssuerName(); + /** + * Gets the issuer serial number. + * + * @return The issuer serial number. + */ + public BigInteger getX509SerialNumber(); +} diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/XMLDataObjectAssociation.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/XMLDataObjectAssociation.java new file mode 100644 index 0000000..fe2a795 --- /dev/null +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/XMLDataObjectAssociation.java @@ -0,0 +1,49 @@ +/* + * Copyright 2003 Federal Chancellery Austria + * MOA-SPSS has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ + + +package at.gv.egovernment.moa.spss.api.common; + + +/** + * Object encapsulating arbitrary content and optional descriptive meta + * information. + * + * @author Patrick Peck + * @author Stephan Grill + * @version $Id$ + */ +public interface XMLDataObjectAssociation { + /** + * Gets descriptive meta information. + * + * @return The descriptive meta information. + */ + public MetaInfo getMetaInfo(); + /** + * Gets the actual content. + * + * @return The content of this association. + */ + public Content getContent(); +} diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/XPathFilter.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/XPathFilter.java new file mode 100644 index 0000000..06a49a2 --- /dev/null +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/XPathFilter.java @@ -0,0 +1,62 @@ +/* + * Copyright 2003 Federal Chancellery Austria + * MOA-SPSS has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ + + +package at.gv.egovernment.moa.spss.api.common; + +import java.util.Map; + +/** + * An XPath expression set operation. + * + * @author Patrick Peck + * @version $Id$ + */ +public interface XPathFilter { + /** Subtract this filter's node set from the resulting node set. */ + public static final String SUBTRACT_TYPE = "subtract"; + /** Intersect this filter's node set with the resulting node set. */ + public static final String INTERSECT_TYPE = "intersect"; + /** Compute the union of this filter's node set and the resulting node set. */ + public static final String UNION_TYPE = "union"; + + /** + * Gets the type of this XPathFilter. + * + * @return The type of this XPathFilter. + */ + public String getFilterType(); + /** + * Gets the XPath expression for selecting the nodes. + * + * @return The XPath expression for selecting the nodes. + */ + public String getXPathExpression(); + /** + * Gets The namespace prefix to URI mapping used during evaluation of the + * XPath expression. + * + * @return The namespace prefix to URI mapping. + */ + public Map getNamespaceDeclarations(); +} diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/XPathFilter2Transform.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/XPathFilter2Transform.java new file mode 100644 index 0000000..6f05710 --- /dev/null +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/XPathFilter2Transform.java @@ -0,0 +1,49 @@ +/* + * Copyright 2003 Federal Chancellery Austria + * MOA-SPSS has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ + + +package at.gv.egovernment.moa.spss.api.common; + +import java.util.List; + +/** + * An XPath type of Transform containing multiple filters for + * performing set operations on XPath selections. + * + * @author Patrick Peck + * @version $Id$ + */ +public interface XPathFilter2Transform extends Transform { + /** Algorithm URI for the XPath Filter2 Transform. */ + public static final String XPATH_FILTER2 = + "http://www.w3.org/2002/06/xmldsig-filter2"; + + /** + * Gets the XPathFilters contained in this + * XPathFilter2Transform. + * + * @return The XPathFilters. + */ + public List getFilters(); + +} diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/XPathTransform.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/XPathTransform.java new file mode 100644 index 0000000..99eda2a --- /dev/null +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/XPathTransform.java @@ -0,0 +1,54 @@ +/* + * Copyright 2003 Federal Chancellery Austria + * MOA-SPSS has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ + + +package at.gv.egovernment.moa.spss.api.common; + +import java.util.Map; + +/** + * A Transform performing an XPath selection. + * + * @author Patrick Peck + * @version $Id$ + */ +public interface XPathTransform extends Transform { + /** Algorithm URI of the XPath Transform. */ + public static final String XPATH = + "http://www.w3.org/TR/1999/REC-xpath-19991116"; + + /** + * Gets the XPath expression used for selection. + * + * @return The XPath expression used for selection. + */ + public String getXPathExpression(); + /** + * Gets The namespace prefix to URI mapping used during evaluation of the + * XPath expression. + * + * @return The namespace prefix to URI mapping. + */ + public Map getNamespaceDeclarations(); + +} diff --git a/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/XSLTTransform.java b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/XSLTTransform.java new file mode 100644 index 0000000..8cb6c8e --- /dev/null +++ b/moaSig/moa-sig-lib/src/main/java/at/gv/egovernment/moa/spss/api/common/XSLTTransform.java @@ -0,0 +1,47 @@ +/* + * Copyright 2003 Federal Chancellery Austria + * MOA-SPSS has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ + + +package at.gv.egovernment.moa.spss.api.common; + +import org.w3c.dom.Element; + +/** + * A Transform containing an XSLT stylesheet. + * + * @author Patrick Peck + * @version $Id$ + */ +public interface XSLTTransform extends Transform { + /** Algorithm URI for the XSLT type of Transform. */ + public static final String XSLT = + "http://www.w3.org/TR/1999/REC-xslt-19991116"; + + /** + * Gets the XSLT stylesheet element used for the transformation. + * + * @return The XSLT stylesheet element used for the transformation. + */ + public Element getStylesheet(); + +} -- cgit v1.2.3