Examples of Variant


Examples of org.opcfoundation.ua.builtintypes.Variant

            XmlElement xmlElement = new XmlElement(sw.toString());
            XmlDecoder xmlDecoder = new XmlDecoder(xmlElement, ENCODER_CONTEXT);
            Object o = xmlDecoder.getVariantContents();

            return new DataValue(new Variant(o));
        } catch (Throwable t) {
            throw new RuntimeException("unable to parse Value: " + value, t);
        }
    }
View Full Code Here

Examples of org.racob.com.Variant

        EnumVariant enumVariant = dispatch.toEnumVariant();

        // FIXME: when no block is passed handling
       
        while (enumVariant.hasMoreElements()) {
            Variant value = enumVariant.nextElement();
            block.yield(context, fromVariant(runtime, value));
        }
  enumVariant.safeRelease();

        return runtime.getNil();
View Full Code Here

Examples of org.restlet.client.representation.Variant

                            if (result == null) {
                                result = new ArrayList<Variant>();
                            }

                            for (MediaType mediaType : mediaTypes) {
                                result.add(new Variant(mediaType));
                            }
                        }
                    }
                }
            }
View Full Code Here

Examples of org.restlet.representation.Variant

        getVariants().add(new RepresentationInfo(mediaType, lastModified, entityTag));
      }
    }
    else {
      for (MediaType mediaType : mediaTypes) {
        getVariants().add(new Variant(mediaType));
      }
    }
  }
View Full Code Here

Examples of org.restlet.resource.Variant

     */
    private boolean checkMetadataConsistency(String fileName,
            MetadataService metadataService, Representation representation) {
        boolean result = true;
        if (representation != null) {
            Variant var = new Variant();
            updateMetadata(metadataService, fileName, var);
            // "rep" contains the theorical correct metadata
            if (!representation.getLanguages().isEmpty()
                    && !var.getLanguages().containsAll(
                            representation.getLanguages())) {
                result = false;
            }
            if (representation.getMediaType() != null
                    && !(var.getMediaType() != null && var.getMediaType()
                            .includes(representation.getMediaType()))) {
                result = false;
            }
            if (!representation.getEncodings().isEmpty()
                    && !var.getEncodings().containsAll(
                            representation.getEncodings())) {
                result = false;
            }
        }
        return result;
View Full Code Here

Examples of org.restlet.resource.Variant

  private final static Logger LOG = Logger.getLogger(CurrentStatesResource.class);

  public CurrentStatesResource(Context context, Request request, Response response)
  {
    super(context, request, response);
    getVariants().add(new Variant(MediaType.TEXT_PLAIN));
    getVariants().add(new Variant(MediaType.APPLICATION_JSON));
  }
View Full Code Here

Examples of org.restlet.resource.Variant

  private final static Logger LOG = Logger.getLogger(ExternalViewResource.class);

  public ExternalViewResource(Context context, Request request, Response response)
  {
    super(context, request, response);
    getVariants().add(new Variant(MediaType.TEXT_PLAIN));
    getVariants().add(new Variant(MediaType.APPLICATION_JSON));
  }
View Full Code Here

Examples of org.restlet.resource.Variant

  private final static Logger LOG = Logger.getLogger(CurrentStateResource.class);

  public CurrentStateResource(Context context, Request request, Response response)
  {
    super(context, request, response);
    getVariants().add(new Variant(MediaType.TEXT_PLAIN));
    getVariants().add(new Variant(MediaType.APPLICATION_JSON));
  }
View Full Code Here

Examples of org.restlet.resource.Variant

  private final static Logger LOG = Logger.getLogger(ClustersResource.class);

  public ClustersResource(Context context, Request request, Response response)
  {
    super(context, request, response);
    getVariants().add(new Variant(MediaType.TEXT_PLAIN));
    getVariants().add(new Variant(MediaType.APPLICATION_JSON));
    // handle(request,response);
  }
View Full Code Here

Examples of org.restlet.resource.Variant

  public StateModelsResource(Context context,
      Request request,
      Response response)
  {
    super(context, request, response);
    getVariants().add(new Variant(MediaType.TEXT_PLAIN));
    getVariants().add(new Variant(MediaType.APPLICATION_JSON));
  }
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.