@Override protected void exportProperty(String uri, String local, int type, Value[] values) { try { final StringBuilder attribute = new StringBuilder(""); for (Value value : values) { attribute.append(getPropertyTypePrefix(value)); attribute.append(serializeValue(value, type)); attribute.append(","); } final String name = StringUtils.isEmpty(uri) ? ISO9075.encode(serializeKey(uri, local)) : local; final String attributeString = "[" + (values.length == 0 ? "" : attribute.substring(0, attribute.length() - 1)) + "]"; super.addAttribute(uri, name, attributeString); } catch (RepositoryException e) { throw new RuntimeException(e); } }
/** * Maps the given single-valued property to an XML attribute. */ protected void exportProperty(String uri, String local, Value value) throws RepositoryException { // TODO: Serialized names and paths should use XML namespace mappings String attribute = ValueHelper.serialize(value, false); addAttribute(uri, ISO9075.encode(local), attribute); }
/** * Maps the given single-valued property to an XML attribute. */ protected void exportProperty(String uri, String local, Value value) throws RepositoryException { // TODO: Serialized names and paths should use XML namespace mappings String attribute = ValueHelper.serialize(value, false); addAttribute(uri, ISO9075.encode(local), attribute); }
/** * Maps the given single-valued property to an XML attribute. */ protected void exportProperty(String uri, String local, Value value) throws RepositoryException { // TODO: Serialized names and paths should use XML namespace mappings String attribute = ValueHelper.serialize(value, false); addAttribute(uri, ISO9075.encode(local), attribute); }
@Override protected void exportProperty(String uri, String local, Value value) throws RepositoryException { //mgnl:contentNode is the default nodeType, no need to export it, this saves a lot of lines e.g. in the configuration workspace export if (JcrConstants.JCR_PRIMARYTYPE.equals(getXMLName(uri, local)) && NodeTypes.ContentNode.NAME.equals(value.getString())) { return; } final String name = ISO9075.encode(serializeKey(uri, local)); final String attribute = serializeValue(value, value.getType()); final String propertyType = getPropertyTypePrefix(value); super.addAttribute(uri, name, propertyType + attribute); }