Examples of Prop


Examples of net.sourceforge.processdash.hier.Prop

    int newIndex = useProps.getNumChildren (parent);

                                // See if should be adding at other index...

                                // if parent specifies allowed children
    Prop val = useProps.pget (parent);
    String status, allowedChild;
    if ((val != null) && ((status = val.getStatus()) != null)) {
      int idx1 = status.indexOf (ALLOWED_CHILD);
      int idx2 = status.indexOf (REQUIRED_PARENT);
      if (idx1 >= 0) {
        if (idx2 < 0)
          idx2 = status.length();
View Full Code Here

Examples of net.sourceforge.processdash.hier.Prop

      return false;

    return moveUpIsLegal(treeModel.getPropKey (useProps, node.getPath()));
  }
  private boolean moveUpIsLegal(PropertyKey key) {
    Prop prop = useProps.pget(key);
    if (!isMoveable(prop.getStatus())) return false;

    PropertyKey parentKey = key.getParent();
    Prop parentProp = useProps.pget(parentKey);
    int pos = -1;
    for (int i=parentProp.getNumChildren();  i-- > 0; )
      if (key.equals(parentProp.getChild(pos=i))) break;
    if (pos < 1) return false;

    PropertyKey siblingKey = parentProp.getChild(pos-1);
    Prop siblingProp = useProps.pget(siblingKey);
    return isMoveable(siblingProp.getStatus());
  }
View Full Code Here

Examples of net.sourceforge.processdash.hier.Prop

    // First, make the change in the properties object.
    DefaultMutableTreeNode parentNode=(DefaultMutableTreeNode)node.getParent();
    int index = parentNode.getIndex(node);
    PropertyKey parentKey = key.getParent();
    Prop parentProp = useProps.pget(parentKey);
    parentProp.moveChildUp(index);

    // Next, make the change in the tree model.
    treeModel.useTreeModelListener(false);
    parentNode.insert(node, index-1);
    treeModel.useTreeModelListener(true);
View Full Code Here

Examples of net.sourceforge.processdash.hier.Prop

            // disallow pasting a node into its current parent (it
            // already lives there!)
        parentPath.equals(cutKey.getParent().path()))
      return false;

    Prop cutProp = useProps.pget(cutKey);
    String cutID = cutProp.getID();
        /* match child with parent's allowed child list, if any */
    if (templateChildren != null && !templateChildren.contains(cutID)) return false;

        /* match parent with child's required parent list, if any */
    String cutStatus = cutProp.getStatus();
    if (cutStatus == null) return true;         /* no required parent */
    int idx = cutStatus.indexOf(REQUIRED_PARENT);
    if (idx == -1) return true;                         /* no required parent */

    StringTokenizer st = new StringTokenizer
View Full Code Here

Examples of net.sourceforge.processdash.hier.Prop

      DefaultMutableTreeNode node = getSelectedNode();
      if (node == null) return;

      // get the default index for adding
      PropertyKey parentPKey = treeModel.getPropKey (useProps, node.getPath ());
      Prop val = useProps.pget (parentPKey);
      int newIndex = useProps.getNumChildren (parentPKey);

                                // See if should be adding at other index...

                                // if parent specifies allowed children
      String status, allowedChild;
      PropertyKey cutKey = treeModel.getPropKey (useProps, cutNode.getPath());
      Prop cutProp = useProps.pget(cutKey);
      String cutID = cutProp.getID();
      if ((val != null) && ((status = val.getStatus()) != null)) {
        int idx1 = status.indexOf (ALLOWED_CHILD);
        int idx2 = status.indexOf (REQUIRED_PARENT);
        if (idx1 >= 0) {
          if (idx2 < 0)
View Full Code Here

Examples of org.apache.wink.webdav.model.Prop

        activelock.setTimeout(LOCK_TIMEOUT);
        // a lock token is not necessary for MS compatibility

        Lockdiscovery lockdiscovery = new Lockdiscovery();
        lockdiscovery.getActivelock().add(activelock);
        Prop prop = new Prop();
        prop.setLockdiscovery(lockdiscovery);

        Response response =
            RuntimeDelegate.getInstance().createResponseBuilder().entity(prop).build();
        return response;
    }
View Full Code Here

Examples of org.apache.wink.webdav.model.Prop

        // the request is for all property names
        if (propfind.getPropname() != null) {
            Propstat propstat =
                response.getOrCreatePropstat(Response.Status.OK.getStatusCode(), null, null);
            Prop prop = propstat.getProp();
            // call the abstract method to allow the handler to fill in the
            // property names
            handler.setAllPropertyNames(this, prop, synd);
            // ensure that all property values are empty
            ensurePropertiesAreEmpty(prop);
        } else {
            Prop prop = null;
            // the request is for all properties
            if (propfind.getAllprop() != null) {
                prop = new Prop();
                handler.setAllPropertyNames(this, prop, synd);
            } else {
                // the request is for specific properties
                prop = propfind.getProp();
            }
View Full Code Here

Examples of org.apache.wink.webdav.model.Prop

        // the request is for all property names
        if (propfind.getPropname() != null) {
            Propstat propstat =
                response.getOrCreatePropstat(Response.Status.OK.getStatusCode(), null, null);
            Prop prop = propstat.getProp();
            // call the abstract method to allow the handler to fill in the
            // property names
            handler.setAllPropertyNames(this, prop, synd);
            // ensure that all property values are empty
            ensurePropertiesAreEmpty(prop);
        } else {
            Prop prop = null;
            // the request is for all properties
            if (propfind.getAllprop() != null) {
                prop = new Prop();
                handler.setAllPropertyNames(this, prop, synd);
            } else {
                // the request is for specific properties
                prop = propfind.getProp();
            }
View Full Code Here

Examples of org.apache.wink.webdav.model.Prop

        // the request is for all property names
        if (propfind.getPropname() != null) {
            Propstat propstat =
                response.getOrCreatePropstat(Response.Status.OK.getStatusCode(), null, null);
            Prop prop = propstat.getProp();
            // call the abstract method to allow the handler to fill in the
            // property names
            handler.setAllPropertyNames(this, prop, synd);
            // ensure that all property values are empty
            ensurePropertiesAreEmpty(prop);
        } else {
            Prop prop = null;
            // the request is for all properties
            if (propfind.getAllprop() != null) {
                prop = new Prop();
                handler.setAllPropertyNames(this, prop, synd);
            } else {
                // the request is for specific properties
                prop = propfind.getProp();
            }
View Full Code Here

Examples of org.apache.wink.webdav.model.Prop

                    expectedPropnames.add(propertyNames[i]);
                }
            }
            totalCovered += expectedPropnames.size();

            Prop prop = propstat.getProp();
            Set<QName> propnames =
                WebDAVModelHelper.extractPropertyNames(prop, new HashSet<QName>());
            Assert.assertEquals(expectedPropnames.size(), propnames.size());

            for (QName name : expectedPropnames) {
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.