Package org.structr.core.property

Examples of org.structr.core.property.PropertyMap$PropertyKeyComparator


      T node = rel.getTargetNode();
      if (node.equals(refChild)) {

        // will be used only once here..
        PropertyMap properties = new PropertyMap();
        properties.put(AbstractChildren.position, position);

        linkNodes(getChildLinkType(), (T) LinkedTreeNode.this, newChild, properties);

        found = true;
View Full Code Here


      position++;

      if (node.equals(refChild)) {

        // will be used only once here..
        PropertyMap properties = new PropertyMap();
        properties.put(AbstractChildren.position, position);

        linkNodes(getChildLinkType(), (T) LinkedTreeNode.this, newChild, properties);

        position++;
      }
View Full Code Here

    // remove old node
    unlinkNodes(getChildLinkType(), (T) LinkedTreeNode.this, oldChild);

    // insert new node with position from old node
    PropertyMap properties = new PropertyMap();
    properties.put(AbstractChildren.position, oldPosition);

    linkNodes(getChildLinkType(), (T) LinkedTreeNode.this, newChild, properties);

    // replace element in linked list as well
    LinkedTreeNode.super.listInsertBefore(oldChild, newChild);
View Full Code Here

    final App app = StructrApp.getInstance(securityContext);

    final NodeInterface newStartNode = (NodeInterface)app.get(startNodeId);
    final NodeInterface endNode      = getTargetNode();
    final Class relationType         = getClass();
    final PropertyMap _props         = getProperties();
    final String type                = this.getClass().getSimpleName();

    if (newStartNode == null) {
      throw new FrameworkException(type, new IdNotFoundToken(startNodeId));
    }
View Full Code Here

    final App app = StructrApp.getInstance(securityContext);

    final NodeInterface newTargetNode = (NodeInterface)app.get(targetIdNode);
    final NodeInterface startNode     = getSourceNode();
    final Class relationType          = getClass();
    final PropertyMap _props          = getProperties();
    final String type                 = this.getClass().getSimpleName();

    if (newTargetNode == null) {
      throw new FrameworkException(type, new IdNotFoundToken(targetIdNode));
    }
View Full Code Here

    return createTestNodes(type, number, 0);

  }

  protected <T extends AbstractNode> T createTestNode(final Class<T> type) throws FrameworkException {
    return (T) createTestNode(type, new PropertyMap());
  }
View Full Code Here

   */
  public void test01DeleteNode() {

    try {

      final PropertyMap props = new PropertyMap();
      final String type       = "UnknownTestType";
      final String name       = "GenericNode-name";
      NodeInterface node      = null;
      String uuid             = null;

      props.put(AbstractNode.type, type);
      props.put(AbstractNode.name, name);

      try (final Tx tx = app.tx()) {

        node = app.create(NodeInterface.class, props);
        tx.success();
View Full Code Here

    final App app = StructrApp.getInstance();

    ShadowDocument doc = app.nodeQuery(ShadowDocument.class).getFirst();
    if (doc == null) {

      final PropertyMap properties = new PropertyMap();
      properties.put(AbstractNode.type, ShadowDocument.class.getSimpleName());
      properties.put(AbstractNode.name, "__ShadowDocument__");
      properties.put(AbstractNode.hidden, true);
      properties.put(AbstractNode.visibleToAuthenticatedUsers, true);

      doc = app.create(ShadowDocument.class, properties);
    }

    return doc;
View Full Code Here

    try (final Tx tx = app.tx()) {

      itemNode = app.create(SchemaNode.class, new NodeAttribute(SchemaNode.name, "Item"));

      final PropertyMap properties = new PropertyMap();
      properties.put(SchemaRelationship.relationshipType, "CHILD");
      properties.put(SchemaRelationship.sourceMultiplicity, "1");
      properties.put(SchemaRelationship.targetMultiplicity, "*");
      properties.put(SchemaRelationship.sourceJsonName, "parentItem");
      properties.put(SchemaRelationship.targetJsonName, "children");

      app.create(itemNode, itemNode, SchemaRelationship.class, properties);

      // compile the stuff
      tx.success();
View Full Code Here

      li4.appendChild(folders2NameContent);

      makePublic(rootNameContent, foldersNameContent, filesNameContent, files2NameContent, folders2NameContent);

      // create RENDER_NODE relationship between first ul and rootNode
      PropertyMap properties = new PropertyMap();
      //properties.put(LinkedListNode.keyProperty, key);
      StructrApp.getInstance(securityContext).command(CreateRelationshipCommand.class).execute((DOMElement) div, (NodeInterface) rootNode, RenderNode.class, properties);

      ((DOMElement) div).setProperty(DOMElement.dataKey, "root");
View Full Code Here

TOP

Related Classes of org.structr.core.property.PropertyMap$PropertyKeyComparator

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.