xades4j.properties
Class DataObjectProperty

java.lang.Object
  extended by xades4j.properties.DataObjectProperty
All Implemented Interfaces:
QualifyingProperty
Direct Known Subclasses:
SignedDataObjectProperty, UnsignedDataObjectProperty

public abstract class DataObjectProperty
extends Object
implements QualifyingProperty

Base class for all the data object properties. This class checks target multiplicity. For instance, if a property can only be applied to one data object and and attempt is made to apply it to another, an exception is thrown.

Author:
Luís

Nested Class Summary
protected static class DataObjectProperty.TargetMultiplicity
          Represents the number of data objects that a property can be applied to.
 
Field Summary
 
Fields inherited from interface xades4j.properties.QualifyingProperty
QUALIFYING_PROPS_REF_TAG, QUALIFYING_PROPS_TAG, SIGNED_DATAOBJ_PROPS_TAG, SIGNED_PROPS_TAG, SIGNED_PROPS_TYPE_URI, SIGNED_SIGNATURE_PROPS_TAG, TARGET_ATTR, UNSIGNED_DATAOBJ_PROPS_TAG, UNSIGNED_PROPS_TAG, UNSIGNED_SIGNATURE_PROPS_TAG, XADES_XMLNS, XADESV141_XMLNS
 
Constructor Summary
protected DataObjectProperty(DataObjectProperty.TargetMultiplicity targetMultiplicity)
           
 
Method Summary
 Collection<DataObjectDesc> getTargetDataObjects()
          Gets the data object descriptions to which the property applies.
 boolean isSignature()
          Indicates wether the property is a signature property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface xades4j.properties.QualifyingProperty
getName, isSigned
 

Constructor Detail

DataObjectProperty

protected DataObjectProperty(DataObjectProperty.TargetMultiplicity targetMultiplicity)
Method Detail

isSignature

public final boolean isSignature()
Description copied from interface: QualifyingProperty
Indicates wether the property is a signature property.

Specified by:
isSignature in interface QualifyingProperty
Returns:
true if this is a signature property

getTargetDataObjects

public Collection<DataObjectDesc> getTargetDataObjects()
Gets the data object descriptions to which the property applies. This shouldn't be called if the property has TargetMultiplicity.ALL

Returns:
un unmodifiable collection of data object descriptions
Throws:
PropertyTargetException - if this property wasn't applied to any data objects


Copyright © 2012. All Rights Reserved.