Examples of ReferenceList


Examples of org.restlet.data.ReferenceList

     *
     * @return The list of variants references
     */
    private ReferenceList getVariantsReferences() {
        this.uniqueReference = null;
        final ReferenceList result = new ReferenceList(0);
        try {
            final Request contextCall = new Request(Method.GET, this.targetUri);
            // Ask for the list of all variants of this resource
            contextCall.getClientInfo().getAcceptedMediaTypes().add(
                    new Preference<MediaType>(MediaType.TEXT_URI_LIST));
            final Response contextResponse = getClientDispatcher().handle(
                    contextCall);
            if (contextResponse.getEntity() != null) {
                // Test if the given response is the list of all variants for
                // this resource
                if (MediaType.TEXT_URI_LIST.equals(contextResponse.getEntity()
                        .getMediaType())) {
                    final ReferenceList listVariants = new ReferenceList(
                            contextResponse.getEntity());
                    Set<String> extensions = null;
                    String entryUri;
                    String fullEntryName;
                    String baseEntryName;
View Full Code Here

Examples of org.restlet.data.ReferenceList

                getClientDispatcher().handle(contextRequest, contextResponse);
            } else {
                // Check if there is only one representation

                // Try to get the unique representation of the resource
                final ReferenceList references = getVariantsReferences();
                if (!references.isEmpty()) {
                    if (this.uniqueReference != null) {
                        contextRequest.setResourceRef(this.uniqueReference);
                        getClientDispatcher().handle(contextRequest,
                                contextResponse);
                    } else {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.