Package com.attivio.sdk.client
Interfaces for client side AIE development. The
ServiceFactory
can be used to create all clients represented here using various host+port/uri combinations.
Example Ingestion Code
ServiceFactory serviceFactory = ServiceFactoryFactory.get();
serviceFactory.setZookeeperConnectionInformation("myHost:17001");
* IngestClient
feeder = serviceFactory.getService(IngestClient.class);
IngestDocument doc1 = new IngestDocument("myId-1");
doc1.setField("title", "my title");
feeder.feed(doc1);
// feed more documents
feeder.commit();
// wait for the commit to complete
feeder.waitForCompletion();
Example Search Code
ServiceFactory serviceFactory = ServiceFactoryFactory.get();
serviceFactory.setZookeeperConnectionInformation("myHost:17001");
SearchClient
searcher = serviceFactory.getService(SearchClient.class);
QueryRequest req = new QueryRequest("foo");
req.addFacetField("myFacetField");
// set more query parameters
QueryResponse resp = searcher.search(req);
// output response information
Example Content Store Code
ServiceFactory serviceFactory = ServiceFactoryFactory.get(); serviceFactory.setZookeeperConnectionInformation("myHost:17001");ContentStoreClient
contentStore = serviceFactory.getService(ContentStoreClient.class); // Create an object which can produce an input stream with relevant content (any useful bytes - like an image file)InputStreamBuilder
contentSource = newInputStreamBuilder
() { private final FileInputStream fis = new FileInputStream("some_image.png"); @Override InputStream createInputStream() throws IOException { return fis; } @Override void close() throws IOException { if (fis != null) { fis.close(); } } }; // Store the content in the content store and get back a content pointerContentPointer
cp = contentStore.store("my_content_id", contentSource); // do something with the content pointer, like store it in a documentIngestDocument
doc = new IngestDocument("my_doc_id");IngestField
> imageField = newIngestField
("image"); imageField.addFieldValue(cp); doc.setField(imageField);
Example Connector Code
ServiceFactory serviceFactory = ServiceFactoryFactory.get();
serviceFactory.setZookeeperConnectionInformation("myHost:17001");
ConnectorControlApi
connectorClient = serviceFactory.getService(ConnectorControlApi.class);
// start the connector named "myCustomConnector"
connectorClient.start("myCustomConnector");
Copyright 2019 Attivio Inc., All rights reserved.-
Interface Summary Interface Description AutoCompleteApi API for the retrieving of query completion suggestions based on a current query request.ConnectorControlApi API that allows for control over predefined connectors inside the AIE platform.ConnectorHistoryApi The ConnectorHistoryApi records the current status and history of connector executions on the AIE platform.ContentStoreClient Deprecated. DictionaryClient Dictionary Management API.DocumentOutputClient Client for feeding content to AIE.DocumentProcessorApi Simple api that runs documents directly through a specified ingest workflow.DocumentStoreApi Client to the AIE document store (currently available only within an AIE node process).EventStoreApi Store, retrieve and acknowledge events.ExternalizableStore IndexCommitter An interface to commit index zones.IngestClient Sends content (documents, deletes, index messages) to an Attivio instance.IngestionHistoryApi TheIngestionHistoryApi
is used to provide incremental capabilities to ingestion clients.IngestionHistoryApiBatchSupport Additional interface to add getSignatureBatch() and visitBatch() to IngestionHistoryApi (which we cannot change to avoid backward compatability issues)InputStreamBuilder Provides the ability to recreate anInputStream
on demand.RelevancyModelApi API for interacting with relevancy models in the system.SearchClient Client for issuing searches against an AIE system.SignalTrackingApi API for interacting tracking signals in the system. -
Class Summary Class Description IngestionHistoryApiBatchSupport.VisitBatch MockAutoCompleteApi Default behavior is to noop, providers must be added in order to achieve other functionality or to test a specific providerMockRelevancyModelApi API for interacting with relevancy models in the system.MockSignalTrackingService -
Enum Summary Enum Description ExternalizableStore.ImportOption -
Annotation Types Summary Annotation Type Description PooledClient Tagging annotation that tells the Service Discovery framework that this API should use a pooled client pattern.SharedClient Tagging annotation that tells the Service Discovery framework that this API should only be created once.StickyClient Tagging annotation that tells the Service Discovery framework that this API should use the same client connection for every API call.