Package com.oorian.schema
Class SchemaBreadcrumbList
java.lang.Object
com.oorian.schema.SchemaType
com.oorian.schema.SchemaBreadcrumbList
- All Implemented Interfaces:
Jsonable
Represents a Schema.org BreadcrumbList.
A BreadcrumbList represents a navigation trail showing the page's position in the site hierarchy. Search engines use this to display breadcrumb navigation in search results.
Usage:
SchemaBreadcrumbList breadcrumbs = new SchemaBreadcrumbList()
.addItem("Home", "https://oorian.com/")
.addItem("Features", "https://oorian.com/features")
.addItem("Flexible Communication", "https://oorian.com/features/flexible-communication");
head.addElement(new JsonLdScript(breadcrumbs));
- Since:
- 2025
- Version:
- 1.0
- Author:
- Claude
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds a breadcrumb item to the list.Serializes this object to aJsonValue.Methods inherited from class com.oorian.schema.SchemaType
createBaseJson, getType, initFromJsonMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.oorian.json.Jsonable
initFromJson, initFromJson, toJsonString
-
Constructor Details
-
SchemaBreadcrumbList
public SchemaBreadcrumbList()
-
-
Method Details
-
addItem
Adds a breadcrumb item to the list.Items should be added in order from the home page to the current page. The position is automatically assigned based on the order of addition.
- Parameters:
name- The display name of the breadcrumburl- The URL of the page- Returns:
- This breadcrumb list for method chaining
-
toJsonValue
Description copied from interface:JsonableSerializes this object to aJsonValue.- Specified by:
toJsonValuein interfaceJsonable- Specified by:
toJsonValuein classSchemaType- Returns:
- the JSON representation of this object.
-