| java.lang.Object org.restlet.data.Metadata org.restlet.data.Tag
Tag | final public class Tag extends Metadata (Code) | | Validation tag equivalent to the HTTP entity tag. "A strong entity tag may be
shared by two entities of a resource only if they are equivalent by octet
equality. A weak entity tag may be shared by two entities of a resource
only if the entities are equivalent and could be substituted for each other
with no significant change in semantics."
See Also: HTTP
* Entity Tags See Also: HTTP
* Entity Tag Cache Validators author: Jerome Louvel (contact@noelios.com) |
Field Summary | |
final public static Tag | ALL Tag matching any other tag, used in call's condition data. |
Constructor Summary | |
public | Tag() Default constructor. | public | Tag(String opaqueTag) Constructor of weak tags. | public | Tag(String opaqueTag, boolean weak) Constructor. |
Method Summary | |
public boolean | equals(Object object) Indicates if both tags are equal.
Parameters: object - The object to compare to. | public boolean | equals(Object object, boolean checkWeakness) Indicates if both tags are equal.
Parameters: object - The object to compare to. Parameters: checkWeakness - the equality test takes care or not of the weakness. | public String | format() Returns tag formatted as an HTTP tag string. | public String | getDescription() Returns the description. | public String | getName() Returns the name, corresponding to an HTTP opaque tag value. | public int | hashCode() | public boolean | isWeak() Indicates if the tag is weak. | public static Tag | parse(String httpTag) Parses a tag formatted as defined by the HTTP standard.
Parameters: httpTag - The HTTP tag string; if it starts with 'W/' the tag will bemarked as weak and the data following the 'W/' used as the tag;otherwise it should be surrounded with quotes (e.g.,"sometag"). |
ALL | final public static Tag ALL(Code) | | Tag matching any other tag, used in call's condition data.
|
Tag | public Tag()(Code) | | Default constructor. The opaque tag is set to null and the weakness
indicator is set to true.
|
Tag | public Tag(String opaqueTag)(Code) | | Constructor of weak tags.
Parameters: opaqueTag - The tag value. |
Tag | public Tag(String opaqueTag, boolean weak)(Code) | | Constructor.
Parameters: opaqueTag - The tag value. Parameters: weak - The weakness indicator. |
equals | public boolean equals(Object object)(Code) | | Indicates if both tags are equal.
Parameters: object - The object to compare to. True if both tags are equal. |
equals | public boolean equals(Object object, boolean checkWeakness)(Code) | | Indicates if both tags are equal.
Parameters: object - The object to compare to. Parameters: checkWeakness - the equality test takes care or not of the weakness. True if both tags are equal. |
getDescription | public String getDescription()(Code) | | Returns the description.
The description. |
getName | public String getName()(Code) | | Returns the name, corresponding to an HTTP opaque tag value.
The name, corresponding to an HTTP opaque tag value. |
hashCode | public int hashCode()(Code) | |
|
isWeak | public boolean isWeak()(Code) | | Indicates if the tag is weak.
True if the tag is weak, false if the tag is strong. |
parse | public static Tag parse(String httpTag)(Code) | | Parses a tag formatted as defined by the HTTP standard.
Parameters: httpTag - The HTTP tag string; if it starts with 'W/' the tag will bemarked as weak and the data following the 'W/' used as the tag;otherwise it should be surrounded with quotes (e.g.,"sometag"). A new tag instance. See Also: HTTP
* Entity Tags |
|
|