View | Details | Raw Unified | Return to bug 40701
Collapse All | Expand All

(-)I:/Workspaces/lib.plugins/org.apache.xindice/src/org/apache/xindice/xml/dom/DocumentImpl.java (-2 / +68 lines)
Lines 28-33 Link Here
28
import org.w3c.dom.Attr;
28
import org.w3c.dom.Attr;
29
import org.w3c.dom.CDATASection;
29
import org.w3c.dom.CDATASection;
30
import org.w3c.dom.Comment;
30
import org.w3c.dom.Comment;
31
import org.w3c.dom.DOMConfiguration;
31
import org.w3c.dom.DOMException;
32
import org.w3c.dom.DOMException;
32
import org.w3c.dom.DOMImplementation;
33
import org.w3c.dom.DOMImplementation;
33
import org.w3c.dom.Document;
34
import org.w3c.dom.Document;
Lines 63-72 Link Here
63
    private String version;
64
    private String version;
64
    private String actualEncoding;
65
    private String actualEncoding;
65
    private String encoding;
66
    private String encoding;
67
    private String documentURI;
66
    private boolean standalone;
68
    private boolean standalone;
67
    private boolean strictErrorChecking;
69
    private boolean strictErrorChecking;
68
    private SymbolTable symbols;
70
    private SymbolTable symbols;
69
    private boolean readOnly;
71
    private boolean readOnly;
72
    private DOMConfiguration domConfig;
70
73
71
74
72
    public DocumentImpl() {
75
    public DocumentImpl() {
Lines 481-486 Link Here
481
        checkLoaded();
484
        checkLoaded();
482
        return actualEncoding;
485
        return actualEncoding;
483
    }
486
    }
487
    
488
   public String getInputEncoding(){
489
	   return getActualEncoding();
490
   }
491
   
492
   public void setInputEncoding(String s){
493
	   setActualEncoding(s);
494
   }
484
495
485
    public void setActualEncoding(String actualEncoding) {
496
    public void setActualEncoding(String actualEncoding) {
486
        checkReadOnly();
497
        checkReadOnly();
Lines 498-504 Link Here
498
        checkLoaded();
509
        checkLoaded();
499
        this.encoding = encoding;
510
        this.encoding = encoding;
500
    }
511
    }
512
    
513
    public String getXmlEncoding(){
514
    	return getEncoding();
515
    }
501
516
517
    public void setXmlEncoding(String s){
518
    	setEncoding(s);
519
    }
502
    public String getVersion() {
520
    public String getVersion() {
503
        checkLoaded();
521
        checkLoaded();
504
        return version;
522
        return version;
Lines 509-515 Link Here
509
        checkLoaded();
527
        checkLoaded();
510
        this.version = version;
528
        this.version = version;
511
    }
529
    }
512
530
    
531
    public String getXmlVersion(){
532
    	return getVersion();
533
    }
534
    
535
    public void setXmlVersion(String s){
536
    	setVersion(s);
537
    }
538
    
513
    public boolean getStandalone() {
539
    public boolean getStandalone() {
514
        checkLoaded();
540
        checkLoaded();
515
        return standalone;
541
        return standalone;
Lines 520-527 Link Here
520
        checkLoaded();
546
        checkLoaded();
521
        this.standalone = standalone;
547
        this.standalone = standalone;
522
    }
548
    }
549
    
550
    
523
551
524
    public boolean getStrictErrorChecking() {
552
    public boolean getXmlStandalone() {
553
		return getStandalone();
554
	}
555
556
	public void setXmlStandalone(boolean flag) throws DOMException {
557
		setStandalone(flag);
558
	}
559
560
	public boolean getStrictErrorChecking() {
525
        checkLoaded();
561
        checkLoaded();
526
        return strictErrorChecking;
562
        return strictErrorChecking;
527
    }
563
    }
Lines 531-534 Link Here
531
        checkLoaded();
