Package org.structr.core.property

Examples of org.structr.core.property.PropertyKey


   
    final String sortOrder   = webSocketData.getSortOrder();
    final String sortKey     = webSocketData.getSortKey();
    final int pageSize       = webSocketData.getPageSize();
    final int page           = webSocketData.getPage();
    PropertyKey sortProperty = StructrApp.getConfiguration().getPropertyKeyForJSONName(type, sortKey);

   
    final Query query = StructrApp.getInstance(securityContext).nodeQuery(type).includeDeletedAndHidden().sort(sortProperty).order("desc".equals(sortOrder));

    // for image lists, suppress thumbnails
View Full Code Here


    }

    final String sortOrder = webSocketData.getSortOrder();
    final String sortKey = webSocketData.getSortKey();
    final PropertyKey sortProperty = StructrApp.getConfiguration().getPropertyKeyForJSONName(AbstractNode.class, sortKey);
    final Query query = StructrApp.getInstance(securityContext).nodeQuery().includeDeletedAndHidden().sort(sortProperty).order("desc".equals(sortOrder));

    query.andName(searchString);

    if (type != null) {
View Full Code Here

    AbstractNode node = getNode(webSocketData.getId());
    String key = (String) webSocketData.getNodeData().get("key");

    if (node != null) {

      PropertyKey propertyKey = StructrApp.getConfiguration().getPropertyKeyForJSONName(node.getClass(), key);
      PropertyConverter converter = propertyKey.inputConverter(getWebSocket().getSecurityContext());

      Object value = node.getProperty(propertyKey);
      if (converter != null) {

        try {
View Full Code Here

      Node node = super.cloneNode(deep);

      for (Iterator<PropertyKey> it = getPropertyKeys(htmlView.name()).iterator(); it.hasNext();) {

        PropertyKey key = it.next();

        // omit system properties (except type), parent/children and page relationships
        if (key.equals(GraphObject.type) || (!key.isUnvalidated()
          && !key.equals(GraphObject.id)
          && !key.equals(DOMNode.ownerDocument) && !key.equals(DOMNode.pageId)
          && !key.equals(DOMNode.parent) && !key.equals(DOMNode.parentId)
          && !key.equals(DOMElement.syncedNodes)
          && !key.equals(DOMNode.children) && !key.equals(DOMNode.childrenIds))) {

          try {
            ((DOMNode) node).setProperty(key, getProperty(key));
          } catch (FrameworkException ex) {
            logger.log(Level.WARNING, "Could not set property " + key + " while cloning DOMElement " + this, ex);
View Full Code Here

  @Override
  public void updateFromPropertyMap(final PropertyMap properties) throws FrameworkException {

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

      final PropertyKey key = entry.getKey();
      final Object value1 = this.getProperty(key);
      final Object value2 = entry.getValue();

      if (value1 == null && value2 == null) {
        continue;
View Full Code Here

    if (htmlProperty == null) {

      // try to find native html property defined in
      // DOMElement or one of its subclasses
      PropertyKey key = StructrApp.getConfiguration().getPropertyKeyForJSONName(entityType, name, false);

      if (key != null && key instanceof HtmlProperty) {

        htmlProperty = (HtmlProperty) key;
View Full Code Here

  public void test01SearchSingleNodeByName() {

    try {

      PropertyMap props     = new PropertyMap();
      final PropertyKey key = AbstractNode.name;
      final String name     = "89w3hkl sdfghsdkljth";

      props.put(key, name);

      final AbstractNode node = createTestNode(TestOne.class, props);
View Full Code Here

  public void test02SearchSingleNodeByDate() {

    try {

      PropertyMap props = new PropertyMap();
      PropertyKey key   = TestOne.aDate;
      Date date         = new Date();
      Class type        = TestOne.class;

      props.put(key, date);
View Full Code Here

  public void test03SearchRelationship() {

    try {

      final NodeHasLocation rel = createTestRelationships(NodeHasLocation.class, 1).get(0);
      final PropertyKey key1    = new StringProperty("jghsdkhgshdhgsdjkfgh").indexed();
      final Class type          = NodeHasLocation.class;
      final String val1         = "54354354546806849870";
     
      final Result<RelationshipInterface> result;
View Full Code Here

  public void test04SearchByLocation() {

    try {

      final PropertyMap props = new PropertyMap();
      final PropertyKey lat   = TestSeven.latitude;
      final PropertyKey lon   = TestSeven.longitude;
      final Class type        = TestSeven.class;

      props.put(lat, 50.12284d);
      props.put(lon, 8.73923d);
      props.put(AbstractNode.name, "TestSeven-0");
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.