Search in sources :

Example 6 with PDStoredBusinessEntity

use of com.helger.pd.indexer.storage.PDStoredBusinessEntity in project phoss-directory by phax.

the class PublicSearchXServletHandler method handleRequest.

public void handleRequest(@Nonnull final IRequestWebScopeWithoutResponse aRequestScope, @Nonnull final UnifiedResponse aUnifiedResponse) throws Exception {
    if (SearchRateLimit.INSTANCE.rateLimiter() != null) {
        final String sRateLimitKey = "ip:" + aRequestScope.getRemoteAddr();
        final boolean bOverLimit = SearchRateLimit.INSTANCE.rateLimiter().overLimitWhenIncremented(sRateLimitKey);
        if (bOverLimit) {
            // Too Many Requests
            if (LOGGER.isDebugEnabled())
                LOGGER.debug("REST search rate limit exceeded for " + sRateLimitKey);
            aUnifiedResponse.setStatus(CHttp.HTTP_TOO_MANY_REQUESTS);
            return;
        }
    }
    final IRequestParamContainer aParams = aRequestScope.params();
    // http://127.0.0.1:8080/search -> null
    // http://127.0.0.1:8080/search/ -> "/"
    // http://127.0.0.1:8080/search/x -> "/x"
    final String sPathInfo = StringHelper.getNotNull(aRequestScope.getPathInfo(), "");
    final ESearchVersion eSearchVersion = ESearchVersion.getFromPathInfoOrNull(sPathInfo);
    if (eSearchVersion == ESearchVersion.V1) {
        // Version 1.0
        // Determine output format
        final ICommonsList<String> aParts = StringHelper.getExploded('/', sPathInfo.substring(1));
        final String sFormat = aParts.getAtIndex(1);
        final EPDOutputFormat eOutputFormat = EPDOutputFormat.getFromIDCaseInsensitiveOrDefault(sFormat, EPDOutputFormat.XML);
        if (LOGGER.isDebugEnabled())
            LOGGER.debug("Using REST query API 1.0 with output format " + eOutputFormat + " (" + sPathInfo + ") from '" + aRequestScope.getUserAgent().getAsString() + "'");
        // Determine result offset and count
        final int nResultPageIndex = aParams.getAsInt(PARAM_RESULT_PAGE_INDEX, aParams.getAsInt("rpi", DEFAULT_RESULT_PAGE_INDEX));
        if (nResultPageIndex < 0) {
            LOGGER.error("ResultPageIndex " + nResultPageIndex + " is invalid. It must be >= 0.");
            aUnifiedResponse.setStatus(CHttp.HTTP_BAD_REQUEST);
            return;
        }
        final int nResultPageCount = aParams.getAsInt(PARAM_RESULT_PAGE_COUNT, aParams.getAsInt("rpc", DEFAULT_RESULT_PAGE_COUNT));
        if (nResultPageCount <= 0) {
            LOGGER.error("ResultPageCount " + nResultPageCount + " is invalid. It must be > 0.");
            aUnifiedResponse.setStatus(CHttp.HTTP_BAD_REQUEST);
            return;
        }
        final int nFirstResultIndex = nResultPageIndex * nResultPageCount;
        final int nLastResultIndex = (nResultPageIndex + 1) * nResultPageCount - 1;
        if (nFirstResultIndex > MAX_RESULTS) {
            LOGGER.error("The first result index " + nFirstResultIndex + " is invalid. It must be <= " + MAX_RESULTS + ".");
            aUnifiedResponse.setStatus(CHttp.HTTP_BAD_REQUEST);
            return;
        }
        if (nLastResultIndex > MAX_RESULTS) {
            LOGGER.error("The last result index " + nLastResultIndex + " is invalid. It must be <= " + MAX_RESULTS + ".");
            aUnifiedResponse.setStatus(CHttp.HTTP_BAD_REQUEST);
            return;
        }
        // Format output?
        final boolean bBeautify = aParams.getAsBoolean(PARAM_BEAUTIFY, false);
        // Determine query terms
        final StringBuilder aSBQueryString = new StringBuilder();
        final ICommonsMap<EPDSearchField, ICommonsList<String>> aQueryValues = new CommonsHashMap<>();
        for (final EPDSearchField eSF : EPDSearchField.values()) {
            final String sFieldName = eSF.getFieldName();
            // Check if one or more request parameters are present for the current
            // search field
            final ICommonsList<String> aValues = aParams.getAsStringList(sFieldName);
            if (aValues != null && aValues.isNotEmpty()) {
                aQueryValues.put(eSF, aValues);
                for (final String sValue : aValues) {
                    if (aSBQueryString.length() > 0)
                        aSBQueryString.append('&');
                    aSBQueryString.append(sFieldName).append('=').append(sValue);
                }
            }
        }
        if (aQueryValues.isEmpty()) {
            LOGGER.error("No valid query term provided!");
            aUnifiedResponse.setStatus(CHttp.HTTP_BAD_REQUEST);
            return;
        }
        if (LOGGER.isDebugEnabled())
            LOGGER.debug("Using the following query terms: " + aQueryValues);
        final ICommonsList<Query> aQueries = new CommonsArrayList<>();
        for (final Map.Entry<EPDSearchField, ICommonsList<String>> aEntry : aQueryValues.entrySet()) {
            final EPDSearchField eField = aEntry.getKey();
            for (final String sQuery : aEntry.getValue()) {
                final Query aQuery = eField.getQuery(sQuery);
                if (aQuery != null)
                    aQueries.add(aQuery);
                else
                    LOGGER.error("Failed to create query '" + sQuery + "' of field " + eField + " - ignoring term!");
            }
        }
        if (aQueries.isEmpty()) {
            LOGGER.error("No valid queries could be created!");
            aUnifiedResponse.setStatus(CHttp.HTTP_BAD_REQUEST);
            return;
        }
        // Build final query term
        final Query aLuceneQuery;
        if (aQueries.size() == 1) {
            aLuceneQuery = aQueries.getFirst();
        } else {
            // Connect all with "AND"
            final BooleanQuery.Builder aBuilder = new BooleanQuery.Builder();
            for (final Query aQuery : aQueries) aBuilder.add(aQuery, Occur.MUST);
            aLuceneQuery = aBuilder.build();
        }
        // How many results to deliver at most
        final int nMaxResults = nLastResultIndex + 1;
        // Search all documents
        final PDStorageManager aStorageMgr = PDMetaManager.getStorageMgr();
        final ICommonsList<PDStoredBusinessEntity> aResultDocs = aStorageMgr.getAllDocuments(aLuceneQuery, nMaxResults);
        // Also get the total hit count for UI display. May be < 0 in case of
        // error
        final int nTotalBEs = aStorageMgr.getCount(aLuceneQuery);
        if (LOGGER.isDebugEnabled())
            LOGGER.debug("  Result for <" + aLuceneQuery + "> (max=" + nMaxResults + ") " + (nTotalBEs == 1 ? "is 1 document" : "are " + nTotalBEs + " documents"));
        // Filter by index/count
        final int nEffectiveLastIndex = Math.min(nLastResultIndex, aResultDocs.size() - 1);
        final List<PDStoredBusinessEntity> aResultView = nFirstResultIndex >= aResultDocs.size() ? Collections.emptyList() : aResultDocs.subList(nFirstResultIndex, nEffectiveLastIndex + 1);
        // Group results by participant ID
        final ICommonsMap<IParticipantIdentifier, ICommonsList<PDStoredBusinessEntity>> aGroupedDocs = PDStorageManager.getGroupedByParticipantID(aResultView);
        final ZonedDateTime aNow = PDTFactory.getCurrentZonedDateTimeUTC();
        // build result
        switch(eOutputFormat) {
            case XML:
                {
                    final XMLWriterSettings aXWS = new XMLWriterSettings().setIndent(bBeautify ? EXMLSerializeIndent.INDENT_AND_ALIGN : EXMLSerializeIndent.NONE);
                    final IMicroDocument aDoc = new MicroDocument();
                    final IMicroElement eRoot = aDoc.appendElement("resultlist");
                    eRoot.setAttribute(RESPONSE_VERSION, eSearchVersion.getVersion());
                    eRoot.setAttribute(RESPONSE_TOTAL_RESULT_COUNT, nTotalBEs);
                    eRoot.setAttribute(RESPONSE_USED_RESULT_COUNT, aResultView.size());
                    eRoot.setAttribute(RESPONSE_RESULT_PAGE_INDEX, nResultPageIndex);
                    eRoot.setAttribute(RESPONSE_RESULT_PAGE_COUNT, nResultPageCount);
                    eRoot.setAttribute(RESPONSE_FIRST_RESULT_INDEX, nFirstResultIndex);
                    eRoot.setAttribute(RESPONSE_LAST_RESULT_INDEX, nEffectiveLastIndex);
                    eRoot.setAttribute(RESPONSE_QUERY_TERMS, aSBQueryString.toString());
                    eRoot.setAttribute(RESPONSE_CREATION_DT, PDTWebDateHelper.getAsStringXSD(aNow));
                    for (final ICommonsList<PDStoredBusinessEntity> aPerParticipant : aGroupedDocs.values()) {
                        final IMicroElement eItem = PDStoredBusinessEntity.getAsSearchResultMicroElement(aPerParticipant);
                        eRoot.appendChild(eItem);
                    }
                    if (false) {
                        // Demo validation
                        final CollectingSAXErrorHandler aErrHdl = new CollectingSAXErrorHandler();
                        final Validator v = new XMLSchemaCache(aErrHdl).getValidator(new ClassPathResource("/schema/directory-search-result-list-v1.xsd"));
                        v.validate(TransformSourceFactory.create(MicroWriter.getNodeAsBytes(aDoc, aXWS)));
                        for (final IError aError : aErrHdl.getErrorList()) LOGGER.error(aError.getAsString(AppCommonUI.DEFAULT_LOCALE));
                    }
                    aUnifiedResponse.disableCaching();
                    aUnifiedResponse.setMimeType(eOutputFormat.getMimeType());
                    aUnifiedResponse.setContent(MicroWriter.getNodeAsBytes(aDoc, aXWS));
                    break;
                }
            case JSON:
                final JsonWriterSettings aJWS = new JsonWriterSettings().setIndentEnabled(bBeautify);
                final IJsonObject aDoc = new JsonObject();
                aDoc.add(RESPONSE_VERSION, eSearchVersion.getVersion());
                aDoc.add(RESPONSE_TOTAL_RESULT_COUNT, nTotalBEs);
                aDoc.add(RESPONSE_USED_RESULT_COUNT, aResultView.size());
                aDoc.add(RESPONSE_RESULT_PAGE_INDEX, nResultPageIndex);
                aDoc.add(RESPONSE_RESULT_PAGE_COUNT, nResultPageCount);
                aDoc.add(RESPONSE_FIRST_RESULT_INDEX, nFirstResultIndex);
                aDoc.add(RESPONSE_LAST_RESULT_INDEX, nEffectiveLastIndex);
                aDoc.add(RESPONSE_QUERY_TERMS, aSBQueryString.toString());
                aDoc.add(RESPONSE_CREATION_DT, PDTWebDateHelper.getAsStringXSD(aNow));
                final IJsonArray aMatches = new JsonArray();
                for (final ICommonsList<PDStoredBusinessEntity> aPerParticipant : aGroupedDocs.values()) {
                    final IJsonObject aItem = PDStoredBusinessEntity.getAsSearchResultJsonObject(aPerParticipant);
                    aMatches.add(aItem);
                }
                aDoc.addJson("matches", aMatches);
                aUnifiedResponse.disableCaching();
                aUnifiedResponse.setMimeType(eOutputFormat.getMimeType());
                aUnifiedResponse.setContentAndCharset(aDoc.getAsJsonString(aJWS), StandardCharsets.UTF_8);
                break;
            default:
                throw new IllegalStateException("Unsupported output format: " + eOutputFormat);
        }
    } else {
        LOGGER.error("Unsupported version provided (" + sPathInfo + ")");
        aUnifiedResponse.setStatus(CHttp.HTTP_NOT_FOUND);
    }
}
Also used : BooleanQuery(org.apache.lucene.search.BooleanQuery) ICommonsList(com.helger.commons.collection.impl.ICommonsList) Query(org.apache.lucene.search.Query) BooleanQuery(org.apache.lucene.search.BooleanQuery) CollectingSAXErrorHandler(com.helger.xml.sax.CollectingSAXErrorHandler) JsonObject(com.helger.json.JsonObject) IJsonObject(com.helger.json.IJsonObject) IMicroDocument(com.helger.xml.microdom.IMicroDocument) MicroDocument(com.helger.xml.microdom.MicroDocument) XMLSchemaCache(com.helger.xml.schema.XMLSchemaCache) PDStoredBusinessEntity(com.helger.pd.indexer.storage.PDStoredBusinessEntity) ZonedDateTime(java.time.ZonedDateTime) IJsonObject(com.helger.json.IJsonObject) CommonsHashMap(com.helger.commons.collection.impl.CommonsHashMap) IRequestParamContainer(com.helger.web.scope.IRequestParamContainer) JsonWriterSettings(com.helger.json.serialize.JsonWriterSettings) EPDOutputFormat(com.helger.pd.publisher.search.EPDOutputFormat) XMLWriterSettings(com.helger.xml.serialize.write.XMLWriterSettings) IError(com.helger.commons.error.IError) ClassPathResource(com.helger.commons.io.resource.ClassPathResource) EPDSearchField(com.helger.pd.publisher.search.EPDSearchField) IJsonArray(com.helger.json.IJsonArray) JsonArray(com.helger.json.JsonArray) IMicroElement(com.helger.xml.microdom.IMicroElement) IJsonArray(com.helger.json.IJsonArray) IMicroDocument(com.helger.xml.microdom.IMicroDocument) Map(java.util.Map) ICommonsMap(com.helger.commons.collection.impl.ICommonsMap) CommonsHashMap(com.helger.commons.collection.impl.CommonsHashMap) CommonsArrayList(com.helger.commons.collection.impl.CommonsArrayList) PDStorageManager(com.helger.pd.indexer.storage.PDStorageManager) Validator(javax.xml.validation.Validator) IParticipantIdentifier(com.helger.peppolid.IParticipantIdentifier)

