Examples of PathElement


Examples of com.bazaarvoice.jolt.common.pathelement.PathElement

        if (pathElements.size() != 1) {
            throw new SpecException("Removr invalid LHS:" + rawJsonKey + " can not contain '.'");
        }

        PathElement pe = pathElements.get(0);
        if (!(pe instanceof MatchablePathElement)) {
            throw new SpecException("Spec LHS key=" + rawJsonKey + " is not a valid LHS key.");
        }

        this.pathElement = (MatchablePathElement) pe;
View Full Code Here

Examples of com.google.apphosting.datastore.EntityV4.Key.PathElement

   * Update a key object with the id in the proto, if one exists.
   */
  static void updateKey(EntityV4.Key v4Key, Key key) {
    List<EntityV4.Key.PathElement> pathElements = v4Key.getPathElementList();
    if (!pathElements.isEmpty()) {
      PathElement lastElement = pathElements.get(pathElements.size() - 1);
      if (lastElement.hasId()) {
        key.setId(lastElement.getId());
      }
    }
  }
View Full Code Here

Examples of net.sf.regain.crawler.document.PathElement

      String url = mPathNodeRE.getParen(mPathNodeUrlGroup);
      url = CrawlerToolkit.toAbsoluteUrl(url, rawDocument.getUrl());
      String title = mPathNodeRE.getParen(mPathNodeTitleGroup);
      title = CrawlerToolkit.replaceHtmlEntities(title);

      list.add(new PathElement(url, title));

      offset = mPathNodeRE.getParenEnd(0);
    }

    if (list.isEmpty()) {
View Full Code Here

Examples of org.apache.jackrabbit.name.Path.PathElement

        PathElement[] pathElements = path.getElements();
        StringBuffer buffer = new StringBuffer();
       
        //Skip the first
        for (int i = 1; i < pathElements.length; i++) {
            PathElement currentPathElement = pathElements[i];
            QName qName = ISO9075.encode(currentPathElement.getName());
            String name = qName.toJCRName((NamespaceRegistryImpl) node.getSession().getWorkspace().getNamespaceRegistry());
            System.out.println(name);
           
            buffer.append("/" + name);
        }
View Full Code Here

Examples of org.apache.tools.ant.types.Path.PathElement

    private Path makePath(String pathId, List<ArtifactDownloadReport> artifacts) {
        log("Path '" + pathId + "' computed with " + artifacts.size() + " files", Project.MSG_VERBOSE);
        Path path = new Path(getProject());
        for (ArtifactDownloadReport artifact : artifacts) {
            if (artifact.getLocalFile() != null) {
                PathElement pe = path.createPathElement();
                pe.setLocation(artifact.getLocalFile());
                log("Adding to path '" + pathId + "': " + artifact.getLocalFile(), Project.MSG_DEBUG);
            }
        }

        getProject().addReference(pathId, path);
View Full Code Here

Examples of org.jboss.as.controller.PathElement

        }

        protected void addProxyResultToMainResult(final PathAddress address, final ModelNode mainResult, final ModelNode proxyResult) {
            ModelNode resultNode = mainResult;
            for (Iterator<PathElement> it = address.iterator() ; it.hasNext() ; ) {
                PathElement element = it.next();
                resultNode = resultNode.get(element.getKey()).get(element.getValue());
            }
            resultNode.set(proxyResult.get(RESULT).clone());
        }
View Full Code Here

Examples of org.jboss.as.controller.PathElement

     */
    private Util() {
    }

    public static String getNameFromAddress(final ModelNode address) {
        PathElement pe = PathAddress.pathAddress(address).getLastElement();
        return pe == null ? null : pe.getValue();
    }
View Full Code Here

Examples of org.jboss.as.controller.PathElement

     * @return whether the child exists or not
     * @throws IOException
     * @throws MgmtOperationException
     */
    public static boolean exists(PathAddress address, ModelControllerClient client) throws IOException, MgmtOperationException {
        final PathElement element = address.getLastElement();
        final PathAddress subAddress = address.subAddress(0, address.size() -1);
        final boolean checkType = element.isWildcard();
        final ModelNode e;
        final ModelNode operation;
        if(checkType) {
            e = new ModelNode().set(element.getKey());
            operation = createOperation(READ_CHILDREN_TYPES_OPERATION, subAddress);
        } else {
            e = new ModelNode().set(element.getValue());
            operation = createOperation(READ_CHILDREN_NAMES_OPERATION, subAddress);
            operation.get(CHILD_TYPE).set(element.getKey());
        }
        try {
            final ModelNode result = executeForResult(operation, client);
            return result.asList().contains(e);
        } catch (MgmtOperationException ex) {
            if(! checkType) {
                final String failureDescription = ex.getResult().get(FAILURE_DESCRIPTION).asString();
                if(failureDescription.contains("JBAS014793") && failureDescription.contains(element.getKey())) {
                    return false;
                }
            }
            throw ex;
        }
View Full Code Here

Examples of org.jboss.as.controller.PathElement

            if (!environment.isRestart()){
                checkState(server, ServerState.STARTING);
            }
            server.setState(ServerState.STARTED);

            final PathElement element = PathElement.pathElement(RUNNING_SERVER, server.getServerName());
            final ProxyController serverController = RemoteProxyController.create(Executors.newCachedThreadPool(),
                    PathAddress.pathAddress(PathElement.pathElement(HOST, domainController.getLocalHostInfo().getLocalHostName()), element),
                    ProxyOperationAddressTranslator.SERVER,
                    channel);
            if (callback != null && serverController instanceof ManagementOperationHandler) {
View Full Code Here

Examples of org.jboss.as.controller.PathElement

    public void registerRemoteHost(ProxyController hostControllerClient) {
        if (!hostControllerInfo.isMasterDomainController()) {
            throw new UnsupportedOperationException("Registration of remote hosts is not supported on slave host controllers");
        }
        PathAddress pa = hostControllerClient.getProxyNodeAddress();
        PathElement pe = pa.getElement(0);
        ProxyController existingController = modelNodeRegistration.getProxyController(pa);

        if (existingController != null || hostControllerInfo.getLocalHostName().equals(pe.getValue())){
            throw new IllegalArgumentException("There is already a registered host named '" + pe.getValue() + "'");
        }
        modelNodeRegistration.registerProxyController(pe, hostControllerClient);
        hostProxies.put(pe.getValue(), hostControllerClient);

        Logger.getLogger("org.jboss.domain").info("Registered remote slave host " + pe.getValue());
    }
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.