http://git-wip-us.apache.org/repos/asf/polygene-website/blob/ea4d77b0/content/java/latest/howto-depend-on-zest.html ---------------------------------------------------------------------- diff --git a/content/java/latest/howto-depend-on-zest.html b/content/java/latest/howto-depend-on-zest.html deleted file mode 100644 index 32311b9..0000000 --- a/content/java/latest/howto-depend-on-zest.html +++ /dev/null @@ -1,134 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Depend on Zest⢠in your build</title><link rel="stylesheet" type="text/css" href="css/style.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.76.1" /><link rel="home" href="index.html" title="" /><link rel="up" href="tutorials.html" title="Tutorials" /><link rel="prev" href="thirty-minutes-intro.html" title="Zest⢠in 30 minutes" /><link rel="next" href="howto-assemble-application.html" title="Assemble an Application" /> - - -<!-- favicon --> - -<link rel="shortcut icon" href="http://qi4j.org/favicon.ico" type="image/vnd.microsoft.icon" /> -<link rel="icon" href="http://qi4j.org/favicon.ico" type="image/x-icon" /> - -<!-- style --> - -<link href="css/shCore.css" rel="stylesheet" type="text/css" /> -<link href="css/shCoreEclipse.css" rel="stylesheet" type="text/css" /> -<link href="css/shThemeEclipse.css" rel="stylesheet" type="text/css" /> -<link href="css/qi4j.css" rel="stylesheet" type="text/css" /> - -<!-- Syntax Highlighter --> - -<script type="text/javascript" src="js/shCore.js"></script> -<script type="text/javascript" src="js/shBrushJava.js"></script> -<script type="text/javascript" src="js/shBrushScala.js"></script> -<script type="text/javascript" src="js/shBrushJScript.js"></script> -<script type="text/javascript" src="js/shBrushBash.js"></script> -<script type="text/javascript" src="js/shBrushPlain.js"></script> -<script type="text/javascript" src="js/shBrushXml.js"></script> -<script type="text/javascript" src="js/shBrushGroovy.js"></script> -<script type="text/javascript" src="js/shBrushPython.js"></script> -<script type="text/javascript" src="js/shBrushRuby.js"></script> -<script type="text/javascript" src="js/shBrushCSharp.js"></script> - -<script type="text/javascript"> - SyntaxHighlighter.defaults['tab-size'] = 4; - SyntaxHighlighter.defaults['gutter'] = false; - SyntaxHighlighter.defaults['toolbar'] = false; - SyntaxHighlighter.all() -</script> - -<!-- JQuery --> - -<script type="text/javascript" src="js/jquery-1.6.4.min.js"></script> - -<!-- Image Scaler --> - -<script type="text/javascript" src="js/imagescaler.js"></script> - -<!-- Table Styler --> - -<script type="text/javascript" src="js/tablestyler.js"></script> - -<!-- Qi4j WebSite Progressive Enhancement --> - -<link href="css/progressive-enhancement.css" rel="stylesheet" type="text/css" /> -<script type="text/javascript" src="js/jquery.scrollTo-1.4.2.js"></script> -<script type="text/javascript" src="js/progressive-enhancement.js"></script> - -<!-- Analytics --> - <script type="text/javascript"> - var _gaq = _gaq || []; - _gaq.push(['_setAccount', 'UA-89723617-1']); - _gaq.push(['_trackPageview']); - - (function() { - var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; - ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; - var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); - })(); - </script> - - </head><body><div xmlns="" xmlns:exsl="http://exslt.org/common" class="logo"><a href="index.html"><img src="images/logo-standard.png" /></a></div><div xmlns="" xmlns:exsl="http://exslt.org/common" class="top-nav"><div xmlns="http://www.w3.org/1999/xhtml" class="toc"><dl><dt><span class="section"><a href="index.html#home">Zestâ¢</a></span></dt><dt><span class="section"><a href="intro.html">Introduction</a></span></dt><dt><span class="section"><span xmlns="" href="tutorials.html">Tutorials</span></span></dt><dt><span class="section"><a href="javadocs.html">Javadoc</a></span></dt><dt><span class="section"><a href="samples.html">Samples</a></span></dt><dt><span class="section"><a href="core.html">Core</a></span></dt><dt><span class="section"><a href="libraries.html">Libraries</a></span></dt><dt><span class="section"><a href="extensions.html">Extensions</a></span></dt><dt><span class="section"><a href="tools.html">Tools</a></span></dt><dt><span class="section"><a href="glossary.html"> Glossary </a></span></dt></dl></div></div><div xmlns="" xmlns:exsl="http://exslt.org/common" class="sub-nav"><div xmlns="http://www.w3.org/1999/xhtml" class="toc"><dl><dt><span class="section"><a href="tutorials.html#_overview">Overview</a></span></dt><dt><span class="section"><a href="two-minutes-intro.html">Zest⢠in 2 minutes</a></span></dt><dt><span class="section"><a href="ten-minutes-intro.html">Zest⢠in 10 minutes</a></span></dt><dt><span class="section"><a href="thirty-minutes-intro.html">Zest⢠in 30 minutes</a></span></dt><dt><span class="section"><span xmlns="" href="howto-depend-on-zest.html">Depend on Zest⢠in your build</span></span></dt><dt><span class="section"><a href="howto-assemble-application.html">Assemble an Application</a></span></dt><dt><span class="section"><a href="tut-composites.html">Transient Composites Tutorial</a></span></dt><dt><span class="section"><a href="tut-services.html">Services Composites Tutorial</a></span></dt><dt><span class="section "><a href="howto-contextual-fragments.html">Use contextual fragments</a></span></dt><dt><span class="section"><a href="howto-leverage-properties.html">Leverage Properties</a></span></dt><dt><span class="section"><a href="howto-create-constraint.html">Create a Constraint</a></span></dt><dt><span class="section"><a href="howto-create-concern.html">Create a Concern</a></span></dt><dt><span class="section"><a href="howto-create-sideeffect.html">Create a SideEffect</a></span></dt><dt><span class="section"><a href="howto-create-entity.html">Create an Entity</a></span></dt><dt><span class="section"><a href="howto-configure-service.html">Configure a Service</a></span></dt><dt><span class="section"><a href="howto-invocation-annotation.html">Use @Invocation</a></span></dt><dt><span class="section"><a href="howto-use-io.html">Use I/O API</a></span></dt><dt><span class="section"><a href="build-system.html">Zest⢠Build System</a></span></dt><dt><span class="section"><a href="community-docs.htm l">Writing Zest⢠Documentation</a></span></dt><dt><span class="section"><a href="releasing-apache.html">Releasing Zestâ¢</a></span></dt></dl></div></div><div class="section" title="Depend on Zest⢠in your build"><div class="titlepage"><div><div><h3 class="title"><a id="howto-depend-on-zest"></a>Depend on Zest⢠in your build</h3></div></div></div><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>Some of the <a class="xref" href="libraries.html" title="Libraries">Libraries</a> and <a class="xref" href="extensions.html" title="Extensions">Extensions</a> depend on artifacts that are not deployed in central, youâll need to -add other repositories to your build scripts accordingly.</p></div><p>Release artifacts, including sources and javadoc, are deployed to Maven Central:</p><p><a class="ulink" href="http://repo1.maven.org/maven2/" target="_top">http://repo1.maven.org/maven2/</a> (US)</p><p><a class="ulink" href="http://uk.maven.org/maven2/" target="_top">http://uk.maven.org/maven2/</a> (Europe)</p><p>Snapshot artifacts, including sources and javadoc, are built against the <code class="literal">develop</code> branch and deployed weekly to the Apache SNAPSHOTS repository:</p><p><a class="ulink" href="http://repository.apache.org/snapshots/" target="_top">http://repository.apache.org/snapshots/</a></p><div class="section" title="Manually"><div class="titlepage"><div><div><h4 class="title"><a id="_manually"></a>Manually</h4></div></div></div><p>If you donât rely on your build scripts dependency resolution mechanism you should -<a class="ulink" href="https://zest.apache.org/download.html" target="_top">download</a> the SDK distribution.</p></div><div class="section" title="Using Maven"><div class="titlepage"><div><div><h4 class="title"><a id="_using_maven"></a>Using Maven</h4></div></div></div><p>You simply declare dependencies on Zest⢠artifacts:</p><pre class="programlisting brush: xml"><dependencies> - <dependency> - <groupId>org.qi4j.core</groupId> - <artifactId>org.qi4j.core.bootstrap</artifactId> - <version>ZEST_VERSION</version> - </dependency> - <dependency> - <groupId>org.qi4j.core</groupId> - <artifactId>org.qi4j.core.runtime</artifactId> - <version>ZEST_VERSION</version> - <scope>runtime</scope> - </dependency> - <dependency> - <groupId>org.qi4j.core</groupId> - <artifactId>org.qi4j.core.testsupport</artifactId> - <version>ZEST_VERSION</version> - <scope>test</scope> - </dependency> -</dependencies></pre><p>Where <code class="literal">ZEST_VERSION</code> is the Zest⢠version you want to use.</p><p>If you want to use <code class="literal">-SNAPSHOT</code> versions, you need to register the Apache Snapshots repository:</p><pre class="programlisting brush: xml"><repositories> - <repository> - <id>apache-snapshots</id> - <url>https://repository.apache.org/snapshots/</url> - <releases><enabled>false</enabled></releases> - <snapshots><enabled>true</enabled></snapshots> - </repository> -</repositories></pre></div><div class="section" title="Using Gradle"><div class="titlepage"><div><div><h4 class="title"><a id="_using_gradle"></a>Using Gradle</h4></div></div></div><p>You simply declare dependencies on Zest⢠artifacts:</p><pre class="programlisting brush: groovy">dependencies { - compile "org.qi4j.core:org.qi4j.core.bootstrap:ZEST_VERSION" - runtime "org.qi4j.core:org.qi4j.core.runtime:ZEST_VERSION" - testCompile "org.qi4j.core:org.qi4j.core.testsupport:ZEST_VERSION" -}</pre><p>Where <code class="literal">ZEST_VERSION</code> is the Zest⢠version you want to use.</p><p>If you want to use <code class="literal">-SNAPSHOT</code> versions, you need to register the Apache Snapshots repository:</p><pre class="programlisting brush: groovy">repositories { - maven { name 'apache-snapshots'; url "https://repository.apache.org/snapshots/" } -}</pre></div><div class="section" title="Using Buildr"><div class="titlepage"><div><div><h4 class="title"><a id="_using_buildr"></a>Using Buildr</h4></div></div></div><p>You simply declare dependencies on Zest⢠artifacts:</p><pre class="programlisting brush: ruby">compile.with 'org.qi4j.core:org.qi4j.core.bootstrap:ZEST_VERSION' -package(:war).with :libs => 'org.qi4j.core:org.qi4j.core.runtime:ZEST_VERSION' -test.with 'org.qi4j.core:org.qi4j.core.testsupport:ZEST_VERSION'</pre><p>Where <code class="literal">ZEST_VERSION</code> is the Zest⢠version you want to use.</p><p>If you want to use <code class="literal">-SNAPSHOT</code> versions, you need to register the Apache Snapshots repository:</p><pre class="programlisting brush: ruby">repositories.remote << 'https://repository.apache.org/snapshots/'</pre></div><div class="section" title="Using SBT"><div class="titlepage"><div><div><h4 class="title"><a id="_using_sbt"></a>Using SBT</h4></div></div></div><p>You simply declare dependencies on Zest⢠artifacts:</p><pre class="programlisting brush: scala">libraryDependencies += \ - "org.qi4j.core" % "org.qi4j.core.bootstrap" % "ZEST_VERSION" \ - withSources() withJavadoc() -libraryDependencies += \ - "org.qi4j.core" % "org.qi4j.core.runtime" % "ZEST_VERSION" % "runtime" \ - withSources() withJavadoc() -libraryDependencies += \ - "org.qi4j.core" % "org.qi4j.core.testsupport" % "ZEST_VERSION" % "test" \ - withSources() withJavadoc()</pre><p>Where <code class="literal">ZEST_VERSION</code> is the Zest⢠version you want to use.</p><p>If you want to use <code class="literal">-SNAPSHOT</code> versions, you need to register the Apache Snapshots repository:</p><pre class="programlisting brush: scala">resolvers += "apache-snapshots" at "https://repository.apache.org/snapshots/"</pre></div><div class="section" title="Using Ivy"><div class="titlepage"><div><div><h4 class="title"><a id="_using_ivy"></a>Using Ivy</h4></div></div></div><p>You simply declare dependencies on Zest⢠artifacts:</p><pre class="programlisting brush: xml"><ivy-module> - <dependencies> - <dependency org="org.qi4j.core" name="org.qi4j.core.bootstrap" - rev="ZEST_VERSION" conf="default" /> - <dependency org="org.qi4j.core" name="org.qi4j.core.runtime" - rev="ZEST_VERSION" conf="runtime" /> - <dependency org="org.qi4j.core" name="org.qi4j.core.testsupport" - rev="ZEST_VERSION" conf="test" /> - </dependencies> -</ivy-module></pre><p>Where <code class="literal">ZEST_VERSION</code> is the Zest⢠version you want to use.</p><p>If you want to use <code class="literal">-SNAPSHOT</code> versions, you need to register the Apache Snapshots repository in a <code class="literal">ivysettings.xml</code> file:</p><pre class="programlisting brush: xml"><ivysettings> - <settings defaultResolver="chain"/> - <resolvers> - <chain name="chain"> - <ibiblio name="apache-snapshots" m2compatible="true" - root="https://repository.apache.org/snapshots/"/> - </chain> - </resolvers> -</ivysettings></pre></div></div><div xmlns="" xmlns:exsl="http://exslt.org/common" class="footer"><p> - Copyright © 2015 The Apache Software Foundation, Licensed under the <a href="http://www.apache.org/licenses/" target="_blank">Apache License, Version 2.0</a>. - <br /><small> - Apache Zest, Zest, Apache, the Apache feather logo, and the Apache Zest project logo are trademarks of The Apache Software Foundation.<br /> - All other marks mentioned may be trademarks or registered trademarks of their respective owners. - </small></p></div></body></html> \ No newline at end of file
http://git-wip-us.apache.org/repos/asf/polygene-website/blob/ea4d77b0/content/java/latest/howto-invocation-annotation.html ---------------------------------------------------------------------- diff --git a/content/java/latest/howto-invocation-annotation.html b/content/java/latest/howto-invocation-annotation.html deleted file mode 100644 index 41ca966..0000000 --- a/content/java/latest/howto-invocation-annotation.html +++ /dev/null @@ -1,109 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Use @Invocation</title><link rel="stylesheet" type="text/css" href="css/style.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.76.1" /><link rel="home" href="index.html" title="" /><link rel="up" href="tutorials.html" title="Tutorials" /><link rel="prev" href="howto-configure-service.html" title="Configure a Service" /><link rel="next" href="howto-use-io.html" title="Use I/O API" /> - - -<!-- favicon --> - -<link rel="shortcut icon" href="http://qi4j.org/favicon.ico" type="image/vnd.microsoft.icon" /> -<link rel="icon" href="http://qi4j.org/favicon.ico" type="image/x-icon" /> - -<!-- style --> - -<link href="css/shCore.css" rel="stylesheet" type="text/css" /> -<link href="css/shCoreEclipse.css" rel="stylesheet" type="text/css" /> -<link href="css/shThemeEclipse.css" rel="stylesheet" type="text/css" /> -<link href="css/qi4j.css" rel="stylesheet" type="text/css" /> - -<!-- Syntax Highlighter --> - -<script type="text/javascript" src="js/shCore.js"></script> -<script type="text/javascript" src="js/shBrushJava.js"></script> -<script type="text/javascript" src="js/shBrushScala.js"></script> -<script type="text/javascript" src="js/shBrushJScript.js"></script> -<script type="text/javascript" src="js/shBrushBash.js"></script> -<script type="text/javascript" src="js/shBrushPlain.js"></script> -<script type="text/javascript" src="js/shBrushXml.js"></script> -<script type="text/javascript" src="js/shBrushGroovy.js"></script> -<script type="text/javascript" src="js/shBrushPython.js"></script> -<script type="text/javascript" src="js/shBrushRuby.js"></script> -<script type="text/javascript" src="js/shBrushCSharp.js"></script> - -<script type="text/javascript"> - SyntaxHighlighter.defaults['tab-size'] = 4; - SyntaxHighlighter.defaults['gutter'] = false; - SyntaxHighlighter.defaults['toolbar'] = false; - SyntaxHighlighter.all() -</script> - -<!-- JQuery --> - -<script type="text/javascript" src="js/jquery-1.6.4.min.js"></script> - -<!-- Image Scaler --> - -<script type="text/javascript" src="js/imagescaler.js"></script> - -<!-- Table Styler --> - -<script type="text/javascript" src="js/tablestyler.js"></script> - -<!-- Qi4j WebSite Progressive Enhancement --> - -<link href="css/progressive-enhancement.css" rel="stylesheet" type="text/css" /> -<script type="text/javascript" src="js/jquery.scrollTo-1.4.2.js"></script> -<script type="text/javascript" src="js/progressive-enhancement.js"></script> - -<!-- Analytics --> - <script type="text/javascript"> - var _gaq = _gaq || []; - _gaq.push(['_setAccount', 'UA-89723617-1']); - _gaq.push(['_trackPageview']); - - (function() { - var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; - ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; - var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); - })(); - </script> - - </head><body><div xmlns="" xmlns:exsl="http://exslt.org/common" class="logo"><a href="index.html"><img src="images/logo-standard.png" /></a></div><div xmlns="" xmlns:exsl="http://exslt.org/common" class="top-nav"><div xmlns="http://www.w3.org/1999/xhtml" class="toc"><dl><dt><span class="section"><a href="index.html#home">Zestâ¢</a></span></dt><dt><span class="section"><a href="intro.html">Introduction</a></span></dt><dt><span class="section"><span xmlns="" href="tutorials.html">Tutorials</span></span></dt><dt><span class="section"><a href="javadocs.html">Javadoc</a></span></dt><dt><span class="section"><a href="samples.html">Samples</a></span></dt><dt><span class="section"><a href="core.html">Core</a></span></dt><dt><span class="section"><a href="libraries.html">Libraries</a></span></dt><dt><span class="section"><a href="extensions.html">Extensions</a></span></dt><dt><span class="section"><a href="tools.html">Tools</a></span></dt><dt><span class="section"><a href="glossary.html"> Glossary </a></span></dt></dl></div></div><div xmlns="" xmlns:exsl="http://exslt.org/common" class="sub-nav"><div xmlns="http://www.w3.org/1999/xhtml" class="toc"><dl><dt><span class="section"><a href="tutorials.html#_overview">Overview</a></span></dt><dt><span class="section"><a href="two-minutes-intro.html">Zest⢠in 2 minutes</a></span></dt><dt><span class="section"><a href="ten-minutes-intro.html">Zest⢠in 10 minutes</a></span></dt><dt><span class="section"><a href="thirty-minutes-intro.html">Zest⢠in 30 minutes</a></span></dt><dt><span class="section"><a href="howto-depend-on-zest.html">Depend on Zest⢠in your build</a></span></dt><dt><span class="section"><a href="howto-assemble-application.html">Assemble an Application</a></span></dt><dt><span class="section"><a href="tut-composites.html">Transient Composites Tutorial</a></span></dt><dt><span class="section"><a href="tut-services.html">Services Composites Tutorial</a></span></dt><dt><span class="section"><a href="howt o-contextual-fragments.html">Use contextual fragments</a></span></dt><dt><span class="section"><a href="howto-leverage-properties.html">Leverage Properties</a></span></dt><dt><span class="section"><a href="howto-create-constraint.html">Create a Constraint</a></span></dt><dt><span class="section"><a href="howto-create-concern.html">Create a Concern</a></span></dt><dt><span class="section"><a href="howto-create-sideeffect.html">Create a SideEffect</a></span></dt><dt><span class="section"><a href="howto-create-entity.html">Create an Entity</a></span></dt><dt><span class="section"><a href="howto-configure-service.html">Configure a Service</a></span></dt><dt><span class="section"><span xmlns="" href="howto-invocation-annotation.html">Use @Invocation</span></span></dt><dt><span class="section"><a href="howto-use-io.html">Use I/O API</a></span></dt><dt><span class="section"><a href="build-system.html">Zest⢠Build System</a></span></dt><dt><span class="section"><a href="community-docs.htm l">Writing Zest⢠Documentation</a></span></dt><dt><span class="section"><a href="releasing-apache.html">Releasing Zestâ¢</a></span></dt></dl></div></div><div class="section" title="Use @Invocation"><div class="titlepage"><div><div><h3 class="title"><a id="howto-invocation-annotation"></a>Use @Invocation</h3></div></div></div><p>The @Invocation annotation is relatively unknown but can be rather powerful to use, especially when creating -libraries that needs to be flexible of what the user needs to do.</p><p>@Invocation is a different <code class="literal">InjectionScope</code>, which is a concept to tell Zest runtime where to look for the -instances to be injected. Other, more well-known, <code class="literal">InjectionScope</code> annotations are <code class="literal">@This</code>, <code class="literal">@Structure</code> and -<code class="literal">@Service</code>.</p><p>The <code class="literal">@Invocation</code> injection scope can provide the following types, all related to the on-going method invocation, -which is especially useful in Generic Concerns or Generic Mixins;</p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"> -<code class="literal">java.lang.reflect.Method</code> - The current method being invoked. -</li><li class="listitem"> -<code class="literal">java.lang.reflect.AnnotatedElement</code> - An descriptor for all annotations of the Method. -</li><li class="listitem"> -<span class="emphasis"><em>Custom Annotations</em></span> - Your own annotation type. -</li><li class="listitem"> -<code class="literal">java.util.Iterable<Method></code> - An iterable of all declared methods of the composite type. -</li></ul></div><div class="section" title="java.lang.reflect.Method"><div class="titlepage"><div><div><h4 class="title"><a id="_java_lang_reflect_method"></a>java.lang.reflect.Method</h4></div></div></div><p>This injection will simply provide the <code class="literal">java.lang.reflect.Method</code> of the on-going call. For generic fragments that -will be the same as the second argument in the <code class="literal">java.lang.reflect.InvocationHandler.invoke()</code> method. Sometimes -it is useful to obtain this for typed fragment as well, to reduce names in Strings.</p></div><div class="section" title="java.lang.reflect.AnnotatedElement"><div class="titlepage"><div><div><h4 class="title"><a id="_java_lang_reflect_annotatedelement"></a>java.lang.reflect.AnnotatedElement</h4></div></div></div><p>This Reflection API class encapsulates the annotation aspect of any element that can be annotated. Zest implements -this interface for the Composite. That means that annotations for both the method as well as the composite is provided -through this injection.</p></div><div class="section" title="Custom Annotations"><div class="titlepage"><div><div><h4 class="title"><a id="_custom_annotations"></a>Custom Annotations</h4></div></div></div><p>It is often useful to introduce oneâs own annotations, especially for libraries, and use these annotations to direct -the runtime to do different things. Many of the "built-in" features in Zest is actually done by this mechanism and -not directly implemented in the Core Runtime.</p><p>First create an annotation of your own liking, it must have <code class="literal">java.lang.annotation.Retention</code> set to <code class="literal">RUNTIME</code></p><pre class="programlisting brush: java">@Retention( RUNTIME ) -@interface Foo -{ - String value(); -} -</pre><p>After that it is possible to have this annotation placed on composite type methods,</p><pre class="programlisting brush: java">public interface MyComposite - extends TransientComposite -{ - @Foo( "1" ) - void doStuff(); -</pre><p>and then the annotation can simply be injected into your Concerns or Mixins, like this;</p><pre class="programlisting brush: java">public abstract static class MyConcern - extends ConcernOf<MyComposite> - implements MyComposite -{ - @Invocation - Foo foo; -</pre></div><div class="section" title="java.util.Iterable<Method>"><div class="titlepage"><div><div><h4 class="title"><a id="_java_util_iterable_lt_method_gt"></a>java.util.Iterable<Method></h4></div></div></div><p>This injection will provide all the declared methods of the current composite. This is particularly useful for mixins -or concerns that builds information about the composite they belong to.</p></div></div><div xmlns="" xmlns:exsl="http://exslt.org/common" class="footer"><p> - Copyright © 2015 The Apache Software Foundation, Licensed under the <a href="http://www.apache.org/licenses/" target="_blank">Apache License, Version 2.0</a>. - <br /><small> - Apache Zest, Zest, Apache, the Apache feather logo, and the Apache Zest project logo are trademarks of The Apache Software Foundation.<br /> - All other marks mentioned may be trademarks or registered trademarks of their respective owners. - </small></p></div></body></html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/polygene-website/blob/ea4d77b0/content/java/latest/howto-leverage-properties.html ---------------------------------------------------------------------- diff --git a/content/java/latest/howto-leverage-properties.html b/content/java/latest/howto-leverage-properties.html deleted file mode 100644 index ce19733..0000000 --- a/content/java/latest/howto-leverage-properties.html +++ /dev/null @@ -1,140 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Leverage Properties</title><link rel="stylesheet" type="text/css" href="css/style.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.76.1" /><link rel="home" href="index.html" title="" /><link rel="up" href="tutorials.html" title="Tutorials" /><link rel="prev" href="howto-contextual-fragments.html" title="Use contextual fragments" /><link rel="next" href="howto-create-constraint.html" title="Create a Constraint" /> - - -<!-- favicon --> - -<link rel="shortcut icon" href="http://qi4j.org/favicon.ico" type="image/vnd.microsoft.icon" /> -<link rel="icon" href="http://qi4j.org/favicon.ico" type="image/x-icon" /> - -<!-- style --> - -<link href="css/shCore.css" rel="stylesheet" type="text/css" /> -<link href="css/shCoreEclipse.css" rel="stylesheet" type="text/css" /> -<link href="css/shThemeEclipse.css" rel="stylesheet" type="text/css" /> -<link href="css/qi4j.css" rel="stylesheet" type="text/css" /> - -<!-- Syntax Highlighter --> - -<script type="text/javascript" src="js/shCore.js"></script> -<script type="text/javascript" src="js/shBrushJava.js"></script> -<script type="text/javascript" src="js/shBrushScala.js"></script> -<script type="text/javascript" src="js/shBrushJScript.js"></script> -<script type="text/javascript" src="js/shBrushBash.js"></script> -<script type="text/javascript" src="js/shBrushPlain.js"></script> -<script type="text/javascript" src="js/shBrushXml.js"></script> -<script type="text/javascript" src="js/shBrushGroovy.js"></script> -<script type="text/javascript" src="js/shBrushPython.js"></script> -<script type="text/javascript" src="js/shBrushRuby.js"></script> -<script type="text/javascript" src="js/shBrushCSharp.js"></script> - -<script type="text/javascript"> - SyntaxHighlighter.defaults['tab-size'] = 4; - SyntaxHighlighter.defaults['gutter'] = false; - SyntaxHighlighter.defaults['toolbar'] = false; - SyntaxHighlighter.all() -</script> - -<!-- JQuery --> - -<script type="text/javascript" src="js/jquery-1.6.4.min.js"></script> - -<!-- Image Scaler --> - -<script type="text/javascript" src="js/imagescaler.js"></script> - -<!-- Table Styler --> - -<script type="text/javascript" src="js/tablestyler.js"></script> - -<!-- Qi4j WebSite Progressive Enhancement --> - -<link href="css/progressive-enhancement.css" rel="stylesheet" type="text/css" /> -<script type="text/javascript" src="js/jquery.scrollTo-1.4.2.js"></script> -<script type="text/javascript" src="js/progressive-enhancement.js"></script> - -<!-- Analytics --> - <script type="text/javascript"> - var _gaq = _gaq || []; - _gaq.push(['_setAccount', 'UA-89723617-1']); - _gaq.push(['_trackPageview']); - - (function() { - var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; - ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; - var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); - })(); - </script> - - </head><body><div xmlns="" xmlns:exsl="http://exslt.org/common" class="logo"><a href="index.html"><img src="images/logo-standard.png" /></a></div><div xmlns="" xmlns:exsl="http://exslt.org/common" class="top-nav"><div xmlns="http://www.w3.org/1999/xhtml" class="toc"><dl><dt><span class="section"><a href="index.html#home">Zestâ¢</a></span></dt><dt><span class="section"><a href="intro.html">Introduction</a></span></dt><dt><span class="section"><span xmlns="" href="tutorials.html">Tutorials</span></span></dt><dt><span class="section"><a href="javadocs.html">Javadoc</a></span></dt><dt><span class="section"><a href="samples.html">Samples</a></span></dt><dt><span class="section"><a href="core.html">Core</a></span></dt><dt><span class="section"><a href="libraries.html">Libraries</a></span></dt><dt><span class="section"><a href="extensions.html">Extensions</a></span></dt><dt><span class="section"><a href="tools.html">Tools</a></span></dt><dt><span class="section"><a href="glossary.html"> Glossary </a></span></dt></dl></div></div><div xmlns="" xmlns:exsl="http://exslt.org/common" class="sub-nav"><div xmlns="http://www.w3.org/1999/xhtml" class="toc"><dl><dt><span class="section"><a href="tutorials.html#_overview">Overview</a></span></dt><dt><span class="section"><a href="two-minutes-intro.html">Zest⢠in 2 minutes</a></span></dt><dt><span class="section"><a href="ten-minutes-intro.html">Zest⢠in 10 minutes</a></span></dt><dt><span class="section"><a href="thirty-minutes-intro.html">Zest⢠in 30 minutes</a></span></dt><dt><span class="section"><a href="howto-depend-on-zest.html">Depend on Zest⢠in your build</a></span></dt><dt><span class="section"><a href="howto-assemble-application.html">Assemble an Application</a></span></dt><dt><span class="section"><a href="tut-composites.html">Transient Composites Tutorial</a></span></dt><dt><span class="section"><a href="tut-services.html">Services Composites Tutorial</a></span></dt><dt><span class="section"><a href="howt o-contextual-fragments.html">Use contextual fragments</a></span></dt><dt><span class="section"><span xmlns="" href="howto-leverage-properties.html">Leverage Properties</span></span></dt><dt><span class="section"><a href="howto-create-constraint.html">Create a Constraint</a></span></dt><dt><span class="section"><a href="howto-create-concern.html">Create a Concern</a></span></dt><dt><span class="section"><a href="howto-create-sideeffect.html">Create a SideEffect</a></span></dt><dt><span class="section"><a href="howto-create-entity.html">Create an Entity</a></span></dt><dt><span class="section"><a href="howto-configure-service.html">Configure a Service</a></span></dt><dt><span class="section"><a href="howto-invocation-annotation.html">Use @Invocation</a></span></dt><dt><span class="section"><a href="howto-use-io.html">Use I/O API</a></span></dt><dt><span class="section"><a href="build-system.html">Zest⢠Build System</a></span></dt><dt><span class="section"><a href="community-docs.htm l">Writing Zest⢠Documentation</a></span></dt><dt><span class="section"><a href="releasing-apache.html">Releasing Zestâ¢</a></span></dt></dl></div></div><div class="section" title="Leverage Properties"><div class="titlepage"><div><div><h3 class="title"><a id="howto-leverage-properties"></a>Leverage Properties</h3></div></div></div><p>Zest⢠does not follow the JavaBeans standard for property support. Instead, a much more explicit concept is in place. The -advantages are enormous, and the only real downside is that people are already destroyed, thinking in so called POJO -terms.</p><p>If you want to reproduce whatâs explained in this tutorial, remember to depend on the Core API artifact:</p><div class="table"><a id="idm371059995936"></a><p class="title"><strong>Table 8. Artifact</strong></p><div class="table-contents"><table summary="Artifact" border="1"><colgroup><col class="col_1" /><col class="col_2" /><col class="col_3" /></colgroup><thead><tr><th align="left" valign="top">Group ID</th><th align="left" valign="top">Artifact ID</th><th align="left" valign="top">Version</th></tr></thead><tbody><tr><td align="left" valign="top"><p>org.qi4j.core</p></td><td align="left" valign="top"><p>org.qi4j.core.api</p></td><td align="left" valign="top"><p>2.1</p></td></tr></tbody></table></div></div><br class="table-break" /><p>At runtime you will need the Core Runtime artifact too. See the <a class="xref" href="howto-depend-on-zest.html" title="Depend on Zest⢠in your build">Depend on Zest⢠in your build</a> tutorial for details.</p><p>So in Zest, inste ad of writing;</p><pre class="programlisting brush: java">public interface Book -{ - String getTitle(); - String getAuthor(); -} -</pre><pre class="programlisting brush: java">public interface MutableBook extends Book -{ - void setTitle( String title ); - void setAuthor( String author ); -} -</pre><p>where we need the MutableBook to be able to initialize it (known as Type 2 Dependency Injection) on creation. From our -point of view, this has many flaws. If we refactor the "Title" property, our IDE need to understand the getters and -setters concept. The good news now is that they all do, but how about meta information about the property itself. For -instance, how to define a system where a UI can get an Icon for "Author" in a generic way? All kinds of system has been -added, such as one can create a BookBean for some metadata, and then MBeans for management. Where will it end?</p><p>We think we have a much better solution, and are bold enough to abandon the getters/setters and POJOs. The above looks -like this;</p><pre class="programlisting brush: java">public interface Book -{ - @Immutable - Property<String> title(); - - @Immutable - Property<String> author(); -} -</pre><p>There is more to this than meets the eye.</p><div class="itemizedlist"><ul class="itemizedlist"><li class="listitem"> -@Immutable annotation signals that this canât change. -</li><li class="listitem"> -Property still have a set() method, which can be used during the initialization only. -</li><li class="listitem"> -Metadata about each Property can be declared as <a class="xref" href="glossary.html#def-metainfo">MetaInfo</a>. -</li></ul></div><pre class="programlisting brush: java">@Structure -Module module; - [...snip...] - - TransientBuilder<Book> builder = module.newTransientBuilder( Book.class ); - Book prototype = builder.prototype(); - prototype.title().set( "The Death of POJOs" ); - prototype.author().set( "Niclas Hedhman" ); - Book book = builder.newInstance(); - String title = book.title().get(); // Retrieves the title. - book.title().set( "Long Live POJOs" ); // throws an IllegalStateException -</pre><div class="section" title="Persistence"><div class="titlepage"><div><div><h4 class="title"><a id="_persistence"></a>Persistence</h4></div></div></div><p>The Property concept also allows a much better defined persistence model. In Zest, only Property and Association -instances are persisted, and that makes the semantics around the persistence system very clear.</p><p>Properties reference values only, and these values must be Serializable, which means that Properties can not contain -Entities, since Entities are not Serializable. Associations are the opposite, as they must only reference Entities and -nothing else.</p></div><div class="section" title="MetaInfo"><div class="titlepage"><div><div><h4 class="title"><a id="_metainfo"></a>MetaInfo</h4></div></div></div><p>Properties can also have typed, custom meta information associated with them. Meta information is declared once per -Property per Module. A Property is identified by its method name and the interface it is declared in.</p><p>Letâs say we want to create a generic Swing client that can show and navigate the domain model, without knowing the -actual domain model. Such Swing client will utilize a SwingInfo property info if it is available.</p><pre class="programlisting brush: java">public interface SwingInfo -{ - Icon icon( Rectangle size ); - - String displayName( Locale locale ); -} -</pre><p>Our generic Swing UI will be mainly reflective in nature, but when it gets hold of a Property, it can simply do;</p><pre class="programlisting brush: java"> @Structure - private Qi4j api; - [...snip...] - - private void addProperty( JPanel panel, Property<?> property ) - { - SwingInfo info = api.propertyDescriptorFor( property ).metaInfo( SwingInfo.class ); - Icon icon = info.icon( SIZE_32_32 ); - panel.add( new JLabel(info.displayName( this.locale ), icon, JLabel.CENTER) ); - } - [...snip...] - -} -</pre></div></div><div xmlns="" xmlns:exsl="http://exslt.org/common" class="footer"><p> - Copyright © 2015 The Apache Software Foundation, Licensed under the <a href="http://www.apache.org/licenses/" target="_blank">Apache License, Version 2.0</a>. - <br /><small> - Apache Zest, Zest, Apache, the Apache feather logo, and the Apache Zest project logo are trademarks of The Apache Software Foundation.<br /> - All other marks mentioned may be trademarks or registered trademarks of their respective owners. - </small></p></div></body></html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/polygene-website/blob/ea4d77b0/content/java/latest/howto-use-io.html ---------------------------------------------------------------------- diff --git a/content/java/latest/howto-use-io.html b/content/java/latest/howto-use-io.html deleted file mode 100644 index 30541a7..0000000 --- a/content/java/latest/howto-use-io.html +++ /dev/null @@ -1,224 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Use I/O API</title><link rel="stylesheet" type="text/css" href="css/style.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.76.1" /><link rel="home" href="index.html" title="" /><link rel="up" href="tutorials.html" title="Tutorials" /><link rel="prev" href="howto-invocation-annotation.html" title="Use @Invocation" /><link rel="next" href="build-system.html" title="Zest⢠Build System" /> - - -<!-- favicon --> - -<link rel="shortcut icon" href="http://qi4j.org/favicon.ico" type="image/vnd.microsoft.icon" /> -<link rel="icon" href="http://qi4j.org/favicon.ico" type="image/x-icon" /> - -<!-- style --> - -<link href="css/shCore.css" rel="stylesheet" type="text/css" /> -<link href="css/shCoreEclipse.css" rel="stylesheet" type="text/css" /> -<link href="css/shThemeEclipse.css" rel="stylesheet" type="text/css" /> -<link href="css/qi4j.css" rel="stylesheet" type="text/css" /> - -<!-- Syntax Highlighter --> - -<script type="text/javascript" src="js/shCore.js"></script> -<script type="text/javascript" src="js/shBrushJava.js"></script> -<script type="text/javascript" src="js/shBrushScala.js"></script> -<script type="text/javascript" src="js/shBrushJScript.js"></script> -<script type="text/javascript" src="js/shBrushBash.js"></script> -<script type="text/javascript" src="js/shBrushPlain.js"></script> -<script type="text/javascript" src="js/shBrushXml.js"></script> -<script type="text/javascript" src="js/shBrushGroovy.js"></script> -<script type="text/javascript" src="js/shBrushPython.js"></script> -<script type="text/javascript" src="js/shBrushRuby.js"></script> -<script type="text/javascript" src="js/shBrushCSharp.js"></script> - -<script type="text/javascript"> - SyntaxHighlighter.defaults['tab-size'] = 4; - SyntaxHighlighter.defaults['gutter'] = false; - SyntaxHighlighter.defaults['toolbar'] = false; - SyntaxHighlighter.all() -</script> - -<!-- JQuery --> - -<script type="text/javascript" src="js/jquery-1.6.4.min.js"></script> - -<!-- Image Scaler --> - -<script type="text/javascript" src="js/imagescaler.js"></script> - -<!-- Table Styler --> - -<script type="text/javascript" src="js/tablestyler.js"></script> - -<!-- Qi4j WebSite Progressive Enhancement --> - -<link href="css/progressive-enhancement.css" rel="stylesheet" type="text/css" /> -<script type="text/javascript" src="js/jquery.scrollTo-1.4.2.js"></script> -<script type="text/javascript" src="js/progressive-enhancement.js"></script> - -<!-- Analytics --> - <script type="text/javascript"> - var _gaq = _gaq || []; - _gaq.push(['_setAccount', 'UA-89723617-1']); - _gaq.push(['_trackPageview']); - - (function() { - var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; - ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; - var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); - })(); - </script> - - </head><body><div xmlns="" xmlns:exsl="http://exslt.org/common" class="logo"><a href="index.html"><img src="images/logo-standard.png" /></a></div><div xmlns="" xmlns:exsl="http://exslt.org/common" class="top-nav"><div xmlns="http://www.w3.org/1999/xhtml" class="toc"><dl><dt><span class="section"><a href="index.html#home">Zestâ¢</a></span></dt><dt><span class="section"><a href="intro.html">Introduction</a></span></dt><dt><span class="section"><span xmlns="" href="tutorials.html">Tutorials</span></span></dt><dt><span class="section"><a href="javadocs.html">Javadoc</a></span></dt><dt><span class="section"><a href="samples.html">Samples</a></span></dt><dt><span class="section"><a href="core.html">Core</a></span></dt><dt><span class="section"><a href="libraries.html">Libraries</a></span></dt><dt><span class="section"><a href="extensions.html">Extensions</a></span></dt><dt><span class="section"><a href="tools.html">Tools</a></span></dt><dt><span class="section"><a href="glossary.html"> Glossary </a></span></dt></dl></div></div><div xmlns="" xmlns:exsl="http://exslt.org/common" class="sub-nav"><div xmlns="http://www.w3.org/1999/xhtml" class="toc"><dl><dt><span class="section"><a href="tutorials.html#_overview">Overview</a></span></dt><dt><span class="section"><a href="two-minutes-intro.html">Zest⢠in 2 minutes</a></span></dt><dt><span class="section"><a href="ten-minutes-intro.html">Zest⢠in 10 minutes</a></span></dt><dt><span class="section"><a href="thirty-minutes-intro.html">Zest⢠in 30 minutes</a></span></dt><dt><span class="section"><a href="howto-depend-on-zest.html">Depend on Zest⢠in your build</a></span></dt><dt><span class="section"><a href="howto-assemble-application.html">Assemble an Application</a></span></dt><dt><span class="section"><a href="tut-composites.html">Transient Composites Tutorial</a></span></dt><dt><span class="section"><a href="tut-services.html">Services Composites Tutorial</a></span></dt><dt><span class="section"><a href="howt o-contextual-fragments.html">Use contextual fragments</a></span></dt><dt><span class="section"><a href="howto-leverage-properties.html">Leverage Properties</a></span></dt><dt><span class="section"><a href="howto-create-constraint.html">Create a Constraint</a></span></dt><dt><span class="section"><a href="howto-create-concern.html">Create a Concern</a></span></dt><dt><span class="section"><a href="howto-create-sideeffect.html">Create a SideEffect</a></span></dt><dt><span class="section"><a href="howto-create-entity.html">Create an Entity</a></span></dt><dt><span class="section"><a href="howto-configure-service.html">Configure a Service</a></span></dt><dt><span class="section"><a href="howto-invocation-annotation.html">Use @Invocation</a></span></dt><dt><span class="section"><span xmlns="" href="howto-use-io.html">Use I/O API</span></span></dt><dt><span class="section"><a href="build-system.html">Zest⢠Build System</a></span></dt><dt><span class="section"><a href="community-docs.htm l">Writing Zest⢠Documentation</a></span></dt><dt><span class="section"><a href="releasing-apache.html">Releasing Zestâ¢</a></span></dt></dl></div></div><div class="section" title="Use I/O API"><div class="titlepage"><div><div><h3 class="title"><a id="howto-use-io"></a>Use I/O API</h3></div></div></div><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This article was written on Rickard Ãbergâs blog, 6 Nov 2010</p></div><p>The past week Iâve had to deal with a lot of data shuffling, both in raw form as bytes and strings, and as SPI and -domain level objects. What struck me is that it is notoriously hard to shuffle things from one place to another in a -way that is scalable, performant and handles errors correctly. And I had to do some things over and over again, like -reading strings from files.</p><p>So the thought occurred: there must be a general pattern to how this thing works, which can be extracted and put into a -library. "Reading lines from a text file" should only have to be done once, and then used in whatever scenario requires -it. Letâs take a look at a typical example of reading from one file and writing to another to see if we can find out -what the possible pieces could be:</p><pre class="programlisting brush: java">1: File source = new File( getClass().getResource( "/iotest.txt" ).getFile() ); -1: File destination = File.createTempFile( "test", ".txt" ); -1: destination.deleteOnExit(); -2: BufferedReader reader = new BufferedReader(new FileReader(source)); -3: long count = 0; -2: try -2: { -4: BufferedWriter writer = new BufferedWriter(new FileWriter(destination)); -4: try -4: { -2: String line = null; -2: while ((line = reader.readLine()) != null) -2: { -3: count++; -4: writer.append( line ).append( '\n' ); -2: } -4: writer.close(); -4: } catch (IOException e) -4: { -4: writer.close(); -4: destination.delete(); -4: } -2: } finally -2: { -2: reader.close(); -2: } -1: System.out.println(count)</pre><p>As the numbers to the left indicates, Iâve identified four parts in this type of code that could be separated from -each other.</p><p>1) is the client code that initiates a transfer, and which have to know the input and output source.</p><p>2) is the code that reads lines from an input.</p><p>3) is helper code that I use to keep track of whatâs going on, and which Iâd like to reuse no matter what kind of -transfer is being done.</p><p>4) receives the data and writes it down. In this code, if I wanted to implement batching on the read and write side I -could do so by changing the 2 and 4 parts to read/write multiple lines at a time.</p><div class="section" title="The API"><div class="titlepage"><div><div><h4 class="title"><a id="_the_api"></a>The API</h4></div></div></div><p>If you want to reproduce whatâs explained in this tutorial, remember to depend on the Core Runtime artifact that depends -on Core API, Core SPI, Core Bootstrap and Core Functional & I/O APIs:</p><div class="table"><a id="idm371059724064"></a><p class="title"><strong>Table 14. Artifact</strong></p><div class="table-contents"><table summary="Artifact" border="1"><colgroup><col class="col_1" /><col class="col_2" /><col class="col_3" /></colgroup><thead><tr><th align="left" valign="top">Group ID</th><th align="left" valign="top">Artifact ID</th><th align="left" valign="top">Version</th></tr></thead><tbody><tr><td align="left" valign="top"><p>org.qi4j.core</p></td><td align="left" valign="top"><p>org.qi4j.core.runtime</p></td><td align="left" valign="top"><p>2.1</p></td></tr></tbody></table></div></div><br class="table-break" /><p>See the <a class="xref" href="howto-depend-on-zest.html" title="Depend on Zest⢠in your build">Depend on Zest⢠in your build</a> tutorial for details.</p><p>Once theses parts were identified it was mostly just a matter of putting interfaces on these pieces, and making su re -they can be easily used in many different situations. The result is as follows.</p><p>To start with we have Input:</p><pre class="programlisting brush: java">public interface Input<T, SenderThrowableType extends Throwable> -{ - <ReceiverThrowableType extends Throwable> void transferTo( Output<? super T, ReceiverThrowableType> output ) - throws SenderThrowableType, ReceiverThrowableType; -} -</pre><p>Inputs, like Iterables, can be used over and over again to initiate transfers of data from one place to another, in -this case an Output. Since I want this to be generic the type of things that is sent is T, so can be anything -(byte[], String, EntityState, MyDomainObject). I also want the sender and receiver of data to be able to throw their -own exceptions, and this is marked by declaring these as generic exception types. For example, the input may want to -throw SQLException and the output IOException, if anything goes wrong. This should be strongly typed, and both sender -and receiver must know when either side screws up, so that they can recover properly and close any resources they have -opened.</p><p>On the receiving side we then have Output:</p><pre class="programlisting brush: java">public interface Output<T, ReceiverThrowableType extends Throwable> -{ - [...snip...] - - <SenderThrowableType extends Throwable> void receiveFrom( Sender<? extends T, SenderThrowableType> sender ) - throws ReceiverThrowableType, SenderThrowableType; -} -</pre><p>When receiveFrom is invoked by an Input, as a result of invoking transferTo on the Input, the Output should open -whatever resources it needs to write to, and then expect data to come from a Sender. Both the Input and Output must -have the same type T, so that they agree on what is being sent. We will see later how this can be handled if this is -not the case.</p><p>Next we have Sender:</p><pre class="programlisting brush: java">public interface Sender<T, SenderThrowableType extends Throwable> -{ - [...snip...] - - <ReceiverThrowableType extends Throwable> void sendTo( Receiver<? super T, ReceiverThrowableType> receiver ) - throws ReceiverThrowableType, SenderThrowableType; -} -</pre><p>The Output invokes sendTo and passes in a Receiver that the Sender will use to send individual items. The sender at -this point can start transferring data of type T to the receiver, one at a time. The Receiver looks like this:</p><pre class="programlisting brush: java">public interface Receiver<T, ReceiverThrowableType extends Throwable> -{ - [...snip...] - - void receive( T item ) - throws ReceiverThrowableType; -} -</pre><p>When the receiver gets the individual items from the sender it can either immediately write them to its underlying -resource, or batch them up. Since the receiver will know when the transfer is done (sendTo returns) it can write the -remaining batches properly and close any resource it holds.</p><p>This simple pattern, with two interfaces on the sending side and two on the receiving side, gives us the potential to -do scalable, performant and fault-tolerant transfers of data.</p></div><div class="section" title="Standard Inputs and Outputs"><div class="titlepage"><div><div><h4 class="title"><a id="_standard_inputs_and_outputs"></a>Standard Inputs and Outputs</h4></div></div></div><p>So now that the above API defines the contract of sending and receiving data, I can then create a couple of standard -inputs and outputs. Letâs say, reading lines of text from a file, and writing lines of text to a file. These -implementations I can then put in static methods so they are easy to use. In the end, to make a copy of a text file -looks like this:</p><pre class="programlisting brush: java">File source = new File("source.txt"); -File destination = new File("destination.txt"); -Inputs.text( source ).transferTo( Outputs.text( destination ) ); -</pre><p>One line of code that handles the reading, the writing, the cleaning up, buffering, and whatnot. Pretty nifty! The -transferTo method will throw IOException, which I can catch if I want to present any errors to the user. But actually -dealing with those errors, i.e. closing the files and potentially deleting the destination if the transfer failed, is -already handled by the Input and Output. I will never have to deal with the details of reading text from a file ever -again!</p></div><div class="section" title="Intercepting the transfer"><div class="titlepage"><div><div><h4 class="title"><a id="_intercepting_the_transfer"></a>Intercepting the transfer</h4></div></div></div><p>While the above handles the basic input/output of a transfer, there are usually other things that I want to do as well. -I may want to count how many items were transferred, do some filtering, or log every 1000 items or so to see whatâs -going on. Since input and output are now separated this becomes simply a matter of inserting something in the middle -that mediates the input and output. Since many of these mediations have a similar character I can put these into -standard utility methods to make them easier to use.</p><p>The first standard decorator is a filter. I will implement this by means of supplying a Specification:</p><pre class="programlisting brush: java">public static <T,ReceiverThrowableType extends Throwable> Output<T, ReceiverThrowableType> filter( final Specification<T> specification, final Output<T, ReceiverThrowableType> output) -{ - ... create an Output that filters items based on the Specification<T> ... -}</pre><p>Where Specification is:</p><pre class="programlisting brush: java">interface Specification<T> -{ - boolean test(T item); -}</pre><p>With this simple construct I can now perform transfers and easily filter out items I donât want on the receiving side. -This example removes empty lines from a text file.</p><pre class="programlisting brush: java">File source = ... -File destination = ... -Inputs.text( source ).transferTo( Transforms.filter(new Specification<String>() -{ - public boolean test(String string) - { - return string.length() != 0; - } -}, Outputs.text(destination) );</pre><p>The second common operation is mapping from one type to the other. This deals with the case that one Input you have may -not match the Output you want to send to, but thereâs a way to map from the input type to the output type. An example -would be to map from String to JSONObject, for example. The operation itself looks like this:</p><pre class="programlisting brush: java">public static <From,To,ReceiverThrowableType extends Throwable> Output<From, ReceiverThrowableType> map( Function<From,To> function, Output<To, ReceiverThrowableType> output)</pre><p>Where Function is defined as:</p><pre class="programlisting brush: java">interface Function<From, To> -{ - To map(From from); -}</pre><p>With this I can then connect an Input of Strings to an Output of JSONObject like so:</p><pre class="programlisting brush: java">Input<String,IOException> input = ...; -Output<JSONObject,RuntimeException> output = ...; -input.transferTo(Transforms.map(new String2JSON(), output);</pre><p>Where String2JSON implements Function and itâs map method converts the String into a JSONObject.</p><p>At this point we can now deal with the last part of the initial example, the counting of items. This can be implemented -as a generic Map that has the same input and output type, and just maintains a count internally that updates on every -call to map(). The example can then be written as:</p><pre class="programlisting brush: java">File source = ... -File destination = ... -Counter<String> counter = new Counter<String>(); -Inputs.text( source ).transferTo( Transforms.map(counter, Outputs.text(destination) )); -System.out.println("Nr of lines:"+counter.getCount())</pre></div><div class="section" title="Usage in the Zest⢠SPI"><div class="titlepage"><div><div><h4 class="title"><a id="_usage_in_the_zest_spi"></a>Usage in the Zest⢠SPI</h4></div></div></div><p>Now I can finally get back to my initial problem that led me to look into this: how to implement a good way to access -EntityStates in a Zest⢠EntityStore, and perform restores of backups. The current version of accessing EntityStates look -like this:</p><pre class="programlisting brush: java"><ThrowableType extends Throwable> void visitEntityStates( EntityStateVisitor<ThrowableType> visitor, ModuleSPI module ) - throws ThrowableType; - -interface EntityStateVisitor<ThrowableType extends Throwable> -{ - void visitEntityState( EntityState entityState ) - throws ThrowableType; -}</pre><p>This can now be replaced with:</p><pre class="programlisting brush: java">Input<EntityState, EntityStoreException> entityStates(ModuleSPI module);</pre><p>Because of the pattern outlined above, users of this will get more information about whatâs happening in the traversal, -such as if the EntityStore raised an EntityStoreException during the traversal, which they can then handle gracefully. -It also becomes easy to add decorators such as maps and filters to users of this. Letâs say you only are interested in -EntityStateâs of a given type. Then add a filter for this, without changing the consumer.</p><p>For importing backup data into an EntityStore, the interface used to look like this:</p><pre class="programlisting brush: java">interface ImportSupport -{ - ImportResult importFrom( Reader in ) - throws IOException; -}</pre><p>This ties the EntityStore to only being able to read JSON lines from Readerâs, the client will not know if the -IOException raised is due to errors in the Reader or writing in the store, and the ImportResult, which contains a list -of exceptions and count of stuff, is quite ugly to create and use. With the I/O API at hand this can now be replaced -with:</p><pre class="programlisting brush: java">interface ImportSupport -{ - Output<String,EntityStoreException> importJSON(); -}</pre><p>To use this, given the helpers outlined above, is as simple as:</p><pre class="programlisting brush: java">File backup = ... -ImportSupport entityStore = ... -Inputs.text(backup).transferTo(entityStore.importJSON());</pre><p>If the client wants any "extras", such as counting how many objects were imported, this can be done by adding filters -as previously shown. If you only want to, say, import entities modified before a particular date (letâs say you know -some junk was introduced after a given time), then add a specification filter that performs this check. And so on.</p></div><div class="section" title="Conclusion"><div class="titlepage"><div><div><h4 class="title"><a id="_conclusion_3"></a>Conclusion</h4></div></div></div><p>It is quite common while developing software that you have to shuffle data or objects from one input to another output, -possible with some transformations in the middle. Usually these things have to be done from scratch, which opens up for -errors and badly applied patterns. By introducing a generic Input/Output API that encapsulates and separates these -things properly it becomes easier to perform these tasks in a scalable, performant and error-free way, and while still -allowing these tasks to be decorated with extra features when needed.</p><p>This article has outlined one way to do this, and the API and helpers that Iâve described are available in the current -Zest⢠Core 1.3-SNAPSHOT in Git (see Zest⢠homepage for access details). The idea is to start using it throughout Zest -wherever we need to do I/O of the type described here.</p></div></div><div xmlns="" xmlns:exsl="http://exslt.org/common" class="footer"><p> - Copyright © 2015 The Apache Software Foundation, Licensed under the <a href="http://www.apache.org/licenses/" target="_blank">Apache License, Version 2.0</a>. - <br /><small> - Apache Zest, Zest, Apache, the Apache feather logo, and the Apache Zest project logo are trademarks of The Apache Software Foundation.<br /> - All other marks mentioned may be trademarks or registered trademarks of their respective owners. - </small></p></div></body></html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/polygene-website/blob/ea4d77b0/content/java/latest/images/classes-are-dead.gif ---------------------------------------------------------------------- diff --git a/content/java/latest/images/classes-are-dead.gif b/content/java/latest/images/classes-are-dead.gif deleted file mode 100644 index 0280817..0000000 Binary files a/content/java/latest/images/classes-are-dead.gif and /dev/null differ http://git-wip-us.apache.org/repos/asf/polygene-website/blob/ea4d77b0/content/java/latest/images/cloudbees.png ---------------------------------------------------------------------- diff --git a/content/java/latest/images/cloudbees.png b/content/java/latest/images/cloudbees.png deleted file mode 100644 index b9d0c94..0000000 Binary files a/content/java/latest/images/cloudbees.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/polygene-website/blob/ea4d77b0/content/java/latest/images/core-overview.png ---------------------------------------------------------------------- diff --git a/content/java/latest/images/core-overview.png b/content/java/latest/images/core-overview.png deleted file mode 100644 index 8d1a4d9..0000000 Binary files a/content/java/latest/images/core-overview.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/polygene-website/blob/ea4d77b0/content/java/latest/images/forkme_left_red.png ---------------------------------------------------------------------- diff --git a/content/java/latest/images/forkme_left_red.png b/content/java/latest/images/forkme_left_red.png deleted file mode 100644 index 3aacaef..0000000 Binary files a/content/java/latest/images/forkme_left_red.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/polygene-website/blob/ea4d77b0/content/java/latest/images/icons/README ---------------------------------------------------------------------- diff --git a/content/java/latest/images/icons/README b/content/java/latest/images/icons/README deleted file mode 100644 index f12b2a7..0000000 --- a/content/java/latest/images/icons/README +++ /dev/null @@ -1,5 +0,0 @@ -Replaced the plain DocBook XSL admonition icons with Jimmac's DocBook -icons (http://jimmac.musichall.cz/ikony.php3). I dropped transparency -from the Jimmac icons to get round MS IE and FOP PNG incompatibilies. - -Stuart Rackham http://git-wip-us.apache.org/repos/asf/polygene-website/blob/ea4d77b0/content/java/latest/images/icons/admon/caution.png ---------------------------------------------------------------------- diff --git a/content/java/latest/images/icons/admon/caution.png b/content/java/latest/images/icons/admon/caution.png deleted file mode 100644 index c6b6fd4..0000000 Binary files a/content/java/latest/images/icons/admon/caution.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/polygene-website/blob/ea4d77b0/content/java/latest/images/icons/admon/caution.svg ---------------------------------------------------------------------- diff --git a/content/java/latest/images/icons/admon/caution.svg b/content/java/latest/images/icons/admon/caution.svg deleted file mode 100644 index e09ecca..0000000 --- a/content/java/latest/images/icons/admon/caution.svg +++ /dev/null @@ -1,373 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- Created with Inkscape (http://www.inkscape.org/) --> -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:xlink="http://www.w3.org/1999/xlink" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="48px" - height="48px" - id="svg1377" - sodipodi:version="0.32" - inkscape:version="0.46" - sodipodi:docbase="/home/jimmac/src/cvs/tango-icon-theme/scalable/status" - sodipodi:docname="dialog-warning.svg" - inkscape:output_extension="org.inkscape.output.svg.inkscape"> - <defs - id="defs1379"> - <inkscape:perspective - sodipodi:type="inkscape:persp3d" - inkscape:vp_x="0 : 24 : 1" - inkscape:vp_y="0 : 1000 : 0" - inkscape:vp_z="48 : 24 : 1" - inkscape:persp3d-origin="24 : 16 : 1" - id="perspective48" /> - <radialGradient - inkscape:collect="always" - xlink:href="#linearGradient5060" - id="radialGradient6719" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(-2.774389,0,0,1.969706,112.7623,-872.8854)" - cx="605.71429" - cy="486.64789" - fx="605.71429" - fy="486.64789" - r="117.14286" /> - <linearGradient - inkscape:collect="always" - id="linearGradient5060"> - <stop - style="stop-color:black;stop-opacity:1;" - offset="0" - id="stop5062" /> - <stop - style="stop-color:black;stop-opacity:0;" - offset="1" - id="stop5064" /> - </linearGradient> - <radialGradient - inkscape:collect="always" - xlink:href="#linearGradient5060" - id="radialGradient6717" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(2.774389,0,0,1.969706,-1891.633,-872.8854)" - cx="605.71429" - cy="486.64789" - fx="605.71429" - fy="486.64789" - r="117.14286" /> - <linearGradient - id="linearGradient5048"> - <stop - style="stop-color:black;stop-opacity:0;" - offset="0" - id="stop5050" /> - <stop - id="stop5056" - offset="0.5" - style="stop-color:black;stop-opacity:1;" /> - <stop - style="stop-color:black;stop-opacity:0;" - offset="1" - id="stop5052" /> - </linearGradient> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient5048" - id="linearGradient6715" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(2.774389,0,0,1.969706,-1892.179,-872.8854)" - x1="302.85715" - y1="366.64789" - x2="302.85715" - y2="609.50507" /> - <linearGradient - y2="56.0523" - x2="47.3197" - y1="11.1133" - x1="4.1914" - gradientUnits="userSpaceOnUse" - id="aigrd1"> - <stop - id="stop6490" - style="stop-color:#D4D4D4" - offset="0" /> - <stop - id="stop6492" - style="stop-color:#E2E2E2" - offset="0.3982" /> - <stop - id="stop6494" - style="stop-color:#FFFFFF" - offset="1" /> - </linearGradient> - <linearGradient - y2="56.0523" - x2="47.3197" - y1="11.1133" - x1="4.1914" - gradientUnits="userSpaceOnUse" - id="linearGradient7451" - xlink:href="#aigrd1" - inkscape:collect="always" /> - <linearGradient - id="linearGradient4126" - inkscape:collect="always"> - <stop - id="stop4128" - offset="0" - style="stop-color:#000000;stop-opacity:1;" /> - <stop - id="stop4130" - offset="1" - style="stop-color:#000000;stop-opacity:0;" /> - </linearGradient> - <radialGradient - r="17.142857" - fy="40.000000" - fx="23.857143" - cy="40.000000" - cx="23.857143" - gradientTransform="matrix(1,0,0,0.5,2.139286e-14,20)" - gradientUnits="userSpaceOnUse" - id="radialGradient7449" - xlink:href="#linearGradient4126" - inkscape:collect="always" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient6525" - id="linearGradient5250" - x1="8.5469341" - y1="30.281681" - x2="30.85088" - y2="48.301884" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(0.899009,0,0,0.934235,1.875108,1.193645)" /> - <linearGradient - inkscape:collect="always" - xlink:href="#aigrd1" - id="linearGradient3922" - gradientUnits="userSpaceOnUse" - x1="4.1914" - y1="11.1133" - x2="47.3197" - y2="56.0523" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient6525" - id="linearGradient3924" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(0.899009,0,0,0.934235,1.875108,1.193645)" - x1="8.5469341" - y1="30.281681" - x2="30.85088" - y2="48.301884" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient6525" - id="linearGradient3933" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(0.899009,0,0,0.934235,1.875108,1.193645)" - x1="8.5469341" - y1="30.281681" - x2="30.85088" - y2="48.301884" /> - <linearGradient - inkscape:collect="always" - xlink:href="#aigrd1" - id="linearGradient3935" - gradientUnits="userSpaceOnUse" - x1="4.1914" - y1="11.1133" - x2="47.3197" - y2="56.0523" /> - <linearGradient - inkscape:collect="always" - xlink:href="#aigrd1" - id="linearGradient3946" - gradientUnits="userSpaceOnUse" - x1="4.1914" - y1="11.1133" - x2="47.3197" - y2="56.0523" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient6525" - id="linearGradient3948" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(0.899009,0,0,0.934235,1.875108,1.193645)" - x1="8.5469341" - y1="30.281681" - x2="30.85088" - y2="48.301884" /> - </defs> - <sodipodi:namedview - id="base" - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1.0" - inkscape:pageopacity="0.0" - inkscape:pageshadow="2" - inkscape:zoom="14.757891" - inkscape:cx="13.022822" - inkscape:cy="24" - inkscape:current-layer="g7435" - showgrid="true" - inkscape:grid-bbox="true" - inkscape:document-units="px" - inkscape:window-width="1105" - inkscape:window-height="818" - inkscape:window-x="0" - inkscape:window-y="30"> - <inkscape:grid - id="GridFromPre046Settings" - type="xygrid" - originx="0px" - originy="0px" - spacingx="1px" - spacingy="1px" - color="#0000ff" - empcolor="#0000ff" - opacity="0.2" - empopacity="0.4" - empspacing="4" /> - </sodipodi:namedview> - <metadata - id="metadata1382"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title>Dialog Warning</dc:title> - <dc:date>2005-10-14</dc:date> - <dc:creator> - <cc:Agent> - <dc:title>Andreas Nilsson</dc:title> - </cc:Agent> - </dc:creator> - <dc:contributor> - <cc:Agent> - <dc:title>Jakub Steiner, Garrett LeSage</dc:title> - </cc:Agent> - </dc:contributor> - <dc:subject> - <rdf:Bag> - <rdf:li>dialog</rdf:li> - <rdf:li>warning</rdf:li> - </rdf:Bag> - </dc:subject> - <cc:license - rdf:resource="http://creativecommons.org/licenses/publicdomain/" /> - </cc:Work> - <cc:License - rdf:about="http://creativecommons.org/licenses/publicdomain/"> - <cc:permits - rdf:resource="http://creativecommons.org/ns#Reproduction" /> - <cc:permits - rdf:resource="http://creativecommons.org/ns#Distribution" /> - <cc:permits - rdf:resource="http://creativecommons.org/ns#DerivativeWorks" /> - </cc:License> - </rdf:RDF> - </metadata> - <g - id="layer1" - inkscape:label="Layer 1" - inkscape:groupmode="layer"> - <g - transform="matrix(1.566667,0.000000,0.000000,1.566667,-8.925566,-23.94764)" - id="g7435"> - <g - style="display:inline" - transform="matrix(1.444074e-2,0,0,1.331973e-2,33.38871,40.40337)" - id="g6707"> - <rect - style="opacity:0.40206185;color:black;fill:url(#linearGradient6715);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" - id="rect6709" - width="1339.6335" - height="478.35718" - x="-1559.2523" - y="-150.69685" /> - <path - style="opacity:0.40206185;color:black;fill:url(#radialGradient6717);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" - d="M -219.61876,-150.68038 C -219.61876,-150.68038 -219.61876,327.65041 -219.61876,327.65041 C -76.744594,328.55086 125.78146,220.48075 125.78138,88.454235 C 125.78138,-43.572302 -33.655436,-150.68036 -219.61876,-150.68038 z " - id="path6711" - sodipodi:nodetypes="cccc" /> - <path - sodipodi:nodetypes="cccc" - id="path6713" - d="M -1559.2523,-150.68038 C -1559.2523,-150.68038 -1559.2523,327.65041 -1559.2523,327.65041 C -1702.1265,328.55086 -1904.6525,220.48075 -1904.6525,88.454235 C -1904.6525,-43.572302 -1745.2157,-150.68036 -1559.2523,-150.68038 z " - style="opacity:0.40206185;color:black;fill:url(#radialGradient6719);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" /> - </g> - <g - id="g3937" - transform="matrix(1,0,4.537846e-3,1,-0.138907,-1.394718e-15)" - inkscape:r_cx="true" - inkscape:r_cy="true"> - <path - inkscape:r_cy="true" - inkscape:r_cx="true" - transform="matrix(1,0,-8.726683e-3,1,0.328074,1.276596)" - id="path6485" - d="M 33.282781,38.644744 L 22.407791,18.394765 C 22.095292,17.832266 21.532792,17.519767 20.907793,17.519767 C 20.282793,17.519767 19.720294,17.894765 19.407795,18.457265 L 8.7828048,38.707245 C 8.5328048,39.207244 8.5328048,39.894744 8.8453048,40.394743 C 9.1578038,40.894743 9.6578038,41.144742 10.282804,41.144742 L 31.782782,41.144742 C 32.407781,41.144742 32.97028,40.832243 33.220281,40.332243 C 33.53278,39.832243 33.53278,39.207244 33.282781,38.644744 z " - style="fill:#cc0000;fill-rule:nonzero;stroke:#9f0000;stroke-width:0.6382978;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - <g - inkscape:r_cy="true" - inkscape:r_cx="true" - id="g6487" - transform="matrix(0.625,0,-5.534934e-3,0.634254,6.164053,15.76055)" - style="fill-rule:nonzero;stroke:#000000;stroke-miterlimit:4"> - <linearGradient - y2="56.052299" - x2="47.319698" - y1="11.1133" - x1="4.1914001" - gradientUnits="userSpaceOnUse" - id="linearGradient6525"> - <stop - id="stop6529" - style="stop-color:#ffffff;stop-opacity:1;" - offset="0" /> - <stop - id="stop6531" - style="stop-color:#ffffff;stop-opacity:0.34020618;" - offset="1" /> - </linearGradient> - <path - inkscape:r_cy="true" - inkscape:r_cx="true" - id="path6496" - d="M 9.5,37.6 C 9.2,38.1 9.5,38.5 10,38.5 L 38.2,38.5 C 38.7,38.5 39,38.1 38.7,37.6 L 24.4,11 C 24.1,10.5 23.7,10.5 23.5,11 L 9.5,37.6 z " - style="fill:url(#linearGradient3946);stroke:none" /> - </g> - <path - inkscape:r_cy="true" - inkscape:r_cx="true" - transform="matrix(1,0,-8.726683e-3,1,0.318277,1.276596)" - sodipodi:nodetypes="ccsccscccc" - id="path1325" - d="M 32.323106,38.183905 L 22.150271,19.265666 C 21.71698,18.45069 21.561698,18.189213 20.908406,18.189213 C 20.346525,18.189213 20.054127,18.57002 19.651305,19.339291 L 9.7489285,38.242296 C 9.1737649,39.303588 9.1128238,39.580228 9.3937644,40.047345 C 9.6747034,40.514462 10.032797,40.48902 11.356441,40.519491 L 30.974593,40.519491 C 32.206825,40.534726 32.483988,40.440837 32.70874,39.97372 C 32.989681,39.506602 32.867799,39.136 32.323106,38.183905 z " - style="opacity:0.5;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient3948);stroke-width:0.63829792;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - </g> - <g - style="fill-rule:nonzero;stroke:#000000;stroke-miterlimit:4" - transform="matrix(0.555088,0,0,0.555052,7.749711,17.80196)" - id="g6498" - inkscape:r_cx="true" - inkscape:r_cy="true"> - <path - style="stroke:none" - d="M 23.9,36.5 C 22.6,36.5 21.6,35.5 21.6,34.2 C 21.6,32.8 22.5,31.9 23.9,31.9 C 25.3,31.9 26.1,32.8 26.2,34.2 C 26.2,35.5 25.3,36.5 23.9,36.5 L 23.9,36.5 z M 22.5,30.6 L 21.9,19.1 L 25.9,19.1 L 25.3,30.6 L 22.4,30.6 L 22.5,30.6 z " - id="path6500" - inkscape:r_cx="true" - inkscape:r_cy="true" /> - </g> - </g> - </g> -</svg> http://git-wip-us.apache.org/repos/asf/polygene-website/blob/ea4d77b0/content/java/latest/images/icons/admon/important.png ---------------------------------------------------------------------- diff --git a/content/java/latest/images/icons/admon/important.png b/content/java/latest/images/icons/admon/important.png deleted file mode 100644 index 49a8279..0000000 Binary files a/content/java/latest/images/icons/admon/important.png and /dev/null differ http://git-wip-us.apache.org/repos/asf/polygene-website/blob/ea4d77b0/content/java/latest/images/icons/admon/important.svg ---------------------------------------------------------------------- diff --git a/content/java/latest/images/icons/admon/important.svg b/content/java/latest/images/icons/admon/important.svg deleted file mode 100644 index 75bec8c..0000000 --- a/content/java/latest/images/icons/admon/important.svg +++ /dev/null @@ -1,164 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- Created with Inkscape (http://www.inkscape.org/) --> -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:xlink="http://www.w3.org/1999/xlink" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="48px" - height="48px" - id="svg1800" - sodipodi:version="0.32" - inkscape:version="0.46" - sodipodi:docbase="/home/tigert/cvs/freedesktop.org/tango-icon-theme/scalable/emblems" - sodipodi:docname="emblem-important.svg" - inkscape:output_extension="org.inkscape.output.svg.inkscape"> - <defs - id="defs3"> - <inkscape:perspective - sodipodi:type="inkscape:persp3d" - inkscape:vp_x="0 : 24 : 1" - inkscape:vp_y="0 : 1000 : 0" - inkscape:vp_z="48 : 24 : 1" - inkscape:persp3d-origin="24 : 16 : 1" - id="perspective17" /> - <linearGradient - inkscape:collect="always" - id="linearGradient3101"> - <stop - style="stop-color:#000000;stop-opacity:1;" - offset="0" - id="stop3103" /> - <stop - style="stop-color:#000000;stop-opacity:0;" - offset="1" - id="stop3105" /> - </linearGradient> - <radialGradient - inkscape:collect="always" - xlink:href="#linearGradient3101" - id="radialGradient3107" - cx="17.3125" - cy="25.53125" - fx="17.3125" - fy="25.53125" - r="9.6875" - gradientTransform="matrix(1.000000,0.000000,0.000000,0.351613,1.292803e-15,16.55413)" - gradientUnits="userSpaceOnUse" /> - </defs> - <sodipodi:namedview - fill="#edd400" - id="base" - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="0.20392157" - inkscape:pageopacity="0.0" - inkscape:pageshadow="2" - inkscape:zoom="1" - inkscape:cx="66.140367" - inkscape:cy="14.79073" - inkscape:current-layer="layer1" - showgrid="false" - inkscape:grid-bbox="true" - inkscape:document-units="px" - inkscape:showpageshadow="false" - inkscape:window-width="872" - inkscape:window-height="818" - inkscape:window-x="370" - inkscape:window-y="30" /> - <metadata - id="metadata4"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <cc:license - rdf:resource="http://creativecommons.org/licenses/publicdomain/" /> - <dc:title>Emblem Important</dc:title> - <dc:creator> - <cc:Agent> - <dc:title>Jakub Steiner</dc:title> - </cc:Agent> - </dc:creator> - <dc:subject> - <rdf:Bag> - <rdf:li>emblem</rdf:li> - <rdf:li>photos</rdf:li> - <rdf:li>pictures</rdf:li> - <rdf:li>raw</rdf:li> - <rdf:li>jpeg</rdf:li> - </rdf:Bag> - </dc:subject> - </cc:Work> - <cc:License - rdf:about="http://creativecommons.org/licenses/publicdomain/"> - <cc:permits - rdf:resource="http://creativecommons.org/ns#Reproduction" /> - <cc:permits - rdf:resource="http://creativecommons.org/ns#Distribution" /> - <cc:permits - rdf:resource="http://creativecommons.org/ns#DerivativeWorks" /> - </cc:License> - </rdf:RDF> - </metadata> - <g - id="layer1" - inkscape:label="Layer 1" - inkscape:groupmode="layer"> - <path - sodipodi:type="arc" - style="opacity:0.40909091;color:#000000;fill:url(#radialGradient3107);fill-opacity:1.0000000;fill-rule:nonzero;stroke:none;stroke-width:1.1053395;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;visibility:visible;display:inline;overflow:visible" - id="path3099" - sodipodi:cx="17.312500" - sodipodi:cy="25.531250" - sodipodi:rx="9.6875000" - sodipodi:ry="3.4062500" - d="M 27.000000 25.531250 A 9.6875000 3.4062500 0 1 1 7.6250000,25.531250 A 9.6875000 3.4062500 0 1 1 27.000000 25.531250 z" - transform="matrix(2.182912,0.000000,0.000000,2.182912,-13.50372,-14.35012)" /> - <path - sodipodi:type="arc" - style="opacity:1.0000000;fill:#f57900;fill-opacity:1.0000000;fill-rule:nonzero;stroke:#914900;stroke-width:0.98214942;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000" - id="path1650" - sodipodi:cx="24.130018" - sodipodi:cy="23.428040" - sodipodi:rx="22.008699" - sodipodi:ry="21.213203" - d="M 46.138718 23.428040 A 22.008699 21.213203 0 1 1 2.1213188,23.428040 A 22.008699 21.213203 0 1 1 46.138718 23.428040 z" - transform="matrix(0.944630,0.000000,0.000000,0.980053,1.504174,-1.556912)" /> - <path - sodipodi:type="arc" - style="opacity:1.0000000;fill:none;fill-opacity:1.0000000;fill-rule:nonzero;stroke:#fcaf3e;stroke-width:0.98214942;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000" - id="path3392" - sodipodi:cx="24.130018" - sodipodi:cy="23.428040" - sodipodi:rx="22.008699" - sodipodi:ry="21.213203" - d="M 46.138718 23.428040 A 22.008699 21.213203 0 1 1 2.1213188,23.428040 A 22.008699 21.213203 0 1 1 46.138718 23.428040 z" - transform="matrix(0.914086,0.000000,0.000000,0.948364,2.380576,-0.905815)" /> - <path - style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4.1224999;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000" - d="M 21.464926,10.373268 C 21.336952,10.373268 21.230316,10.547762 21.230316,10.757175 L 22.295085,25.197999 C 22.295085,25.407412 22.401721,25.581906 22.529695,25.581907 C 22.529695,25.581907 23.370516,25.593810 24.063684,25.581907 C 24.292022,25.577986 24.361898,25.602219 24.568998,25.581907 C 25.262166,25.593810 26.102987,25.581907 26.102987,25.581907 C 26.230961,25.581907 26.337597,25.407412 26.337597,25.197999 L 27.402366,10.757175 C 27.402366,10.547762 27.295730,10.402799 27.167755,10.402799 L 24.587044,10.402799 C 24.577532,10.400862 24.578842,10.373268 24.568998,10.373268 L 21.464926,10.373268 z " - id="rect1872" /> - <path - sodipodi:type="arc" - style="opacity:1.0000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:4.1224999;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000" - id="path2062" - sodipodi:cx="-16.437500" - sodipodi:cy="34.062500" - sodipodi:rx="4.5625000" - sodipodi:ry="3.8125000" - d="M -11.875000 34.062500 A 4.5625000 3.8125000 0 1 1 -21.000000,34.062500 A 4.5625000 3.8125000 0 1 1 -11.875000 34.062500 z" - transform="matrix(0.504864,0.000000,0.000000,0.604182,32.65935,9.608845)" /> - <path - style="fill:#fffeff;fill-opacity:0.21390374;fill-rule:nonzero;stroke:none;stroke-width:1.0000000;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4.0000000;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000" - d="M 43.676426,20.476780 C 43.676426,31.307396 37.624257,16.170581 25.001688,20.863168 C 12.279172,25.592912 4.4350535,31.307396 4.4350535,20.476780 C 4.4350535,9.6461627 13.225120,0.85609769 24.055740,0.85609769 C 34.886359,0.85609769 43.676426,9.6461627 43.676426,20.476780 z " - id="path3068" - sodipodi:nodetypes="czssc" /> - </g> -</svg> http://git-wip-us.apache.org/repos/asf/polygene-website/blob/ea4d77b0/content/java/latest/images/icons/admon/note.png ---------------------------------------------------------------------- diff --git a/content/java/latest/images/icons/admon/note.png b/content/java/latest/images/icons/admon/note.png deleted file mode 100644 index b35e7be..0000000 Binary files a/content/java/latest/images/icons/admon/note.png and /dev/null differ