Example 7 with PDStoredBusinessEntity

use of com.helger.pd.indexer.storage.PDStoredBusinessEntity in project phoss-directory by phax.

the class ExportAllManager method queryAllContainedBusinessCardsAsCSV.

public static void queryAllContainedBusinessCardsAsCSV(@Nonnull final EQueryMode eQueryMode, @Nonnull @WillNotClose final CSVWriter aCSVWriter) throws IOException {
    _unify(aCSVWriter);
    final Query aQuery = eQueryMode.getEffectiveQuery(new MatchAllDocsQuery());
    aCSVWriter.writeNext("Participant ID", "Names (per-row)", "Country code", "Geo info", "Identifier schemes", "Identifier values", "Websites", "Contact type", "Contact name", "Contact phone", "Contact email", "Additional info", "Registration date", "Document types");
    final Consumer<? super PDStoredBusinessEntity> aConsumer = aEntity -> {
        aCSVWriter.writeNext(aEntity.getParticipantID().getURIEncoded(), StringHelper.getImplodedMapped("\n", aEntity.names(), PDStoredMLName::getNameAndLanguageCode), aEntity.getCountryCode(), aEntity.getGeoInfo(), StringHelper.getImplodedMapped("\n", aEntity.identifiers(), PDStoredIdentifier::getScheme), StringHelper.getImplodedMapped("\n", aEntity.identifiers(), PDStoredIdentifier::getValue), StringHelper.getImploded("\n", aEntity.websiteURIs()), StringHelper.getImplodedMapped("\n", aEntity.contacts(), PDStoredContact::getType), StringHelper.getImplodedMapped("\n", aEntity.contacts(), PDStoredContact::getName), StringHelper.getImplodedMapped("\n", aEntity.contacts(), PDStoredContact::getPhone), StringHelper.getImplodedMapped("\n", aEntity.contacts(), PDStoredContact::getEmail), aEntity.getAdditionalInformation(), aEntity.getRegistrationDate() == null ? "" : aEntity.getRegistrationDate().toString(), StringHelper.getImplodedMapped("\n", aEntity.documentTypeIDs(), IDocumentTypeIdentifier::getURIEncoded));
    };
    PDMetaManager.getStorageMgr().searchAllDocuments(aQuery, -1, aConsumer);
    aCSVWriter.flush();
}
Also used : Query(org.apache.lucene.search.Query) EExcelVersion(com.helger.poi.excel.EExcelVersion) CommonsTreeSet(com.helger.commons.collection.impl.CommonsTreeSet) IDocumentTypeIdentifier(com.helger.peppolid.IDocumentTypeIdentifier) PDMetaManager(com.helger.pd.indexer.mgr.PDMetaManager) LoggerFactory(org.slf4j.LoggerFactory) IMicroDocument(com.helger.xml.microdom.IMicroDocument) PDTFactory(com.helger.commons.datetime.PDTFactory) IMicroElement(com.helger.xml.microdom.IMicroElement) PDStoredBusinessEntity(com.helger.pd.indexer.storage.PDStoredBusinessEntity) PDField(com.helger.pd.indexer.storage.field.PDField) ThreadSafe(javax.annotation.concurrent.ThreadSafe) MatchAllDocsQuery(org.apache.lucene.search.MatchAllDocsQuery) ICommonsOrderedMap(com.helger.commons.collection.impl.ICommonsOrderedMap) StandardCharsets(java.nio.charset.StandardCharsets) JsonObject(com.helger.json.JsonObject) WorkbookCreationHelper(com.helger.poi.excel.WorkbookCreationHelper) ICommonsList(com.helger.commons.collection.impl.ICommonsList) IJsonArray(com.helger.json.IJsonArray) UnifiedResponse(com.helger.servlet.response.UnifiedResponse) CSVWriter(com.helger.commons.csv.CSVWriter) PDStoredContact(com.helger.pd.indexer.storage.PDStoredContact) Writer(java.io.Writer) WebFileIO(com.helger.photon.app.io.WebFileIO) ESuccess(com.helger.commons.state.ESuccess) FileSystemResource(com.helger.commons.io.resource.FileSystemResource) IJsonObject(com.helger.json.IJsonObject) MicroDocument(com.helger.xml.microdom.MicroDocument) CHttpHeader(com.helger.commons.http.CHttpHeader) JsonArray(com.helger.json.JsonArray) FileHelper(com.helger.commons.io.file.FileHelper) PDStoredIdentifier(com.helger.pd.indexer.storage.PDStoredIdentifier) ICommonsSortedSet(com.helger.commons.collection.impl.ICommonsSortedSet) IParticipantIdentifier(com.helger.peppolid.IParticipantIdentifier) Nonnull(javax.annotation.Nonnull) WillNotClose(javax.annotation.WillNotClose) Logger(org.slf4j.Logger) CommonsArrayList(com.helger.commons.collection.impl.CommonsArrayList) StringHelper(com.helger.commons.string.StringHelper) PDTWebDateHelper(com.helger.commons.datetime.PDTWebDateHelper) IOException(java.io.IOException) File(java.io.File) JsonWriter(com.helger.json.serialize.JsonWriter) SimpleReadWriteLock(com.helger.commons.concurrent.SimpleReadWriteLock) MicroWriter(com.helger.xml.microdom.serialize.MicroWriter) Consumer(java.util.function.Consumer) PDStoredMLName(com.helger.pd.indexer.storage.PDStoredMLName) EQueryMode(com.helger.pd.indexer.storage.EQueryMode) CommonsLinkedHashMap(com.helger.commons.collection.impl.CommonsLinkedHashMap) ExcelStyle(com.helger.poi.excel.style.ExcelStyle) Comparator(java.util.Comparator) Query(org.apache.lucene.search.Query) MatchAllDocsQuery(org.apache.lucene.search.MatchAllDocsQuery) PDStoredIdentifier(com.helger.pd.indexer.storage.PDStoredIdentifier) PDStoredMLName(com.helger.pd.indexer.storage.PDStoredMLName) IDocumentTypeIdentifier(com.helger.peppolid.IDocumentTypeIdentifier) MatchAllDocsQuery(org.apache.lucene.search.MatchAllDocsQuery) PDStoredContact(com.helger.pd.indexer.storage.PDStoredContact)

