Package com.oorian.schema
Class SchemaWebPage
java.lang.Object
com.oorian.schema.SchemaType
com.oorian.schema.SchemaWebPage
- All Implemented Interfaces:
Jsonable
Represents a Schema.org WebPage.
A WebPage is a distinct page within a website. This schema type provides metadata about the page itself, including when it was last modified, its primary topic, and breadcrumb navigation.
Usage:
SchemaWebPage page = new SchemaWebPage()
.setName("Features")
.setDescription("Explore Oorian's features")
.setUrl("https://oorian.com/features")
.setDateModified("2025-01-15");
head.addElement(new JsonLdScript(page));
- Since:
- 2025
- Version:
- 1.0
- Author:
- Claude
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsetBreadcrumb(SchemaBreadcrumbList breadcrumb) Sets the breadcrumb navigation for the page.setDateModified(String dateModified) Sets the date the page was last modified (ISO 8601 format).setDatePublished(String datePublished) Sets the date the page was first published (ISO 8601 format).setDescription(String description) Sets a description of the web page.setInLanguage(String inLanguage) Sets the language of the page (BCP 47 format).Sets the name/title of the web page.setPublisher(SchemaOrganization publisher) Sets the publisher of the page.Sets the URL of the web page.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
-
SchemaWebPage
public SchemaWebPage()
-
-
Method Details
-
setName
Sets the name/title of the web page.- Parameters:
name- The page name- Returns:
- This page for method chaining
-
setDescription
Sets a description of the web page.- Parameters:
description- The page description- Returns:
- This page for method chaining
-
setUrl
Sets the URL of the web page.- Parameters:
url- The page URL- Returns:
- This page for method chaining
-
setDatePublished
Sets the date the page was first published (ISO 8601 format).- Parameters:
datePublished- The publication date (e.g., "2025-01-01")- Returns:
- This page for method chaining
-
setDateModified
Sets the date the page was last modified (ISO 8601 format).- Parameters:
dateModified- The modification date (e.g., "2025-01-15")- Returns:
- This page for method chaining
-
setBreadcrumb
Sets the breadcrumb navigation for the page.- Parameters:
breadcrumb- The breadcrumb list- Returns:
- This page for method chaining
-
setPublisher
Sets the publisher of the page.- Parameters:
publisher- The organization that published the page- Returns:
- This page for method chaining
-
setInLanguage
Sets the language of the page (BCP 47 format).- Parameters:
inLanguage- The language code (e.g., "en", "en-US")- Returns:
- This page 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.
-