Examples of AnnotationSet


Examples of com.linkedin.restli.internal.server.model.AnnotationSet

        null,
        false,
        null,
        Parameter.ParamType.POST,
        false,
        new AnnotationSet(new Annotation[]{}));

    List<Parameter<?>> collectionResourceParams = new ArrayList<Parameter<?>>();
    collectionResourceParams.add(new Parameter<Integer>(
        "myComplexKeyCollectionId",
        Integer.class,
        new IntegerDataSchema(),
        false,
        null,
        Parameter.ParamType.ASSOC_KEY_PARAM,
        false,
        new AnnotationSet(new Annotation[]{})));
    collectionResourceParams.add(patchParam);

    List<Parameter<?>> simpleResourceParams = new ArrayList<Parameter<?>>();
    simpleResourceParams.add(patchParam);

    List<Parameter<?>> associationResourceParams = new ArrayList<Parameter<?>>();
    associationResourceParams.add(new Parameter<CompoundKey>(
        "myComplexKeyAssociationId",
        CompoundKey.class,
        null,
        false,
        null,
        Parameter.ParamType.ASSOC_KEY_PARAM,
        false,
        new AnnotationSet(new Annotation[]{})));
    associationResourceParams.add(patchParam);

    return new Object[][]
        {
            {
View Full Code Here

Examples of com.linkedin.restli.internal.server.model.AnnotationSet

        DataTemplateUtil.getSchema(MyComplexKey.class),
        false,
        null,
        Parameter.ParamType.POST,
        false,
        new AnnotationSet(new Annotation[]{}));
    ResourceMethodDescriptor descriptor = RestLiArgumentBuilderTestHelper.getMockResourceMethodDescriptor(model, param);
    ResourceContext context = RestLiArgumentBuilderTestHelper.getMockResourceContext(null, null, null);
    RoutingResult routingResult = RestLiArgumentBuilderTestHelper.getMockRoutingResult(descriptor, 2, context, 1);

    RestLiArgumentBuilder argumentBuilder = new CreateArgumentBuilder();
View Full Code Here

Examples of com.linkedin.restli.internal.server.model.AnnotationSet

  @Test(dataProvider = "argumentData")
  public void testArgumentBuilder(Set<Object> batchKeys) throws RestLiSyntaxException
  {
    @SuppressWarnings("rawtypes")
    Parameter<Set> param = new Parameter<Set>("", Set.class, null, false, null, Parameter.ParamType.BATCH, false, new AnnotationSet(new Annotation[]{}));
    ResourceMethodDescriptor descriptor = RestLiArgumentBuilderTestHelper.getMockResourceMethodDescriptor(null, param);
    ResourceContext context = RestLiArgumentBuilderTestHelper.getMockResourceContext(null, null, batchKeys);
    RoutingResult routingResult = RestLiArgumentBuilderTestHelper.getMockRoutingResult(descriptor, 1, context, 2);
    RestRequest request = RestLiArgumentBuilderTestHelper.getMockRequest(false, null, 0);
View Full Code Here

Examples of com.linkedin.restli.internal.server.model.AnnotationSet

  @Test(dataProvider = "argumentData")
  public void testArgumentBuilder(Set<Object> batchKeys) throws RestLiSyntaxException
  {
    @SuppressWarnings("rawtypes")
    Parameter<Set> param = new Parameter<Set>("", Set.class, null, false, null, Parameter.ParamType.BATCH, false, new AnnotationSet(new Annotation[]{}));
    ResourceMethodDescriptor descriptor = RestLiArgumentBuilderTestHelper.getMockResourceMethodDescriptor(null, param);
    ResourceContext context = RestLiArgumentBuilderTestHelper.getMockResourceContext(null, null, batchKeys);
    RoutingResult routingResult = RestLiArgumentBuilderTestHelper.getMockRoutingResult(descriptor, 1, context, 2);

    RestRequest request = RestLiArgumentBuilderTestHelper.getMockRequest(false, null, 0);
View Full Code Here

Examples of com.linkedin.restli.internal.server.model.AnnotationSet

                    new IntegerDataSchema(),
                    false,
                    null,
                    Parameter.ParamType.ASSOC_KEY_PARAM,
                    false,
                    new AnnotationSet(new Annotation[]{})),
                "myComplexKeyCollectionId",
                new Integer(123),
                new IntegerDataSchema()
            },
            {
                null, // Test for RestLiSimpleResource
                null,
                null,
                null
            },
            {
                new Parameter<CompoundKey>("myComplexKeyAssociationId",
                    CompoundKey.class,
                    null,
                    false,
                    null,
                    Parameter.ParamType.ASSOC_KEY_PARAM,
                    false,
                    new AnnotationSet(new Annotation[]{})),
                "myComplexKeyAssociationId",
                new CompoundKey().append("string1", "str1").append("string2", "str2"),
                null
            }
        };
