com.ibm.openpages.api.search

Class DateFacetParam

  • java.lang.Object
    • com.ibm.openpages.api.search.DateFacetParam


  • public class DateFacetParam
    extends java.lang.Object
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class and Description
      static class  DateFacetParam.DateFacetAction
      The 'A' value in: {!T A}[DATA] o = OnDate, r = RangeDate, p = PreviousDays, & n = NextDays
      static class  DateFacetParam.DateFacetType
      The 'T' value in: {!T A}[DATA] !c = CreationDate, !l = LastModifiedDate, & !o = OtherDates
    • Constructor Summary

      Constructors 
      Constructor and Description
      DateFacetParam(java.lang.String dateData)
      Constructs a DateFacetParam object to be used for date facet search.
    • Constructor Detail

      • DateFacetParam

        public DateFacetParam(java.lang.String dateData)
        Constructs a DateFacetParam object to be used for date facet search. Takes a date facet string based on OP's date facet URI and converts it into Solr consumable date facet. The input string format is: &fdt={!T A}[DATA] Where: T == Type of date facet -- !c = creation date, !l = last modified date, and !o = other date A == Action on date facet -- o = on date, r = range date, p = previous days, and n = next days DATA = Data of date facet -- "YYYY-MM-DD" = for "on date", "YYYY-MM-DD TO YYYY-MM-DD" = for range date, and # = for previous or next days Examples of OP date facet URI: {!c o}[2016-01-01] {!c r}[2016-01-01 TO 2016-12-31] {!l o}[2015-01-01] {!l r}[2015-01-01 TO 2015-12-31] {!o o}[2016-01-01] {!o r}[2015-01-01 TO 2015-03-31] {!o p}[10] {!o n}[11]
        Parameters:
        dateData - The date facet syntax
    • Method Detail

      • isValid

        public boolean isValid()
        Checks to see if this object contains a valid date or not.
        Returns:
        'true' if the date if valid, 'false' otherwise.
      • getType

        public DateFacetParam.DateFacetType getType()
        Get the date facet type: Creation Date, Last Modified Date, Other Dates
        Returns:
        The date facet type.
      • setType

        public void setType(DateFacetParam.DateFacetType type)
        Set the date facet type: Creation Date, Last Modified Date, Other Dates
        Parameters:
        type - The date facet type.
      • getAction

        public DateFacetParam.DateFacetAction getAction()
        Get the date facet action: On Date, Range Date, Previous Days, Next Days
        Returns:
        The date facet action.
      • setAction

        public void setAction(DateFacetParam.DateFacetAction action)
        Set the date facet action: On Date, Range Date, Previous Days, Next Days
        Parameters:
        action - The date facet action.
      • getDate

        public java.lang.String getDate()
        Get the date facet data formated for Solr usage.
        Returns:
        The date facet data.
      • setDate

        public void setDate(java.lang.String date)
        Set the date facet data for Solr usage.
        Parameters:
        date - The date facet data.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object

Licensed Materials - Property of IBM
OpenPages with Watson (PID: 5725-D51)
© Copyright IBM Corporation 2013, 2021. All Rights Reserved.
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.