Class ResultFactory
- java.lang.Object
-
- com.funnelback.publicui.search.model.padre.factories.ResultFactory
-
public class ResultFactory extends java.lang.ObjectBuildsResults from various input sources.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classResultFactory.Metadataprivate static classResultFactory.MetadataClassprivate static classResultFactory.MetadataValue
-
Field Summary
Fields Modifier and Type Field Description private static org.apache.logging.log4j.Loggerlog
-
Constructor Summary
Constructors Constructor Description ResultFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ResultfromMap(java.util.Map<java.lang.String,java.lang.String> data, QuickLinks ql, Explain explain, Collapsed collapsed)Builds aResultfrom a Map containing the valuesstatic ResultfromXmlStreamReader(javax.xml.stream.XMLStreamReader xmlStreamReader)Builds aResultfrom anXMLStreamReaderDoesn'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 booleanisDocumentVisibleToUser(java.util.Map<java.lang.String,java.lang.String> data)private static CollapsedparseCollapsed(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.StringparseTags(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 aResultfrom 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 aResultfrom anXMLStreamReaderDoesn't supports MetaData reading. Assumes that the stream is already inside thetag - Parameters:
xmlStreamReader- TheXMLStreamReaderto 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.XMLStreamExceptionParses 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
-
-