vgritsenko    2003/12/22 06:07:13

  Modified:    java/src/org/apache/xindice/client/xmldb/resources
                        BinaryResourceImpl.java XMLResourceImpl.java
  Log:
  Implement getParentCollection on BinaryResource
  
  Revision  Changes    Path
  1.4       +12 -7     
xml-xindice/java/src/org/apache/xindice/client/xmldb/resources/BinaryResourceImpl.java
  
  Index: BinaryResourceImpl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xindice/java/src/org/apache/xindice/client/xmldb/resources/BinaryResourceImpl.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- BinaryResourceImpl.java   7 Aug 2003 20:13:20 -0000       1.3
  +++ BinaryResourceImpl.java   22 Dec 2003 14:07:13 -0000      1.4
  @@ -71,34 +71,40 @@
    */
   public class BinaryResourceImpl implements BinaryResource {
   
  -    private Object content;
       private String id;
  +    private Object content;
  +    private Collection collection;
   
   
       public BinaryResourceImpl(String id, Object content) {
  +        this(id, null, content);
  +    }
  +
  +    public BinaryResourceImpl(String id, Collection collection, Object 
content) {
           this.id = id;
           this.content = content;
  +        this.collection = collection;
       }
   
       /**
        * @see org.xmldb.api.base.Resource#getContent()
        */
       public Object getContent() throws XMLDBException {
  -        return content;
  +        return this.content;
       }
   
       /**
        * @see org.xmldb.api.base.Resource#getId()
        */
       public String getId() throws XMLDBException {
  -        return id;
  +        return this.id;
       }
   
       /**
        * @see org.xmldb.api.base.Resource#getParentCollection()
        */
       public Collection getParentCollection() throws XMLDBException {
  -        return null;
  +        return this.collection;
       }
   
       /**
  @@ -118,5 +124,4 @@
       public void setId(String id) {
           this.id = id;
       }
  -
   }
  
  
  
  1.17      +6 -6      
xml-xindice/java/src/org/apache/xindice/client/xmldb/resources/XMLResourceImpl.java
  
  Index: XMLResourceImpl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xindice/java/src/org/apache/xindice/client/xmldb/resources/XMLResourceImpl.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- XMLResourceImpl.java      9 Aug 2003 05:01:55 -0000       1.16
  +++ XMLResourceImpl.java      22 Dec 2003 14:07:13 -0000      1.17
  @@ -94,10 +94,10 @@
           saxFactory.setNamespaceAware(true);
       }
   
  -    protected String id = null;
  -    protected String documentId = null;
  -    protected org.xmldb.api.base.Collection collection = null;
  -    protected String content = null;
  +    protected String id;
  +    protected String documentId;
  +    protected org.xmldb.api.base.Collection collection;
  +    protected String content;
   
       /**
        * This is a SAX feature that controls how namespaces are reported in 
SAX.
  
  
  

Reply via email to