Class SchemaFAQPage

java.lang.Object
com.oorian.schema.SchemaType
com.oorian.schema.SchemaFAQPage
All Implemented Interfaces:
Jsonable

public class SchemaFAQPage extends SchemaType
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 Details

    • SchemaFAQPage

      public SchemaFAQPage()
  • Method Details

    • addQuestion

      public SchemaFAQPage addQuestion(String question, String answer)
      Adds a question and answer to the FAQ.
      Parameters:
      question - The question text
      answer - The answer text (can include HTML)
      Returns:
      This FAQ page for method chaining
    • toJsonValue

      public JsonValue toJsonValue()
      Description copied from interface: Jsonable
      Serializes this object to a JsonValue.
      Specified by:
      toJsonValue in interface Jsonable
      Specified by:
      toJsonValue in class SchemaType
      Returns:
      the JSON representation of this object.