Codota Logo
ClientHelper
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
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

  • Making http requests using okhttp
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • notifyDataSetChanged (ArrayAdapter)
  • FileOutputStream (java.io)
    A file output stream is an output stream for writing data to aFile or to a FileDescriptor. Whether
  • TreeMap (java.util)
    A Red-Black tree based NavigableMap implementation. The map is sorted according to the Comparable of
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Collectors (java.util.stream)
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now