Examples of Path

This class simplifies working with paths and using a Path is often more efficient that processing and manipulating the equivalent String. This class can easily {@link #iterator() iterate} over the segments, returnthe {@link #size() number of segments}, {@link #compareTo(Path) compare} with other paths, {@link #resolve(Path) resolve}relative paths, return the {@link #getParent() ancestor (or parent)}, determine whether one path is an {@link #isAncestorOf(Path) ancestor} or {@link #isDecendantOf(Path) decendent} of another path, and{@link #getCommonAncestor(Path) finding a common ancestor}.

  • org.jboss.jca.common.api.metadata.ra.Path
    @author Stefano Maestri
  • org.jboss.jca.common.metadata.ra.ra16.Path
    @author Stefano Maestri
  • org.jostraca.tree.path.Path
  • org.jrest4guice.rest.annotations.Path
  • org.kie.commons.java.nio.file.Path
  • org.mantikhor.llapi.Path
    kipedia.org/wiki/Path_%28graph_theory%29'>a Path in Graph theory, but is different in one specific respect: a Mantikhor path is expressed in terms of properties, arc-node pairs considered as a unit. In graph theory, the definition is made in terms of the nodes a path visits, and the arc is deemphasized except as an access coduit to the node. A Mantikhor path is restricted to the set of paths: Paths are used to optimize and formalize the process of graph analysis. In general, a collection of paths is meaningful only within the context of a single graph. When implementing Comparable, the natural ordering of Paths is:
  • org.meshcms.util.Path
    An abstract representation of a file path. The root of the path is undefined, and the path can be relative (i.e. can start with '..'). Example of paths are: A Path can be created from any object. When you call a constructor, the path is initialized as empty, then the objects passed to the constructor are added to it. When all objects have been added, the path is simplified by removing redundant elements. For example, "home/user/../otheruser" is reduced to "home/otheruser". After the constructor returns, the Path object is immutable. When you call a method to modify it (like one of the add() methods), it returns a new Path that is the result of the requested operation. The objects are added as follows: @author Luciano Vernaschi
  • org.modeshape.jcr.value.Path
    rg/en/jsr/detail?id=283">JSR-283 by converting the reserved characters (namely '*', '/', ':', '[', ']' and '|') to their unicode equivalent.
  • {@link #URL_ENCODER UrlEncoder} - an encoder and decoder that is useful for converting text to be used within a URL, asdefined by Section 2.3 of RFC 2396. This encoder does encode many characters (including '`', '@', '#', '$', '^', '&', '{', '[', '}', ']', '|', ':', ';', '\', '"', '<', ',', '>', '?', '/', and ' '), while others are not encoded (including '-', '_', '.', '!', '~', '*', '\', ''', '(', and ')'). Note that only the '*' character is the only character reserved by JSR-283 that is not encoded by the URL encoder.
  • {@link #NO_OP_ENCODER NoOpEncoder} - an {@link TextEncoder encoder} implementation that does nothing.
  • This class simplifies working with paths and using a Path is often more efficient that processing and manipulating the equivalent String. This class can easily {@link #iterator() iterate} over the segments, returnthe {@link #size() number of segments}, {@link #compareTo(Path) compare} with other paths, {@link #resolve(Path) resolve}relative paths, return the {@link #getParent() ancestor (or parent)}, determine whether one path is an {@link #isAncestorOf(Path) ancestor} or {@link #isDescendantOf(Path) decendent} of another path, and{@link #getCommonAncestor(Path) finding a common ancestor}.

  • org.moparscape.msc.gs.model.Path
  • org.neo4j.graphdb.Path
    Represents a path in the graph. A path starts with a node followed by pairs of {@link Relationship} and {@link Node} objects. The shortest pathis of length 0. Such a path contains only one node and no relationships. During a traversal {@link Path} instances are emitted where the currentposition of the traverser is represented by each such path. The current node in such a traversal is reached via {@link Path#endNode()}.
  • org.newdawn.slick.geom.Path
    A shape built from lines and curves. Hole support is present but restricted. @author kevin
  • org.nuxeo.common.utils.Path
  • org.patika.mada.util.Path
    @author Ozgun BaburCopyright: Bilkent Center for Bioinformatics, 2007 - present
  • org.pdfclown.documents.contents.objects.Path
    fanochizzolini.it) @since 0.0.7 @version 0.1.0
  • org.rundeck.storage.api.Path
    Address within a tree
  • org.simpleframework.http.Path
    The Path represents the path part of a URI. This provides the various components of the URI path to the user. The normalization of the path is the conversion of the path given into it's actual path by removing the references to the parent directories and to the current dir.

    If the path that this represents is /usr/bin/../etc/./README then the actual path, normalized, is /usr/etc/README. Once the path has been normalized it is possible to acquire the segments as an array of strings, which allows simple manipulation of the path. @author Niall Gallagher @see org.simpleframework.http.parse.PathParser

  • org.springframework.data.mongodb.core.index.MongoPersistentEntityIndexResolver.CycleGuard.Path
  • org.springframework.data.rest.core.Path
    Simple value object to build up (URI) paths. Allows easy concatenation of {@link String}s and will take care of removal of whitespace and reducing slashes to single ones. @author Oliver Gierke
  • org.sugarj.common.path.Path
    @author Sebastian Erdweg
  • org.tmatesoft.hg.util.Path
    Identify repository files (not String nor io.File). Convenient for pattern matching. Memory-friendly. @author Artem Tikhomirov @author TMate Software Ltd.
  • org.uberfire.backend.vfs.Path
  • org.uberfire.java.nio.file.Path
  • org.uiautomation.ios.communication.Path
  • org.vaadin.gwtgraphics.client.shape.Path
    Path represents a path consisting of pen movement commands. Currently, moveTo, lineTo and close commands are supported. The moveTo and lineTo commands support both relative and absolute coordinates.

    The code below creates a path drawing a 100 x 100 pixels rectangle at the position (50, 50):

     Path path = new Path(50, 50); path.lineRelativelyTo(100, 0); path.lineRelativelyTo(0, 100); path.lineRelativelyTo(-100, 0); path.close(); 
    This rectangle is modified as a triangle with the following code:
     path.setStep(2, new LineTo(true, -50, 100)); path.removeStep(3); 
    @author Henri Kerola / IT Mill Ltd
  • org.xilaew.atg.model.testCaseGraphRuntime.Path
    A representation of the model object 'Path'.

    The following features are supported:

    @see org.xilaew.atg.model.testCaseGraphRuntime.TestCaseGraphRuntimePackage#getPath() @model @generated
  • org.zkoss.canvas.Path
    @author simon
  • pivot.collections.Sequence.Tree.Path
  • scala.tools.nsc.io.Path
  • simtools.diagram.gate.Path
    A path computes the way between 2 ends. A path has at least one segment. @author zxpletran007

  • Examples of flexjson.Path

    public class MapTransformer extends AbstractTransformer {

        public void transform(Object object) {
            JSONContext context = getContext();
            Path path = context.getPath();
            Map value = (Map) object;

            try {
                TypeContext typeContext = getContext().writeOpenObject();
                for (Object key : value.keySet()) {

                    path.enqueue(key != null ? key.toString() : null);

                    if (context.isIncluded(key != null ? key.toString() : null, value.get(key))) {

                        Transformer transformer = context.getTransformer(null, value.get(key));


                        if(!(transformer instanceof Inline) || !((Inline)transformer).isInline()) {
                            if (!typeContext.isFirst()) getContext().writeComma();
                            typeContext.increment();
                            if( key != null ) {
                                getContext().writeName(key.toString());
                            } else {
                                getContext().writeName(null);
                            }
                        }

                        if( key != null ) {
                            typeContext.setPropertyName(key.toString());
                        } else {
                            typeContext.setPropertyName(null);
                        }

                        transformer.transform(value.get(key));

                    }

                    path.pop();

                }
                getContext().writeCloseObject();
            } catch( Exception ex ) {
                throw new JSONException(String.format("%s: Error while trying to serialize.", path), ex);
    View Full Code Here

    Examples of gov.nasa.worldwind.render.Path

        @Override
        protected void _assembleVertexControlPoints_(DrawContext dc)
        {
            Terrain terrain = dc.getTerrain();
            Path pol = (Path) super._pol_;

            Position refPos = pol.getReferencePosition();
            Vec4 refPoint = terrain.getSurfacePoint(refPos.getLatitude(), refPos.getLongitude(), 0);

            int altitudeMode = pol.getAltitudeMode();
            double height = 1000; // pol.getHeight();

            Vec4 vaa = null;
            double vaaLength = 0; // used to compute independent length of each cap vertex
            double vaLength = 0;

            int i = 0;
           
            for (LatLon location : pol.getPositions())
            {
                Vec4 vert;

                // Compute the top/cap point.
                if (altitudeMode == WorldWind.CONSTANT || !(location instanceof Position))
    View Full Code Here

    Examples of gov.nist.javax.sip.header.ims.Path

          this.lexer.match(TokenTypes.PATH);
          this.lexer.SPorHT();
          this.lexer.match(':');
          this.lexer.SPorHT();
          while (true) {
            Path path = new Path();
            super.parse(path);
            pathList.add(path);
            this.lexer.SPorHT();
            char la = lexer.lookAhead(0);
            if (la == ',') {
    View Full Code Here

    Examples of hudson.plugins.git.GitChangeSet.Path

         * @throws SAXException
         * @throws IOException
         */
        public void testGetDiffLinkPath() throws IOException, SAXException {
            final HashMap<String, Path> pathMap = createPathMap("rawchangelog");
            final Path path1 = pathMap.get("src/main/java/hudson/plugins/git/browser/GithubWeb.java");
            assertEquals(VIEWGIT_URL + "/?p=PROJECT&a=commitdiff&h=396fc230a3db05c427737aa5c2eb7856ba72b05d#src%2Fmain%2Fjava%2Fhudson%2Fplugins%2Fgit%2Fbrowser%2FGithubWeb.java", viewGitWeb.getDiffLink(path1).toString());
            final Path path2 = pathMap.get("src/test/java/hudson/plugins/git/browser/GithubWebTest.java");
            assertEquals(VIEWGIT_URL + "/?p=PROJECT&a=commitdiff&h=396fc230a3db05c427737aa5c2eb7856ba72b05d#src%2Ftest%2Fjava%2Fhudson%2Fplugins%2Fgit%2Fbrowser%2FGithubWebTest.java", viewGitWeb.getDiffLink(path2).toString());
            final Path path3 = pathMap.get("src/test/resources/hudson/plugins/git/browser/rawchangelog-with-deleted-file");
            assertNull("Do not return a diff link for added files.", viewGitWeb.getDiffLink(path3));
        }
    View Full Code Here

    Examples of java.nio.file.Path

                }
                File metaInf = new File(file, "META-INF");
                if (!metaInf.isDirectory()) {
                    return;
                }
                final Path filePath = file.toPath();
                Files.walkFileTree(metaInf.toPath(), new SimpleFileVisitor<Path>() {
                    @Override
                    public FileVisitResult visitFile(Path file,
                                                     BasicFileAttributes attrs)
                            throws IOException {
                        if (!file.getFileName().toString()
                                .toLowerCase(Locale.ENGLISH).endsWith(TLD_EXT)) {
                            return FileVisitResult.CONTINUE;
                        }

                        String subPath = file.subpath(
                                filePath.getNameCount(), file.getNameCount()).toString();
                        if ('/' != File.separatorChar) {
                            subPath = subPath.replace(File.separatorChar, '/');
                        }
                        String resourcePath = webappPath + "/" + subPath;
    View Full Code Here

    Examples of javafx.scene.shape.Path

          circle.setFill(Color.rgb(0xcc, 0xff, 0x00, 1.0));
          circle.setOpacity(0.9);
          circle.setSmooth(true);
          circle.setStroke(Color.rgb(0xa7, 0xd1, 0x00, 1.0));
          circle.setStrokeWidth(2.0 * scale);
          final Path path = new Path();
          path.setStroke(null);
          path.setOpacity(0.74);
          path.setSmooth(true);
          final MoveTo mt = new MoveTo(123.143 * scale, 61.088 * scale);
          mt.setAbsolute(true);
          path.getElements().add(mt);
          final RadialGradient rg = new RadialGradient(0, 0, 118.0 * scale, 90.0 * scale, 53.625 * scale, false, CycleMethod.NO_CYCLE,
              new Stop(0.0 * scale, Color.rgb(0xFF, 0xFF, 0xFF, 1.0)),
              new Stop(0.2033 * scale, Color.rgb(0xFE, 0xFF, 0xFD, 1.0)),
              new Stop(0.2765 * scale, Color.rgb(0xFD, 0xFD, 0xF6, 1.0)),
              new Stop(0.3286 * scale, Color.rgb(0xF9, 0xFB, 0xEB, 1.0)),
              new Stop(0.3708 * scale, Color.rgb(0xF4, 0xF7, 0xDA, 1.0)),
              new Stop(0.4065 * scale, Color.rgb(0xEE, 0xF2, 0xC4, 1.0)),
              new Stop(0.4157 * scale, Color.rgb(0xEC, 0xF1, 0xBD, 1.0)),
              new Stop(1.0 * scale, Color.rgb(0xCC, 0xFF, 0x00, 1.0)));
          path.setFill(rg);
          final CubicCurveTo cct1 = new CubicCurveTo(130.602 * scale, 70.889 * scale, 129.01 * scale,
              84.643 * scale, 119.59 * scale, 91.813 * scale);
          cct1.setAbsolute(true);
          path.getElements().add(cct1);
          final CubicCurveTo cct2 = new CubicCurveTo(110.171 * scale, 98.981 * scale, 96.489 * scale,
              96.843 * scale, 89.032 * scale, 87.043 * scale);
          cct2.setAbsolute(true);
          path.getElements().add(cct2);
          final CubicCurveTo cct3 = new CubicCurveTo(81.573 * scale, 77.24 * scale, 83.165 * scale,
              63.486 * scale, 92.584 * scale, 56.316 * scale);
          cct3.setAbsolute(true);
          path.getElements().add(cct3);
          final CubicCurveTo cct4 = new CubicCurveTo(102.004 * scale, 49.149 * scale, 115.686 * scale,
              51.285 * scale, 123.143 * scale, 61.088 * scale);
          cct4.setAbsolute(true);
          path.getElements().add(cct4);
          path.getElements().add(new ClosePath());
    //      final Ellipse ellipse = new Ellipse(96.5 * scale, 62.5 * scale, 8.294 * scale, 4.906 * scale);
    //      ellipse.setFill(Color.rgb(0xff, 0xff, 0xff, 1.0));
    //      ellipse.setSmooth(true);
    //      ellipse.getTransforms().add(Transform.affine(0.7958 * scale, -0.6055 * scale, 0.655 * scale,
    //          0.7958 * scale, -18.1424 * scale, 71.1966 * scale));
     
    View Full Code Here

    Examples of javax.persistence.criteria.Path

      }

      @Override
      @SuppressWarnings("unchecked")
      public CriteriaUpdate<T> set(String attributeName, Object value) {
        final Path attributePath = getRoot().get( attributeName );
        final Expression valueExpression = value == null
            ? criteriaBuilder().nullLiteral( attributePath.getJavaType() )
            : criteriaBuilder().literal( value );
        addAssignment( attributePath, valueExpression );
        return this;
      }
    View Full Code Here

    Examples of javax.validation.Path

          return false;
        }

        boolean isReachable;

        Path pathToObject = localContext.getPropertyPath().getPathWithoutLeafNode();
        if ( pathToObject == null ) {
          pathToObject = PathImpl.createNewPath( null );
        }

        try {
    View Full Code Here

    Examples of javax.ws.rs.Path

       @SuppressWarnings("unchecked")
       @Override
       public UriBuilder path(Class resource) throws IllegalArgumentException
       {
          if (resource == null) throw new IllegalArgumentException("path was null");
          Path ann = (Path) resource.getAnnotation(Path.class);
          if (ann != null)
          {
             String[] segments = new String[]{ann.value()};
             path = paths(true, path, segments);
          }
          else
          {
             throw new IllegalArgumentException("Class must be annotated with @Path to invoke path(Class)");
    View Full Code Here

    Examples of jodd.json.Path

      public void serializeValue(JsonContext jsonContext, Map<?, ?> map) {
        jsonContext.writeOpenObject();

        int count = 0;

        Path currentPath = jsonContext.getPath();

        for (Map.Entry<?, ?> entry : map.entrySet()) {
          final Object key = entry.getKey();
          final Object value = entry.getValue();

          if (key != null) {
            currentPath.push(key.toString());
          } else {
            currentPath.push(StringPool.NULL);
          }

          // check if we should include the field

          boolean include = true;

          if (value != null) {

            // + all collections are not serialized by default

            include = jsonContext.matchIgnoredPropertyTypes(value.getClass(), false, include);

            // + path queries: excludes/includes

            include = jsonContext.matchPathToQueries(include);
          }

          // done

          if (!include) {
            currentPath.pop();
            continue;
          }

          if (key == null) {
            jsonContext.pushName(null, count > 0);
          } else {
            jsonContext.pushName(key.toString(), count > 0);
          }

          jsonContext.serialize(value);

          if (jsonContext.isNamePopped()) {
            count++;
          }

          currentPath.pop();
        }

        jsonContext.writeCloseObject();
      }
    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.