Example 8 with PDStoredBusinessEntity

use of com.helger.pd.indexer.storage.PDStoredBusinessEntity in project phoss-directory by phax.

the class ExportAllManager method queryAllContainedBusinessCardsAsExcel.

@Nonnull
public static WorkbookCreationHelper queryAllContainedBusinessCardsAsExcel(@Nonnull final EQueryMode eQueryMode, final boolean bIncludeDocTypes) throws IOException {
    final Query aQuery = eQueryMode.getEffectiveQuery(new MatchAllDocsQuery());
    final ExcelStyle ES_DATE = new ExcelStyle().setDataFormat("yyyy-mm-dd");
    final ExcelStyle ES_WRAP = new ExcelStyle().setWrapText(true);
    @WillNotClose final WorkbookCreationHelper aWBCH = new WorkbookCreationHelper(EExcelVersion.XLSX);
    aWBCH.createNewSheet();
    aWBCH.addRow();
    aWBCH.addCell("Participant ID");
    aWBCH.addCell("Names (per-row)");
    aWBCH.addCell("Country code");
    aWBCH.addCell("Geo info");
    aWBCH.addCell("Identifier schemes");
    aWBCH.addCell("Identifier values");
    aWBCH.addCell("Websites");
    aWBCH.addCell("Contact type");
    aWBCH.addCell("Contact name");
    aWBCH.addCell("Contact phone");
    aWBCH.addCell("Contact email");
    aWBCH.addCell("Additional info");
    aWBCH.addCell("Registration date");
    if (bIncludeDocTypes)
        aWBCH.addCell("Document types");
    final Consumer<? super PDStoredBusinessEntity> aConsumer = aEntity -> {
        aWBCH.addRow();
        aWBCH.addCell(aEntity.getParticipantID().getURIEncoded());
        aWBCH.addCell(StringHelper.getImplodedMapped("\n", aEntity.names(), PDStoredMLName::getNameAndLanguageCode));
        aWBCH.addCellStyle(ES_WRAP);
        aWBCH.addCell(aEntity.getCountryCode());
        aWBCH.addCell(aEntity.getGeoInfo());
        aWBCH.addCellStyle(ES_WRAP);
        aWBCH.addCell(StringHelper.getImplodedMapped("\n", aEntity.identifiers(), PDStoredIdentifier::getScheme));
        aWBCH.addCellStyle(ES_WRAP);
        aWBCH.addCell(StringHelper.getImplodedMapped("\n", aEntity.identifiers(), PDStoredIdentifier::getValue));
        aWBCH.addCellStyle(ES_WRAP);
        aWBCH.addCell(StringHelper.getImploded("\n", aEntity.websiteURIs()));
        aWBCH.addCellStyle(ES_WRAP);
        aWBCH.addCell(StringHelper.getImplodedMapped("\n", aEntity.contacts(), PDStoredContact::getType));
        aWBCH.addCellStyle(ES_WRAP);
        aWBCH.addCell(StringHelper.getImplodedMapped("\n", aEntity.contacts(), PDStoredContact::getName));
        aWBCH.addCellStyle(ES_WRAP);
        aWBCH.addCell(StringHelper.getImplodedMapped("\n", aEntity.contacts(), PDStoredContact::getPhone));
        aWBCH.addCellStyle(ES_WRAP);
        aWBCH.addCell(StringHelper.getImplodedMapped("\n", aEntity.contacts(), PDStoredContact::getEmail));
        aWBCH.addCellStyle(ES_WRAP);
        aWBCH.addCell(aEntity.getAdditionalInformation());
        aWBCH.addCellStyle(ES_WRAP);
        aWBCH.addCell(aEntity.getRegistrationDate());
        aWBCH.addCellStyle(ES_DATE);
        if (bIncludeDocTypes) {
            aWBCH.addCell(StringHelper.getImplodedMapped("\n", aEntity.documentTypeIDs(), IDocumentTypeIdentifier::getURIEncoded));
            aWBCH.addCellStyle(ES_WRAP);
        }
    };
    // Query all and group by participant ID
    PDMetaManager.getStorageMgr().searchAllDocuments(aQuery, -1, aConsumer);
    aWBCH.autoSizeAllColumns();
    aWBCH.autoFilterAllColumns();
    return aWBCH;
}
Also used : Query(org.apache.lucene.search.Query) EExcelVersion(com.helger.poi.excel.EExcelVersion) CommonsTreeSet(com.helger.commons.collection.impl.CommonsTreeSet) IDocumentTypeIdentifier(com.helger.peppolid.IDocumentTypeIdentifier) PDMetaManager(com.helger.pd.indexer.mgr.PDMetaManager) LoggerFactory(org.slf4j.LoggerFactory) IMicroDocument(com.helger.xml.microdom.IMicroDocument) PDTFactory(com.helger.commons.datetime.PDTFactory) IMicroElement(com.helger.xml.microdom.IMicroElement) PDStoredBusinessEntity(com.helger.pd.indexer.storage.PDStoredBusinessEntity) PDField(com.helger.pd.indexer.storage.field.PDField) ThreadSafe(javax.annotation.concurrent.ThreadSafe) MatchAllDocsQuery(org.apache.lucene.search.MatchAllDocsQuery) ICommonsOrderedMap(com.helger.commons.collection.impl.ICommonsOrderedMap) StandardCharsets(java.nio.charset.StandardCharsets) JsonObject(com.helger.json.JsonObject) WorkbookCreationHelper(com.helger.poi.excel.WorkbookCreationHelper) ICommonsList(com.helger.commons.collection.impl.ICommonsList) IJsonArray(com.helger.json.IJsonArray) UnifiedResponse(com.helger.servlet.response.UnifiedResponse) CSVWriter(com.helger.commons.csv.CSVWriter) PDStoredContact(com.helger.pd.indexer.storage.PDStoredContact) Writer(java.io.Writer) WebFileIO(com.helger.photon.app.io.WebFileIO) ESuccess(com.helger.commons.state.ESuccess) FileSystemResource(com.helger.commons.io.resource.FileSystemResource) IJsonObject(com.helger.json.IJsonObject) MicroDocument(com.helger.xml.microdom.MicroDocument) CHttpHeader(com.helger.commons.http.CHttpHeader) JsonArray(com.helger.json.JsonArray) FileHelper(com.helger.commons.io.file.FileHelper) PDStoredIdentifier(com.helger.pd.indexer.storage.PDStoredIdentifier) ICommonsSortedSet(com.helger.commons.collection.impl.ICommonsSortedSet) IParticipantIdentifier(com.helger.peppolid.IParticipantIdentifier) Nonnull(javax.annotation.Nonnull) WillNotClose(javax.annotation.WillNotClose) Logger(org.slf4j.Logger) CommonsArrayList(com.helger.commons.collection.impl.CommonsArrayList) StringHelper(com.helger.commons.string.StringHelper) PDTWebDateHelper(com.helger.commons.datetime.PDTWebDateHelper) IOException(java.io.IOException) File(java.io.File) JsonWriter(com.helger.json.serialize.JsonWriter) SimpleReadWriteLock(com.helger.commons.concurrent.SimpleReadWriteLock) MicroWriter(com.helger.xml.microdom.serialize.MicroWriter) Consumer(java.util.function.Consumer) PDStoredMLName(com.helger.pd.indexer.storage.PDStoredMLName) EQueryMode(com.helger.pd.indexer.storage.EQueryMode) CommonsLinkedHashMap(com.helger.commons.collection.impl.CommonsLinkedHashMap) ExcelStyle(com.helger.poi.excel.style.ExcelStyle) Comparator(java.util.Comparator) Query(org.apache.lucene.search.Query) MatchAllDocsQuery(org.apache.lucene.search.MatchAllDocsQuery) ExcelStyle(com.helger.poi.excel.style.ExcelStyle) PDStoredIdentifier(com.helger.pd.indexer.storage.PDStoredIdentifier) PDStoredMLName(com.helger.pd.indexer.storage.PDStoredMLName) IDocumentTypeIdentifier(com.helger.peppolid.IDocumentTypeIdentifier) MatchAllDocsQuery(org.apache.lucene.search.MatchAllDocsQuery) WillNotClose(javax.annotation.WillNotClose) WorkbookCreationHelper(com.helger.poi.excel.WorkbookCreationHelper) PDStoredContact(com.helger.pd.indexer.storage.PDStoredContact) Nonnull(javax.annotation.Nonnull)

