<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5011986689949757828</id><updated>2024-10-24T11:59:16.260+02:00</updated><category term="grails"/><category term="groovy"/><category term="nutch"/><category term="GORM"/><category term="list"/><category term="map"/><category term="plugin"/><category term="tag"/><category term="tagLib"/><category term="web service"/><category term="AdaptiveFetchSchedule"/><category term="DefaultFetchSchedule"/><category term="Elvis operator. operadores"/><category term="MD5Signature"/><category term="ParserChecker"/><category term="TextProfileSignature"/><category term="array"/><category term="closure"/><category term="collection"/><category term="combinar indice"/><category term="cxf"/><category term="expresiones regulares"/><category term="form"/><category term="google analytics"/><category term="highlight"/><category term="index"/><category term="order"/><category term="pagination"/><category term="params"/><category term="puerto"/><category term="range"/><category term="recrawl"/><category term="resaltar"/><category term="set"/><category term="split"/><category term="string"/><category term="token"/><category term="ws-client"/><category term="xml"/><title type='text'>Una programadora más en el mundo</title><subtitle type='html'>Aquí encontrarás trucos o cosas útiles de programación que he ido encontrando a lo largo de mis días</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://una-programadora-mas-en-el-mundo.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>una-programadora-mas-en-el-mundo</name><uri>http://www.blogger.com/profile/15342020417144526845</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>22</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5011986689949757828.post-2019702283634320871</id><published>2012-12-20T14:48:00.000+01:00</published><updated>2012-12-20T14:48:29.838+01:00</updated><title type='text'>GROOVY - GroovyBeans</title><content type='html'>Creo que todos los que hemos trabajado con Java hemos sufrido con la creación de los JavaBeans ( y si no es que me estáis mintiendo). Aunque es cierto que gracias a los IDEs, la tediosa tarea de crear los beans junto con sus get y set, se ha reducido mucho, siguen siendo un poco caóticos en el momento que empiezan a tener muchas propiedades.&lt;br&gt;
En Groovy, tenemos disponibles los &lt;b&gt;GroovyBeans &lt;/b&gt;(¿original eh?), que son JavaBeans definidos en Groovy.&lt;br&gt;
Una de las grandes ventajas que ofrecen los GroovyBeans, a mi parecer, es la generación automática (e &amp;quot;invisible&amp;quot;) que hace de los métodos de acceso. Esto implica, que simplemente deberemos definir las propiedades de nuestro bean, y automáticamente tendremos a nuestra disposición los métodos de obtención y establecimiento.&lt;br&gt;
&lt;a href=&quot;http://una-programadora-mas-en-el-mundo.blogspot.com/2012/12/groovy-groovybeans.html#more&quot;&gt;Leer más »&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://una-programadora-mas-en-el-mundo.blogspot.com/feeds/2019702283634320871/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2012/12/groovy-groovybeans.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/2019702283634320871'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/2019702283634320871'/><link rel='alternate' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2012/12/groovy-groovybeans.html' title='GROOVY - GroovyBeans'/><author><name>una-programadora-mas-en-el-mundo</name><uri>http://www.blogger.com/profile/15342020417144526845</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5011986689949757828.post-448416181363065858</id><published>2011-11-28T17:30:00.000+01:00</published><updated>2012-12-20T14:18:28.951+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="closure"/><category scheme="http://www.blogger.com/atom/ns#" term="groovy"/><title type='text'>GROOVY - Curried closure</title><content type='html'>En esta ocasión os voy a hablar de unos métodos de los closures de Groovy que no conocía hasta hace poco tiempo (lo sé lo sé, seguro que muchos ya los conocíais de antes...), se trata de los métodos &lt;b&gt;curry, rcurry y ncurry&lt;/b&gt;.&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://una-programadora-mas-en-el-mundo.blogspot.com/2011/11/groovy-curried-closure.html#more&quot;&gt;Leer más »&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://una-programadora-mas-en-el-mundo.blogspot.com/feeds/448416181363065858/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/11/groovy-curried-closure.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/448416181363065858'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/448416181363065858'/><link rel='alternate' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/11/groovy-curried-closure.html' title='GROOVY - Curried closure'/><author><name>una-programadora-mas-en-el-mundo</name><uri>http://www.blogger.com/profile/15342020417144526845</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5011986689949757828.post-587879934265489265</id><published>2011-11-28T15:00:00.000+01:00</published><updated>2011-11-28T15:00:12.232+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="groovy"/><category scheme="http://www.blogger.com/atom/ns#" term="xml"/><title type='text'>GROOVY- Trabajando con XML</title><content type='html'>Todos sabemos que crear o tratar ficheros con Java puede ser bastante engorroso, pero con groovy la cosa es muy diferente.&lt;br&gt;
En este post pondré un breve ejemplo de cómo crear un documento XML y cómo leerlo con Groovy.&lt;br&gt;
&lt;a href=&quot;http://una-programadora-mas-en-el-mundo.blogspot.com/2011/11/groovy-trabajando-con-xml.html#more&quot;&gt;Leer más »&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://una-programadora-mas-en-el-mundo.blogspot.com/feeds/587879934265489265/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/11/groovy-trabajando-con-xml.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/587879934265489265'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/587879934265489265'/><link rel='alternate' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/11/groovy-trabajando-con-xml.html' title='GROOVY- Trabajando con XML'/><author><name>una-programadora-mas-en-el-mundo</name><uri>http://www.blogger.com/profile/15342020417144526845</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5011986689949757828.post-7404704002598865774</id><published>2011-09-20T14:41:00.000+02:00</published><updated>2011-09-20T14:41:36.181+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="grails"/><category scheme="http://www.blogger.com/atom/ns#" term="web service"/><category scheme="http://www.blogger.com/atom/ns#" term="ws-client"/><title type='text'>GRAILS - Cliente de servicios web con WS-Client</title><content type='html'>Hoy le toca al turno al &lt;a href=&quot;http://www.grails.org/plugin/ws-client&quot;&gt;plugin WSClient&lt;/a&gt; para grails. Utilizando este plugin podremos crear un cliente de un servicio web fácil fácil.&lt;br&gt;
&lt;br&gt;
Un ejemplo para ver como funciona.&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://una-programadora-mas-en-el-mundo.blogspot.com/2011/09/grails-cliente-de-servicios-web-con-ws.html#more&quot;&gt;Leer más »&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://una-programadora-mas-en-el-mundo.blogspot.com/feeds/7404704002598865774/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/09/grails-cliente-de-servicios-web-con-ws.html#comment-form' title='14 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/7404704002598865774'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/7404704002598865774'/><link rel='alternate' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/09/grails-cliente-de-servicios-web-con-ws.html' title='GRAILS - Cliente de servicios web con WS-Client'/><author><name>una-programadora-mas-en-el-mundo</name><uri>http://www.blogger.com/profile/15342020417144526845</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>14</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5011986689949757828.post-8869488959359450014</id><published>2011-09-19T13:18:00.000+02:00</published><updated>2011-09-20T09:55:08.755+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cxf"/><category scheme="http://www.blogger.com/atom/ns#" term="grails"/><category scheme="http://www.blogger.com/atom/ns#" term="web service"/><title type='text'>GRAILS - Servicios web con CXF</title><content type='html'>A la hora de crear servicios web el &lt;a href=&quot;http://grails.org/plugin/cxf/&quot;&gt;plugin cxf&lt;/a&gt; de grails nos facilita mucho esta tarea, permitiéndonos crear un servicio web en cuestión de minutos. (He de puntualizar que tardas poco si son servicios web sencillos, como te plantees cosas más complejas como devolver o aceptar mapas por parámetros la cosa se complica...)&lt;br&gt;
&lt;br&gt;
Veamos cómo poner un servicio web en funcionamiento usando este plugin.&lt;br&gt;
&lt;a href=&quot;http://una-programadora-mas-en-el-mundo.blogspot.com/2011/09/grails-servicios-web-con-cxf.html#more&quot;&gt;Leer más »&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://una-programadora-mas-en-el-mundo.blogspot.com/feeds/8869488959359450014/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/09/grails-servicios-web-con-cxf.html#comment-form' title='4 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/8869488959359450014'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/8869488959359450014'/><link rel='alternate' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/09/grails-servicios-web-con-cxf.html' title='GRAILS - Servicios web con CXF'/><author><name>una-programadora-mas-en-el-mundo</name><uri>http://www.blogger.com/profile/15342020417144526845</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5011986689949757828.post-4117673435680560772</id><published>2011-06-29T12:05:00.000+02:00</published><updated>2011-06-29T12:05:00.969+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="grails"/><category scheme="http://www.blogger.com/atom/ns#" term="pagination"/><category scheme="http://www.blogger.com/atom/ns#" term="plugin"/><title type='text'>GRAILS - Remote pagination plugin</title><content type='html'>Esta vez toca una pequeña explicación de un plugin útil y muy fácil de utilizar. Se trata de &lt;a href=&quot;http://www.grails.org/plugin/remote-pagination&quot;&gt;Remote Pagination&lt;/a&gt;, el cual ofrece los tags &lt;code&gt;remotePaginate&lt;/code&gt; y &lt;code&gt;remoteSortableColumn&lt;/code&gt; que permiten paginar y ordenar las columnas de forma remota.&lt;br&gt;
&lt;a href=&quot;http://una-programadora-mas-en-el-mundo.blogspot.com/2011/06/grails-remote-pagination-plugin.html#more&quot;&gt;Leer más »&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://una-programadora-mas-en-el-mundo.blogspot.com/feeds/4117673435680560772/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/06/grails-remote-pagination-plugin.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/4117673435680560772'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/4117673435680560772'/><link rel='alternate' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/06/grails-remote-pagination-plugin.html' title='GRAILS - Remote pagination plugin'/><author><name>una-programadora-mas-en-el-mundo</name><uri>http://www.blogger.com/profile/15342020417144526845</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5011986689949757828.post-6616283419258052592</id><published>2011-06-28T08:00:00.014+02:00</published><updated>2011-06-28T08:00:01.068+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="form"/><category scheme="http://www.blogger.com/atom/ns#" term="grails"/><category scheme="http://www.blogger.com/atom/ns#" term="token"/><title type='text'>GRAILS - Evitar envío duplicado del formulario</title><content type='html'>Muchas veces (por no decir siempre) nos encontramos con el problema de evitar que un usuario envíe dos o más veces el mismo formulario (ya sabemos todos que existen usuarios que parece que tienen un tick nervioso en el dedo y no parar de dar a los botones por si no les ha hecho caso...).&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://una-programadora-mas-en-el-mundo.blogspot.com/2011/06/grails-evitar-envio-duplicado-del.html#more&quot;&gt;Leer más »&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://una-programadora-mas-en-el-mundo.blogspot.com/feeds/6616283419258052592/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/06/grails-evitar-envio-duplicado-del.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/6616283419258052592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/6616283419258052592'/><link rel='alternate' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/06/grails-evitar-envio-duplicado-del.html' title='GRAILS - Evitar envío duplicado del formulario'/><author><name>una-programadora-mas-en-el-mundo</name><uri>http://www.blogger.com/profile/15342020417144526845</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5011986689949757828.post-3550450735999252639</id><published>2011-06-23T17:00:00.000+02:00</published><updated>2011-06-23T17:00:03.114+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="combinar indice"/><category scheme="http://www.blogger.com/atom/ns#" term="index"/><category scheme="http://www.blogger.com/atom/ns#" term="nutch"/><title type='text'>NUTCH - Combinar índices</title><content type='html'>Dentro del script que he empleado para hacer el crawl de distintas páginas, decidí que los nuevos crawls se harían en directorios distintos y después de juntarían con uno general. Este es el código que utilizo para mezclar los crawldb.&lt;br&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;Path crawlDb = new Path(dir + &amp;quot;/crawldb_&amp;quot;+id);
Path crawlDbDestino = new Path(dir+&amp;quot;/crawldb&amp;quot;);
Path crawlDbNuevo = new Path(dir+&amp;quot;/crawldb2&amp;quot;);
//Aquí hay más código, pero no relacionado con este tema

