The following features are supported:
There are two known types of Attributes.
These areFor an attribute to be parsed as a DynamicAttribute, it should have a namespace portion and the attribute name should be registered with the {@link cambridge.Cambridge} class
Attribute
as defined in X.501 standard. The ASN.1 definition of this structure is
Attribute ::= SEQUENCE { type AttributeType, values SET OF AttributeValue } AttributeType ::= ObjectIdentifier AttributeValue ::= ANY@author Volker Roth @version "$Id: Attribute.java,v 1.4 2007/08/30 08:45:05 pebinger Exp $"
atomCommonAttributes = attribute xml:base { atomUri }?, attribute xml:lang { atomLanguageTag }?, undefinedAttribute
This class contains the attribute definition for elements.
@author Bill BrownTitle: AttributesLib for Java
Description:
Copyright: Copyright (c) 2004
Company: eBay Inc.
@author Weijun Li @version 1.0This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
Attribute
element specifies an attribute of the assertion subject. The Attribute
element is an extension of the AttributeDesignator
element that allows the attribute value to be specified. The following schema fragment specifies the expected content contained within SAML Attribute element.
<complexType name="AttributeType"> <complexContent> <extension base="{urn:oasis:names:tc:SAML:1.0:assertion}AttributeDesignatorType"> <sequence> <element ref="{urn:oasis:names:tc:SAML:1.0:assertion}AttributeValue" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType>
Warning: This is a facade provided for use by user code, not for implementation by user code. User implementations of this interface are highly likely to be incompatible with future releases of the product at both binary and source levels.
3.2.2 Attributes Elements may have associated properties, called attributes, which may have values (by default, or set by authors or scripts). Attribute/value pairs appear before the final ">" of an element's start tag. Any number of (legal) attribute value pairs, separated by spaces, may appear in an element's start tag. They may appear in any order. In this example, the id attribute is set for an H1 element: In certain cases, authors may specify the value of an attribute without any quotation marks. The attribute value may only contain letters (a-z and A-Z), digits (0-9), hyphens (ASCII decimal 45), periods (ASCII decimal 46), underscores (ASCII decimal 95), and colons (ASCII decimal 58). We recommend using quotation marks even when it is possible to eliminate them. Attribute names are always case-insensitive. Attribute values are generally case-insensitive. The definition of each attribute in the reference manual indicates whether its value is case-insensitive. All the attributes defined by this specification are listed in the attribute index. <code> {@.html <H1 id="section1"> This is an identified heading thanks to the id attribute </H1>}</code>
By default, SGML requires that all attribute values be delimited using either double quotation marks (ASCII decimal 34) or single quotation marks (ASCII decimal 39). Single quote marks can be included within the attribute value when the value is delimited by double quote marks, and vice versa. Authors may also use numeric character references to represent double quotes (") and single quotes ('). For doublequotes authors can also use the character entity reference ".
An Attribute is returned by a getter operation or passed to a a setter operation. @author Juha Lindfors. @author Adrian Brock. @version $Revision: 1.4 $
Revisions:
20020730 Adrian Brock:
20020930 Juha Lindfors:
An attribute can have zero or more values. The value may be null.
When there are multiple values for a particular attribute, the collection of values may be specifically ordered or unordered. This interface provides a method for determining whether the order is maintained.
If the values of an attribute are ordered, then duplicates are allowed. If the values are unordered then duplicates are not allowed.
If the values are unordered then the indexed operations work as if the values added previously to the attribute had been done using ordered semantics. For example, if the values "a", "b" and "c" were previously added to an unordered attribute using "add("a"); add("b"); add("c");
", it is equivalent to adding the same objects to an ordered attribute using "add(0,"a"); add(1,"b"); add(2,"c");
". In this case, if we do "remove(1)
" on the unordered list, the value "b" is removed, changing the index of "c" to 1.
Multiple null values can be added to an attribute. It is not the same as having no values on an attribute. If a null value is added to an unordered attribute which already has a null value, the add
method has no effect.
A directory may optionally provide information about the syntax of an attribute's value via a schema. The methods getAttributeDefinition
and getAttributeSyntaxDefinition
return the schema definitions if they exist.
Note that updates to the attribute via ths interface do not affect the directory directly. The only mechanism for modifying the directory is through the {@link DirContext}.
Concrete implementations of this Attribute
interface may be either static or dynamic, and this interface does not make any distinction between the two types. A static attribute implementation retrieves its value from the directory once and stores it locally, a dynamic attribute implementation will go back to the directory for each request.
Attribute objects inherit the {@link Node} interface, but since they are notactually child nodes of the element they describe, the DOM does not consider them part of the document tree. Thus, the {@link Node} methods{@link Node#getParent()}, {@link Node#getPreviousSibling()}, and {@link Node#getNextSibling()} all return null
for Attributeinstances.
Attribute extends {@link HasText}. To get the value of the attribute use {@link HasText#getText()}. @author $Author$ @version $Date$ $Revision: 43$
An instance of this class is a representation of a single attribute in the source document and is not modifiable. The {@link OutputDocument#replace(Attributes,Map)} and {@link OutputDocument#replace(Attributes, boolean convertNamesToLowerCase)} methodsprovide the means to add, delete or modify attributes and their values in an {@link OutputDocument}.
Obtained using the {@link Attributes#get(String key)} method.
See also the XML 1.0 specification for attributes. @see Attributes
Attributes that declare namespaces such as xmlns="http://www.w3.org/TR/1999/xhtml"
or xmlns:xlink="http://www.w3.org/TR/1999/xlink"
are stored separately on the elements where they appear. They are never represented as Attribute
objects.
Attribute
TODO
@author Felix Project Team
The following features are supported:
Attribute
defines an XML attribute. An attribute may have a name, an optional namespace and a value.
An instance of this interface should represent an Attribute from an XML schema.
@author dzwiers www.refractions.net @source $URL$ 3.2.2 Attributes Elements may have associated properties, called attributes, which may have values (by default, or set by authors or scripts). Attribute/value pairs appear before the final ">" of an element's start tag. Any number of (legal) attribute value pairs, separated by spaces, may appear in an element's start tag. They may appear in any order. In this example, the id attribute is set for an H1 element: In certain cases, authors may specify the value of an attribute without any quotation marks. The attribute value may only contain letters (a-z and A-Z), digits (0-9), hyphens (ASCII decimal 45), periods (ASCII decimal 46), underscores (ASCII decimal 95), and colons (ASCII decimal 58). We recommend using quotation marks even when it is possible to eliminate them. Attribute names are always case-insensitive. Attribute values are generally case-insensitive. The definition of each attribute in the reference manual indicates whether its value is case-insensitive. All the attributes defined by this specification are listed in the attribute index.
By default, SGML requires that all attribute values be delimited using either double quotation marks (ASCII decimal 34) or single quotation marks (ASCII decimal 39). Single quote marks can be included within the attribute value when the value is delimited by double quote marks, and vice versa. Authors may also use numeric character references to represent double quotes (") and single quotes ('). For doublequotes authors can also use the character entity reference ". {@.html
This is an identified heading thanks to the id attribute
}
yyyy-MM-dd'T'HH:mm:ss
. ...
// Create numeric attributes "length" and "weight"
Attribute length = new Attribute("length");
Attribute weight = new Attribute("weight");
// Create vector to hold nominal values "first", "second", "third"
FastVector my_nominal_values = new FastVector(3);
my_nominal_values.addElement("first");
my_nominal_values.addElement("second");
my_nominal_values.addElement("third");
// Create nominal attribute "position"
Attribute position = new Attribute("position", my_nominal_values);
...
@author Eibe Frank (eibe@cs.waikato.ac.nz) @version $Revision: 1.44 $
Attributes are immutable and therefore any attempts to modify them will result in an {@link UnsupportedOperationException}.
There are two types of attribute: real attributes and virtual attributes. Real attributes can be created using the {@link AttributeBuilder} class or by using the various staticfactory methods in the {@link Attributes} class, whereas virtualattributes are represented using the {@link VirtualAttribute}class. New attribute implementations can be implemented by either implementing this interface or by extending {@link AbstractAttribute}.
The notion of an "attribute" is similar to that of an attribute in UML.
This interface is capable of modelling "primitive data", things like strings, numerics, dates, etc... However for "complex data" (that is non-primitive data types which are made up other primitive data types), a specific sub-interface is used, see {@link ComplexAttribute}.
An analogy for an attribute is a "field" in a java object. A field also brings together a field name, value and type.
Attribute attribute = ...; if ( attribute.getType().isIdentified() ) { String id = attribute.getID(); }
Attribute
element behaves.
Models an element attribute.
@author Daniel Fernández @since 2.0.0Design decision: Attribute is also a item. The reason is it simplifies the use of xpath. A xpath migt return either elements or attributes, so... @author tomyeh @see Element
yyyy-MM-dd'T'HH:mm:ss
. ...
// Create numeric attributes "length" and "weight"
Attribute length = new Attribute("length");
Attribute weight = new Attribute("weight");
// Create list to hold nominal values "first", "second", "third"
List
my_nominal_values.add("first");
my_nominal_values.add("second");
my_nominal_values.add("third");
// Create nominal attribute "position"
Attribute position = new Attribute("position", my_nominal_values);
...
@author Eibe Frank (eibe@cs.waikato.ac.nz) @version $Revision: 6889 $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|