Examples of key()


Examples of org.apache.uima.fit.descriptor.ExternalResource.key()

      }
     
      ExternalResource era = ReflectionUtil.getAnnotation(field, ExternalResource.class);

      // Get the resource key. If it is a nested resource, also get the prefix.
      String key = era.key();
      if (key.length() == 0) {
        key = field.getName();
      }
      if (object instanceof ExternalResourceAware) {
        String prefix = ((ExternalResourceAware) object).getResourceName();
View Full Code Here

Examples of org.apache.wicket.ajax.json.JSONStringer.key()

      Json.writeObject(writer, "separator", separator);
      Json.writeObject(writer, "tokenSeparators", tokenSeparators);
      Json.writeObject(writer, "selectOnBlur", selectOnBlur);
      Json.writeObject(writer, "dropdownAutoWidth", dropdownAutoWidth);
      if (ajax != null) {
        writer.key("ajax");
        ajax.toJson(writer);
      }
      Json.writeFunction(writer, "data", data);
      Json.writeFunction(writer, "tags", tags);
      writer.endObject();
View Full Code Here

Examples of org.apache.wicket.ajax.json.JSONWriter.key()

    OutputStreamWriter out = new OutputStreamWriter(webResponse.getOutputStream(), getRequest().getCharset());
    JSONWriter json = new JSONWriter(out);

    try {
      json.object();
      json.key("results").array();
      for (T item : response) {
        json.object();
        provider.toJson(item, json);
        json.endObject();
      }
View Full Code Here

Examples of org.apache.wink.json4j.JSONStringer.key()

    public void test_WriteObjectComplex() {
        Exception ex = null;
        try{
            JSONStringer jStringer = new JSONStringer();
            jStringer.object();
            jStringer.key("string");
            jStringer.value("String1");
            jStringer.key("bool");
            jStringer.value(false);
            jStringer.key("number");
            jStringer.value(1);
View Full Code Here

Examples of org.apache.wink.json4j.JSONWriter.key()

        Exception ex = null;
        try{
            StringWriter w = new StringWriter();
            JSONWriter jWriter = new JSONWriter(w);
            jWriter.object();
            jWriter.key("foo");
            jWriter.value("bar");
            jWriter.close();
            String str = w.toString();
            // Verify it parses.
            JSONObject test = new JSONObject(str);
View Full Code Here

Examples of org.apache.wink.json4j.compat.JSONStringer.key()

        try{
            System.setProperty("org.apache.wink.common.model.json.factory.impl", "org.apache.wink.json4j.compat.impl.ApacheJSONFactory");
            JSONFactory factory = JSONFactory.newInstance();
            JSONStringer jStringer = factory.createJSONStringer();
            jStringer.object();
            jStringer.key("string");
            jStringer.value("String1");
            jStringer.key("bool");
            jStringer.value(false);
            jStringer.key("number");
            jStringer.value(1);
View Full Code Here

Examples of org.apache.wink.json4j.compat.JSONWriter.key()

            StringWriter w = new StringWriter();
            System.setProperty("org.apache.wink.common.model.json.factory.impl", "org.apache.wink.json4j.compat.impl.ApacheJSONFactory");
            JSONFactory factory = JSONFactory.newInstance();
            JSONWriter jWriter = factory.createJSONWriter(w);
            jWriter.object();
            jWriter.key("foo");
            jWriter.value(true);
            jWriter.close();
            String str = w.toString();
            // Verify it parses.
            JSONObject test = factory.createJSONObject(str);
View Full Code Here

Examples of org.bndtools.utils.parse.properties.PropertiesLineReader.key()

        int lineNum = 1;

        LineType type = reader.next();
        while (type != LineType.eof) {
            if (type == LineType.entry) {
                String entryKey = reader.key();
                if (Constants.BUNDLE_VERSION.equals(entryKey)) {
                    LineLocation loc = new LineLocation();
                    loc.lineNum = lineNum;
                    IRegion region = reader.region();
                    loc.start = region.getOffset();
View Full Code Here

Examples of org.codehaus.groovy.grails.web.json.JSONWriter.key()

        Errors errors = (Errors) object;
        JSONWriter writer = json.getWriter();

        try {
            writer.object();
            writer.key("errors");
            writer.array();

            for (Object o : errors.getAllErrors()) {
                if (o instanceof FieldError) {
                    FieldError fe = (FieldError) o;
View Full Code Here

Examples of org.codehaus.jettison.json.JSONStringer.key()

  @Test
  public void testToString() throws JSONException {
    SchemaConfigured sc = new SchemaConfigured(null, TABLE_NAME, CF_NAME);
    JSONStringer json = new JSONStringer();
    json.object();
    json.key("tableName");
    json.value(TABLE_NAME);
    json.key("cfName");
    json.value(CF_NAME);
    json.endObject();
    assertEquals(json.toString(), sc.schemaConfAsJSON());
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.