/** * Request to read the node given by the supplied reference value. * * @param reference the reference property value that is to be resolved into a node * @return the node that is read from the repository * @throws ValueFormatException if the supplied reference could not be converted to an identifier property value */ public Node resolve( Reference reference ) { CheckArg.isNotNull(reference, "reference"); UUID uuid = getContext().getValueFactories().getUuidFactory().create(reference); return getNodeAt(uuid); }
UuidFactory uuidFactory = context.getValueFactories().getUuidFactory(); ValueFactory<Reference> referenceFactory = context.getValueFactories().getReferenceFactory(); for (Map.Entry<UUID, UUID> oldToNew : oldToNewUuids.entrySet()) {
factories.put(PropertyType.WEAKREFERENCE, new Factory<Reference>(valueFactories.getWeakReferenceFactory())); factories.put(PropertyType.URI, new Factory<URI>(valueFactories.getUriFactory())); factories.put(PropertyType.UUID, new Factory<UUID>(valueFactories.getUuidFactory())); factories.put(PropertyType.BINARY, this.binaryFactory); this.typeFactoriesByPropertyType = Collections.unmodifiableMap(factories);
UuidFactory uuidFactory = context.getValueFactories().getUuidFactory(); ValueFactory<Reference> referenceFactory = context.getValueFactories().getReferenceFactory(); for (Map.Entry<UUID, UUID> oldToNew : oldToNewUuids.entrySet()) {
protected UUID getRootNodeUuid() { if (rootUuid == null) { Node root = graph.getNodeAt("/"); rootLocation = root.getLocation(); rootUuid = rootLocation.getUuid(); if (rootUuid == null) { Property uuid = root.getProperty(ModeShapeLexicon.UUID); if (uuid != null) { rootUuid = context.getValueFactories().getUuidFactory().create(uuid.getFirstValue()); } } if (rootUuid == null) { Property uuid = root.getProperty(JcrLexicon.UUID); if (uuid != null) { rootUuid = context.getValueFactories().getUuidFactory().create(uuid.getFirstValue()); } } } return rootUuid; }
uuid = getContext().getValueFactories().getUuidFactory().create(uuidProperty.getFirstValue()); } else { uuidProperty = node.getProperty(JcrLexicon.UUID); if (uuidProperty != null) { uuid = getContext().getValueFactories().getUuidFactory().create(uuidProperty.getFirstValue());
for (Property property : request.properties()) { if (property.getName().equals(ModeShapeLexicon.UUID) || property.getName().equals(JcrLexicon.UUID)) { uuid = getExecutionContext().getValueFactories().getUuidFactory().create(property.getValues().next());
for (Property property : request.properties()) { if (property.getName().equals(ModeShapeLexicon.UUID) || property.getName().equals(JcrLexicon.UUID)) { uuid = getExecutionContext().getValueFactories().getUuidFactory().create(property.getValues().next()); } else { if (property.size() > 0) propsToStore.add(property);