Class Id
The ID element provides a permanent, globally unique identifier for feeds and entries. IDs must never change, even if the resource is moved or its content is modified.
Requirements for IDs per RFC 4287:
- Must be a valid IRI (Internationalized Resource Identifier)
- Must be permanent - never changes
- Must be unique - no two feeds or entries should share the same ID
- Should be dereferenceable when possible (but not required)
Common ID formats:
- Tag URI -
tag:example.org,2024:entry-123 - HTTP URL -
http://example.org/posts/123 - UUID URN -
urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a
Schema
atomId = element atom:id { atomCommonAttributes, (atomUri) }
Examples:
Specification:
Represents an
See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Id
Normal constructor.- Parameters:
text
- The id element contents.
-
Id
public Id()Bean constructor.
-
-
Method Details
-
getText
Bean property getter:text .The content of this identifier.
- Returns:
- The property value, or
null if it is not set.
-
setText
Bean property setter:text .The content of this identifier.
- Parameters:
value
- The new value for this property.
Can benull to unset the property.- Returns:
- This object
-
setBase
Description copied from class:Common
-
setLang
Description copied from class:Common
Bean property setter:lang .Sets the natural language of the element's content (xml:lang attribute).
Example:
Text
title =new Text("text" ) .setText("Mon Blog" ) .setLang("fr" );
-