-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sounds great. Please create a bugzilla entry for this
(http://issues.apache.org/bugzilla/enter_bug.cgi?product=Slide) and add
a more detailed description of your patch. What exactly does it do, what
problem does it solve, etc. Also the format of your patches should be
unified diff (diff -u).

Thanks, Unico


[EMAIL PROTECTED] wrote:
> I added version-aware Lucene searching for Slide.
> Can you add my changes to Slide?
> 
> Tomek
> 
> share/org/apache/slide/search/RequestedResource.java
> 
> 31d30
> < import org.apache.slide.content.NodeRevisionNumber;
> 51,58c50
> <
> <      /**
> <      * Returns the revision number of the resource.
> <      *
> <      * @return     the revision number of resource
> <      */
> <        public NodeRevisionNumber getRevisionNumber();
> <
> ---
> 
> 
> share/org/apache/slide/search/basic/ComparableResourceImpl.java
> 
> 42d41
> < import org.apache.slide.content.NodeRevisionNumber;
> 118,136c117
> <         this (objectNode, searchToken, scope, propertyProvider, null);
> <     }
> <
> <     /**
> <      * Constructs a RequestedResource.
> <      *
> <      * @param objectNode        the ObjectNode for this resource
> <      * @param searchToken       the SearchToken for this request
> <      * @param scope             the scope of the query.
> <      * @param propertyProvider  the  PropertyProvider to use (may be
> <      *                          <code>null</code>).
> <      * @param revisionNumber          the revision number of this resource
> <      *
> <      * @throws BadQueryException
> <      */
> <      public ComparableResourceImpl (ObjectNode objectNode, SearchToken 
> searchToken, QueryScope scope, PropertyProvider propertyProvider, 
> NodeRevisionNumber revisionNumber)
> <         throws SlideException
> <     {
> <         this (objectNode, searchToken.getSlideToken(), 
> searchToken.getContentHelper(), scope, propertyProvider, revisionNumber);
> ---
> 
>>        this (objectNode, searchToken.getSlideToken(), 
>> searchToken.getContentHelper(), scope, propertyProvider);
> 
> 139a121
> 
> 155,172d136
> <
> <               this(objectNode, slideToken, contentHelper, scope, 
> propertyProvider, null);
> <       }
> <
> <     /**
> <      * Constructs a RequestedResource.
> <      *
> <      * @param objectNode        the ObjectNode for this resource
> <      * @param slideToken        the slideToken for this request
> <      * @param contentHelper     you won't believe, the ContentHelper
> <      * @param scope             the scope of the query.
> <      * @param propertyProvider  the  PropertyProvider to use (may be
> <      *                          <code>null</code>).
> <      * @param revisionNumber          the revision number of this resource
> <      *
> <      * @throws BadQueryException
> <      */
> <     public ComparableResourceImpl (ObjectNode objectNode, SlideToken 
> slideToken, Content contentHelper, QueryScope scope, PropertyProvider 
> propertyProvider, NodeRevisionNumber revisionNumber) throws SlideException {
> 185d148
> <                                       if (revisionNumber == null)
> 188,190d150
> <                                       else
> <                 revisionDescriptor =
> <                     contentHelper.retrieve (slideToken, 
> revisionDescriptors, revisionNumber);
> 353,357c313
> <
> <        public NodeRevisionNumber getRevisionNumber() {
> <               return revisionDescriptor.getRevisionNumber();
> <        }
> <
> ---
> 
> 499,501c455,456
> <         if (getInternalHref().equals (otherResource.getInternalHref()) &&
> <                                
> (getRevisionNumber().equals(((ComparableResource)otherResource).getRevisionNumber())))
> <                       result = 0;
> ---
> 
>>        if (getInternalHref().equals (otherResource.getInternalHref()))
>>            result = 0;
> 
> 700,702c655,656
> <         if (getUri().equals (otherUri)) {
> <                               return 
> getRevisionNumber().equals(((ComparableResource)otherObject).getRevisionNumber());
> <                 }
> ---
> 
>>        if (getUri().equals (otherUri))
>>            return true;
> 
> 
> share/org/apache/slide/search/basic/OrderBy.java
> 
> 206,207c206
> <             if (r1.getInternalHref().equals (r2.getInternalHref()) &&
> <                                       
> r1.getRevisionNumber().equals(r2.getRevisionNumber())) {
> ---
> 
>>            if (r1.getInternalHref().equals (r2.getInternalHref())) {
> 
> 
> stores/org/apache/slide/index/lucene/Index.java 
> 
> 68d67
> <     public static final String REVISION_FIELD_NAME = "SLIDE_REVISION";
> 225d223
> <         doc.add(storedString(Index.REVISION_FIELD_NAME, 
> descriptor.getRevisionNumber().toString()));
> 310d307
> <         doc.add(storedString(Index.REVISION_FIELD_NAME, 
> descriptor.getRevisionNumber().toString()));
> 
> stores/org/apache/slide/index/lucene/expressions/AbstractLuceneExpression.java
> 
> 56d55
> < import org.apache.slide.content.NodeRevisionNumber;
> 160,162c159
> <                                        String number = 
> doc.get(Index.REVISION_FIELD_NAME);
> <                                        NodeRevisionNumber nodeNumber = new 
> NodeRevisionNumber(number);
> <                 RequestedResource resource = createResource(uri, 
> nodeNumber);
> ---
> 
>>                RequestedResource resource = createResource(uri);
> 
> 205c202
> <     protected RequestedResource createResource(String uri, 
> NodeRevisionNumber nodeNumber) throws SearchException
> ---
> 
>>    protected RequestedResource createResource(String uri) throws 
>> SearchException
> 
> 214c211
> <                     query.getScope(), factory.getPropertyProvider(), 
> nodeNumber);
> ---
> 
>>                    query.getScope(), factory.getPropertyProvider());
> 
> 
> 
> server/org/apache/slide/webdav/util/ResourceWithProvidedProperties.java
> 
> 36d35
> < import org.apache.slide.content.NodeRevisionNumber;
> 93,102c92
> <
> <      /**
> <      * Returns the revision number of the resource.
> <      *
> <      * @return     the revision number of the resource.
> <      */
> <       public NodeRevisionNumber getRevisionNumber() {
> <               return revisionDescriptor.getRevisionNumber();
> <       }
> <
> ---
> 
> 
> 
> ----------------------------------------------------------------------
> OMNIXMAIL! Jesli masz telefon w sieci Era i dostep do WAP, to mozesz
> na komorce odbierac poczte ze wszystkich swoich kont poczty e-mail!
> OMNIXMAIL jest w Era Omnix: http://link.interia.pl/f1896

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFCwTH0cuec8tVNKAwRAnuzAKCjU0YR0S8TB46Z6t0fOcsBm1hzugCfRHN/
rUj3pr5JLUNRxkJYjaDzVjI=
=CsSH
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to