Reference bean.
@author Zhang, Zheng @version 2.0A reference is a Java type (represented as a {@link TypeMirror}) and a set of annotations (represented as a {@link Declaration}). Together they describe a root reference to a JAXB type binding.
Those two values can be supplied independently, or you can use other convenience constructors to supply two values at once. @author Kohsuke Kawaguchi
A reference is a Java type (represented as a {@link TypeMirror}) and a set of annotations (represented as a {@link Declaration}). Together they describe a root reference to a JAXB type binding.
Those two values can be supplied independently, or you can use other convenience constructors to supply two values at once. @author Kohsuke Kawaguchi
The following features are supported:
Reference provides a way of recording address information about objects which themselves are not directly bound to the naming/directory system.
A Reference consists of an ordered list of addresses and class information about the object being referenced. Each address in the list identifies a communications endpoint for the same conceptual object. The "communications endpoint" is information that indicates how to contact the object. It could be, for example, a network address, a location in memory on the local machine, another process on the same machine, etc. The order of the addresses in the list may be of significance to object factories that interpret the reference.
Multiple addresses may arise for various reasons, such as replication or the object offering interfaces over more than one communication mechanism. The addresses are indexed starting with zero.
A Reference also contains information to assist in creating an instance of the object to which this Reference refers. It contains the class name of that object, and the class name and location of the factory to be used to create the object. The class factory location is a space-separated list of URLs representing the class path used to load the factory. When the factory class (or any class or resource upon which it depends) needs to be loaded, each URL is used (in order) to attempt to load the class.
A Reference instance is not synchronized against concurrent access by multiple threads. Threads that need to access a single Reference concurrently should synchronize amongst themselves and provide the necessary locking. @author Rosanna Lee @author Scott Seligman @see RefAddr @see StringRefAddr @see BinaryRefAddr @since 1.3
<element name="Reference" type="ds:ReferenceType"/> <complexType name="ReferenceType"> <sequence> <element ref="ds:Transforms" minOccurs="0"/> <element ref="ds:DigestMethod"/> <element ref="ds:DigestValue"/> </sequence> <attribute name="Id" type="ID" use="optional"/> <attribute name="URI" type="anyURI" use="optional"/> <attribute name="Type" type="anyURI" use="optional"/> </complexType> <element name="DigestValue" type="ds:DigestValueType"/> <simpleType name="DigestValueType"> <restriction base="base64Binary"/> </simpleType>
A Reference
instance may be created by invoking one of the {@link XMLSignatureFactory#newReference newReference} methods of the{@link XMLSignatureFactory} class; for example:
XMLSignatureFactory factory = XMLSignatureFactory.getInstance("DOM"); Reference ref = factory.newReference ("http://www.ietf.org/rfc/rfc3275.txt", factory.newDigestMethod(DigestMethod.SHA1, null));@author Sean Mullan @author Erwin van der Koogh @author JSR 105 Expert Group @see XMLSignatureFactory#newReference(String,DigestMethod) @see XMLSignatureFactory#newReference(String,DigestMethod,List,String,String)
References work with a special half store file type. References know how to write out the reference format in the file system and are what is juggled when references are mixed in with direct store files. The half store file type is used reading the referred to file.
References to store files located over in some other region look like this in the file system 1278437856009925445.3323223323
: i.e. an id followed by hash of the referenced region. Note, a region is itself not splittable if it has instances of store file references. References are cleaned up by compactions.
References work with {@link HalfMapFileReader}. References know how to write out the reference format in the file system and are whats juggled when references are mixed in with direct store files. The {@link HalfMapFileReader} is used reading the referred to file.
References to store files located over in some other region look like this in the file system 1278437856009925445.hbaserepository,qAReLZD-OyQORZWq_vqR1k==,959247014679548184
: i.e. an id followed by the name of the referenced region. The data ('mapfiles') of references are empty. The accompanying info
file contains the midkey
that demarks top and bottom of the referenced storefile, the id of the remote store we're referencing and whether we're to serve the top or bottom region of the remote store file. Note, a region is itself not splitable if it has instances of store file references. References are cleaned up by compactions.
A reference stores the original item reference, and also the item's data store reference, which describes its location within the data store.
Implementations of that interface MUST BE immutable @author Rupert Westenthaler
EncryptedKey
to items encrypted by that key value (EncryptedData
or EncryptedKey
elements). It is defined as follows:
Verify a reference
Element refElem = doc.getElement("Reference"); // PSEUDO Reference ref = new Reference(refElem); String url = ref.getURI(); ref.setData(new XMLSignatureInput(new FileInputStream(url))); if (ref.verify()) { System.out.println("verified"); }
<element name="Reference" type="ds:ReferenceType"/> <complexType name="ReferenceType"> <sequence> <element ref="ds:Transforms" minOccurs="0"/> <element ref="ds:DigestMethod"/> <element ref="ds:DigestValue"/> </sequence> <attribute name="Id" type="ID" use="optional"/> <attribute name="URI" type="anyURI" use="optional"/> <attribute name="Type" type="anyURI" use="optional"/> </complexType>@author Christian Geuer-Pollmann @see ObjectContainer @see Manifest
E.
@author Wilfred Springer
@param < E> The type of environment on which this reference is based.
Purpose: Holds mapping reference info. The info held in this class will be used after unmarshal to resolve 1-1 and 1-M mapping references. This is necessary to ensure that all related objects have been created before attempting to set instance values in related objects.
e.g.&$a, &new MyClass() &foo()
<xs:complexType name="ReferenceType">@author grkvlt@apache.org
Note that this class doesn't encode or decode the reserved characters. It assumes that the URIs or the URI parts passed in are properly encoded using the standard URI encoding mechanism. You can use the static "encode()" and "decode()" methods for this purpose. Note that if an invalid URI character is detected by the constructor or one of the setters, a trace will be logged and the character will be automatically encoded.
The fundamental point to underline is the difference between an URI "reference" and an URI. Contrary to an URI (the target identifier of a REST resource), an URI reference can be relative (with or without query and fragment part). This relative URI reference can then be resolved against a base reference via the getTargetRef() method which will return a new resolved Reference instance, an absolute URI reference with no base reference and with no dot-segments (the path segments "." and "..").
You can also apply the getTargetRef() method on absolute references in order to solve the dot-segments. Note that applying the getRelativeRef() method on an absolute reference returns the current reference relatively to a base reference, if any, and solves the dot-segments.
The Reference stores its data as a single string, the one passed to the constructor. This string can always be obtained using the toString() method. A couple of integer indexes are maintained to improve the extraction time of various reference properties (URI components).
When you modify a specific component of the URI reference, via the setPath() method for example, the internal string is simply regenerated by updating only the relevant part. We try as much as possible to protect the bytes given to the Reference class instead of transparently parsing and normalizing the URI data. Our idea is to protect encodings and special characters in all case and reduce the memory size taken by this class while making Reference instances mutable.
Because the base reference is only a property of the Reference ("baseRef"). When you use the "Reference(base, path)" constructor, it is equivalent to doing:
ref = new Reference(path);
ref.setBaseRef(base);
The base ref is not automatically resolved or "merged" with the rest of the reference information (the path here). For example, this let's you reuse a single reference as the base of several relative references. If you modify the base reference, all relative references are still accurate.
Note that the name and value properties are thread safe, stored in volatile members. @author Jerome Louvel @see RFC 3986Note that this class doesn't encode or decode the reserved characters. It assumes that the URIs or the URI parts passed in are properly encoded using the standard URI encoding mechanism. You can use the static "encode()" and "decode()" methods for this purpose. Note that if an invalid URI character is detected by the constructor or one of the setters, a trace will be logged and the character will be automatically encoded.
The fundamental point to underline is the difference between an URI "reference" and an URI. Contrary to an URI (the target identifier of a REST resource), an URI reference can be relative (with or without query and fragment part). This relative URI reference can then be resolved against a base reference via the getTargetRef() method which will return a new resolved Reference instance, an absolute URI reference with no base reference and with no dot-segments (the path segments "." and "..").
You can also apply the getTargetRef() method on absolute references in order to solve the dot-segments. Note that applying the getRelativeRef() method on an absolute reference returns the current reference relatively to a base reference, if any, and solves the dot-segments.
The Reference stores its data as a single string, the one passed to the constructor. This string can always be obtained using the toString() method. A couple of integer indexes are maintained to improve the extraction time of various reference properties (URI components).
When you modify a specific component of the URI reference, via the setPath() method for example, the internal string is simply regenerated by updating only the relevant part. We try as much as possible to protect the bytes given to the Reference class instead of transparently parsing and normalizing the URI data. Our idea is to protect encodings and special characters in all case and reduce the memory size taken by this class while making Reference instances mutable.
Because the base reference is only a property of the Reference ("baseRef"). When you use the "Reference(base, path)" constructor, it is equivalent to doing:
ref = new Reference(path);
ref.setBaseRef(base);
The base ref is not automatically resolved or "merged" with the rest of the reference information (the path here). For example, this let's you reuse a single reference as the base of several relative references. If you modify the base reference, all relative references are still accurate.
Note that the name and value properties are thread safe, stored in volatile members. @author Jerome Louvel @see RFC 3986
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|