Package com.oorian.schema
Class SchemaFAQPage
java.lang.Object
com.oorian.schema.SchemaType
com.oorian.schema.SchemaFAQPage
- All Implemented Interfaces:
Jsonable
Represents a Schema.org FAQPage.
A FAQPage is a page containing a collection of frequently asked questions and answers. Search engines can display this content directly in search results as expandable FAQ rich snippets.
Usage:
SchemaFAQPage faq = new SchemaFAQPage()
.addQuestion(
"What is Oorian?",
"Oorian is a Java web framework for building real-time applications.")
.addQuestion(
"Is Oorian open source?",
"Oorian is free for non-commercial use with commercial licensing available.");
head.addElement(new JsonLdScript(faq));
- Since:
- 2025
- Version:
- 1.0
- Author:
- Claude
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddQuestion(String question, String answer) Adds a question and answer to the FAQ.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
-
SchemaFAQPage
public SchemaFAQPage()
-
-
Method Details
-
addQuestion
Adds a question and answer to the FAQ.- Parameters:
question- The question textanswer- The answer text (can include HTML)- Returns:
- This FAQ 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.
-