Class ResultFactory
- java.lang.Object
-
- com.funnelback.publicui.search.model.padre.factories.ResultFactory
-
public class ResultFactory extends java.lang.Object
BuildsResult
s from various input sources.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
ResultFactory.Metadata
private static class
ResultFactory.MetadataClass
private static class
ResultFactory.MetadataValue
-
Field Summary
Fields Modifier and Type Field Description private static org.apache.logging.log4j.Logger
log
-
Constructor Summary
Constructors Constructor Description ResultFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Result
fromMap(java.util.Map<java.lang.String,java.lang.String> data, QuickLinks ql, Explain explain, Collapsed collapsed)
Builds aResult
from a Map containing the valuesstatic Result
fromXmlStreamReader(javax.xml.stream.XMLStreamReader xmlStreamReader)
Builds aResult
from anXMLStreamReader
Doesn't supports MetaData reading.(package private) static java.util.Optional<java.lang.Boolean>
getBoolean(java.util.Map<java.lang.String,java.lang.String> data, java.lang.String tag)
(package private) static boolean
isDocumentVisibleToUser(java.util.Map<java.lang.String,java.lang.String> data)
private static Collapsed
parseCollapsed(javax.xml.stream.XMLStreamReader reader)
private static java.util.Set<java.lang.String>
parseGScopeSet(java.lang.String strGScopesSet)
Parses thefield into a Set of Integers If it hits any failure it will return the set of as many as it parsed, or the empty set. private static java.lang.String
parseTags(javax.xml.stream.XMLStreamReader reader)
Parses tags associated with a results.
-
-
-
Method Detail
-
fromMap
public static Result fromMap(java.util.Map<java.lang.String,java.lang.String> data, QuickLinks ql, Explain explain, Collapsed collapsed)
Builds aResult
from a Map containing the values- Parameters:
data
- The map containing the valuesql
- Quick links for the resultsexplain
- Explain data for the resultcollapsed
- Collapsing information for the result- Returns:
- A result with populated values
-
isDocumentVisibleToUser
static boolean isDocumentVisibleToUser(java.util.Map<java.lang.String,java.lang.String> data)
-
getBoolean
static java.util.Optional<java.lang.Boolean> getBoolean(java.util.Map<java.lang.String,java.lang.String> data, java.lang.String tag)
-
parseGScopeSet
private static java.util.Set<java.lang.String> parseGScopeSet(java.lang.String strGScopesSet)
Parses thefield into a Set of Integers If it hits any failure it will return the set of as many as it parsed, or the empty set.
-
fromXmlStreamReader
public static Result fromXmlStreamReader(javax.xml.stream.XMLStreamReader xmlStreamReader) throws javax.xml.stream.XMLStreamException
Builds aResult
from anXMLStreamReader
Doesn't supports MetaData reading. Assumes that the stream is already inside thetag - Parameters:
xmlStreamReader
- TheXMLStreamReader
to read from- Returns:
- A Result with populated values
- Throws:
javax.xml.stream.XMLStreamException
-
parseTags
private static java.lang.String parseTags(javax.xml.stream.XMLStreamReader reader) throws javax.xml.stream.XMLStreamException
Parses tags associated with a results. href attributes are ignored because the URL will be rebuilt manually if needed.- Parameters:
reader
-- Returns:
- Throws:
javax.xml.stream.XMLStreamException
-
parseCollapsed
private static Collapsed parseCollapsed(javax.xml.stream.XMLStreamReader reader) throws javax.xml.stream.XMLStreamException
- Throws:
javax.xml.stream.XMLStreamException
-
-