Represents metadata to associate with Amazon EC2 resources. Each tag consists of a user-defined key and value. Use tags to categorize EC2 resources, such as by purpose, owner, or environment.
This class provides a representation of a tag. A tag is consists of three parts: the ID of tag, a String
representation of the tag, and the number of times the tag is used to label gnizr bookmarks.
The ID of the tag is usually assigned by the database system when the tag is created for the first time.
@author Harry Chen @since 2.2N.B.: This is not the same thing as a PFC {@code Tag}. It's created from user-entered text (e.g., {@code grocery}), but is equal to other tags which differ in name by whitespace, punctuation, plurality, etc. @author coda
The following features are supported:
Tag
object acts as a Label by containing a String
that is a part-of-speech tag.
@author Christopher Manning
@version 2003/02/15 (implements TagFactory correctly now)
AudioFile file = AudioFileIO.read(new File("C:\\test.mp3")); Tag tag = file.getTag();
@author Rapha�l Slinckx
Properties
The Tag interface specifies the setter and getter methods for the core pageContext and parent properties.
The JSP page implementation object invokes setPageContext and setParent, in that order, before invoking doStartTag() or doEndTag().
Methods
There are two main actions: doStartTag and doEndTag. Once all appropriate properties have been initialized, the doStartTag and doEndTag methods can be invoked on the tag handler. Between these invocations, the tag handler is assumed to hold a state that must be preserved. After the doEndTag invocation, the tag handler is available for further invocations (and it is expected to have retained its properties).
Lifecycle
Lifecycle details are described by the transition diagram below, with the following comments:
Once all invocations on the tag handler are completed, the release method is invoked on it. Once a release method is invoked all properties, including parent and pageContext, are assumed to have been reset to an unspecified value. The page compiler guarantees that release() will be invoked on the Tag handler before the handler is released to the GC.
Empty and Non-Empty Action
If the TagLibraryDescriptor file indicates that the action must always have an empty action, by an <body-content> entry of "empty", then the doStartTag() method must return SKIP_BODY. Otherwise, the doStartTag() method may return SKIP_BODY or EVAL_BODY_INCLUDE.
If SKIP_BODY is returned the body, if present, is not evaluated.
If EVAL_BODY_INCLUDE is returned, the body is evaluated and "passed through" to the current out.
Take the following HTML segment as an example:
<p>This is a sample paragraph.</p>
The "<p>
" is represented by a {@link StartTag} object, and the "</p>
" is represented by an {@link EndTag} object,both of which are subclasses of the Tag
class. The whole segment, including the start tag, its corresponding end tag and all of the content in between, is represented by an {@link Element} object.
<
' character found in the source document is considered to be the start of a tag. The characters following it are compared with the {@linkplain TagType#getStartDelimiter() start delimiters}of all the {@linkplain TagType#register() registered} {@linkplain TagType tag types}, and a list of matching tag types is determined. The analysis performed in relation to each candidate tag type is a two-stage process:
The {@link TagType#isValidPosition(Source, int pos, int[] fullSequentialParseData)} method is responsible for this checkand has a common default implementation for all tag types (although custom tag types can override it if necessary). Its behaviour differs depending on whether or not a {@linkplain Source#fullSequentialParse() full sequential parse} is peformed.See the documentation of the {@link TagType#isValidPosition(Source,int,int[]) isValidPosition} method for full details.
null
and the process continues with the next candidate tag type. >
' character is taken to be an {@linkplain #isUnregistered() unregistered} tag.Some tag search methods ignore unregistered tags. See the {@link #isUnregistered()} method for more information.See the documentation of the {@link TagType} class for more details on how tags are recognised.
Methods that get tags in a source document are collectively referred to as Tag Search Methods. They are found mostly in the {@link Source} and {@link Segment} classes, and can be generally categorised as follows:
name
which is used to specify the {@linkplain #getName() name} of the tag to search for.Specifying a name that ends in a colon (:
) searches for all elements or tags in the specified XML namespace. tagType
which is used to specify the {@linkplain #getTagType() type} of the tag to search for.In some methods the search parameter is restricted to the {@link StartTagType} or {@link EndTagType} subclass of TagType
.Tag
represents a Jelly custom tag.
This class represents a syntax dictionary tag (should probably be renamed to DictionaryTag or something similar). Like Function it inherits from Procedure as a Tag is really a Procedure - it takes parameters and returns no value. Bear that in mind :)
A tag has a number of states with regards to it's HTML/XML compatibility. For example:
AudioFile file = AudioFileIO.read(new File("C:\\test.mp3")); Tag tag = file.getTag();
@author Raphael Slinckx
@author Paul Taylor
Tags are used to group related managed objects together into categories.
Tag
simply associates a numeric ID with a String description.
@author Len Trigg
@version $Revision: 1.13 $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|