Aggregations

ICommonsList (com.helger.commons.collection.impl.ICommonsList)8 PDStoredBusinessEntity (com.helger.pd.indexer.storage.PDStoredBusinessEntity)8 IParticipantIdentifier (com.helger.peppolid.IParticipantIdentifier)8 CommonsArrayList (com.helger.commons.collection.impl.CommonsArrayList)6 PDStoredMLName (com.helger.pd.indexer.storage.PDStoredMLName)6 IDocumentTypeIdentifier (com.helger.peppolid.IDocumentTypeIdentifier)6 Query (org.apache.lucene.search.Query)6 ICommonsOrderedMap (com.helger.commons.collection.impl.ICommonsOrderedMap)5 StringHelper (com.helger.commons.string.StringHelper)5 IJsonArray (com.helger.json.IJsonArray)5 IJsonObject (com.helger.json.IJsonObject)5 JsonArray (com.helger.json.JsonArray)5 JsonObject (com.helger.json.JsonObject)5 PDMetaManager (com.helger.pd.indexer.mgr.PDMetaManager)5 IMicroDocument (com.helger.xml.microdom.IMicroDocument)5 IMicroElement (com.helger.xml.microdom.IMicroElement)5 MicroDocument (com.helger.xml.microdom.MicroDocument)5 CommonsLinkedHashMap (com.helger.commons.collection.impl.CommonsLinkedHashMap)4 CommonsTreeSet (com.helger.commons.collection.impl.CommonsTreeSet)4 ICommonsSortedSet (com.helger.commons.collection.impl.ICommonsSortedSet)4