Examples of LocationProvider


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));
            }
        }
    }
View Full Code Here

Examples of net.sf.saxon.event.LocationProvider

    public void processingInstruction (String name, CharSequence remainder, int locationId, int properties)
    {
      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 org.eclipse.ant.internal.ui.model.LocationProvider

    file.refreshLocal(IResource.DEPTH_INFINITE, null);

    IDocument doc = ProjectUtils.getDocument(project, antFile);
    //final String filepath = ProjectUtils.getFilePath(project, antFile);

    LocationProvider provider = new LocationProvider(null) {
      public IFile getFile()
      {
        return file;
      }
      public IPath getLocation()
View Full Code Here

Examples of org.onebusaway.uk.atco_cif.LocationProvider

  private Stop getAtcoStop(LocationElement location) {
    String locationId = location.getLocationId();
    AgencyAndId id = id(locationId);
    Stop stop = _dao.getStopForId(id);
    if (stop == null) {
      LocationProvider locationSource = _additionalLocationById.get(locationId);
      if (locationSource == null) {
        throw new AtcoCifException("found location with id=" + locationId
            + " but no additional location information found");
      }

      LocationProvider nxLocationSource = _nxLocationGeoDetailById.get(locationId);
      if (nxLocationSource != null) {
        locationSource = nxLocationSource;
      }

      if (locationSource.getLat() == 0.0 || locationSource.getLon() == 0.0) {
View Full Code Here

Examples of org.pdf4j.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.setLineAndColumn(nodeNr, locator.getLineNumber(locationId), locator.getColumnNumber(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 org.pdf4j.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 org.pdf4j.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 org.pdf4j.saxon.event.LocationProvider

    public void processingInstruction (String name, CharSequence remainder, int locationId, int properties)
    {
      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 org.pdf4j.saxon.event.LocationProvider

    }

    public Location getLocation() {
        if (startElementEvent != null) {
            PipelineConfiguration pipe = startElementEvent.getPipelineConfiguration();
            final LocationProvider provider = pipe.getLocationProvider();
            final int locationId = startElementEvent.getLocationId();
            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);
                }
            };
        } else if (currentItem instanceof NodeInfo) {
            final NodeInfo node = (NodeInfo)currentItem;
            return new Location() {
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.