567
        checkLoaded();
532
        this.strictErrorChecking = strictErrorChecking;
568
        this.strictErrorChecking = strictErrorChecking;
533
    }
569
    }
570
571
	public String getDocumentURI() {
572
		return documentURI;
573
	}
574
575
	public void setDocumentURI(String documentURI) {
576
		this.documentURI = documentURI;
577
	}
578
579
580
581
	public Node renameNode(Node n, String namespaceURI, String qualifiedName) throws DOMException {
582
		throw new DOMException(DOMException.NOT_SUPPORTED_ERR,"This operation is not supported");
583
584
	}
585
586
	public DOMConfiguration getDomConfig() {
587
		return domConfig;
588
	}
589
590
	public void normalizeDocument() {
591
		
592
		
593
	}
594
595
	public void setDomConfig(DOMConfiguration domConfig) {
596
		this.domConfig = domConfig;
597
	}
598
599
534
}
600
}
(-)I:/Workspaces/lib.plugins/org.apache.xindice/src/org/apache/xindice/xml/dom/TextImpl.java (+15 lines)
Lines 81-85 Link Here
81
            throw EX_INDEX_SIZE;
81
            throw EX_INDEX_SIZE;
82
        }
82
        }
83
    }
83
    }
84
85
	public String getWholeText() {
86
		// TODO Auto-generated method stub
87
		return null;
88
	}
89
90
	public boolean isElementContentWhitespace() {
91
		// TODO Auto-generated method stub
92
		return false;
93
	}
94
95
	public Text replaceWholeText(String s) throws DOMException {
96
		// TODO Auto-generated method stub
97
		return null;
98
	}
84
}
99
}
85
100
(-)I:/Workspaces/lib.plugins/org.apache.xindice/src/org/apache/xindice/xml/dom/DOMImplementationImpl.java (-1 / +6 lines)
Lines 30-36 Link Here
30
 * @version CVS $Revision$, $Date$
30
 * @version CVS $Revision$, $Date$
31
 */
31
 */
