You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@metamodel.apache.org by bu...@apache.org on 2013/08/01 10:42:35 UTC
svn commit: r872253 - in /websites/staging/metamodel/trunk/content: ./
css/metamodel.css css/prettify-metamodel.css index.html
Author: buildbot
Date: Thu Aug 1 08:42:34 2013
New Revision: 872253
Log:
Staging update by buildbot for metamodel
Modified:
websites/staging/metamodel/trunk/content/ (props changed)
websites/staging/metamodel/trunk/content/css/metamodel.css
websites/staging/metamodel/trunk/content/css/prettify-metamodel.css
websites/staging/metamodel/trunk/content/index.html
Propchange: websites/staging/metamodel/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Thu Aug 1 08:42:34 2013
@@ -1 +1 @@
-1508825
+1509119
Modified: websites/staging/metamodel/trunk/content/css/metamodel.css
==============================================================================
--- websites/staging/metamodel/trunk/content/css/metamodel.css (original)
+++ websites/staging/metamodel/trunk/content/css/metamodel.css Thu Aug 1 08:42:34 2013
@@ -57,12 +57,12 @@ p {
}
table {
- margin: 0px;
- margin-top: 4px;
- margin-bottom: 4px;
- padding: 5px;
- background-color: #f0f0f0;
- border-radius: 5px;
+ background-color: #222;
+ margin: 10px;
+ color: white;
+ border-radius: 10px;
+ padding: 10px;
+ font-size: 0.8em;
}
th,td {
Modified: websites/staging/metamodel/trunk/content/css/prettify-metamodel.css
==============================================================================
--- websites/staging/metamodel/trunk/content/css/prettify-metamodel.css (original)
+++ websites/staging/metamodel/trunk/content/css/prettify-metamodel.css Thu Aug 1 08:42:34 2013
@@ -2,7 +2,7 @@
* Prettify overrides for the MetaModel website
*/
pre {
- background-color: #222 !important;
+ background-color: #222 !important;
border-radius: 10px !important;
padding: 10px;
margin-left: 10px;
Modified: websites/staging/metamodel/trunk/content/index.html
==============================================================================
--- websites/staging/metamodel/trunk/content/index.html (original)
+++ websites/staging/metamodel/trunk/content/index.html Thu Aug 1 08:42:34 2013
@@ -15,11 +15,11 @@
<div class="nav_container">
<ul id="nav">
<li><a href="#">Home</a></li>
- <li><a href="#examples">Examples</a></li>
<li><a href="#wiki">Wiki</a></li>
<li><a href="#mailinglists">Mailing lists</a></li>
<li><a href="#sourcecode">Source code</a></li>
<li><a href="#issuetracking">Issue tracking</a></li>
+ <li><a href="#examples">Examples</a></li>
<li><a href="#heritage">Heritage</a></li>
<li><a href="#disclaimer">Disclaimer</a></li>
</ul>
@@ -50,79 +50,21 @@
<img src="img/datastore-types.png" alt="Datastore types" class="indent" />
</p>
- </div>
- </div>
-
- </div>
- <div class="graybg">
-
- <a class="bookmark" name="examples"></a>
-
- <div class="section">
- <div class="left">
- <h2>Examples</h2>
- <h3>Query with MetaModel</h3>
- </div>
-
- <div class="right">
-
- <p>With MetaModel you use a type-safe SQL-like API for querying any datastore:</p>
-
- <pre class="prettyprint lang-java">DataContext dataContext = DataContextFactory.create[TypeOfDatastore](...);
-DataSet dataSet = dataContext.query()
- .from("libraries")
- .select("name")
- .where("language").eq("Java")
- .and("enhances_data_access").eq(true)
- .execute();</pre>
-
- <p>The MetaModel query API allows you to use the power of SQL, even on data formats such as CSV files, Excel spreadsheets, NoSQL databases and more.</p>
- </div>
- </div>
-
- <div class="section">
- <div class="left">
- <h3>Update with MetaModel</h3>
- </div>
- <div class="right">
- <p>MetaModel lets you do CRUD operations on arbitrary datamodels, also in a type-safe manner. Batch updates and transactions are logically modelled as UpdateScript closures.</p>
+ <p>MetaModel <i>isn't</i> a data mapping framework. Instead we emphasize abstraction of metadata, making MetaModel great for generic data processing applications, less so for applications modeled around a particular domain.</p>
- <pre class="prettyprint lang-java">dataContext.executeUpdate(new UpdateScript() {
- public void run(UpdateCallback callback) {
- // CREATE a table
- Table table = callback.createTable("contributors")
- .withColumn("id").ofType(INTEGER)
- .withColumn("name").ofType(VARCHAR).execute();
-
- // INSERT INTO table
- callback.insertInto(table)
- .value("id", 1).value("name", "John Doe").execute();
- callback.insertInto(table)
- .value("name", "Jane D.").execute();
-
- // UPDATE table
- callback.update(table).value("name","Jane Doe")
- .where("id").eq(2).execute();
-
- // DELETE FROM table
- callback.deleteFrom(table).where("id").eq(1).execute();
- }
-});</pre>
-
- <p>The rest of the API should reveal itself through using the DataContext! Javadocs, wiki, mailing lists and other resources help too of course, so ...</p>
</div>
</div>
</div>
<a class="bookmark" name="wiki"></a>
- <div>
+ <div class="graybg">
<div class="section">
<div class="left">
<h2>Wiki</h2>
</div>
<div class="right">
- <p>Check out the <a href="https://wiki.apache.org/metamodel">MetaModel wiki</a> for more examples and documentation.</p>
+ <p>Check out the <a href="https://wiki.apache.org/metamodel">MetaModel wiki</a> for in-depth examples and documentation.</p>
</div>
</div>
@@ -188,6 +130,66 @@ DataSet dataSet = dataContext.query()
</div>
</div>
+
+ <a class="bookmark" name="examples"></a>
+ <div>
+
+ <div class="section">
+ <div class="left">
+ <h2>Examples</h2>
+ <h3>Query with MetaModel</h3>
+ </div>
+
+ <div class="right">
+
+ <p>With MetaModel you use a type-safe SQL-like API for querying any datastore:</p>
+
+ <pre class="prettyprint lang-java">DataContext dataContext = DataContextFactory.create[TypeOfDatastore](...);
+DataSet dataSet = dataContext.query()
+ .from("libraries")
+ .select("name")
+ .where("language").eq("Java")
+ .and("enhances_data_access").eq(true)
+ .execute();</pre>
+
+ <p>The MetaModel query API allows you to use the power of SQL, even on data formats such as CSV files, Excel spreadsheets, NoSQL databases and more.</p>
+ </div>
+ </div>
+
+ <div class="section">
+ <div class="left">
+ <h3>Update with MetaModel</h3>
+ </div>
+ <div class="right">
+ <p>MetaModel lets you do CRUD operations on arbitrary datamodels, also in a type-safe manner. Batch updates and transactions are logically modelled as UpdateScript closures.</p>
+
+ <pre class="prettyprint lang-java">dataContext.executeUpdate(new UpdateScript() {
+ public void run(UpdateCallback callback) {
+ // CREATE a table
+ Table table = callback.createTable("contributors")
+ .withColumn("id").ofType(INTEGER)
+ .withColumn("name").ofType(VARCHAR).execute();
+
+ // INSERT INTO table
+ callback.insertInto(table)
+ .value("id", 1).value("name", "John Doe").execute();
+ callback.insertInto(table)
+ .value("name", "Jane D.").execute();
+
+ // UPDATE table
+ callback.update(table).value("name","Jane Doe")
+ .where("id").eq(2).execute();
+
+ // DELETE FROM table
+ callback.deleteFrom(table).where("id").eq(1).execute();
+ }
+});</pre>
+
+ <p>The rest of the API should reveal itself through using the DataContext! Javadocs, wiki, mailing lists and other resources help too of course, so check them out.</p>
+ </div>
+ </div>
+ </div>
+
<div class="graybg">
<a class="bookmark" name="heritage"></a>