Examples of LocationProvider


Examples of javax.microedition.location.LocationProvider

                 * @see java.lang.Thread#run()
                 */
                public void run() {
                    final BlackBerryCriteria oldBBCriteria = _bbCriteria;
                    _bbCriteria.setMode(GPSInfo.GPS_MODE_CDMA_MS_ASSIST);
                    LocationProvider tempProvider = null;

                    try {
                        tempProvider =
                                LocationProvider.getInstance(_bbCriteria);
                    } catch (final LocationException e) {
                        log(e.toString());
                    }

                    if (tempProvider != null) {
                        log("Clearing VZ credentials. Please wait...");

                        try {
                            Thread.sleep(2000);
                        } catch (final InterruptedException e) {
                            log(e.toString());
                        }

                        GPSSettings.setPDEInfo("127.0.0.1", 0);

                        try {
                            Thread.sleep(2000);
                        } catch (final InterruptedException e) {
                            log(e.toString());
                        }

                        try {
                            tempProvider.getLocation(1);
                        } catch (final Exception e) {
                            log(e.toString());
                        }

                        try {
View Full Code Here

Examples of javax.microedition.location.LocationProvider

            final Thread resetThread = new Thread() {
                /**
                 * @see java.lang.Thread#run()
                 */
                public void run() {
                    LocationProvider tempProvider = null;

                    try {
                        tempProvider = LocationProvider.getInstance(_criteria);
                    } catch (final LocationException e) {
                        log(e.toString());
                    }

                    if (tempProvider != null) {
                        log("Clearing VZ credentials. Please wait...");

                        try {
                            Thread.sleep(2000);
                        } catch (final InterruptedException e) {
                            log(e.toString());
                        }

                        GPSSettings.setPDEInfo("127.0.0.1", 0);

                        try {
                            // Sleep so the PDE has time to be set up
                            Thread.sleep(2000);
                        } catch (final InterruptedException e) {
                            log(e.toString());
                        }

                        try {
                            tempProvider.getLocation(1);
                        } catch (final Exception e) {
                            log(e.toString());
                        }

                        try {
View Full Code Here

Examples of net.sf.saxon.event.LocationProvider

            throw new IllegalStateException("missing call on startContent()");
        }
        int nameCode = namePool.allocate("", "", name);
        ProcInstImpl pi = new ProcInstImpl(nameCode, remainder.toString());
        currentNode.addChild(pi, size[depth]++);
        LocationProvider locator = pipe.getLocationProvider();
        if (locator!=null) {
            pi.setLocation(locator.getSystemId(locationId),
                           locator.getLineNumber(locationId));
        }
    }
View Full Code Here

Examples of net.sf.saxon.event.LocationProvider

            if (namespacesUsed > 0) {
                e.setNamespaceDeclarations(namespaces, namespacesUsed);
            }

            e.initialise(nameCode, typeCode, attlist, parent, sequenceNumber);
            LocationProvider locator = pipe.getLocationProvider();
            if (locator!=null) {
                String baseURI = locator.getSystemId(locationId);
                int lineNumber = locator.getLineNumber(locationId);
                int columnNumber = locator.getColumnNumber(locationId);
                e.setLocation(baseURI, lineNumber, columnNumber);
            }
            return e;
        }
View Full Code Here

Examples of net.sf.saxon.event.LocationProvider

    {
        boolean toplevel = (parent instanceof XSLStylesheet);
        String baseURI = null;
        int lineNumber = -1;
        int columnNumber = -1;
        LocationProvider locator = pipe.getLocationProvider();
        if (locator!=null) {
            baseURI = locator.getSystemId(locationId);
            lineNumber = locator.getLineNumber(locationId);
            columnNumber = locator.getColumnNumber(locationId);
        }

        if (parent instanceof DataElement) {
            DataElement d = new DataElement();
            d.setNamespaceDeclarations(namespaces, namespacesUsed);
View Full Code Here

Examples of net.sf.saxon.event.LocationProvider

            siblingsAtDepth = p2;
        }
        prevAtDepth[currentDepth] = -1;
        siblingsAtDepth[currentDepth] = 0;

        LocationProvider locator = pipe.getLocationProvider();
        if (locator instanceof SourceLocationProvider) {
            tree.setSystemId(nodeNr, locator.getSystemId(locationId));
        } else if (currentDepth == 1) {
            tree.setSystemId(nodeNr, systemId);
        }
        if (lineNumbering) {
            tree.setLineNumber(nodeNr, locator.getLineNumber(locationId), locator.getColumnNumber(locationId));
        }
    }
View Full Code Here

Examples of net.sf.saxon.event.LocationProvider

        }
        tree.next[nodeNr] = prevAtDepth[currentDepth - 1];   // *O* owner pointer in last sibling
        prevAtDepth[currentDepth] = nodeNr;
        siblingsAtDepth[currentDepth]++;

        LocationProvider locator = pipe.getLocationProvider();
        if (locator instanceof SourceLocationProvider) {
            tree.setSystemId(nodeNr, locator.getSystemId(locationId));
            if (lineNumbering) {
                tree.setLineNumber(nodeNr, locator.getLineNumber(locationId), locator.getColumnNumber(locationId));
            }
        }
    }
View Full Code Here

Examples of net.sf.saxon.event.LocationProvider

     */

    public void write(Item item) throws XPathException {
        ExpressionLocation loc = new ExpressionLocation();
        if (locationId != -1) {
            LocationProvider provider = getPipelineConfiguration().getLocationProvider();
            loc.setSystemId(provider.getSystemId(locationId));
            loc.setLineNumber(provider.getLineNumber(locationId));
        }
        listener.message(new XdmNode((NodeInfo)item), terminate, loc);
    }
View Full Code Here

Examples of net.sf.saxon.event.LocationProvider

    }

    public Location getLocation() {
        if (startElementEvent != null) {
            PipelineConfiguration pipe = startElementEvent.getPipelineConfiguration();
            final LocationProvider provider = pipe.getLocationProvider();
            final int locationId = startElementEvent.getLocationId();
            if (provider != null) {
                return new Location() {
                    public int getCharacterOffset() {
                        return -1;
                    }

                    public int getColumnNumber() {
                        return provider.getColumnNumber(locationId);
                    }

                    public int getLineNumber() {
                        return provider.getLineNumber(locationId);
                    }

                    public String getPublicId() {
                        return null;
                    }

                    public String getSystemId() {
                        return provider.getSystemId(locationId);
                    }
                };
            }
        }
        if (currentItem instanceof NodeInfo) {
View Full Code Here

Examples of net.sf.saxon.event.LocationProvider

            siblingsAtDepth = p2;
        }
        prevAtDepth[currentDepth] = -1;
        siblingsAtDepth[currentDepth] = 0;

        LocationProvider locator = pipe.getLocationProvider();
        if (locator instanceof SourceLocationProvider) {
            tree.setSystemId(nodeNr, locator.getSystemId(locationId));
            if (lineNumbering) {
                tree.setLineNumber(nodeNr, locator.getLineNumber(locationId));
            }
        } else if (currentDepth == 1) {
            tree.setSystemId(nodeNr, systemId);
        }
        if (lineNumbering) {
            tree.setLineNumber(nodeNr, locator.getLineNumber(locationId));
        }
    }
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.