32
public final class DOMImplementationImpl implements DOMImplementation {
32
public final class DOMImplementationImpl implements DOMImplementation {
33
    private static final String[][] FEATURES = {
33
    public Object getFeature(String s, String s1) {
34
		// TODO Auto-generated method stub
35
		return null;
36
	}
37
38
	private static final String[][] FEATURES = {
34
        {"XML", "1.0"},
39
        {"XML", "1.0"},
35
        {"XML", "2.0"},
40
        {"XML", "2.0"},
36
        {"Traversal", "2.0"},
41
        {"Traversal", "2.0"},
(-)I:/Workspaces/lib.plugins/org.apache.xindice/src/org/apache/xindice/xml/dom/NodeImpl.java (+244 lines)
Lines 30-37 Link Here
30
import org.w3c.dom.NamedNodeMap;
30
import org.w3c.dom.NamedNodeMap;
31
import org.w3c.dom.Node;
31
import org.w3c.dom.Node;
32
import org.w3c.dom.NodeList;
32
import org.w3c.dom.NodeList;
33
import org.w3c.dom.UserDataHandler;
34
import org.w3c.dom.events.Event;
33
35
34
import java.util.HashMap;
36
import java.util.HashMap;
37
import java.util.Hashtable;
35
38
36
/**
39
/**
37
 * NodeImpl implements the foundation of the Xindice compressed DOM.
40
 * NodeImpl implements the foundation of the Xindice compressed DOM.
Lines 295-300 Link Here
295
                : null;
298
                : null;
296
    }
299
    }
297
300
301
   
302
    public boolean dispatchEvent(Event event) {
303
        return false;
304
    }
305
    
298
    /**
306
    /**
299
     * Inserts the node <code>newChild</code> before the existing child node
307
     * Inserts the node <code>newChild</code> before the existing child node
300
     * <code>refChild</code>. If <code>refChild</code> is <code>null</code>,
308
     * <code>refChild</code>. If <code>refChild</code> is <code>null</code>,
Lines 920-923 Link Here
920
    public String toString() {
928
    public String toString() {
921
        return TextWriter.toString(this);
929
        return TextWriter.toString(this);
922
    }
930
    }
931
932
	public short compareDocumentPosition(Node node) throws DOMException {
933
		if(this == node)
934
			return 0;
935
		else if(node instanceof NodeImpl){
936
			
937
			return (short) Math.signum(this.key.hashCode() - ((NodeImpl) node).key.hashCode());
938
		}else
939
			return (short) Math.signum(this.hashCode() - node.hashCode());
940
		
941
	}
942
943
944
	public Object getFeature(String s, String s1) {
945
		return null;
946
	}
947
948
	public String getTextContent() throws DOMException {
949
		return getNodeValue();
950
	}
951
952
953
	public Object setUserData(String s, Object obj, UserDataHandler userdatahandler) {
954
		if(obj == null){
955
			if(userData != null){
956
				Hashtable hTable = (Hashtable) userData.get(this);
957
				return hTable.get(s);				
958
			}
959
			return null;
960
		}else{
961
962
			Hashtable t;
963
			if(userData == null){
964
				userData = new HashMap();
965
				t = new Hashtable();
966
				userData.put(this, t);
967
			}else {
968
				t = (Hashtable) userData.get(this);
969
				if(t== null){
970
					t = new Hashtable();
971
					userData.put(this, t);
972
				}
973
			}
974
			
975
			return t.put(s, new UserDataObject(obj,userdatahandler));
976
			
977
		}
978
	}
979
	
980
    public String getBaseURI() {
981
        return null;
982
    }
983
    
984
    public boolean isEqualNode(Node arg) {
985
        if (arg == this) {
986
            return true;
987
        }
988
        if (arg.getNodeType() != getNodeType()) {
989
            return false;
990
        }
991
        // in theory nodeName can't be null but better be careful
992
        // who knows what other implementations may be doing?...
993
        if (getNodeName() == null) {
994
            if (arg.getNodeName() != null) {
995
                return false;
996
            }
997
        }
998
        else if (!getNodeName().equals(arg.getNodeName())) {
999
            return false;
1000
        }
1001
1002
        if (getLocalName() == null) {
1003
            if (arg.getLocalName() != null) {
1004
                return false;
1005
            }
1006
        }
1007
        else if (!getLocalName().equals(arg.getLocalName())) {
1008
            return false;
1009
        }
1010
1011
        if (getNamespaceURI() == null) {
1012
            if (arg.getNamespaceURI() != null) {
1013
                return false;
1014
            }
1015
        }
1016
        else if (!getNamespaceURI().equals(arg.getNamespaceURI())) {
1017
            return false;
1018
        }
1019
1020
        if (getPrefix() == null) {
1021
            if (arg.getPrefix() != null) {
1022
                return false;
1023
            }
1024
        }
1025
        else if (!getPrefix().equals(arg.getPrefix())) {
1026
            return false;
1027
        }
1028
1029
        if (getNodeValue() == null) {
1030
            if (arg.getNodeValue() != null) {
1031
                return false;
1032
            }
1033
        }
1034
        else if (!getNodeValue().equals(arg.getNodeValue())) {
1035
            return false;
1036
        }
1037
1038
1039
        return true;
1040
    }
1041
    
1042
    public void setTextContent(String textContent)
1043
    throws DOMException {
1044
    	setNodeValue(textContent);
1045
    }
1046
    
1047
    public String lookupPrefix(String namespaceURI){
1048
        
1049
        // REVISIT: When Namespaces 1.1 comes out this may not be true
1050
        // Prefix can't be bound to null namespace
1051
        if (namespaceURI == null) {
1052
            return null;
1053
        }
1054
1055
        short type = this.getNodeType();
1056
1057
        switch (type) {
1058
        case Node.ELEMENT_NODE: {
1059
                this.getNamespaceURI(); // to flip out children 
1060
                return lookupNamespacePrefix(namespaceURI);
1061
            }
1062
        case Node.DOCUMENT_NODE:{
1063
                return((NodeImpl)((Document)this).getDocumentElement()).lookupPrefix(namespaceURI);
1064
            }
1065
1066
        case Node.ENTITY_NODE :
1067
        case Node.NOTATION_NODE:
1068
        case Node.DOCUMENT_FRAGMENT_NODE:
1069
        case Node.DOCUMENT_TYPE_NODE:
1070
            // type is unknown
1071
            return null;
1072
        case Node.ATTRIBUTE_NODE:{
1073
                if (getOwnerDocument()!= null && getOwnerDocument().getNodeType() == Node.ELEMENT_NODE) {
1074
                    return  getOwnerDocument().lookupPrefix(namespaceURI);
1075
1076
                }
1077
                return null;
1078
            }
1079
        default:{   
1080
                NodeImpl ancestor = (NodeImpl)getParentNode();
1081
                if (ancestor != null) {
1082
                    return ancestor.lookupPrefix(namespaceURI);
1083
                }
1084
                return null;
1085
            }
1086
1087
        }
1088
    }
1089
    
1090
    public boolean isDefaultNamespace(String namespaceURI){
1091
        // REVISIT: remove casts when DOM L3 becomes REC.
1092
        short type = this.getNodeType();
1093
        switch (type) {
1094
        case Node.ELEMENT_NODE: {             
1095
            String namespace = this.getNamespaceURI();
1096
            String prefix = this.getPrefix();
1097
            
1098
            // REVISIT: is it possible that prefix is empty string?
1099
            if (prefix == null || prefix.length() == 0) {
1100
                if (namespaceURI == null) {
1101
                    return (namespace == namespaceURI);
1102
                }
1103
                return namespaceURI.equals(namespace);
1104
            }
1105
            if (this.hasAttributes()) {
1106
                ElementImpl elem = (ElementImpl)this;
1107
                NodeImpl attr = (NodeImpl)elem.getAttributeNodeNS("http://www.w3.org/2000/xmlns/", "xmlns");
1108
                if (attr != null) {
1109
                    String value = attr.getNodeValue();
1110
                    if (namespaceURI == null) {
1111
                        return (namespace == value);
1112
                    }
1113
                    return namespaceURI.equals(value);
1114
                }
1115
            }
1116
1117
            NodeImpl ancestor = (NodeImpl)getParentNode();
1118
            if (ancestor != null) {
1119
                return ancestor.isDefaultNamespace(namespaceURI);
1120
            }
1121
            return false;
1122
        }
1123
        case Node.DOCUMENT_NODE:{
1124
                return((NodeImpl)((Document)this).getDocumentElement()).isDefaultNamespace(namespaceURI);
1125
            }
1126
1127
        case Node.ENTITY_NODE :
1128
        case Node.NOTATION_NODE:
1129
        case Node.DOCUMENT_FRAGMENT_NODE:
1130
        case Node.DOCUMENT_TYPE_NODE:
1131
            // type is unknown
1132
            return false;
1133
        case Node.ATTRIBUTE_NODE:{
1134
                if (getOwnerDocument()!=null && getOwnerDocument().getNodeType() == Node.ELEMENT_NODE) {
1135
                    return getOwnerDocument().isDefaultNamespace(namespaceURI);
1136
1137
                }
1138
                return false;
1139
            }
1140
        default:{   
1141
                NodeImpl ancestor = (NodeImpl)getParentNode();
1142
                if (ancestor != null) {
1143
                    return ancestor.isDefaultNamespace(namespaceURI);
1144
                }
1145
                return false;
1146
            }
1147
1148
        }
1149
1150
1151
    }
1152
    
1153
 	class UserDataObject{
1154
		
1155
		UserDataHandler handler;
1156
		Object node;
1157
		
1158
		UserDataObject(Object node, UserDataHandler handler){
1159
			this.node = node;
1160
			this.handler = handler;
1161
			
1162
		}
1163
		
1164
	}
1165
1166
	
923
}
1167
}
(-)I:/Workspaces/lib.plugins/org.apache.xindice/src/org/apache/xindice/xml/dom/ContainerNodeImpl.java (+1 lines)
Lines 29-34 Link Here
29
import org.w3c.dom.Node;
29
import org.w3c.dom.Node;
30
import org.w3c.dom.NodeList;
30
import org.w3c.dom.NodeList;
31
import org.w3c.dom.Text;
31
import org.w3c.dom.Text;
32
import org.w3c.dom.TypeInfo;
32
import org.w3c.dom.traversal.DocumentTraversal;
33
import org.w3c.dom.traversal.DocumentTraversal;
33
import org.w3c.dom.traversal.NodeFilter;
34
import org.w3c.dom.traversal.NodeFilter;
34
import org.w3c.dom.traversal.NodeIterator;
35
import org.w3c.dom.traversal.NodeIterator;
(-)I:/Workspaces/lib.plugins/org.apache.xindice/src/org/apache/xindice/xml/dom/ElementImpl.java (-1 / +22 lines)
Lines 31-36 Link Here
31
import org.w3c.dom.Element;
31
import org.w3c.dom.Element;
32
import org.w3c.dom.NamedNodeMap;
32
import org.w3c.dom.NamedNodeMap;
33
import org.w3c.dom.Node;
33
import org.w3c.dom.Node;
34
import org.w3c.dom.TypeInfo;
34
35
35
import java.io.IOException;
36
import java.io.IOException;
36
import java.util.HashSet;
37
import java.util.HashSet;
Lines 42-49 Link Here
42
 */
43
 */
43
public final class ElementImpl extends ContainerNodeImpl implements Element {
44
public final class ElementImpl extends ContainerNodeImpl implements Element {
44
45
45
    private static final Log log = LogFactory.getLog(ElementImpl.class);
46
    public TypeInfo getSchemaTypeInfo() {
47
		// TODO Auto-generated method stub
48
		return null;
49
	}
46
50
51
	public void setIdAttribute(String s, boolean flag) throws DOMException {
52
		// TODO Auto-generated method stub
53
		
54
	}
55
56
	public void setIdAttributeNode(Attr attr, boolean flag) throws DOMException {
57
		// TODO Auto-generated method stub
58
		
59
	}
60
61
	public void setIdAttributeNS(String s, String s1, boolean flag) throws DOMException {
62
		// TODO Auto-generated method stub
63
		
64
	}
65
66
	private static final Log log = LogFactory.getLog(ElementImpl.class);
67
47
    // private static final String SRC_NS = XMLNS_PREFIX + ":src";
68
    // private static final String SRC_NS = XMLNS_PREFIX + ":src";
48
    // private static final String SRC_COL = "src:" + NodeSource.SOURCE_COL;
69
    // private static final String SRC_COL = "src:" + NodeSource.SOURCE_COL;
49
    // private static final String SRC_KEY = "src:" + NodeSource.SOURCE_KEY;
70
    // private static final String SRC_KEY = "src:" + NodeSource.SOURCE_KEY;
(-)I:/Workspaces/lib.plugins/org.apache.xindice/src/org/apache/xindice/xml/dom/DOMStringListImpl.java (+30 lines)
Line 0 Link Here
1
package org.apache.xindice.xml.dom;
2
3
import java.util.Vector;
4
5
import org.w3c.dom.DOMStringList;
6
7
public class DOMStringListImpl implements DOMStringList {
8
9
	private Vector fList  = new Vector(5,1); 
10
	
11
	public boolean contains(String s) {
12
		return fList.contains(s);
13
	}
14
15
	public int getLength() {
16
		return fList.size();
17
	}
18
19
	public String item(int i) {
20
	       try
21
	        {
22
	            return (String)fList.elementAt(i);
23
	        }
24
	        catch(ArrayIndexOutOfBoundsException arrayindexoutofboundsexception)
25
	        {
26
	            return null;
27
	        }
28
	}
29
30
}
(-)I:/Workspaces/lib.plugins/org.apache.xindice/src/org/apache/xindice/xml/dom/DOMConfigurationImpl.java (+29 lines)
Line 0 Link Here
1
package org.apache.xindice.xml.dom;
2
3
import org.w3c.dom.DOMConfiguration;
4
import org.w3c.dom.DOMException;
5
import org.w3c.dom.DOMStringList;
6
7
public class DOMConfigurationImpl implements DOMConfiguration {
8
9
	
10
	public boolean canSetParameter(String s, Object obj) {
11
		return false;
12
	}
13
14
	public Object getParameter(String s) throws DOMException {
15
		// TODO Auto-generated method stub
16
		return null;
17
	}
18
19
	public DOMStringList getParameterNames() {
20
		// TODO Auto-generated method stub
21
		return null;
22
	}
23
24
	public void setParameter(String s, Object obj) throws DOMException {
25
		// TODO Auto-generated method stub
26
27
	}
28
29
}
(-)I:/Workspaces/lib.plugins/org.apache.xindice/src/org/apache/xindice/xml/dom/AttrImpl.java (-2 / +48 lines)
Lines 22-38 Link Here
22
import org.w3c.dom.DOMException;
22
import org.w3c.dom.DOMException;
23
import org.w3c.dom.Element;
23
import org.w3c.dom.Element;
24
import org.w3c.dom.Node;
24
import org.w3c.dom.Node;
25
import org.w3c.dom.TypeInfo;
26
import org.w3c.dom.UserDataHandler;
25
27
26
/**
28
/**
27
 * AttrImpl
29
 * AttrImpl
28
 *
30
 *
29
 * @version CVS $Revision$, $Date$
31
 * @version CVS $Revision$, $Date$
30
 */
32
 */
31
public final class AttrImpl extends ContainerNodeImpl implements Attr {
33
public final class AttrImpl extends ContainerNodeImpl implements Attr, TypeInfo {
32
34
33
    private boolean specified = true;
35
	private boolean specified = true;
34
    private short symbolID = -1;
36
    private short symbolID = -1;
37
    
38
    protected String typeName;
39
    
40
    protected Object type;
41
    
42
    /** DTD namespace. **/
43
    static final String DTD_URI = "http://www.w3.org/TR/REC-xml";
35
44
45
46
	public String getTypeName() {
47
		return (String) typeName;
48
	}
49
50
	public String getTypeNamespace() {
51
		return DTD_URI;
52
	}
53
54
	public boolean isDerivedFrom(String s, String s1, int i) {
55
		return false;
56
	}
57
58
    
59
36
    public AttrImpl() {
60
    public AttrImpl() {
37
    }
61
    }
38
62
Lines 164-167 Link Here
164
            return null;
188
            return null;
165
        }
189
        }
166
    }
190
    }
191
192
	public TypeInfo getSchemaTypeInfo() {
193
		return this;
194
	}
195
196
	public boolean isId() {
197
		// TODO Auto-generated method stub
198
		return false;
199
	}
200
201
	public void setTypeName(String typeName) {
202
		this.typeName = typeName;
203
	}
204
205
	public Object getType() {
206
		return type;
207
	}
208
209
	public void setType(Object type) {
210
		this.type = type;
211
		this.typeName = type.toString();
212
	}
167
}
213
}
(-)I:/Workspaces/lib.plugins/org.apache.xindice/src/org/apache/xindice/xml/dom/EntityImpl.java (-1 / +16 lines)
Lines 27-33 Link Here
27
 * @version CVS $Revision$, $Date$
27
 * @version CVS $Revision$, $Date$
28
 */
28
 */
29
public final class EntityImpl extends NodeImpl implements Entity {
29
public final class EntityImpl extends NodeImpl implements Entity {
30
    private String encoding = null;
30
    public String getInputEncoding() {
31
		// TODO Auto-generated method stub
32
		return null;
33
	}
34
35
	public String getXmlEncoding() {
36
		// TODO Auto-generated method stub
37
		return null;
38
	}
39
40
	public String getXmlVersion() {
41
		// TODO Auto-generated method stub
42
		return null;
43
	}
44
45
	private String encoding = null;
31
    private String version = null;
46
    private String version = null;
32
47
33
    public EntityImpl() {
48
    public EntityImpl() {
(-)I:/Workspaces/lib.plugins/org.apache.xindice/src/org/apache/xindice/xml/jaxp/DocumentBuilderFactoryImpl.java (-1 / +16 lines)
Lines 18-27 Link Here
18
18
19
package org.apache.xindice.xml.jaxp;
19
package org.apache.xindice.xml.jaxp;
20
20
21
import javax.xml.XMLConstants;
21
import javax.xml.parsers.DocumentBuilder;
22
import javax.xml.parsers.DocumentBuilder;
22
import javax.xml.parsers.DocumentBuilderFactory;
23
import javax.xml.parsers.DocumentBuilderFactory;
23
import javax.xml.parsers.ParserConfigurationException;
24
import javax.xml.parsers.ParserConfigurationException;
25
26
24
import java.util.HashMap;
27
import java.util.HashMap;
28
25
import java.util.Map;
29
import java.util.Map;
26
30
27
/**
31
/**
Lines 30-37 Link Here
30
 * @version CVS $Revision$, $Date$
34
 * @version CVS $Revision$, $Date$
31
 */
35
 */
32
public class DocumentBuilderFactoryImpl extends DocumentBuilderFactory {
36
public class DocumentBuilderFactoryImpl extends DocumentBuilderFactory {
33
    private Map attrs = new HashMap();
37
	private Map attrs = new HashMap();
38
    @Override
39
	public boolean getFeature(String s) throws ParserConfigurationException {
40
    	throw new ParserConfigurationException("SAXParser implementation static");
41
	}
34
42
43
	@Override
44
	public void setFeature(String s, boolean flag) throws ParserConfigurationException {
45
				
46
	}
47
48
49
35
    public void setAttribute(String name, Object value) {
50
    public void setAttribute(String name, Object value) {
36
        attrs.put(name, value);
51
        attrs.put(name, value);
37
    }
52
    }
(-)I:/Workspaces/lib.plugins/org.apache.xindice/src/org/apache/xindice/core/Collection.java (-3 / +8 lines)
Lines 565-573 Link Here
565
        }
565
        }
566
566
567
        if (!(entry instanceof Document)) {
567
        if (!(entry instanceof Document)) {
568
            throw new DBException(FaultCodes.COL_INVALID_RESULT,
568
            if (log.isErrorEnabled()) {
569
                                  "Resource '" + key + "' in collection '" +
569
            	log.error("FaultCode: FaultCodes.COL_INVALID_RESULT - \tMessage: Resource '" + key + "' in collection '" + getCanonicalName() + "' is not a document");
570
                                  getCanonicalName() + "' is not a document");
570
            }
571
            if(log.isDebugEnabled()){
572
                log.debug("Message",
573
                    	new DBException(FaultCodes.COL_INVALID_RESULT,"Resource '" + key + "' in collection '" + getCanonicalName() + "' is not a document"));
574
            }
575
            return null;
571
        }
576
        }
572
577
573
        return (Document) entry;
578
        return (Document) entry;

Return to bug 40701