Class DublinCoreSearchCriterionDefinition
- java.lang.Object
-
- org.ametys.runtime.parameter.Parameter<MetadataType>
-
- org.ametys.web.frontoffice.search.metamodel.impl.AbstractDefaultSearchCriterionDefinition
-
- org.ametys.web.frontoffice.search.metamodel.impl.DublinCoreSearchCriterionDefinition
-
- All Implemented Interfaces:
SearchCriterionDefinition
- Direct Known Subclasses:
ResourceFormatSearchCriterionDefinition
public class DublinCoreSearchCriterionDefinition extends AbstractDefaultSearchCriterionDefinition
SearchCriterionDefinition
forResourceSearchable
proposing a search criterion on a DublinCore metadata of the resource.
-
-
Field Summary
Fields Modifier and Type Field Description private String
_metadataName
-
Constructor Summary
Constructors Constructor Description DublinCoreSearchCriterionDefinition(String id, String pluginName, I18nizableText label, MetadataType type, Optional<Map<String,I18nizableText>> enumeratorEntries, Optional<Searchable> searchable, String metadataName)
Default constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static Optional<Enumerator>
_getEnumerator(Optional<Map<String,I18nizableText>> entries)
protected Stream<String>
_retrieveValues(Object value)
Potentially retrieve multiple values (as a stream) from an untyped client objectQuery
getQuery(Object value, Query.Operator operator, String language, Map<String,Object> contextualParameters)
Gets the query associated to the given value-
Methods inherited from class org.ametys.web.frontoffice.search.metamodel.impl.AbstractDefaultSearchCriterionDefinition
dispose, getEnumeratedValues, getSearchable, isEnumerated, toJSON
-
Methods inherited from class org.ametys.runtime.parameter.Parameter
getDefaultValue, getDescription, getEnumerator, getId, getLabel, getPluginName, getType, getValidator, getWidget, getWidgetParameters, setDefaultValue, setDescription, setEnumerator, setId, setLabel, setPluginName, setType, setValidator, setWidget, setWidgetParameters
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.ametys.web.frontoffice.search.metamodel.SearchCriterionDefinition
getContextPrefixLabels, getId, getLabel, getType, getValidator, getWidget, getWidgetParameters, isTooBigForStaticEnumerator
-
-
-
-
Field Detail
-
_metadataName
private String _metadataName
-
-
Constructor Detail
-
DublinCoreSearchCriterionDefinition
public DublinCoreSearchCriterionDefinition(String id, String pluginName, I18nizableText label, MetadataType type, Optional<Map<String,I18nizableText>> enumeratorEntries, Optional<Searchable> searchable, String metadataName)
Default constructor- Parameters:
id
- The idpluginName
- The plugin namelabel
- The labeltype
- The typeenumeratorEntries
- The enumerator entriessearchable
- theSearchable
metadataName
- The DC metadata name
-
-
Method Detail
-
_getEnumerator
private static Optional<Enumerator> _getEnumerator(Optional<Map<String,I18nizableText>> entries)
-
_retrieveValues
protected Stream<String> _retrieveValues(Object value)
Potentially retrieve multiple values (as a stream) from an untyped client object- Parameters:
value
- The untyped client object- Returns:
- The values
-
getQuery
public Query getQuery(Object value, Query.Operator operator, String language, Map<String,Object> contextualParameters)
Description copied from interface:SearchCriterionDefinition
Gets the query associated to the given value- Parameters:
value
- the valueoperator
- the operatorlanguage
- The current search language.contextualParameters
- the search contextual parameters.- Returns:
- the query associated to the given value
-
-