diff options
author | tkellner <tkellner@3a0b52a2-8410-0410-bc02-ff6273a87459> | 2012-08-01 09:10:42 +0000 |
---|---|---|
committer | tkellner <tkellner@3a0b52a2-8410-0410-bc02-ff6273a87459> | 2012-08-01 09:10:42 +0000 |
commit | 67b6605775cecd7b769991cf922ed6109f6c0d8c (patch) | |
tree | 227aef7197553468eecaeef5f3aa19a51429f06a /Spezifikation/PDFSignator Schnittstelle/src/at/asit/pdfover/pdfsignator/SignatureProfile.java | |
parent | 7ada2b5aa5978e21d30b98735e19959e755bc37e (diff) | |
download | pdf-over-67b6605775cecd7b769991cf922ed6109f6c0d8c.tar.gz pdf-over-67b6605775cecd7b769991cf922ed6109f6c0d8c.tar.bz2 pdf-over-67b6605775cecd7b769991cf922ed6109f6c0d8c.zip |
PDF Signator Schnittstelle mit EUML2 in Eclipse für Codegenerierung
git-svn-id: https://svn.iaik.tugraz.at/svn/egiz/prj/current/12PDF-OVER-4.0@12240 3a0b52a2-8410-0410-bc02-ff6273a87459
Diffstat (limited to 'Spezifikation/PDFSignator Schnittstelle/src/at/asit/pdfover/pdfsignator/SignatureProfile.java')
-rw-r--r-- | Spezifikation/PDFSignator Schnittstelle/src/at/asit/pdfover/pdfsignator/SignatureProfile.java | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/Spezifikation/PDFSignator Schnittstelle/src/at/asit/pdfover/pdfsignator/SignatureProfile.java b/Spezifikation/PDFSignator Schnittstelle/src/at/asit/pdfover/pdfsignator/SignatureProfile.java new file mode 100644 index 00000000..84c1023d --- /dev/null +++ b/Spezifikation/PDFSignator Schnittstelle/src/at/asit/pdfover/pdfsignator/SignatureProfile.java @@ -0,0 +1,81 @@ +package at.asit.pdfover.pdfsignator; + +import java.util.ArrayList; +import java.util.List; + +import at.asit.pdfover.pdfsignator.profileproperties.ProfileProperty; + +/** + * Represents a Signature profile + * @author afitzek + */ +public abstract class SignatureProfile { + + /** + * The profile ID + */ + protected String profileID; + + /** + * The Profile properties + * @uml.property name="profileProperty" + * @uml.associationEnd multiplicity="(0 -1)" ordering="true" aggregation="shared" inverse="signatureProfile:at.asit.pdfover.pdfsignator.profileproperties.ProfileProperty" + * + */ + protected List<ProfileProperty> properties = new ArrayList<ProfileProperty>(); + + /** + * Gets the profile ID + * @return Returns the profileID. + */ + public String GetProfileID() { + return profileID; + } + + /** + * Adds a property to this profile + * @param property + */ + public void AddProperty(ProfileProperty property) { + + ProfileProperty replace = this.GetProperty(property.GetKey()); + + if(replace != null) + { + this.properties.remove(replace); + replace = null; + } + + this.properties.add(property); + } + + /** + * Gets a property by its key + * @param key The property key + * @return The ProfileProperty or null if not available + */ + public ProfileProperty GetProperty(String key) { + ProfileProperty find = null; + for(ProfileProperty available : this.properties) { + find = available; + if(find.GetKey().equals(key)) { + return find; + } + } + return null; + } + + /** + * Gets the Signature Dimension + * @return + */ + public abstract SignatureDimension GetSignatureDimension(); + + /** + * Gets available Properties for this Profile + * @return + */ + public ProfileProperty[] GetAvailableProperties() { + return this.properties.toArray(new ProfileProperty[0]); + } +} |