Browse Source

minor doc addition, looking at possible replica-set .xsd variations.

pull/1/head
Mark Pollack 15 years ago
parent
commit
dac4aed120
  1. 18
      spring-data-mongodb/src/main/resources/org/springframework/data/document/mongodb/config/spring-mongo-1.0.xsd
  2. 1
      spring-data-mongodb/src/test/java/org/springframework/data/document/mongodb/PersonExample.java
  3. 18
      src/docbkx/reference/mongodb.xml

18
spring-data-mongodb/src/main/resources/org/springframework/data/document/mongodb/config/spring-mongo-1.0.xsd

@ -39,7 +39,22 @@ The Mongo driver options
</xsd:annotation> </xsd:annotation>
</xsd:element> </xsd:element>
</xsd:sequence> </xsd:sequence>
<!--
<xsd:sequence minOccurs="0" maxOccurs="1">
<xsd:element name="replica-set" type="replicaSetType">
<xsd:annotation>
<xsd:documentation><![CDATA[
The Mongo Replica set database addresses
]]></xsd:documentation>
<xsd:appinfo>
<tool:annotation>
<tool:exports type="com.mongodb.MongoOptions"/>
</tool:annotation>
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
-->
<xsd:attribute name="id" type="xsd:ID" use="optional"> <xsd:attribute name="id" type="xsd:ID" use="optional">
<xsd:annotation> <xsd:annotation>
@ -193,6 +208,7 @@ The name of the Mongo object that determines what server to monitor. (by default
<xsd:union memberTypes="xsd:string"/> <xsd:union memberTypes="xsd:string"/>
</xsd:simpleType> </xsd:simpleType>
<xsd:complexType name="optionsType"> <xsd:complexType name="optionsType">
<xsd:attribute name="connectionsPerHost" type="xsd:positiveInteger"> <xsd:attribute name="connectionsPerHost" type="xsd:positiveInteger">
<xsd:annotation> <xsd:annotation>

1
spring-data-mongodb/src/test/java/org/springframework/data/document/mongodb/PersonExample.java

@ -64,7 +64,6 @@ public class PersonExample {
log.debug("Updated: " + p); log.debug("Updated: " + p);
//mongoOps.remove( query(whereId().is(p.getId())), p.getClass()); //mongoOps.remove( query(whereId().is(p.getId())), p.getClass());
mongoOps.remove(p); mongoOps.remove(p);

18
src/docbkx/reference/mongodb.xml

@ -88,6 +88,12 @@
to create a Spring based project in <ulink to create a Spring based project in <ulink
url="http://www.springsource.com/developer/sts">STS</ulink>.</para> url="http://www.springsource.com/developer/sts">STS</ulink>.</para>
<para>First you need to set up a running Mongodb server. Refer to the
<ulink url="http://www.mongodb.org/display/DOCS/Quickstart">Mongodb Quick
Start guide</ulink> for an explanation on how to startup a Mongo instance.
Once installed starting Mongo is typically a matter of executing the
following command: <literal>MONGO_HOME/bin/mongod</literal></para>
<para>To create a Spring project in STS go to File -&gt; New -&gt; Spring <para>To create a Spring project in STS go to File -&gt; New -&gt; Spring
Template Project -&gt; Simple Spring Utility Project --&gt; press Yes when Template Project -&gt; Simple Spring Utility Project --&gt; press Yes when
prompted. Then enter a project and a package name such as prompted. Then enter a project and a package name such as
@ -109,7 +115,7 @@
<para>The cglib dependency is there as we will use Spring's Java <para>The cglib dependency is there as we will use Spring's Java
configuration style. Also change the version of Spring in the pom.xml to configuration style. Also change the version of Spring in the pom.xml to
be </para> be</para>
<programlisting lang="xml">&lt;spring.framework.version&gt;3.0.5.RELEASE&lt;/spring.framework.version&gt;</programlisting> <programlisting lang="xml">&lt;spring.framework.version&gt;3.0.5.RELEASE&lt;/spring.framework.version&gt;</programlisting>
@ -1165,7 +1171,7 @@ import static org.springframework.data.document.mongodb.query.Query.query;
role="bold">withinCenterSphere </emphasis> <literal>(Circle circle) role="bold">withinCenterSphere </emphasis> <literal>(Circle circle)
</literal>Creates a geospatial criterion using <literal>$within </literal>Creates a geospatial criterion using <literal>$within
$center</literal> operators. This is only available for Mongo 1.7 $center</literal> operators. This is only available for Mongo 1.7
and higher. </para> and higher.</para>
</listitem> </listitem>
<listitem> <listitem>
@ -1185,14 +1191,12 @@ import static org.springframework.data.document.mongodb.query.Query.query;
<para><literal>Criteria</literal> <emphasis role="bold">nearSphere <para><literal>Criteria</literal> <emphasis role="bold">nearSphere
</emphasis> <literal>(Point point) </literal>Creates a geospatial </emphasis> <literal>(Point point) </literal>Creates a geospatial
criterion using <literal>$nearSphere$center</literal> operations. criterion using <literal>$nearSphere$center</literal> operations.
This is only available for Mongo 1.7 and higher. </para> This is only available for Mongo 1.7 and higher.</para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
<para> The <classname>Query</classname> class has some additional <para>The <classname>Query</classname> class has some additional methods
methods used to provide options for the query.</para> used to provide options for the query.</para>
<section> <section>
<title>Methods for the Query class</title> <title>Methods for the Query class</title>

Loading…
Cancel
Save