Class IndexerUtils
Object
IndexerUtils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Indexerstatic StringgetAttribute(String coverageName, String domainName, Indexer indexer) Look for the specified coverageName inside the provided Indexer and return the attributes of the specified domain.static Indexer.Coverages.CoveragegetCoverage(Indexer indexer, String name) Return an indexerIndexer.Coverages.Coverageobject from the specifiedIndexer, referring to the requested name.static DomainTypegetDomain(DomainType domain, DomainsType refDomains) static StringgetParam(ParametersType params, String parameterName) Return the parameter string value of the specified parameter name from the provided parameters elementstatic StringgetParameter(String parameterName, File indexerFile) Return the parameter string value of the specified parameter name from the indexer defined in the specified file (if exists).static StringgetParameter(String parameterName, Indexer indexer) Return the parameter string value of the specified parameter name from the provided indexerstatic booleangetParameterAsBoolean(String parameterName, Indexer indexer) Return the parameter value (as a boolean) of the specified parameter name from the provider indexerstatic <T extends Enum>
TgetParameterAsEnum(String parameterName, Class<T> enumClass, Indexer indexer) Return the parameter value (as a boolean) of the specified parameter name from the provider indexerstatic IntegergetParameterAsInteger(String parameterName, Indexer indexer) Return the parameter value (as an integer) of the specified parameter name from the provider indexer, or null, if the parameter was not foundstatic SchemaTypegetSchema(Indexer indexer, Indexer.Coverages.Coverage coverage) Get aSchemaTypeelement for the specifiedIndexer.Coverages.Coverage.static SourceSPIProviderFactorygetSourceSPIProviderFactory(Indexer indexer) static IndexerinitializeIndexer(ParametersType params, File parent) static voidparseAdditionalDomains(String attributes, List<DomainType> domainList) Parse additional domainsstatic StringrefineParameterValue(String parameterName, String parameterValue) Utility method which does special checks on specific parametersstatic voidsetAttributes(DomainType domain, String values) Set the attributes of the specified domain, getting values from the value String In case the value contains a ";" separator, add a different attribute for each element.static voidsetParam(List<ParametersType.Parameter> parameters, String parameterName, String parameterValue) Set the parameter having the specified name with the specified valuestatic voidsetParam(List<ParametersType.Parameter> parameters, Properties props, String propName) Get the value of a property name from a properties object and set that value to a parameter with the same namestatic voidSet the given parameter on the given indexerstatic voidsetPropertyCollectors(Indexer indexer, String propertyCollectors) BuildIndexer.Collectorselement by parsing the specified propertyCollectors, and put them on the specified indexer object.
-
Field Details
-
INDEXER_XML
- See Also:
-
INDEXER_PROPERTIES
- See Also:
-
-
Constructor Details
-
IndexerUtils
public IndexerUtils()
-
-
Method Details
-
setPropertyCollectors
BuildIndexer.Collectorselement by parsing the specified propertyCollectors, and put them on the specified indexer object. -
getCoverage
Return an indexerIndexer.Coverages.Coverageobject from the specifiedIndexer, referring to the requested name.- Parameters:
indexer- the mainIndexerinstancename- the name of theIndexer.Coverages.Coverageelement to be retrieved.- Returns:
- the
Indexer.Coverages.Coverageelement for the specified name (if any).
-
refineParameterValue
Utility method which does special checks on specific parameters -
setAttributes
Set the attributes of the specified domain, getting values from the value String In case the value contains a ";" separator, add a different attribute for each element. -
setParam
public static void setParam(List<ParametersType.Parameter> parameters, String parameterName, String parameterValue) Set the parameter having the specified name with the specified value -
setParam
public static void setParam(List<ParametersType.Parameter> parameters, Properties props, String propName) Get the value of a property name from a properties object and set that value to a parameter with the same name -
getParameterAsBoolean
Return the parameter value (as a boolean) of the specified parameter name from the provider indexer -
getParameterAsInteger
Return the parameter value (as an integer) of the specified parameter name from the provider indexer, or null, if the parameter was not found -
getParameterAsEnum
public static <T extends Enum> T getParameterAsEnum(String parameterName, Class<T> enumClass, Indexer indexer) Return the parameter value (as a boolean) of the specified parameter name from the provider indexer -
getParam
Return the parameter string value of the specified parameter name from the provided parameters element -
getParameter
Return the parameter string value of the specified parameter name from the provided indexer -
getParameter
Return the parameter string value of the specified parameter name from the indexer defined in the specified file (if exists). -
parseAdditionalDomains
Parse additional domains -
getDomain
-
getAttribute
Look for the specified coverageName inside the provided Indexer and return the attributes of the specified domain.- Returns:
- TODO: Code is going complex. We should use a visitor
-
getSchema
Get aSchemaTypeelement for the specifiedIndexer.Coverages.Coverage. TheIndexerobject will be used in case of an externally referenced schema.- Parameters:
indexer- the mainIndexerinstancecoverage- theIndexer.Coverages.Coverageelement with the Schema to be returned.
-
createDefaultIndexer
-
initializeIndexer
-
getSourceSPIProviderFactory
-
setParam
Set the given parameter on the given indexer- Parameters:
indexer- indexer on which to set the paramparamName- parameter nameparamValue- parameter value
-