You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by st...@apache.org on 2005/04/28 15:07:00 UTC
svn commit: r165135 [3/3] - in /incubator/jackrabbit/trunk/src:
java/org/apache/jackrabbit/core/ java/org/apache/jackrabbit/core/lock/
java/org/apache/jackrabbit/core/nodetype/
java/org/apache/jackrabbit/core/nodetype/virtual/
java/org/apache/jackrabbit/core/nodetype/xml/
java/org/apache/jackrabbit/core/query/
java/org/apache/jackrabbit/core/query/lucene/
java/org/apache/jackrabbit/core/query/sql/
java/org/apache/jackrabbit/core/query/xpath/
java/org/apache/jackrabbit/core/state/
java/org/apache/jackrabbit/core/state/mem/
java/org/apache/jackrabbit/core/state/obj/
java/org/apache/jackrabbit/core/state/xml/
java/org/apache/jackrabbit/core/util/
java/org/apache/jackrabbit/core/util/uuid/
java/org/apache/jackrabbit/core/value/
java/org/apache/jackrabbit/core/version/
java/org/apache/jackrabbit/core/version/persistence/
java/org/apache/jackrabbit/core/virtual/ java/org/apache/jackrabbit/core/xml/
test/org/apache/jackrabbit/core/nodetype/xml/
Propchange: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/ReferenceValue.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/StringValue.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/StringValue.java?rev=165135&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/StringValue.java (added)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/StringValue.java Thu Apr 28 06:06:58 2005
@@ -0,0 +1,79 @@
+/*
+ * Copyright 2004-2005 The Apache Software Foundation or its licensors,
+ * as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.core.value;
+
+import javax.jcr.PropertyType;
+import javax.jcr.ValueFormatException;
+
+/**
+ * A <code>StringValue</code> provides an implementation
+ * of the <code>Value</code> interface representing a string value.
+ */
+public class StringValue extends BaseValue {
+
+ public static final int TYPE = PropertyType.STRING;
+
+ private final String text;
+
+ /**
+ * Constructs a <code>StringValue</code> object representing a string.
+ *
+ * @param text the string this <code>StringValue</code> should represent
+ */
+ public StringValue(String text) {
+ super(TYPE);
+ this.text = text;
+ }
+
+ /**
+ * Indicates whether some other object is "equal to" this one.
+ * <p/>
+ * The result is <code>true</code> if and only if the argument is not
+ * <code>null</code> and is a <code>StringValue</code> object that
+ * represents the same value as this object.
+ *
+ * @param obj the reference object with which to compare.
+ * @return <code>true</code> if this object is the same as the obj
+ * argument; <code>false</code> otherwise.
+ */
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj instanceof StringValue) {
+ StringValue other = (StringValue) obj;
+ if (text == other.text) {
+ return true;
+ } else if (text != null && other.text != null) {
+ return text.equals(other.text);
+ }
+ }
+ return false;
+ }
+
+ //------------------------------------------------------------< BaseValue >
+ /**
+ * {@inheritDoc}
+ */
+ protected String getInternalString() throws ValueFormatException {
+ if (text != null) {
+ return text;
+ } else {
+ throw new ValueFormatException("empty value");
+ }
+ }
+}
Propchange: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/StringValue.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/ValueHelper.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/ValueHelper.java?rev=165135&view=auto
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/ValueHelper.java (added)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/ValueHelper.java Thu Apr 28 06:06:58 2005
@@ -0,0 +1,579 @@
+/*
+ * Copyright 2004-2005 The Apache Software Foundation or its licensors,
+ * as applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.core.value;
+
+import org.apache.jackrabbit.core.IllegalNameException;
+import org.apache.jackrabbit.core.MalformedPathException;
+import org.apache.jackrabbit.core.Path;
+import org.apache.jackrabbit.core.QName;
+import org.apache.jackrabbit.core.util.Base64;
+import org.apache.jackrabbit.core.util.Text;
+
+import javax.jcr.PropertyType;
+import javax.jcr.RepositoryException;
+import javax.jcr.Value;
+import javax.jcr.ValueFormatException;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
+import java.io.StringWriter;
+import java.io.Writer;
+
+/**
+ * The <code>ValueHelper</code> class provides several <code>Value</code>
+ * related utility methods.
+ */
+public class ValueHelper {
+
+ /**
+ * empty private constructor
+ */
+ private ValueHelper() {
+ }
+
+ /**
+ * @param srcValue
+ * @param targetType
+ * @return
+ * @throws ValueFormatException
+ * @throws IllegalArgumentException
+ */
+ public static Value convert(String srcValue, int targetType)
+ throws ValueFormatException, IllegalArgumentException {
+ if (srcValue == null) {
+ return null;
+ } else {
+ return convert(new StringValue(srcValue), targetType);
+ }
+ }
+
+ /**
+ * @param srcValues
+ * @param targetType
+ * @return
+ * @throws ValueFormatException
+ * @throws IllegalArgumentException
+ */
+ public static Value[] convert(String[] srcValues, int targetType)
+ throws ValueFormatException, IllegalArgumentException {
+ if (srcValues == null) {
+ return null;
+ }
+ Value[] newValues = new Value[srcValues.length];
+ for (int i = 0; i < srcValues.length; i++) {
+ newValues[i] = convert(srcValues[i], targetType);
+ }
+ return newValues;
+ }
+
+ /**
+ * @param srcValues
+ * @param targetType
+ * @return
+ * @throws ValueFormatException
+ * @throws IllegalArgumentException
+ */
+ public static Value[] convert(Value[] srcValues, int targetType)
+ throws ValueFormatException, IllegalArgumentException {
+ if (srcValues == null) {
+ return null;
+ }
+
+ Value[] newValues = new Value[srcValues.length];
+ int srcValueType = PropertyType.UNDEFINED;
+ for (int i = 0; i < srcValues.length; i++) {
+ if (srcValues[i] == null) {
+ newValues[i] = null;
+ continue;
+ }
+ // check type of values
+ if (srcValueType == PropertyType.UNDEFINED) {
+ srcValueType = srcValues[i].getType();
+ } else if (srcValueType != srcValues[i].getType()) {
+ // inhomogeneous types
+ String msg = "inhomogeneous type of values";
+ throw new ValueFormatException(msg);
+ }
+
+ newValues[i] = convert(srcValues[i], targetType);
+ }
+ return newValues;
+ }
+
+ /**
+ * @param srcValue
+ * @param targetType
+ * @return
+ * @throws ValueFormatException
+ * @throws IllegalStateException
+ * @throws IllegalArgumentException
+ */
+ public static Value convert(Value srcValue, int targetType)
+ throws ValueFormatException, IllegalStateException,
+ IllegalArgumentException {
+ if (srcValue == null) {
+ return null;
+ }
+
+ Value val;
+ int srcType = srcValue.getType();
+
+ if (srcType == targetType) {
+ // no conversion needed, return original value
+ return srcValue;
+ }
+
+ switch (targetType) {
+ case PropertyType.STRING:
+ // convert to STRING
+ try {
+ val = new StringValue(srcValue.getString());
+ } catch (RepositoryException re) {
+ throw new ValueFormatException("conversion failed: "
+ + PropertyType.nameFromValue(srcType) + " to "
+ + PropertyType.nameFromValue(targetType), re);
+ }
+ break;
+
+ case PropertyType.BINARY:
+ // convert to BINARY
+ try {
+ val = new BinaryValue(srcValue.getStream());
+ } catch (RepositoryException re) {
+ throw new ValueFormatException("conversion failed: "
+ + PropertyType.nameFromValue(srcType) + " to "
+ + PropertyType.nameFromValue(targetType), re);
+ }
+ break;
+
+ case PropertyType.BOOLEAN:
+ // convert to BOOLEAN
+ try {
+ val = new BooleanValue(srcValue.getBoolean());
+ } catch (RepositoryException re) {
+ throw new ValueFormatException("conversion failed: "
+ + PropertyType.nameFromValue(srcType) + " to "
+ + PropertyType.nameFromValue(targetType), re);
+ }
+ break;
+
+ case PropertyType.DATE:
+ // convert to DATE
+ try {
+ val = new DateValue(srcValue.getDate());
+ } catch (RepositoryException re) {
+ throw new ValueFormatException("conversion failed: "
+ + PropertyType.nameFromValue(srcType) + " to "
+ + PropertyType.nameFromValue(targetType), re);
+ }
+ break;
+
+ case PropertyType.DOUBLE:
+ // convert to DOUBLE
+ try {
+ val = new DoubleValue(srcValue.getDouble());
+ } catch (RepositoryException re) {
+ throw new ValueFormatException("conversion failed: "
+ + PropertyType.nameFromValue(srcType) + " to "
+ + PropertyType.nameFromValue(targetType), re);
+ }
+ break;
+
+ case PropertyType.LONG:
+ // convert to LONG
+ try {
+ val = new LongValue(srcValue.getLong());
+ } catch (RepositoryException re) {
+ throw new ValueFormatException("conversion failed: "
+ + PropertyType.nameFromValue(srcType) + " to "
+ + PropertyType.nameFromValue(targetType), re);
+ }
+ break;
+
+ case PropertyType.PATH:
+ // convert to PATH
+ switch (srcType) {
+ case PropertyType.PATH:
+ // no conversion needed, return original value
+ // (redundant code, just here for the sake of clarity)
+ return srcValue;
+
+ case PropertyType.BINARY:
+ case PropertyType.STRING:
+ case PropertyType.NAME: // a name is always also a relative path
+ // try conversion via string
+ String path;
+ try {
+ // get string value
+ path = srcValue.getString();
+ } catch (RepositoryException re) {
+ // should never happen
+ throw new ValueFormatException("failed to convert source value to PATH value",
+ re);
+ }
+ try {
+ // check path format
+ Path.checkFormat(path);
+ } catch (MalformedPathException mpe) {
+ throw new ValueFormatException("source value " + path
+ + " does not represent a valid path", mpe);
+ }
+ val = PathValue.valueOf(path);
+ break;
+
+ case PropertyType.BOOLEAN:
+ case PropertyType.DATE:
+ case PropertyType.DOUBLE:
+ case PropertyType.LONG:
+ case PropertyType.REFERENCE:
+ throw new ValueFormatException("conversion failed: "
+ + PropertyType.nameFromValue(srcType) + " to "
+ + PropertyType.nameFromValue(targetType));
+
+ default:
+ throw new IllegalArgumentException("not a valid type constant: " + srcType);
+ }
+ break;
+
+ case PropertyType.NAME:
+ // convert to NAME
+ switch (srcType) {
+ case PropertyType.NAME:
+ // no conversion needed, return original value
+ // (redundant code, just here for the sake of clarity)
+ return srcValue;
+
+ case PropertyType.BINARY:
+ case PropertyType.STRING:
+ case PropertyType.PATH: // path might be a name (relative path of length 1)
+ // try conversion via string
+ String name;
+ try {
+ // get string value
+ name = srcValue.getString();
+ } catch (RepositoryException re) {
+ // should never happen
+ throw new ValueFormatException("failed to convert source value to NAME value",
+ re);
+ }
+ try {
+ // check name format
+ QName.checkFormat(name);
+ } catch (IllegalNameException ine) {
+ throw new ValueFormatException("source value "
+ + name
+ + " does not represent a valid name", ine);
+ }
+ val = NameValue.valueOf(name);
+ break;
+
+ case PropertyType.BOOLEAN:
+ case PropertyType.DATE:
+ case PropertyType.DOUBLE:
+ case PropertyType.LONG:
+ case PropertyType.REFERENCE:
+ throw new ValueFormatException("conversion failed: "
+ + PropertyType.nameFromValue(srcType) + " to "
+ + PropertyType.nameFromValue(targetType));
+
+ default:
+ throw new IllegalArgumentException("not a valid type constant: " + srcType);
+ }
+ break;
+
+ case PropertyType.REFERENCE:
+ // convert to REFERENCE
+ switch (srcType) {
+ case PropertyType.REFERENCE:
+ // no conversion needed, return original value
+ // (redundant code, just here for the sake of clarity)
+ return srcValue;
+
+ case PropertyType.BINARY:
+ case PropertyType.STRING:
+ // try conversion via string
+ String uuid;
+ try {
+ // get string value
+ uuid = srcValue.getString();
+ } catch (RepositoryException re) {
+ // should never happen
+ throw new ValueFormatException("failed to convert source value to REFERENCE value",
+ re);
+ }
+ val = ReferenceValue.valueOf(uuid);
+ break;
+
+ case PropertyType.BOOLEAN:
+ case PropertyType.DATE:
+ case PropertyType.DOUBLE:
+ case PropertyType.LONG:
+ case PropertyType.PATH:
+ case PropertyType.NAME:
+ throw new ValueFormatException("conversion failed: "
+ + PropertyType.nameFromValue(srcType) + " to "
+ + PropertyType.nameFromValue(targetType));
+
+ default:
+ throw new IllegalArgumentException("not a valid type constant: " + srcType);
+ }
+ break;
+
+ default:
+ throw new IllegalArgumentException("not a valid type constant: " + targetType);
+ }
+
+ return val;
+ }
+
+ /**
+ * @param srcValue
+ * @return
+ * @throws IllegalStateException
+ */
+ public static Value copy(Value srcValue) throws IllegalStateException {
+ if (srcValue == null) {
+ return null;
+ }
+
+ Value newVal = null;
+ try {
+ switch (srcValue.getType()) {
+ case PropertyType.BINARY:
+ newVal = new BinaryValue(srcValue.getStream());
+ break;
+
+ case PropertyType.BOOLEAN:
+ newVal = new BooleanValue(srcValue.getBoolean());
+ break;
+
+ case PropertyType.DATE:
+ newVal = new DateValue(srcValue.getDate());
+ break;
+
+ case PropertyType.DOUBLE:
+ newVal = new DoubleValue(srcValue.getDouble());
+ break;
+
+ case PropertyType.LONG:
+ newVal = new LongValue(srcValue.getLong());
+ break;
+
+ case PropertyType.PATH:
+ newVal = PathValue.valueOf(srcValue.getString());
+ break;
+
+ case PropertyType.NAME:
+ newVal = NameValue.valueOf(srcValue.getString());
+ break;
+
+ case PropertyType.REFERENCE:
+ newVal = ReferenceValue.valueOf(srcValue.getString());
+ break;
+
+ case PropertyType.STRING:
+ newVal = new StringValue(srcValue.getString());
+ break;
+ }
+ } catch (RepositoryException re) {
+ // should never get here
+ }
+ return newVal;
+ }
+
+ /**
+ * @param srcValues
+ * @return
+ * @throws IllegalStateException
+ */
+ public static Value[] copy(Value[] srcValues) throws IllegalStateException {
+ if (srcValues == null) {
+ return null;
+ }
+
+ Value[] newValues = new Value[srcValues.length];
+ for (int i = 0; i < srcValues.length; i++) {
+ newValues[i] = copy(srcValues[i]);
+ }
+ return newValues;
+ }
+
+ /**
+ * Serializes the given value to a <code>String</code>. The serialization
+ * format is the same as used by Document & System View XML, i.e.
+ * binary values will be Base64-encoded whereas for all others
+ * <code>{@link javax.jcr.Value#getString()}</code> will be used.
+ *
+ * @param value the value to be serialized
+ * @param encodeBlanks if <code>true</code> space characters will be encoded
+ * as <code>"_x0020_"</code> within he output string.
+ * @return a string representation of the given value.
+ * @throws IllegalStateException if the given value is in an illegal state
+ * @throws RepositoryException if an error occured during the serialization.
+ */
+ public static String serialize(Value value, boolean encodeBlanks)
+ throws IllegalStateException, RepositoryException {
+ StringWriter writer = new StringWriter();
+ try {
+ serialize(value, encodeBlanks, writer);
+ } catch (IOException ioe) {
+ throw new RepositoryException("failed to serialize value",
+ ioe);
+ }
+ return writer.toString();
+ }
+
+ /**
+ * Outputs the serialized value to a <code>Writer</code>. The serialization
+ * format is the same as used by Document & System View XML, i.e.
+ * binary values will be Base64-encoded whereas for all others
+ * <code>{@link javax.jcr.Value#getString()}</code> will be used for
+ * serialization.
+ *
+ * @param value the value to be serialized
+ * @param encodeBlanks if <code>true</code> space characters will be encoded
+ * as <code>"_x0020_"</code> within he output string.
+ * @param writer writer to output the encoded data
+ * @throws IllegalStateException if the given value is in an illegal state
+ * @throws IOException if an i/o error occured during the
+ * serialization
+ * @throws RepositoryException if an error occured during the serialization.
+ */
+ public static void serialize(Value value, boolean encodeBlanks,
+ Writer writer)
+ throws IllegalStateException, IOException, RepositoryException {
+ if (value.getType() == PropertyType.BINARY) {
+ // binary data, base64 encoding required;
+ // the encodeBlanks flag can be ignored since base64-encoded
+ // data cannot contain space characters
+ InputStream in = value.getStream();
+ try {
+ Base64.encode(in, writer);
+ // no need to close StringWriter
+ //writer.close();
+ } finally {
+ try {
+ in.close();
+ } catch (IOException e) {
+ // ignore
+ }
+ }
+ } else {
+ String textVal = value.getString();
+ if (encodeBlanks) {
+ // enocde blanks in string
+ textVal = Text.replace(textVal, " ", "_x0020_");
+ }
+ writer.write(textVal);
+ }
+ }
+
+ /**
+ * Deserializes the given string to a <code>Value</code> of the given type.
+ *
+ * @param value string to be deserialized
+ * @param type type of value
+ * @param decodeBlanks if <code>true</code> <code>"_x0020_"</code>
+ * character sequences will be decoded to single space
+ * characters each.
+ * @return the deserialized <code>Value</code>
+ * @throws ValueFormatException if the string data is not of the required
+ * format
+ * @throws RepositoryException if an error occured during the
+ * deserialization.
+ */
+ public static Value deserialize(String value, int type,
+ boolean decodeBlanks)
+ throws ValueFormatException, RepositoryException {
+ if (type == PropertyType.BINARY) {
+ // base64 encoded binary value;
+ // the encodeBlanks flag can be ignored since base64-encoded
+ // data cannot contain encoded space characters
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ try {
+ Base64.decode(value, baos);
+ // no need to close ByteArrayOutputStream
+ //baos.close();
+ } catch (IOException ioe) {
+ throw new RepositoryException("failed to decode binary value",
+ ioe);
+ }
+ return new BinaryValue(baos.toByteArray());
+ } else {
+ if (decodeBlanks) {
+ // decode encoded blanks in value
+ value = Text.replace(value, "_x0020_", " ");
+ }
+ return convert(value, type);
+ }
+ }
+
+ /**
+ * Deserializes the string data read from the given reader to a
+ * <code>Value</code> of the given type.
+ *
+ * @param reader reader for the string data to be deserialized
+ * @param type type of value
+ * @param decodeBlanks if <code>true</code> <code>"_x0020_"</code>
+ * character sequences will be decoded to single space
+ * characters each.
+ * @return the deserialized <code>Value</code>
+ * @throws IOException if an i/o error occured during the
+ * serialization
+ * @throws ValueFormatException if the string data is not of the required
+ * format
+ * @throws RepositoryException if an error occured during the
+ * deserialization.
+ */
+ public static Value deserialize(Reader reader, int type,
+ boolean decodeBlanks)
+ throws IOException, ValueFormatException, RepositoryException {
+ if (type == PropertyType.BINARY) {
+ // base64 encoded binary value;
+ // the encodeBlanks flag can be ignored since base64-encoded
+ // data cannot contain encoded space characters
+/*
+ // @todo decode to temp file and pass FileInputStream to BinaryValue constructor
+ File tmpFile = File.createTempFile("bin", null);
+ FileOutputStream out = new FileOutputStream(tmpFile);
+ tmpFile.deleteOnExit();
+ Base64.decode(reader, out);
+ out.close();
+ return new BinaryValue(new FileInputStream(tmpFile));
+*/
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ Base64.decode(reader, baos);
+ // no need to close ByteArrayOutputStream
+ //baos.close();
+ return new BinaryValue(baos.toByteArray());
+ } else {
+ char[] chunk = new char[8192];
+ int read;
+ StringBuffer buf = new StringBuffer();
+ while ((read = reader.read(chunk)) > -1) {
+ buf.append(chunk, 0, read);
+ }
+ String value = buf.toString();
+ if (decodeBlanks) {
+ // decode encoded blanks in value
+ value = Text.replace(value, "_x0020_", " ");
+ }
+ return convert(value, type);
+ }
+ }
+}
Propchange: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/ValueHelper.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionHistoryNodeState.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionHistoryNodeState.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionHistoryNodeState.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionHistoryNodeState.java Thu Apr 28 06:06:58 2005
@@ -17,8 +17,9 @@
package org.apache.jackrabbit.core.version;
import org.apache.jackrabbit.core.Constants;
-import org.apache.jackrabbit.core.InternalValue;
+import org.apache.jackrabbit.core.value.InternalValue;
import org.apache.jackrabbit.core.QName;
+import org.apache.jackrabbit.core.value.InternalValue;
import org.apache.jackrabbit.core.virtual.VirtualNodeState;
import javax.jcr.RepositoryException;
Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionItemStateProvider.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionItemStateProvider.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionItemStateProvider.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionItemStateProvider.java Thu Apr 28 06:06:58 2005
@@ -16,9 +16,10 @@
*/
package org.apache.jackrabbit.core.version;
-import org.apache.jackrabbit.core.InternalValue;
+import org.apache.jackrabbit.core.value.InternalValue;
import org.apache.jackrabbit.core.NodeId;
import org.apache.jackrabbit.core.PropertyId;
+import org.apache.jackrabbit.core.value.InternalValue;
import org.apache.jackrabbit.core.nodetype.NodeDefId;
import org.apache.jackrabbit.core.nodetype.NodeTypeRegistry;
import org.apache.jackrabbit.core.state.ItemStateException;
Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionLabelsNodeState.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionLabelsNodeState.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionLabelsNodeState.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionLabelsNodeState.java Thu Apr 28 06:06:58 2005
@@ -17,7 +17,7 @@
package org.apache.jackrabbit.core.version;
import org.apache.jackrabbit.core.Constants;
-import org.apache.jackrabbit.core.InternalValue;
+import org.apache.jackrabbit.core.value.InternalValue;
import org.apache.jackrabbit.core.QName;
import org.apache.jackrabbit.core.state.NoSuchItemStateException;
import org.apache.jackrabbit.core.util.uuid.UUID;
Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionNodeState.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionNodeState.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionNodeState.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionNodeState.java Thu Apr 28 06:06:58 2005
@@ -16,8 +16,9 @@
*/
package org.apache.jackrabbit.core.version;
-import org.apache.jackrabbit.core.InternalValue;
+import org.apache.jackrabbit.core.value.InternalValue;
import org.apache.jackrabbit.core.QName;
+import org.apache.jackrabbit.core.value.InternalValue;
import org.apache.jackrabbit.core.util.uuid.UUID;
import org.apache.jackrabbit.core.virtual.VirtualNodeState;
import org.apache.jackrabbit.core.virtual.VirtualPropertyState;
Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/InternalFrozenNodeImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/InternalFrozenNodeImpl.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/InternalFrozenNodeImpl.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/InternalFrozenNodeImpl.java Thu Apr 28 06:06:58 2005
@@ -17,10 +17,11 @@
package org.apache.jackrabbit.core.version.persistence;
import org.apache.jackrabbit.core.Constants;
-import org.apache.jackrabbit.core.InternalValue;
+import org.apache.jackrabbit.core.value.InternalValue;
import org.apache.jackrabbit.core.NodeImpl;
import org.apache.jackrabbit.core.PropertyImpl;
import org.apache.jackrabbit.core.QName;
+import org.apache.jackrabbit.core.value.InternalValue;
import org.apache.jackrabbit.core.nodetype.NodeTypeImpl;
import org.apache.jackrabbit.core.state.ItemStateException;
import org.apache.jackrabbit.core.state.NodeState;
Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/InternalVersionHistoryImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/InternalVersionHistoryImpl.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/InternalVersionHistoryImpl.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/InternalVersionHistoryImpl.java Thu Apr 28 06:06:58 2005
@@ -17,12 +17,12 @@
package org.apache.jackrabbit.core.version.persistence;
import org.apache.jackrabbit.core.Constants;
-import org.apache.jackrabbit.core.InternalValue;
import org.apache.jackrabbit.core.NodeImpl;
import org.apache.jackrabbit.core.QName;
import org.apache.jackrabbit.core.state.ItemStateException;
import org.apache.jackrabbit.core.state.UpdatableItemStateManager;
import org.apache.jackrabbit.core.util.uuid.UUID;
+import org.apache.jackrabbit.core.value.InternalValue;
import org.apache.jackrabbit.core.version.InternalVersion;
import org.apache.jackrabbit.core.version.InternalVersionHistory;
import org.apache.jackrabbit.core.version.InternalVersionItem;
@@ -30,9 +30,9 @@
import org.apache.log4j.Logger;
import javax.jcr.PropertyType;
+import javax.jcr.ReferentialIntegrityException;
import javax.jcr.RepositoryException;
import javax.jcr.Value;
-import javax.jcr.ReferentialIntegrityException;
import javax.jcr.version.VersionException;
import java.util.Calendar;
import java.util.HashMap;
@@ -439,6 +439,7 @@
/**
* Returns the persistent node of this version history
+ *
* @return
*/
protected PersistentNode getNode() {
@@ -454,9 +455,8 @@
* @return
* @throws RepositoryException
*/
- protected static InternalVersionHistoryImpl create(
- PersistentVersionManager vMgr, PersistentNode parent,
- String historyId, QName name, NodeImpl src)
+ protected static InternalVersionHistoryImpl create(PersistentVersionManager vMgr, PersistentNode parent,
+ String historyId, QName name, NodeImpl src)
throws RepositoryException {
// create history node
Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/InternalVersionImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/InternalVersionImpl.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/InternalVersionImpl.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/InternalVersionImpl.java Thu Apr 28 06:06:58 2005
@@ -17,8 +17,9 @@
package org.apache.jackrabbit.core.version.persistence;
import org.apache.jackrabbit.core.Constants;
-import org.apache.jackrabbit.core.InternalValue;
+import org.apache.jackrabbit.core.value.InternalValue;
import org.apache.jackrabbit.core.QName;
+import org.apache.jackrabbit.core.value.InternalValue;
import org.apache.jackrabbit.core.state.NodeState;
import org.apache.jackrabbit.core.util.uuid.UUID;
import org.apache.jackrabbit.core.version.InternalFrozenNode;
Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/PersistentNode.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/PersistentNode.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/PersistentNode.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/PersistentNode.java Thu Apr 28 06:06:58 2005
@@ -15,11 +15,12 @@
*/
package org.apache.jackrabbit.core.version.persistence;
-import org.apache.jackrabbit.core.InternalValue;
+import org.apache.jackrabbit.core.value.InternalValue;
import org.apache.jackrabbit.core.NodeId;
import org.apache.jackrabbit.core.PropertyId;
import org.apache.jackrabbit.core.PropertyImpl;
import org.apache.jackrabbit.core.QName;
+import org.apache.jackrabbit.core.value.InternalValue;
import org.apache.jackrabbit.core.nodetype.NodeDefId;
import org.apache.jackrabbit.core.nodetype.PropDefId;
import org.apache.jackrabbit.core.state.ItemState;
Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/virtual/VirtualNodeState.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/virtual/VirtualNodeState.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/virtual/VirtualNodeState.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/virtual/VirtualNodeState.java Thu Apr 28 06:06:58 2005
@@ -17,8 +17,9 @@
package org.apache.jackrabbit.core.virtual;
import org.apache.jackrabbit.core.Constants;
-import org.apache.jackrabbit.core.InternalValue;
+import org.apache.jackrabbit.core.value.InternalValue;
import org.apache.jackrabbit.core.QName;
+import org.apache.jackrabbit.core.value.InternalValue;
import org.apache.jackrabbit.core.state.ItemState;
import org.apache.jackrabbit.core.state.NoSuchItemStateException;
import org.apache.jackrabbit.core.state.NodeState;
Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/virtual/VirtualPropertyState.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/virtual/VirtualPropertyState.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/virtual/VirtualPropertyState.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/virtual/VirtualPropertyState.java Thu Apr 28 06:06:58 2005
@@ -17,7 +17,8 @@
package org.apache.jackrabbit.core.virtual;
import org.apache.jackrabbit.core.QName;
-import org.apache.jackrabbit.core.InternalValue;
+import org.apache.jackrabbit.core.value.InternalValue;
+import org.apache.jackrabbit.core.value.InternalValue;
import org.apache.jackrabbit.core.state.ItemState;
import org.apache.jackrabbit.core.state.PropertyState;
Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/virtual/VirtualValueProvider.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/virtual/VirtualValueProvider.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/virtual/VirtualValueProvider.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/virtual/VirtualValueProvider.java Thu Apr 28 06:06:58 2005
@@ -16,7 +16,7 @@
*/
package org.apache.jackrabbit.core.virtual;
-import org.apache.jackrabbit.core.InternalValue;
+import org.apache.jackrabbit.core.value.InternalValue;
import org.apache.jackrabbit.core.QName;
/**
Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/DocViewSAXEventGenerator.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/DocViewSAXEventGenerator.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/DocViewSAXEventGenerator.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/DocViewSAXEventGenerator.java Thu Apr 28 06:06:58 2005
@@ -22,7 +22,7 @@
import org.apache.jackrabbit.core.QName;
import org.apache.jackrabbit.core.SessionImpl;
import org.apache.jackrabbit.core.util.ISO9075;
-import org.apache.jackrabbit.core.util.ValueHelper;
+import org.apache.jackrabbit.core.value.ValueHelper;
import org.apache.log4j.Logger;
import org.xml.sax.ContentHandler;
import org.xml.sax.SAXException;
Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/SessionImporter.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/SessionImporter.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/SessionImporter.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/SessionImporter.java Thu Apr 28 06:06:58 2005
@@ -17,7 +17,6 @@
package org.apache.jackrabbit.core.xml;
import org.apache.jackrabbit.core.Constants;
-import org.apache.jackrabbit.core.InternalValue;
import org.apache.jackrabbit.core.NamespaceResolver;
import org.apache.jackrabbit.core.NodeImpl;
import org.apache.jackrabbit.core.QName;
@@ -25,7 +24,9 @@
import org.apache.jackrabbit.core.nodetype.EffectiveNodeType;
import org.apache.jackrabbit.core.nodetype.PropDef;
import org.apache.jackrabbit.core.util.ReferenceChangeTracker;
-import org.apache.jackrabbit.core.util.ValueHelper;
+import org.apache.jackrabbit.core.value.InternalValue;
+import org.apache.jackrabbit.core.value.ReferenceValue;
+import org.apache.jackrabbit.core.value.ValueHelper;
import org.apache.log4j.Logger;
import javax.jcr.ImportUUIDBehavior;
@@ -33,7 +34,6 @@
import javax.jcr.ItemNotFoundException;
import javax.jcr.Property;
import javax.jcr.PropertyType;
-import javax.jcr.ReferenceValue;
import javax.jcr.RepositoryException;
import javax.jcr.Value;
import javax.jcr.ValueFormatException;
Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/SysViewSAXEventGenerator.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/SysViewSAXEventGenerator.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/SysViewSAXEventGenerator.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/SysViewSAXEventGenerator.java Thu Apr 28 06:06:58 2005
@@ -21,7 +21,7 @@
import org.apache.jackrabbit.core.PropertyImpl;
import org.apache.jackrabbit.core.QName;
import org.apache.jackrabbit.core.SessionImpl;
-import org.apache.jackrabbit.core.util.ValueHelper;
+import org.apache.jackrabbit.core.value.ValueHelper;
import org.apache.log4j.Logger;
import org.xml.sax.ContentHandler;
import org.xml.sax.SAXException;
Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/WorkspaceImporter.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/WorkspaceImporter.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/WorkspaceImporter.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/xml/WorkspaceImporter.java Thu Apr 28 06:06:58 2005
@@ -19,7 +19,7 @@
import org.apache.jackrabbit.core.BatchedItemOperations;
import org.apache.jackrabbit.core.Constants;
import org.apache.jackrabbit.core.HierarchyManager;
-import org.apache.jackrabbit.core.InternalValue;
+import org.apache.jackrabbit.core.value.InternalValue;
import org.apache.jackrabbit.core.MalformedPathException;
import org.apache.jackrabbit.core.NamespaceResolver;
import org.apache.jackrabbit.core.NodeId;
@@ -28,6 +28,7 @@
import org.apache.jackrabbit.core.QName;
import org.apache.jackrabbit.core.SessionImpl;
import org.apache.jackrabbit.core.WorkspaceImpl;
+import org.apache.jackrabbit.core.value.InternalValue;
import org.apache.jackrabbit.core.nodetype.EffectiveNodeType;
import org.apache.jackrabbit.core.nodetype.NodeDef;
import org.apache.jackrabbit.core.nodetype.NodeTypeRegistry;
Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/core/nodetype/xml/TestAll.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/core/nodetype/xml/TestAll.java?rev=165135&r1=165134&r2=165135&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/core/nodetype/xml/TestAll.java (original)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/core/nodetype/xml/TestAll.java Thu Apr 28 06:06:58 2005
@@ -31,9 +31,10 @@
import junit.framework.TestCase;
import org.apache.jackrabbit.core.Constants;
-import org.apache.jackrabbit.core.InternalValue;
+import org.apache.jackrabbit.core.value.InternalValue;
import org.apache.jackrabbit.core.NamespaceResolver;
import org.apache.jackrabbit.core.QName;
+import org.apache.jackrabbit.core.value.InternalValue;
import org.apache.jackrabbit.core.nodetype.NodeDef;
import org.apache.jackrabbit.core.nodetype.InvalidNodeTypeDefException;
import org.apache.jackrabbit.core.nodetype.NodeTypeDef;