Path[] crawlDbs;
if (!fs.exists(crawlDbDestino))
{
 crawlDbs = new Path[1];
 crawlDbs[0] = crawlDb;
 crawldbMerger.merge(crawlDbDestino, crawlDbs, false, false);
 fs.delete(crawlDb,true);
}
else
{
 crawlDbs = new Path[2];
 crawlDbs[0] = crawlDb;
 crawlDbs[1] = crawlDbDestino;
 crawldbMerger.merge(crawlDbNuevo,crawlDbs,false,false);
 fs.delete(crawlDbDestino, true);
 fs.rename(crawlDbNuevo, crawlDbDestino);
 fs.delete(crawlDb,true);
}
&lt;/pre&gt;&lt;br&gt;
&lt;a href=&quot;http://una-programadora-mas-en-el-mundo.blogspot.com/2011/06/nutch-combinar-indices.html#more&quot;&gt;Leer más »&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://una-programadora-mas-en-el-mundo.blogspot.com/feeds/3550450735999252639/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/06/nutch-combinar-indices.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/3550450735999252639'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/3550450735999252639'/><link rel='alternate' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/06/nutch-combinar-indices.html' title='NUTCH - Combinar índices'/><author><name>una-programadora-mas-en-el-mundo</name><uri>http://www.blogger.com/profile/15342020417144526845</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5011986689949757828.post-8506087972828767283</id><published>2011-06-23T16:00:00.002+02:00</published><updated>2011-06-23T16:00:00.230+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Elvis operator. operadores"/><category scheme="http://www.blogger.com/atom/ns#" term="groovy"/><title type='text'>GROOVY - Elvis Operator</title><content type='html'>Elvis operator (?:) es una versión corta del operador ternario de Java. Literalmente es la abreviación de &quot;if-then-else&quot;. Este operador es muy útil para, por ejemplo, definir valores por defecto si no se han indicado antes, lo que significa que tendrán valor null o false.&lt;br /&gt;
&lt;br /&gt;
Veamos un par de ejemplos.&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;def nombre = nombre?:&quot;desconocido&quot; 
def otro = nombre==&quot;desconocido&quot;?&quot;a&quot;:&quot;b&quot;
&lt;/pre&gt;&lt;br /&gt;
En el primer ejemplo, si el nombre tiene algún valor, se asigna ese valor, y en caso contrario se le asigna el string &quot;desconocido&quot;. La primera parte del operador se conoce como expresión. Si esa expresión se evalúa a false o null, entonces el valor después de : es devuelto, si no el posterior a ? es el que será devuelto. En el segundo caso, si el nombre es &quot;desconocido&quot;, la variable otro tendrá valor &quot;a&quot; y si no &quot;b&quot;.&lt;br /&gt;
&lt;br /&gt;
Puede que al principio cueste un poco acostumbrarse a este operador, pero una vez que lo hagáis, os daréis cuenta de que lo podéis usar en muchos sitios para abreviar código.&lt;br /&gt;
&lt;br /&gt;
Enjoy!</content><link rel='replies' type='application/atom+xml' href='http://una-programadora-mas-en-el-mundo.blogspot.com/feeds/8506087972828767283/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/06/groovy-elvis-operator.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/8506087972828767283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/8506087972828767283'/><link rel='alternate' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/06/groovy-elvis-operator.html' title='GROOVY - Elvis Operator'/><author><name>una-programadora-mas-en-el-mundo</name><uri>http://www.blogger.com/profile/15342020417144526845</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5011986689949757828.post-8985840794751204827</id><published>2011-06-23T15:45:00.002+02:00</published><updated>2011-06-23T15:45:00.744+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="expresiones regulares"/><category scheme="http://www.blogger.com/atom/ns#" term="groovy"/><title type='text'>GROOVY - Expresiones regulares</title><content type='html'>Groovy, como Java, permite el uso de expresiones regulares y lo hace de una manera sencilla. Además, añade tres operadores que facilitan aún más la labor.&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://una-programadora-mas-en-el-mundo.blogspot.com/2011/06/groovy-expresiones-regulares.html#more&quot;&gt;Leer más »&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://una-programadora-mas-en-el-mundo.blogspot.com/feeds/8985840794751204827/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/06/groovy-expresiones-regulares.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/8985840794751204827'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/8985840794751204827'/><link rel='alternate' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/06/groovy-expresiones-regulares.html' title='GROOVY - Expresiones regulares'/><author><name>una-programadora-mas-en-el-mundo</name><uri>http://www.blogger.com/profile/15342020417144526845</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5011986689949757828.post-4422667686117614916</id><published>2011-04-19T10:25:00.000+02:00</published><updated>2011-04-19T10:25:36.879+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="google analytics"/><category scheme="http://www.blogger.com/atom/ns#" term="grails"/><category scheme="http://www.blogger.com/atom/ns#" term="plugin"/><title type='text'>GRAILS - Google Analytics plugin</title><content type='html'>Hace unos días tuve que habilitar google analytics para una aplicación web creada con Grails. Mi primera opción fue introducir el código que proporciona google analytics para que las páginas sean analizadas, pero después encontré un plugin (cómo no, en Grails siempre, o casi, puedes encontrar un plugin que te facilite lo que quieres hacer) que facilita esta labor, al menos en mi opinión.&lt;br&gt;
&lt;br&gt;
Os dejo el enlace al plugin para que podáis ver directamente todas sus opciones: &lt;a href=&quot;http://www.grails.org/plugin/google-analytics&quot;&gt;Grails Google Analytics Plugin&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
A pesar de tener en la documentación del plugin la información suficiente para hacerlo funcionar, os voy a mostrar mi solución por si os sirve de aclaración.&lt;br&gt;
&lt;a href=&quot;http://una-programadora-mas-en-el-mundo.blogspot.com/2011/04/grails-google-analytics-plugin.html#more&quot;&gt;Leer más »&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://una-programadora-mas-en-el-mundo.blogspot.com/feeds/4422667686117614916/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/04/grails-google-analytics-plugin.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/4422667686117614916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/4422667686117614916'/><link rel='alternate' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/04/grails-google-analytics-plugin.html' title='GRAILS - Google Analytics plugin'/><author><name>una-programadora-mas-en-el-mundo</name><uri>http://www.blogger.com/profile/15342020417144526845</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5011986689949757828.post-1580944103841095426</id><published>2011-03-07T22:22:00.000+01:00</published><updated>2011-03-07T22:22:25.351+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="array"/><category scheme="http://www.blogger.com/atom/ns#" term="collection"/><category scheme="http://www.blogger.com/atom/ns#" term="groovy"/><category scheme="http://www.blogger.com/atom/ns#" term="list"/><category scheme="http://www.blogger.com/atom/ns#" term="map"/><category scheme="http://www.blogger.com/atom/ns#" term="range"/><category scheme="http://www.blogger.com/atom/ns#" term="set"/><title type='text'>GROOVY - Collections</title><content type='html'>En groovy tenemos disponibles varios tipos de colecciones que nos facilitarán bastante la vida: arrays, listas, rangos, sets y mapas. Véamos un poco cada uno de ellos.&lt;br&gt;
&lt;a href=&quot;http://una-programadora-mas-en-el-mundo.blogspot.com/2011/03/groovy-collections.html#more&quot;&gt;Leer más »&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://una-programadora-mas-en-el-mundo.blogspot.com/feeds/1580944103841095426/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/03/groovy-collections.html#comment-form' title='3 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/1580944103841095426'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/1580944103841095426'/><link rel='alternate' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/03/groovy-collections.html' title='GROOVY - Collections'/><author><name>una-programadora-mas-en-el-mundo</name><uri>http://www.blogger.com/profile/15342020417144526845</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5011986689949757828.post-4607149101487410880</id><published>2011-03-02T12:37:00.000+01:00</published><updated>2011-03-02T12:37:35.278+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="groovy"/><category scheme="http://www.blogger.com/atom/ns#" term="string"/><title type='text'>GROOVY - Strings</title><content type='html'>En este post voy a extenderme algo más de lo normal, pero creo que es bueno compartir esta información, que ya me ha tocado recordar más de una vez entre mis compañeros.&lt;br&gt;
&lt;br&gt;
Hablaré brevemente (o al menos esa es mi intención inicial) sobre los tipos de Strings en groovy, string multi-linea y sobre los &amp;#39;slashy strings&amp;#39; (strings delimitados por barras). ¡Manos a la obra!&lt;br&gt;
&lt;a href=&quot;http://una-programadora-mas-en-el-mundo.blogspot.com/2011/03/groovy-strings.html#more&quot;&gt;Leer más »&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://una-programadora-mas-en-el-mundo.blogspot.com/feeds/4607149101487410880/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/03/groovy-strings.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/4607149101487410880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/4607149101487410880'/><link rel='alternate' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/03/groovy-strings.html' title='GROOVY - Strings'/><author><name>una-programadora-mas-en-el-mundo</name><uri>http://www.blogger.com/profile/15342020417144526845</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5011986689949757828.post-7002204677361291137</id><published>2011-02-17T08:00:00.003+01:00</published><updated>2011-02-17T08:00:09.333+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="grails"/><category scheme="http://www.blogger.com/atom/ns#" term="params"/><title type='text'>GRAILS - Parámetros multivaluados y params.list()</title><content type='html'>De nuevo os traigo un truquito que he leido en el observatorio, concretamente en el post &lt;a href=&quot;http://observatoriodegrails.com/articulos/sq31-intermedio-parametros-web-multivaluados/&quot;&gt;SQ31 – Intermedio – Parámetros web multivaluados&lt;/a&gt;.&lt;br&gt;
&lt;br&gt;
¿Nunca habéis tenido que recoger de los parámetros un campo con varios valores? Pues yo sí, y antes de leer este post he de decir que me volvía loca para convertir lo que recibía en algo que pudiera manipular cómodamente.&lt;br&gt;
&lt;a href=&quot;http://una-programadora-mas-en-el-mundo.blogspot.com/2011/02/grails-parametros-multivaluados-y.html#more&quot;&gt;Leer más »&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://una-programadora-mas-en-el-mundo.blogspot.com/feeds/7002204677361291137/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/02/grails-parametros-multivaluados-y.html#comment-form' title='2 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/7002204677361291137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/7002204677361291137'/><link rel='alternate' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/02/grails-parametros-multivaluados-y.html' title='GRAILS - Parámetros multivaluados y params.list()'/><author><name>una-programadora-mas-en-el-mundo</name><uri>http://www.blogger.com/profile/15342020417144526845</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5011986689949757828.post-5805338787350110361</id><published>2011-02-16T08:34:00.001+01:00</published><updated>2011-02-16T08:34:57.409+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="grails"/><category scheme="http://www.blogger.com/atom/ns#" term="puerto"/><title type='text'>GRAILS - Establecer puerto por defecto</title><content type='html'>Como todos sabéis (y si &amp;nbsp;no a partir de ahora lo haréis), el puerto por defecto que utiliza grails para las aplicaciones es el 8080, pero podemos cambiar fácilmente de puerto si nos es necesario.&lt;br /&gt;
&lt;br /&gt;
Si queremos cambiar el puerto sólo ocasionalmente, opino que lo mejor es indicarlo a la hora de arrancar la aplicación. Si quisieramos arrancar la aplicación en el puerto 8090, bastaría con lanzar la ejecución de la siguiente forma.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;grails -Dserver.port=8090 run-app
&lt;/pre&gt;&lt;br /&gt;
Pero claro, ¿y si lo que queremos es arrancar la aplicación siempre en el puerto 8090?. No resultaría muy práctico tener que incluir la opción cada vez que arrancamos la aplicación. Como no podía ser de otra manera, grails nos permite definir el puerto por defecto poniendo la siguiente línea en &lt;i&gt;BuildConfig.groovy&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;grails.server.port.http=8090
&lt;/pre&gt;&lt;br /&gt;
Enjoy!</content><link rel='replies' type='application/atom+xml' href='http://una-programadora-mas-en-el-mundo.blogspot.com/feeds/5805338787350110361/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/02/grails-establecer-puerto-por-defecto.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/5805338787350110361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/5805338787350110361'/><link rel='alternate' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/02/grails-establecer-puerto-por-defecto.html' title='GRAILS - Establecer puerto por defecto'/><author><name>una-programadora-mas-en-el-mundo</name><uri>http://www.blogger.com/profile/15342020417144526845</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5011986689949757828.post-3145948159300049086</id><published>2011-02-11T10:18:00.002+01:00</published><updated>2011-02-11T10:20:31.392+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="groovy"/><category scheme="http://www.blogger.com/atom/ns#" term="list"/><category scheme="http://www.blogger.com/atom/ns#" term="map"/><category scheme="http://www.blogger.com/atom/ns#" term="split"/><title type='text'>GROOVY - Split en listas y mapas</title><content type='html'>Esta vez os traigo el método split para listas (List) y mapas (Map) en groovy. Se añaden a las propias clases mediante metaprogramación.&lt;br&gt;
&lt;br&gt;
Si estáis utilizando grails, podéis incluirlos en el Bootstrap de vuestra aplicación para tenerlos siempre disponibles.&lt;br&gt;
&lt;a href=&quot;http://una-programadora-mas-en-el-mundo.blogspot.com/2011/02/groovy-split-en-listas-y-mapas.html#more&quot;&gt;Leer más »&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://una-programadora-mas-en-el-mundo.blogspot.com/feeds/3145948159300049086/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/02/groovy-split-en-listas-y-mapas.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/3145948159300049086'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/3145948159300049086'/><link rel='alternate' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/02/groovy-split-en-listas-y-mapas.html' title='GROOVY - Split en listas y mapas'/><author><name>una-programadora-mas-en-el-mundo</name><uri>http://www.blogger.com/profile/15342020417144526845</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5011986689949757828.post-3653558901452075730</id><published>2011-02-07T10:27:00.001+01:00</published><updated>2011-02-07T10:37:43.566+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="GORM"/><category scheme="http://www.blogger.com/atom/ns#" term="grails"/><category scheme="http://www.blogger.com/atom/ns#" term="order"/><title type='text'>GRAILS - Establecer la ordenación de las asociaciones</title><content type='html'>Después de unos días de ausencia... os traigo un truquito nuevo que he leído en el &lt;a href=&quot;http://observatoriodegrails.com/&quot;&gt;Observatorio de grails&lt;/a&gt;, concretamente en &lt;a href=&quot;http://observatoriodegrails.com/articulos/sq30-basico-forzar-la-ordenacion-de-las-asociaciones/&quot;&gt;este post&lt;/a&gt;.&lt;br&gt;
&lt;br&gt;
No sé si os habréis encontrado alguna vez con la necesidad de obtener las relaciones de un objeto ordenadas siempre de la misma manera, pero yo sí. Hasta ahora lo que hacía era, si necesitaba que estuvieran ordenadas por id, añadía una propiedad List con el nombre de la relación. También he utilizado SortedSet para obtener una ordenación personalizada de esa relación. Y, por supuesto, definir el orden cada vez que hacía una consula, es decir, .findAllByNombre(nombre,[sort:&amp;#39;nombre&amp;#39;,order:&amp;#39;asc&amp;#39;]).&lt;br&gt;
&lt;a href=&quot;http://una-programadora-mas-en-el-mundo.blogspot.com/2011/02/grails-establecer-la-ordenacion-de-las.html#more&quot;&gt;Leer más »&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://una-programadora-mas-en-el-mundo.blogspot.com/feeds/3653558901452075730/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/02/grails-establecer-la-ordenacion-de-las.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/3653558901452075730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/3653558901452075730'/><link rel='alternate' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/02/grails-establecer-la-ordenacion-de-las.html' title='GRAILS - Establecer la ordenación de las asociaciones'/><author><name>una-programadora-mas-en-el-mundo</name><uri>http://www.blogger.com/profile/15342020417144526845</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5011986689949757828.post-6107303085817306833</id><published>2011-01-19T10:52:00.001+01:00</published><updated>2014-07-01T08:03:21.886+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="GORM"/><category scheme="http://www.blogger.com/atom/ns#" term="grails"/><title type='text'>GRAILS - get, read o load?</title><content type='html'>A la hora de obtener un objeto de dominio, ¿qué metodo debemos utilizar, read, get o load?.&lt;br&gt;
&lt;a href=&quot;http://una-programadora-mas-en-el-mundo.blogspot.com/2011/01/grails-get-read-o-load.html#more&quot;&gt;Leer más »&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://una-programadora-mas-en-el-mundo.blogspot.com/feeds/6107303085817306833/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/01/grails-get-read-o-load.html#comment-form' title='2 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/6107303085817306833'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/6107303085817306833'/><link rel='alternate' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/01/grails-get-read-o-load.html' title='GRAILS - get, read o load?'/><author><name>una-programadora-mas-en-el-mundo</name><uri>http://www.blogger.com/profile/15342020417144526845</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5011986689949757828.post-3010249893924118268</id><published>2011-01-17T11:05:00.003+01:00</published><updated>2011-02-11T10:18:53.074+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="grails"/><category scheme="http://www.blogger.com/atom/ns#" term="highlight"/><category scheme="http://www.blogger.com/atom/ns#" term="resaltar"/><category scheme="http://www.blogger.com/atom/ns#" term="tag"/><category scheme="http://www.blogger.com/atom/ns#" term="tagLib"/><title type='text'>GRAILS - Highlight tag</title><content type='html'>Bueno, esta vez os traigo una etiqueta bastante simple pero que puede resultaros útil, aunque en casos muy concretos.&lt;br&gt;
&lt;br&gt;
Lo que hace este tag es resaltar (highlight) ciertas palabras de un texto. En mi caso lo he empleado para marcar las palabras en los resultados de una búsqueda (sí, lo sé, lucene tiene su propio highlight, pero en este caso concreto no me servía...).&lt;br&gt;
El resaltado de las palabras lo hace englobándolas dentro de un &lt;span class=&quot;pbuscada&quot;&gt;&lt;/span&gt;, por lo que sólo tendréis que adaptar los estilos a esa clase para ponerlo a vuestro gusto.&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://una-programadora-mas-en-el-mundo.blogspot.com/2011/01/grails-highlight-tag.html#more&quot;&gt;Leer más »&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://una-programadora-mas-en-el-mundo.blogspot.com/feeds/3010249893924118268/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/01/grails-highlight-tag.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/3010249893924118268'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/3010249893924118268'/><link rel='alternate' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/01/grails-highlight-tag.html' title='GRAILS - Highlight tag'/><author><name>una-programadora-mas-en-el-mundo</name><uri>http://www.blogger.com/profile/15342020417144526845</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5011986689949757828.post-4178749356347545250</id><published>2011-01-14T11:22:00.002+01:00</published><updated>2011-01-17T10:37:57.501+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AdaptiveFetchSchedule"/><category scheme="http://www.blogger.com/atom/ns#" term="DefaultFetchSchedule"/><category scheme="http://www.blogger.com/atom/ns#" term="MD5Signature"/><category scheme="http://www.blogger.com/atom/ns#" term="nutch"/><category scheme="http://www.blogger.com/atom/ns#" term="recrawl"/><category scheme="http://www.blogger.com/atom/ns#" term="TextProfileSignature"/><title type='text'>NUTCH - Configurar recrawl</title><content type='html'>¿No os ha pasado que según en qué foro o tutorial leáis os dicen una u otra forma de cómo configurar nutch para hacer recrawl de las páginas? Pues a mí sí...&lt;br&gt;
&lt;br&gt;
En un primer momento intenté llamar a la clase Crawl con la opción de -addDays, después de unos días me dí cuenta de que no hacía mucho caso.&lt;br&gt;
Después vino la gran idea de crearme mi propia clase Crawl y a la hora de hacer el fetch, establecer el tiempo como el actual más 7 días, por ejemplo. Tampoco me hizo mucho caso.&lt;br&gt;
Y finalmente, ¡creo que he encontrado la solución más práctica y que funciona!&lt;br&gt;
&lt;a href=&quot;http://una-programadora-mas-en-el-mundo.blogspot.com/2011/01/nutch-configurar-recrawl.html#more&quot;&gt;Leer más »&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://una-programadora-mas-en-el-mundo.blogspot.com/feeds/4178749356347545250/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/01/nutch-configurar-recrawl.html#comment-form' title='5 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/4178749356347545250'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/4178749356347545250'/><link rel='alternate' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/01/nutch-configurar-recrawl.html' title='NUTCH - Configurar recrawl'/><author><name>una-programadora-mas-en-el-mundo</name><uri>http://www.blogger.com/profile/15342020417144526845</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5011986689949757828.post-5430017444036489356</id><published>2011-01-13T13:32:00.004+01:00</published><updated>2011-01-19T10:56:30.079+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="grails"/><category scheme="http://www.blogger.com/atom/ns#" term="tag"/><category scheme="http://www.blogger.com/atom/ns#" term="tagLib"/><title type='text'>GRAILS - Tag para truncar texto</title><content type='html'>Bueno, esta es una etiqueta que me ha venido bien ya en un par de ocasiones. Lo que hace es simplemente truncar un texto según el número de caracteres que se indique, poniendo puntos suspensivos al final del texto si ha tenido que truncarse.&lt;br /&gt;
&lt;br /&gt;
Basta con que os creéis un tagLib e incluyáis este trozo de código.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;def truncarNombre = {attrs -&amp;gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;def maximo = new Integer(attrs[&#39;max&#39;])
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;def max = (attrs[&#39;nombre&#39;].length()-1&amp;gt;maximo)?maximo:attrs[&#39;nombre&#39;].length()-1
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;def nombre = attrs[&#39;nombre&#39;][0..max]
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;if (attrs[&#39;nombre&#39;].length()-1&amp;gt;maximo)
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;nombre = nombre +&#39;...&#39;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;out &amp;lt;&amp;lt; nombre.encodeAsHTML()
}

&lt;/pre&gt;&lt;br /&gt;
Luego, en el gsp en el que queráis utilizarlo, basta con que pongáis lo siguiente para utilizarla:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;prettyprint&quot;&gt;&amp;lt;g:truncarTexto texto=&#39;texto que queréis truncar por ser demasiado largo&#39; max=&#39;10&#39;/&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
Espero que os sirva :)</content><link rel='replies' type='application/atom+xml' href='http://una-programadora-mas-en-el-mundo.blogspot.com/feeds/5430017444036489356/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/01/grails-tag-para-truncar-texto.html#comment-form' title='2 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/5430017444036489356'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/5430017444036489356'/><link rel='alternate' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/01/grails-tag-para-truncar-texto.html' title='GRAILS - Tag para truncar texto'/><author><name>una-programadora-mas-en-el-mundo</name><uri>http://www.blogger.com/profile/15342020417144526845</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5011986689949757828.post-841589285624145862</id><published>2011-01-13T13:16:00.000+01:00</published><updated>2011-01-13T13:16:12.037+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="nutch"/><category scheme="http://www.blogger.com/atom/ns#" term="ParserChecker"/><title type='text'>NUTCH - ParserChecker – Una forma de comprobar el resultado del Parser</title><content type='html'>Al hacer unas consultas en el maillist de nutch, me mostraron el uso de esta clase.&lt;br /&gt;
&lt;br /&gt;
Si desde linea de comandos ejecutamos lo siguiente, obtenemos el resultado de hacer el parse de esa url, con todos los posibles enlaces de salida y el contenido.&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;bin/nutch org.apache.nutch.parse.ParserChecker &lt;aquí la=&quot;&quot; url=&quot;&quot;&gt;&lt;/aquí&gt;&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
Creedme, puede resultar muy útil cuando no sabes por qué dominios no te está haciendo bien el crawl y resulta que es porque te estaba dando una excepción el parser de pdfs...</content><link rel='replies' type='application/atom+xml' href='http://una-programadora-mas-en-el-mundo.blogspot.com/feeds/841589285624145862/comments/default' title='Enviar comentarios'/><link rel='replies' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/01/nutch-parserchecker-una-forma-de.html#comment-form' title='0 comentarios'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/841589285624145862'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5011986689949757828/posts/default/841589285624145862'/><link rel='alternate' type='text/html' href='http://una-programadora-mas-en-el-mundo.blogspot.com/2011/01/nutch-parserchecker-una-forma-de.html' title='NUTCH - ParserChecker – Una forma de comprobar el resultado del Parser'/><author><name>una-programadora-mas-en-el-mundo</name><uri>http://www.blogger.com/profile/15342020417144526845</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>