NameConstants.MIX_CREATED));
bundle.setReferenceable(true);
bundle.setSharedSet(new HashSet<NodeId>(Arrays.asList(
new NodeId(5, 6), new NodeId(7, 8), new NodeId(9, 10))));
PropertyEntry property;
property = new PropertyEntry(
new PropertyId(id, NameConstants.JCR_CREATED));
property.setType(PropertyType.DATE);
property.setMultiValued(false);
Calendar date = Calendar.getInstance();
date.setTimeInMillis(1234567890);
property.setValues(new InternalValue[] { InternalValue.create(date) });
bundle.addProperty(property);
property = new PropertyEntry(
new PropertyId(id, NameConstants.JCR_CREATEDBY));
property.setType(PropertyType.STRING);
property.setMultiValued(false);
property.setValues(
new InternalValue[] { InternalValue.create("test") });
bundle.addProperty(property);
property = new PropertyEntry(
new PropertyId(id, factory.create("", "binary")));
property.setType(PropertyType.BINARY);
property.setMultiValued(false);
property.setValues(new InternalValue[] { InternalValue.create(
new byte[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }) });
bundle.addProperty(property);
property = new PropertyEntry(
new PropertyId(id, factory.create("", "boolean")));
property.setType(PropertyType.BOOLEAN);
property.setMultiValued(true);
property.setValues(new InternalValue[] {
InternalValue.create(true), InternalValue.create(false) });
bundle.addProperty(property);
property = new PropertyEntry(
new PropertyId(id, factory.create("", "date")));
property.setType(PropertyType.DATE);
property.setMultiValued(false);
property.setValues(new InternalValue[] { InternalValue.create(date) });
bundle.addProperty(property);
property = new PropertyEntry(
new PropertyId(id, factory.create("", "decimal")));
property.setType(PropertyType.DECIMAL);
property.setMultiValued(false);
property.setValues(new InternalValue[] {
InternalValue.create(new BigDecimal("1234567890.0987654321")) });
bundle.addProperty(property);
property = new PropertyEntry(
new PropertyId(id, factory.create("", "double")));
property.setType(PropertyType.DOUBLE);
property.setMultiValued(true);
property.setValues(new InternalValue[] {
InternalValue.create(1.0), InternalValue.create(Math.PI) });
bundle.addProperty(property);
property = new PropertyEntry(
new PropertyId(id, factory.create("", "long")));
property.setType(PropertyType.LONG);
property.setMultiValued(false);
property.setValues(new InternalValue[] {
InternalValue.create(1234567890) });
bundle.addProperty(property);
property = new PropertyEntry(
new PropertyId(id, factory.create("", "name")));
property.setType(PropertyType.NAME);
property.setMultiValued(false);
property.setValues(new InternalValue[] {
InternalValue.create(NameConstants.JCR_MIMETYPE) });
bundle.addProperty(property);
property = new PropertyEntry(
new PropertyId(id, factory.create("", "path")));
property.setType(PropertyType.PATH);
property.setMultiValued(true);
PathFactory pathFactory = PathFactoryImpl.getInstance();
Path root = pathFactory.getRootPath();
Path path = pathFactory.create(root, NameConstants.JCR_SYSTEM, false);
property.setValues(new InternalValue[] {
InternalValue.create(root), InternalValue.create(path) });
bundle.addProperty(property);
property = new PropertyEntry(
new PropertyId(id, factory.create("", "reference")));
property.setType(PropertyType.REFERENCE);
property.setMultiValued(false);
property.setValues(new InternalValue[] {
InternalValue.create(new NodeId(11, 12)) });
bundle.addProperty(property);
property = new PropertyEntry(
new PropertyId(id, factory.create("", "string")));
property.setType(PropertyType.STRING);
property.setMultiValued(false);
property.setValues(new InternalValue[] {
InternalValue.create("test") });
bundle.addProperty(property);
property = new PropertyEntry(
new PropertyId(id, factory.create("", "uri")));
property.setType(PropertyType.URI);
property.setMultiValued(false);
property.setValues(new InternalValue[] {
InternalValue.create(new URI("http://jackrabbit.apache.org/")) });
bundle.addProperty(property);
property = new PropertyEntry(
new PropertyId(id, factory.create("", "weakreference")));
property.setType(PropertyType.WEAKREFERENCE);
property.setMultiValued(false);
property.setValues(new InternalValue[] {
InternalValue.create(new NodeId(13, 14), true) });
bundle.addProperty(property);
bundle.addChildNodeEntry(
NameConstants.JCR_SYSTEM, new NodeId(15, 16));