View Full Code Here

Examples of com.linkedin.restli.internal.server.model.AnnotationSet

        null,
        false,
        null,
        Parameter.ParamType.BATCH,
        false,
        new AnnotationSet(new Annotation[]{}));
    ResourceMethodDescriptor descriptor = RestLiArgumentBuilderTestHelper.getMockResourceMethodDescriptor(model, param);
    ResourceContext context = RestLiArgumentBuilderTestHelper.getMockResourceContext(null, null, null);
    RoutingResult routingResult = RestLiArgumentBuilderTestHelper.getMockRoutingResult(descriptor, 2, context, 1);

    RestLiArgumentBuilder argumentBuilder = new BatchCreateArgumentBuilder();
View Full Code Here

Examples of gate.AnnotationSet

   * @param featurename
   */
  public static void copyFeature(Map<String, AnnotationSet> bindings,
      String fromBindings, String fromType, String toBindings, String toType,
      String featurename) {
    AnnotationSet toSet = getAnnsForType(getBindings(bindings, toBindings),
        toType);
    AnnotationSet fromSet = getAnnsForType(getBindings(bindings, fromBindings),
        fromType);
    Annotation toAnn = getLongestAnn(toSet);
    Annotation fromAnn = getLongestAnn(fromSet);
    FeatureMap toFm = toAnn.getFeatures();
    FeatureMap fromFm = fromAnn.getFeatures();
View Full Code Here

Examples of gate.AnnotationSet

   * @param toAnn
   * @param featurename
   */
  public static void copyFeature(Map<String, AnnotationSet> bindings,
      String fromBindings, String fromType, Annotation toAnn, String featurename) {
    AnnotationSet fromSet = getAnnsForType(getBindings(bindings, fromBindings),
        fromType);
    Annotation fromAnn = getLongestAnn(fromSet);
    FeatureMap toFm = toAnn.getFeatures();
    FeatureMap fromFm = fromAnn.getFeatures();
    toFm.put(featurename, fromFm.get(featurename));
View Full Code Here

Examples of gate.AnnotationSet

   * @param bindingName
   * @return
   */
  public static AnnotationSet getBindings(Map<String, AnnotationSet> bindings,
      String bindingName) {
    AnnotationSet set = bindings.get(bindingName);
    if (set == null) {
      throw new GateRuntimeException("No bindings named " + bindingName);
    }
    return new ImmutableAnnotationSetImpl(set.getDocument(), set) {
      private static final long serialVersionUID = -6703131102439043539L;
    };
  }
View Full Code Here

Examples of gate.AnnotationSet

   * @param typeName
   * @return
   */
  public static AnnotationSet getAnnsForType(AnnotationSet annset,
      String typeName) {
    AnnotationSet set = annset.get(typeName);
    if (set == null) {
      throw new GateRuntimeException("Got a null set for type " + typeName);
    }
    return new ImmutableAnnotationSetImpl(annset.getDocument(), set) {
      private static final long serialVersionUID = -6703131102439043539L;
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.