Skip to content

Commit 180e0ac

Browse files
DOCSP-16533 extracted API links (#110)
* extracted API links
1 parent 8512ef2 commit 180e0ac

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+507
-463
lines changed

source/faq.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ The output of the above code snippet should look like this:
197197
{"_id": 1, "val": 1}
198198

199199
For more information on the legacy classes and methods used in the above example,
200-
see the following API documentation pages:
200+
see the following API Documentation pages:
201201

202202
- :java-docs:`Legacy API Javadoc Site <apidocs/mongodb-driver-legacy/index.html>`
203203
- :java-docs:`MongoClient <apidocs/mongodb-driver-legacy/com/mongodb/MongoClient.html>`
@@ -237,7 +237,7 @@ Here is an example showing how to use the legacy ``MongoClientOptions`` and
237237
:end-before: end current-api-mongoclientsettings-example
238238

239239
For more information on the legacy classes and methods used in the above example,
240-
see the following API documentation pages:
240+
see the following API Documentation pages:
241241

242242
- :java-docs:`Legacy API Javadoc Site <apidocs/mongodb-driver-legacy/index.html>`
243243
- :java-docs:`MongoClient <apidocs/mongodb-driver-legacy/com/mongodb/MongoClient.html>`

source/fundamentals/aggregation.txt

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Aggregation operations have some :manual:`limitations </core/aggregation-pipelin
4949
of 16 megabytes.
5050

5151
- Pipeline stages have a memory limit of 100 megabytes by default. If required, you may exceed this limit by using
52-
the `allowDiskUse <https://mongodb.github.io/mongo-java-driver/4.2/apidocs/mongodb-driver-sync/com/mongodb/client/AggregateIterable.html#allowDiskUse(java.lang.Boolean)>`__
52+
the :java-docs:`allowDiskUse <apidocs/mongodb-driver-sync/com/mongodb/client/AggregateIterable.html#allowDiskUse(java.lang.Boolean)>`
5353
method.
5454

5555
.. important:: ``$graphLookup`` exception
@@ -116,20 +116,17 @@ Basic Aggregation Example
116116
~~~~~~~~~~~~~~~~~~~~~~~~~
117117

118118
To perform an aggregation, pass a list of aggregation stages to the
119-
:java-docs:`MongoCollection.aggregate() <apidocs/mongodb-driver-sync/com/mongodb/client/MongoCollection.html#aggregate(java.util.List)>`
120-
method.
119+
``MongoCollection.aggregate()`` method.
121120

122121
The Java driver provides the
123122
:java-docs:`Aggregates <apidocs/mongodb-driver-core/com/mongodb/client/model/Aggregates.html>`
124-
helper class that
125-
contains builders for aggregation stages.
123+
helper class that contains builders for aggregation stages.
126124

127125
In the following example, the aggregation pipeline:
128126

129127
- Uses a :manual:`$match </reference/operator/aggregation/match/>` stage to filter for documents whose
130128
``categories`` array field contains the element ``Bakery``. The example uses
131-
:java-docs:`Aggregates.match <apidocs/mongodb-driver-core/com/mongodb/client/model/Aggregates.html#match(org.bson.conversions.Bson)>`
132-
to build the ``$match`` stage.
129+
``Aggregates.match`` to build the ``$match`` stage.
133130

134131
- Uses a :manual:`$group </reference/operator/aggregation/group/>` stage to group the matching documents by the ``stars``
135132
field, accumulating a count of documents for each distinct value of ``stars``.
@@ -152,6 +149,12 @@ The above aggregation should produce the following results:
152149
{"_id": 4, "count": 2}
153150
{"_id": 5, "count": 1}
154151

152+
For more information about the methods and classes mentioned in this section,
153+
see the following API Documentation:
154+
155+
- :java-docs:`MongoCollection.aggregate() <apidocs/mongodb-driver-sync/com/mongodb/client/MongoCollection.html#aggregate(java.util.List)>`
156+
- :java-docs:`Aggregates.match <apidocs/mongodb-driver-core/com/mongodb/client/model/Aggregates.html#match(org.bson.conversions.Bson)>`
157+
155158
Explain Aggregation Example
156159
~~~~~~~~~~~~~~~~~~~~~~~~~~~
157160

@@ -191,18 +194,16 @@ following resources:
191194

192195
- :manual:`Explain Output </reference/explain-results/>` Server Manual Entry
193196
- :manual:`Query Plans </core/query-plans/>` Server Manual Entry
194-
- :java-core-api:`ExplainVerbosity <com/mongodb/ExplainVerbosity>` API Documentation
197+
- :java-docs:`ExplainVerbosity <apidocs/mongodb-driver-core/com/mongodb/ExplainVerbosity>` API Documentation
195198
- :java-docs:`explain() <apidocs/mongodb-driver-sync/com/mongodb/client/FindIterable.html#explain()>` API Documentation
196199
- :java-docs:`AggregateIterable <apidocs/mongodb-driver-sync/com/mongodb/client/AggregateIterable.html>` API Documentation
197200

198201
Aggregation Expression Example
199202
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
200203

201-
The Java driver provides builders for
202-
:java-docs:`accumulator expressions <apidocs/mongodb-driver-core/com/mongodb/client/model/Accumulators.html>`
203-
for use with
204-
:java-docs:`$group <apidocs/mongodb-driver-core/com/mongodb/client/model/Aggregates.html#group(TExpression,java.util.List)>`. You
205-
must declare all other expressions in JSON format or compatible document format.
204+
The Java driver provides builders for accumulator expressions for use with
205+
``$group``. You must declare all other expressions in JSON format or
206+
compatible document format.
206207

207208
.. tip::
208209

@@ -223,19 +224,16 @@ must declare all other expressions in JSON format or compatible document format.
223224
Document.parse("{ $arrayElemAt: ['$categories', 0] }")
224225

225226
In the following example, the aggregation pipeline uses a
226-
`$project <https://mongodb.github.io/mongo-java-driver/4.2/apidocs/mongodb-driver-core/com/mongodb/client/model/Aggregates.html#project(org.bson.conversions.Bson)>`__
227-
stage and various
228-
`Projections <https://mongodb.github.io/mongo-java-driver/4.2/apidocs/mongodb-driver-core/com/mongodb/client/model/Projections.html>`__
229-
to return the ``name`` field and the calculated field ``firstCategory`` whose value is the first element in the
230-
``categories`` field.
227+
``$project`` stage and various ``Projections`` to return the ``name``
228+
field and the calculated field ``firstCategory`` whose value is the
229+
first element in the ``categories`` field.
231230

232231
.. literalinclude:: /includes/fundamentals/code-snippets/AggTour.java
233232
:language: java
234233
:dedent:
235234
:start-after: begin aggregation two
236235
:end-before: end aggregation two
237236

238-
239237
The above aggregation should produce the following results:
240238

241239
.. code-block:: none
@@ -251,3 +249,11 @@ The above aggregation should produce the following results:
251249
{"name": "ZZZ Pasta Buffet", "firstCategory": "Pasta"}
252250
{"name": "XYZ Coffee Bar", "firstCategory": "Coffee"}
253251
{"name": "XYZ Bagels Restaurant", "firstCategory": "Bagels"}
252+
253+
For more information about the methods and classes mentioned in this section,
254+
see the following API Documentation:
255+
256+
- :java-docs:`Accumulators <apidocs/mongodb-driver-core/com/mongodb/client/model/Accumulators.html>`
257+
- :java-docs:`$group <apidocs/mongodb-driver-core/com/mongodb/client/model/Aggregates.html#group(TExpression,java.util.List)>`
258+
- :java-docs:`$project <apidocs/mongodb-driver-core/com/mongodb/client/model/Aggregates.html#project(org.bson.conversions.Bson)>`
259+
- :java-docs:`Projections <apidocs/mongodb-driver-core/com/mongodb/client/model/Projections.html>`

source/fundamentals/auth.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ mechanism:
146146

147147
To specify the default authentication mechanism using the
148148
``MongoCredential`` class, use the
149-
:java-docs:`createScramSha256Credential() </apidocs/mongodb-driver-core/com/mongodb/MongoCredential.html#createScramSha256Credential(java.lang.String,java.lang.String,char[])>`
149+
:java-docs:`createScramSha256Credential() <apidocs/mongodb-driver-core/com/mongodb/MongoCredential.html#createScramSha256Credential(java.lang.String,java.lang.String,char[])>`
150150
method. Your code to instantiate a ``MongoClient`` should look something like this:
151151

152152
.. include:: /includes/fundamentals/code-snippets/auth-credentials-sha256.rst
@@ -198,7 +198,7 @@ mechanism:
198198

199199
To specify the default authentication mechanism using the
200200
``MongoCredential`` class, use the
201-
:java-docs:`createScramSha1Credential() </apidocs/mongodb-driver-core/com/mongodb/MongoCredential.html#createScramSha1Credential(java.lang.String,java.lang.String,char[])>`
201+
:java-docs:`createScramSha1Credential() <apidocs/mongodb-driver-core/com/mongodb/MongoCredential.html#createScramSha1Credential(java.lang.String,java.lang.String,char[])>`
202202
method. Your code to instantiate a ``MongoClient`` should look something like this:
203203

204204
.. include:: /includes/fundamentals/code-snippets/auth-credentials-sha1.rst
@@ -291,7 +291,7 @@ mechanism:
291291
in the ``authMechanism`` parameter and your session token in the
292292
``authMechanismProperties`` parameter. Then, add it to your
293293
``MongoClientSettings`` by calling the
294-
:java-docs:`applyConnectionString() </apidocs/mongodb-driver-core/com/mongodb/MongoClientSettings.Builder.html#applyConnectionString(com.mongodb.ConnectionString)>`
294+
:java-docs:`applyConnectionString() <apidocs/mongodb-driver-core/com/mongodb/MongoClientSettings.Builder.html#applyConnectionString(com.mongodb.ConnectionString)>`
295295
method as follows:
296296

297297
.. include:: /includes/fundamentals/code-snippets/auth-credentials-aws-session.rst
@@ -300,7 +300,7 @@ mechanism:
300300

301301
You can include your AWS session token in your ``MongoCredential``
302302
instance by specifying it in a call to the
303-
:java-docs:`withMechanismProperty() </apidocs/mongodb-driver-core/com/mongodb/MongoCredential.html#withMechanismProperty(java.lang.String,T)>`
303+
:java-docs:`withMechanismProperty() <apidocs/mongodb-driver-core/com/mongodb/MongoCredential.html#withMechanismProperty(java.lang.String,T)>`
304304
method as shown below:
305305

306306
.. code-block:: java
@@ -359,11 +359,11 @@ mechanism:
359359

360360
To specify the ``X.509`` authentication mechanism using the
361361
``MongoCredential`` class, use the
362-
:java-docs:`createMongoX509Credential() </apidocs/mongodb-driver-core/com/mongodb/MongoCredential.html#createMongoX509Credential(java.lang.String)>`
362+
:java-docs:`createMongoX509Credential() <apidocs/mongodb-driver-core/com/mongodb/MongoCredential.html#createMongoX509Credential(java.lang.String)>`
363363
method. Also, enable TLS by calling the
364364
:java-docs:`applyToSslSettings() <apidocs/mongodb-driver-core/com/mongodb/MongoClientSettings.Builder.html#applyToSslSettings(com.mongodb.Block)>`
365365
method and setting the ``enabled`` property to ``true`` in the
366-
:java-docs:`SslSettings.Builder </apidocs/mongodb-driver-core/com/mongodb/connection/SslSettings.Builder.html>`
366+
:java-docs:`SslSettings.Builder <apidocs/mongodb-driver-core/com/mongodb/connection/SslSettings.Builder.html>`
367367
block. Your code to instantiate a ``MongoClient`` should look something like this:
368368

369369
.. include:: /includes/fundamentals/code-snippets/auth-credentials-x509.rst

source/fundamentals/builders/aggregates.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Aggregates Builders
1515
Overview
1616
--------
1717

18-
This guide provides an overview of the :java-core-api:`Aggregates </com/mongodb/client/model/Aggregates>`
18+
This guide provides an overview of the :java-docs:`Aggregates <apidocs/mongodb-driver-core/com/mongodb/client/model/Aggregates>`
1919
class which provides static factory methods that build :manual:`aggregation pipeline
2020
stages </reference/operator/aggregation/>`.
2121

@@ -220,7 +220,7 @@ for each distinct grouping.
220220

221221
.. tip::
222222

223-
The driver includes the :java-core-api:`Accumulators <com/mongodb/client/model/Accumulators.html>`
223+
The driver includes the :java-docs:`Accumulators <apidocs/mongodb-driver-core/com/mongodb/client/model/Accumulators.html>`
224224
class with static factory methods for each of the supported accumulator.
225225

226226
The following example creates a pipeline stage that groups documents by the value
@@ -471,7 +471,7 @@ into a bucket called "monster" for monstrously large screen sizes:
471471

472472
.. tip::
473473

474-
The driver includes the :java-core-api:`Accumulators <com/mongodb/client/model/Accumulators.html>`
474+
The driver includes the :java-docs:`Accumulators <apidocs/mongodb-driver-core/com/mongodb/client/model/Accumulators.html>`
475475
class with static factory methods for each of the supported accumulator.
476476

477477
.. literalinclude:: /includes/fundamentals/code-snippets/builders/AggBuilders.java
@@ -508,7 +508,7 @@ in a new field called ``avgPrice``:
508508

509509
.. tip::
510510

511-
The driver includes the :java-core-api:`Accumulators <com/mongodb/client/model/Accumulators.html>`
511+
The driver includes the :java-docs:`Accumulators <apidocs/mongodb-driver-core/com/mongodb/client/model/Accumulators.html>`
512512
class with static factory methods for each of the supported accumulator:
513513

514514
.. literalinclude:: /includes/fundamentals/code-snippets/builders/AggBuilders.java

0 commit comments

Comments
 (0)