| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
package net.sf.saxon.om; |
| 9 |
|
| 10 |
import net.sf.saxon.event.ReceiverOptions; |
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
public abstract class CopyOptions { |
| 16 |
|
| 17 |
public static final int LOCAL_NAMESPACES = 1; |
| 18 |
|
| 19 |
public static final int ALL_NAMESPACES = 2; |
| 20 |
|
| 21 |
public static final int SOME_NAMESPACES = LOCAL_NAMESPACES | ALL_NAMESPACES; |
| 22 |
|
| 23 |
public static final int TYPE_ANNOTATIONS = 4; |
| 24 |
|
| 25 |
public static final int FOR_UPDATE = 8; |
| 26 |
|
| 27 |
public static final int ACCUMULATORS = 16; |
| 28 |
|
| 29 |
public static final int IS_XQUERY = 32; |
| 30 |
|
| 31 |
public static boolean includes(int options, int option) { |
| 32 |
return (options & option) == option; |
| 33 |
} |
| 34 |
|
| 35 |
public static int getStartDocumentProperties(int copyOptions) { |
| 36 |
int properties = 0; |
| 37 |
if (CopyOptions.includes(copyOptions, CopyOptions.FOR_UPDATE)) { |
| 38 |
properties |= ReceiverOptions.MUTABLE_TREE; |
| 39 |
} |
| 40 |
return properties; |
| 41 |
} |
| 42 |
} |
| 43 |
|