Package org.structr.core.property

Examples of org.structr.core.property.PropertyKey


          // Treat only "our" rels
          if(rel.getProperty(GraphObject.id) != null) {

            Class type                    = rel.getClass();
            PropertyKey destPropertyKey   = StructrApp.getConfiguration().getPropertyKeyForDatabaseName(type, destKey);
            PropertyKey sourcePropertyKey = StructrApp.getConfiguration().getPropertyKeyForDatabaseName(type, sourceKey);

            try {
              // copy properties
              rel.setProperty(destPropertyKey, rel.getProperty(sourcePropertyKey));
View Full Code Here


            for (Entry entry : properties.entrySet()) {

              String key = (String) entry.getKey();
              Object val = entry.getValue();

              PropertyKey propertyKey = StructrApp.getConfiguration().getPropertyKeyForDatabaseName(rel.getClass(), key);
              if (propertyKey != null) {

                try {
                  rel.setProperty(propertyKey, val);
View Full Code Here

    JsonObject obj = new JsonObject();
    JsonObject vals = new JsonObject();

    for(Entry<PropertyKey, Object> entry : attributes.entrySet()) {

      PropertyKey key = entry.getKey();
      Object value    = entry.getValue();
     
      if (value == null) {
        vals.add(key.jsonName(), null);
      } else {
        vals.add(key.jsonName(), new JsonPrimitive(value.toString()));
      }
    }

    obj.add(getErrorToken(), vals);
View Full Code Here

            // remove attributes that do not belong to the target node
            final PropertyMap foreignProperties = new PropertyMap();

            for (final Iterator<PropertyKey> it = attributes.keySet().iterator(); it.hasNext();) {

              final PropertyKey key = it.next();
              if (foreignPropertyKeys.contains(key)) {

                // move entry to foreign map and remove from attributes
                foreignProperties.put(key, attributes.get(key));
                it.remove();
View Full Code Here

TOP

Related Classes of org.structr.core.property.PropertyKey

Copyright © 2018 www.massapicom. 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.