Examples of ObjectMap


Examples of com.esotericsoftware.kryo.util.ObjectMap

    return (T)instantiator.newInstance();
  }

  /** Name/value pairs that are available to all serializers. */
  public ObjectMap getContext () {
    if (context == null) context = new ObjectMap();
    return context;
  }
View Full Code Here

Examples of com.esotericsoftware.kryo.util.ObjectMap

  }

  /** Name/value pairs that are available to all serializers and are cleared after each object graph is serialized or
   * deserialized. */
  public ObjectMap getGraphContext () {
    if (graphContext == null) graphContext = new ObjectMap();
    return graphContext;
  }
View Full Code Here

Examples of com.esotericsoftware.kryo.util.ObjectMap

    return (T)instantiator.newInstance();
  }

  /** Name/value pairs that are available to all serializers. */
  public ObjectMap getContext () {
    if (context == null) context = new ObjectMap();
    return context;
  }
View Full Code Here

Examples of com.esotericsoftware.kryo.util.ObjectMap

  }

  /** Name/value pairs that are available to all serializers and are cleared after each object graph is serialized or
   * deserialized. */
  public ObjectMap getGraphContext () {
    if (graphContext == null) graphContext = new ObjectMap();
    return graphContext;
  }
View Full Code Here

Examples of com.esotericsoftware.kryo.util.ObjectMap

    while (nextClass != Object.class) {
      Collections.addAll(allFields, nextClass.getDeclaredFields());
      nextClass = nextClass.getSuperclass();
    }

    ObjectMap context = kryo.getContext();

    IntArray useAsm = new IntArray();
    ArrayList<Field> validFields = new ArrayList(allFields.size());
    for (int i = 0, n = allFields.size(); i < n; i++) {
      Field field = allFields.get(i);

      int modifiers = field.getModifiers();
      if (Modifier.isTransient(modifiers)) continue;
      if (Modifier.isStatic(modifiers)) continue;
      if (field.isSynthetic() && ignoreSyntheticFields) continue;

      if (!field.isAccessible()) {
        if (!setFieldsAsAccessible) continue;
        try {
          field.setAccessible(true);
        } catch (AccessControlException ex) {
          continue;
        }
      }

      Optional optional = field.getAnnotation(Optional.class);
      if (optional != null && !context.containsKey(optional.value())) continue;

      validFields.add(field);

      // BOZO - Must be public?
      useAsm.add(!Modifier.isFinal(modifiers) && Modifier.isPublic(modifiers)
View Full Code Here

Examples of com.gvaneyck.rtmp.encoding.ObjectMap

        if (response == null) {
            ipAddress = "127.0.0.1";
            return;
        }

        ObjectMap result = (ObjectMap)JSON.parse(response);
        ipAddress = result.getString("ip_address");
    }
View Full Code Here

Examples of com.gvaneyck.rtmp.encoding.ObjectMap

        output.writeBytes(query);
        output.close();

        // Read the response
        String response;
        ObjectMap result;
        try {
            response = readAll(connection.getInputStream());
            result = (ObjectMap)JSON.parse(response);
        }
        catch (IOException e) {
            System.err.println("Incorrect username or password");
            throw e;
        }

        // Check for banned or other failures
        // {"rate":0,"reason":"account_banned","status":"FAILED","delay":10000,"banned":7647952951000}
        if (result.get("status").equals("FAILED"))
            throw new IOException("Error logging in: " + result.get("reason"));

        // Handle login queue
        if (!result.containsKey("token")) {
            int node = result.getInt("node"); // Our login queue ID
            String nodeStr = "" + node;
            String champ = result.getString("champ"); // The name of our login
                                                      // queue
            int rate = result.getInt("rate"); // How many tickets are processed
                                              // every queue update
            int delay = result.getInt("delay"); // How often the queue status
                                                // updates

            int id = 0;
            int cur = 0;
            Object[] tickers = result.getArray("tickers");
            for (Object o : tickers) {
                ObjectMap to = (ObjectMap)o;

                // Find our queue
                int tnode = to.getInt("node");
                if (tnode != node)
                    continue;

                id = to.getInt("id"); // Our ticket in line
                cur = to.getInt("current"); // The current ticket being
                                            // processed
                break;
            }

            // Let the user know
View Full Code Here

Examples of com.psddev.dari.util.ObjectMap

        if (width == null || height == null) {
            return item;
        }

        StorageItem override = StorageItem.Static.createIn(item.getStorage());
                new ObjectMap(override).putAll(new ObjectMap(item));
        CollectionUtils.putByPath(override.getMetadata(), ORIGINAL_WIDTH_METADATA_PATH, ImageTag.findDimension(item, "width"));
        CollectionUtils.putByPath(override.getMetadata(), ORIGINAL_HEIGHT_METADATA_PATH, ImageTag.findDimension(item, "height"));

        boolean overridden = ImageResizeStorageItemListener.overridePathWithNearestSize(override,
                width, height);
View Full Code Here

Examples of edu.isi.karma.kr2rml.ObjectMap

          // Create an object property map
          if (target instanceof InternalNode) {
            // Get the RefObjMap object for the objectmap
            TriplesMap objTrMap = r2rmlMapping.getTriplesMapIndex().get(target.getId());
            RefObjectMap refObjMap = new RefObjectMap(RefObjectMap.getNewRefObjectMapId(), objTrMap);
            ObjectMap objMap = new ObjectMap(target.getId(), refObjMap);
            poMap.setObject(objMap);
           
            // Create the predicate
            Predicate pred = new Predicate(olink.getId());
           
            // Check if a specialization link exists
            LabeledLink specializedEdge = getSpecializationLinkIfExists(olink, node);
            if (specializedEdge != null) {
              Node specializedEdgeTarget = specializedEdge.getTarget();
              if (specializedEdgeTarget instanceof ColumnNode) {
                String columnName = translator.getColumnNameForHNodeId(((ColumnNode) specializedEdgeTarget).getHNodeId());
                ColumnTemplateTerm cnTerm =
                    new ColumnTemplateTerm(columnName);
                pred.getTemplate().addTemplateTermToSet(cnTerm);
              }
            } else {
              pred.getTemplate().addTemplateTermToSet(
                  new StringTemplateTerm(olink.getLabel().getUri(), true));
            }
            poMap.setPredicate(pred);
            if (generateInverse)
              addInversePropertyIfExists(subjMap, poMap, olink, subjTrMap);
           
            // Add the links in the graph links data structure
            TriplesMapLink link = new TriplesMapLink(subjTrMap, objTrMap, poMap)
            r2rmlMapping.getAuxInfo().getTriplesMapGraph().addLink(link);
          }
         
          else if(target instanceof LiteralNode) {
            LiteralNode lnode = (LiteralNode) target;
           
            //Create the object
            TemplateTermSet termSet = new TemplateTermSet();
            StringTemplateTerm literalTerm = new StringTemplateTerm(lnode.getValue(), lnode.isUri());
            termSet.addTemplateTermToSet(literalTerm);
           
            StringTemplateTerm rdfLiteralTypeTerm = new StringTemplateTerm(lnode.getLabel().getUri(), true);
            TemplateTermSet rdfLiteralTypeTermSet = new TemplateTermSet();
            rdfLiteralTypeTermSet.addTemplateTermToSet(rdfLiteralTypeTerm);
           
            ObjectMap objMap = new ObjectMap(target.getId(), termSet, rdfLiteralTypeTermSet);
            poMap.setObject(objMap);
           
            // Create the predicate
            Predicate pred = new Predicate(olink.getId());
            pred.getTemplate().addTemplateTermToSet(
                  new StringTemplateTerm(olink.getLabel().getUri(), true));
           
            poMap.setPredicate(pred);
            if (generateInverse)
              addInversePropertyIfExists(subjMap, poMap, olink, subjTrMap);
           
          }
         
          // Create a data property map
          else if(target instanceof ColumnNode) {
            // Create the object map
            ColumnNode cnode = (ColumnNode) target;
            String hNodeId = cnode.getHNodeId();
            String columnName = translator.getColumnNameForHNodeId(hNodeId);
            ColumnTemplateTerm cnTerm = new ColumnTemplateTerm(columnName);
            TemplateTermSet termSet = expandColumnTemplateTermForPyTransforms(
                hNodeId, cnTerm);
           
            String rdfLiteralUri =   cnode.getRdfLiteralType() == null? "" : cnode.getRdfLiteralType().getUri();
            StringTemplateTerm rdfLiteralTypeTerm = new StringTemplateTerm(rdfLiteralUri, true);
            TemplateTermSet rdfLiteralTypeTermSet = new TemplateTermSet();
            rdfLiteralTypeTermSet.addTemplateTermToSet(rdfLiteralTypeTerm);

            ObjectMap objMap = new ObjectMap(hNodeId, termSet, rdfLiteralTypeTermSet);
            poMap.setObject(objMap);
           
            // Create the predicate
            Predicate pred = new Predicate(olink.getId());
           
View Full Code Here

Examples of org.bifrost.xmlio.config.ObjectMap

    pmap.setConverter(dconv);
    plist.add(pmap);
    pmap = new PropertyMap("calendar");
    pmap.setConverter(new GregorianCalendarConverter());
    plist.add(pmap);
    ObjectMap omap = new ObjectMap("TestHelperDate", "TestHelperDate", plist);
    config.addObjectMap(omap);
   
    CharArrayWriter output = new CharArrayWriter();
    assertNotNull(output);
    TestHelperDate helper = new TestHelperDate();
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.