Tabnine Logo
ClientHelper
Code IndexAdd Tabnine to your IDE (free)

How to use
ClientHelper
in
com.marklogic.client.ext.helper

Best Java code snippets using com.marklogic.client.ext.helper.ClientHelper (Showing top 6 results out of 315)

origin: com.marklogic/ml-app-deployer

/**
 * Constructs a new ClientHelper, using newClient().
 *
 * @return
 */
public ClientHelper clientHelper() {
  return new ClientHelper(newClient());
}
origin: com.marklogic/ml-javaclient-util

public List<String> getUrisInCollection(String collectionName) {
  return getUrisInCollection(collectionName, 10);
}
origin: com.marklogic/ml-javaclient-util

  public String eval(String expr) {
    return getClient().newServerEval().xquery(expr).evalAs(String.class);
  }
}
origin: com.marklogic/ml-javaclient-util

public List<String> getCollections(String uri) {
  DocumentCollections colls = getMetadata(uri).getCollections();
  return Arrays.asList(colls.toArray(new String[] {}));
}
origin: com.marklogic/ml-javaclient-util

public List<String> getUrisInCollection(String collectionName, int pageLength) {
  QueryManager mgr = getClient().newQueryManager();
  mgr.setPageLength(pageLength);
  StringQueryDefinition def = mgr.newStringDefinition();
  def.setCollections(collectionName);
  SearchHandle h = mgr.search(def, new SearchHandle());
  List<String> uris = new ArrayList<String>();
  for (MatchDocumentSummary s : h.getMatchResults()) {
    uris.add(s.getUri());
  }
  return uris;
}
origin: com.marklogic/ml-javaclient-util

public long getCollectionSize(String collectionName) {
  QueryManager queryMgr = getClient().newQueryManager();
  StringQueryDefinition def = queryMgr.newStringDefinition();
  def.setCollections(collectionName);
  SearchHandle sh = queryMgr.search(def, new SearchHandle());
  return sh.getTotalResults();
}
com.marklogic.client.ext.helperClientHelper

Javadoc

The intent of this class is to provide some syntactic sugar on common operations using the ML Java API, which is a wrapper around the ML REST API.

Most used methods

  • <init>
  • getClient
  • getMetadata
  • getUrisInCollection

Popular in Java

  • Reactive rest calls using spring rest template
  • setRequestProperty (URLConnection)
  • onCreateOptionsMenu (Activity)
  • onRequestPermissionsResult (Fragment)
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Table (org.hibernate.mapping)
    A relational table
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now