131
131
*/
132
132
public class RpcConnection implements RpcAPI {
133
133
134
- private final static Logger LOG = LogManager .getLogger (RpcConnection .class );
134
+ private static final Logger LOG = LogManager .getLogger (RpcConnection .class );
135
135
136
- public final static int MAX_DOWNLOAD_CHUNK_SIZE = 1024 * 1024 ; // 1 MB
137
- private final static Charset DEFAULT_ENCODING = StandardCharsets .UTF_8 ;
136
+ public static final int MAX_DOWNLOAD_CHUNK_SIZE = 1024 * 1024 ; // 1 MB
137
+ private static final Charset DEFAULT_ENCODING = StandardCharsets .UTF_8 ;
138
+ private static final String EXIST_RESULT_XMLNS_EXIST = "<exist:result xmlns:exist=\" " ;
138
139
139
140
private final XmldbRequestProcessorFactory factory ;
140
141
private final ContentFilePool filePool ;
@@ -1608,7 +1609,7 @@ protected String printAll(final DBBroker broker, final Sequence resultSet, int h
1608
1609
if (opt == null || opt .equalsIgnoreCase ("no" )) {
1609
1610
buf .append ("<?xml version=\" 1.0\" ?>\n " );
1610
1611
}
1611
- buf .append ("<exist:result xmlns:exist= \" " ).append (Namespaces .EXIST_NS ).append ("\" " );
1612
+ buf .append (EXIST_RESULT_XMLNS_EXIST ).append (Namespaces .EXIST_NS ).append ("\" " );
1612
1613
buf .append ("hitCount=\" 0\" />" );
1613
1614
return buf .toString ();
1614
1615
}
@@ -1621,7 +1622,7 @@ protected String printAll(final DBBroker broker, final Sequence resultSet, int h
1621
1622
}
1622
1623
1623
1624
final StringWriter writer = new StringWriter ();
1624
- writer .write ("<exist:result xmlns:exist= \" " );
1625
+ writer .write (EXIST_RESULT_XMLNS_EXIST );
1625
1626
writer .write (Namespaces .EXIST_NS );
1626
1627
writer .write ("\" hits=\" " );
1627
1628
writer .write (Integer .toString (resultSet .getItemCount ()));
@@ -1684,7 +1685,7 @@ public String query(final String xpath, final int howmany, final int start,
1684
1685
final QueryResult qr = this .<QueryResult >compileQuery (broker , transaction , source , parameters ).apply (compiled -> doQuery (broker , compiled , null , parameters ));
1685
1686
if (qr == null ) {
1686
1687
return "<?xml version=\" 1.0\" ?>\n "
1687
- + "<exist:result xmlns:exist= \" " + Namespaces .EXIST_NS + "\" "
1688
+ + EXIST_RESULT_XMLNS_EXIST + Namespaces .EXIST_NS + "\" "
1688
1689
+ "hitCount=\" 0\" />" ;
1689
1690
}
1690
1691
try {
@@ -1730,6 +1731,7 @@ public Map<String, Object> queryP(final String xpath, final String documentPath,
1730
1731
* @throws EXistException if an internal error occurs
1731
1732
* @throws PermissionDeniedException If the current user is not allowed to perform this action
1732
1733
*/
1734
+ @ Deprecated
1733
1735
private Map <String , Object > queryP (final String xpath , final XmldbURI docUri ,
1734
1736
final String s_id , final Map <String , Object > parameters ) throws EXistException , PermissionDeniedException {
1735
1737
0 commit comments