Author: desruisseaux Date: Mon Dec 3 15:19:48 2012 New Revision: 1416558 URL: http://svn.apache.org/viewvc?rev=1416558&view=rev Log: Renamed ObjectResolver as ReferenceResolver as suggested on the mailing list.
Added: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/xml/ReferenceResolver.java - copied, changed from r1416188, sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/xml/ObjectResolver.java Removed: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/xml/ObjectResolver.java Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/xml/IdentifiedObject.java sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/xml/NilObject.java sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/xml/XLink.java Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/xml/IdentifiedObject.java URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/xml/IdentifiedObject.java?rev=1416558&r1=1416557&r2=1416558&view=diff ============================================================================== --- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/xml/IdentifiedObject.java (original) +++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/xml/IdentifiedObject.java Mon Dec 3 15:19:48 2012 @@ -65,7 +65,7 @@ import org.opengis.metadata.citation.Cit * * @see IdentifierSpace * @see org.apache.sis.metadata.iso.MetadataEntity - * @see ObjectLinker#newIdentifiedObject(Class, Identifier[]) + * @see ReferenceResolver#newIdentifiedObject(MarshalContext, Class, Identifier[]) */ public interface IdentifiedObject { /** Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/xml/NilObject.java URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/xml/NilObject.java?rev=1416558&r1=1416557&r2=1416558&view=diff ============================================================================== --- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/xml/NilObject.java (original) +++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/xml/NilObject.java Mon Dec 3 15:19:48 2012 @@ -74,7 +74,7 @@ package org.apache.sis.xml; * @module * * @see NilReason#createNilObject(Class) - * @see ObjectLinker#resolve(Class, NilReason) + * @see ReferenceResolver#resolve(MarshalContext, Class, NilReason) * @see org.apache.sis.util.Numbers#valueOfNil(Class) */ public interface NilObject { Copied: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/xml/ReferenceResolver.java (from r1416188, sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/xml/ObjectResolver.java) URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/xml/ReferenceResolver.java?p2=sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/xml/ReferenceResolver.java&p1=sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/xml/ObjectResolver.java&r1=1416188&r2=1416558&rev=1416558&view=diff ============================================================================== --- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/xml/ObjectResolver.java (original) +++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/xml/ReferenceResolver.java Mon Dec 3 15:19:48 2012 @@ -33,25 +33,26 @@ import static org.apache.sis.util.Argume * At unmarshalling time, this class replaces (if possible) a reference by the full object definition. * * <p>Subclasses can override the methods defined in this class in order to search in their - * own catalog. See the {@link XML#LINKER} javadoc for an example of registering a custom - * {@code ObjectResolver} to a unmarshaller.</p> + * own catalog. See the {@link XML#RESOLVER} javadoc for an example of registering a custom + * {@code ReferenceResolver} to a unmarshaller.</p> * * @author Martin Desruisseaux (Geomatys) * @since 0.3 (derived from geotk-3.18) * @version 0.3 * @module */ -public class ObjectResolver { +public class ReferenceResolver { /** * The default and thread-safe instance. This instance is used at unmarshalling time - * when no {@code ObjectResolver} was explicitly set by the {@link XML#LINKER} property. + * when no {@code ReferenceResolver} was explicitly set by the {@link XML#RESOLVER} + * property. */ - public static final ObjectResolver DEFAULT = new ObjectResolver(); + public static final ReferenceResolver DEFAULT = new ReferenceResolver(); /** - * Creates a default {@code ObjectResolver}. This constructor is for subclasses only. + * Creates a default {@code ReferenceResolver}. This constructor is for subclasses only. */ - protected ObjectResolver() { + protected ReferenceResolver() { } /** @@ -83,7 +84,7 @@ public class ObjectResolver { if (NilObjectHandler.isIgnoredInterface(type)) { throw new IllegalArgumentException(Errors.format(Errors.Keys.IllegalArgumentValue_2, "type", type)); } - return (T) Proxy.newProxyInstance(ObjectResolver.class.getClassLoader(), + return (T) Proxy.newProxyInstance(ReferenceResolver.class.getClassLoader(), new Class<?>[] {type, IdentifiedObject.class, NilObject.class, LenientComparable.class}, new NilObjectHandler(identifiers)); } @@ -165,7 +166,7 @@ public class ObjectResolver { * @return {@code true} if the marshaller can use the {@code uuidref} attribute * instead than marshalling the given metadata. */ - public <T> boolean canUseReference(final MarshalContext context, final Class<T> type, final T object, final UUID uuid) { + public <T> boolean canSubstituteByReference(final MarshalContext context, final Class<T> type, final T object, final UUID uuid) { return false; } } Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/xml/XLink.java URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/xml/XLink.java?rev=1416558&r1=1416557&r2=1416558&view=diff ============================================================================== --- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/xml/XLink.java (original) +++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/xml/XLink.java Mon Dec 3 15:19:48 2012 @@ -67,9 +67,9 @@ import java.util.Objects; * </table></blockquote> * * When {@code xlink} attributes are found at unmarshalling time instead of an object definition, - * those attributes are given to the {@link ObjectLinker#resolve(Class, XLink)} method. Users can - * override that method in order to fetch an instance in some catalog for the given {@code xlink} - * values. + * those attributes are given to the {@link ReferenceResolver#resolve(MarshalContext, Class, XLink)} + * method. Users can override that method in order to fetch an instance in some catalog for the given + * {@code xlink} values. * * @author Guilhem Legal (Geomatys) * @author Martin Desruisseaux (Geomatys)