Examples of Segment


Examples of javax.swing.text.Segment

        return elementEnd;
    }
   
    private static Segment getLineBuffer() {
        if (lineBuffer == null) {
            lineBuffer = new Segment();
        }
        return lineBuffer;
    }
View Full Code Here

Examples of joshua.decoder.segment_file.Segment

          this.fatalError(new SAXParseException(
            "Found </seg> but segment was null (missing root tag?)",
            this.locator));
        } else {
          try {
            Segment seg  = this.tempSeg.typeCheck(text);
            this.tempSeg = null;
            this.coit.coNext(seg);
           
          } catch (TypeCheckingException e) {
            this.error(new SAXParseException(
View Full Code Here

Examples of krati.core.segment.Segment

        long startTime, endTime, diffTime;
        System.out.printf("Read multi-segments (%d)%n", segCount);

        try {
            while (segManager.getSegmentCount() < segCount) {
                Segment segment = segManager.nextSegment();
                testAppend(segment);
            }

            Set<SegmentReader> runnerSet = new HashSet<SegmentReader>();
            SegmentReader[] runnerArray = new SegmentReader[segManager.getSegmentCount()];
View Full Code Here

Examples of net.htmlparser.jericho.Segment

    return count;
  }

  private void processCurrentSegment() {
    Segment segment = parser.getCurrentSegment();
    // If this tag is inside the previous tag (e.g. a server tag) then
    // ignore it as it was already output along with the previous tag.
    if( segment.getEnd() <= lastSegEnd ) {
      return;
    }
    lastSegEnd = segment.getEnd();
    if( segment instanceof Tag ) {
      if( segment instanceof StartTag ) {
        processStartTag( (StartTag)segment );
      } else if ( segment instanceof EndTag ) {
        processEndTag( (EndTag)segment );
      } else {
        writer.write( segment.toString() );
      }
    } else {
      processText( segment );
    }
  }
View Full Code Here

Examples of net.sourceforge.gpstools.jpeg.JpegStructure.Segment

        for (Segment sapp1 : app1) {
            handleAPP1Segment(sapp1);
        }
        // We have no XMP but other APP1, insert XMP behind other APP1
        if (xmpSegment == null && !app1.isEmpty()) {
            Segment lastAPP1 = app1.get(app1.size() - 1);
            xmpSegment = new Segment(Marker.APP1, lastAPP1.offset
                    + lastAPP1.length, 0);
        }
        // We have no APP1 but APP0, insert XMP behind APP0
        if (xmpSegment == null) {
            List<Segment> app0 = structure.getSegments(Marker.APP0);
            if (!app0.isEmpty()) {
                Segment lastAPP0 = app0.get(app0.size() - 1);
                xmpSegment = new Segment(Marker.APP1, lastAPP0.offset
                        + lastAPP0.length, 0);
            }
        }
        // We have neither XMP nor EXIF nor APP0, insert behind SOI
        if (xmpSegment == null) {
            List<Segment> soi = structure.getSegments(Marker.SOI);
            if (soi.isEmpty()) {
                throw new XMPReadException("No SOI marker found.");
            }
            xmpSegment = new Segment(Marker.APP1, soi.get(0).offset, 0);
        }
    }
View Full Code Here

Examples of net.yacy.search.index.Segment

    public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {
        // return variable that accumulates replacements
        final Switchboard sb = (Switchboard) env;
        final serverObjects prop = new serverObjects();
        Segment segment = null;
        final boolean html = post != null && post.containsKey("html");
        prop.setLocalized(html);
        if (post != null && post.containsKey("segment") && sb.verifyAuthentication(header)) {
            segment = sb.indexSegments.segment(post.get("segment"));
        }
        if (segment == null) segment = sb.indexSegments.segment(Segments.Process.PUBLIC);

        prop.put("rejected", "0");
        sb.updateMySeed();
        final int cacheMaxSize = (int) sb.getConfigLong(SwitchboardConstants.WORDCACHE_MAX_COUNT, 10000);
        prop.putNum("ppm", sb.currentPPM());
        prop.putNum("qpm", sb.peers.mySeed().getQPM());
        prop.putNum("wordCacheSize", segment.termIndex().getBufferSize());
        prop.putNum("wordCacheMaxSize", cacheMaxSize);

        // crawl queues
        prop.putNum("localCrawlSize", sb.getThread(SwitchboardConstants.CRAWLJOB_LOCAL_CRAWL).getJobCount());
        prop.putNum("limitCrawlSize", sb.crawlQueues.limitCrawlJobSize());
View Full Code Here

Examples of org.apache.batik.ext.awt.geom.Segment

        // System.err.println("sorting: " + sl.size());
        Transition [] segs = new Transition[sl.size()*2];
        Iterator iter = sl.iterator();
        int i=0;
        while (iter.hasNext()) {
            Segment seg = (Segment)iter.next();
            segs[i++] = new Transition(seg.minX(), true);
            segs[i++] = new Transition(seg.maxX(), false);
            // System.err.println("Seg: " + seg.minX() + ", " + seg.maxX());
        }

        Arrays.sort(segs, TransitionComp.COMP);
        validRanges = new ArrayList();
View Full Code Here

Examples of org.apache.commons.imaging.formats.jpeg.segments.Segment

                throw new ImageReadException("No Segments Found.");
            }

            for (int d = 0; d < segments.size(); d++) {

                final Segment segment = segments.get(d);

                final NumberFormat nf = NumberFormat.getIntegerInstance();
                // this.debugNumber("found, marker: ", marker, 4);
                pw.println(d + ": marker: "
                        + Integer.toHexString(segment.marker) + ", "
                        + segment.getDescription() + " (length: "
                        + nf.format(segment.length) + ")");
                segment.dump(pw);
            }

            pw.println("");
        }
View Full Code Here

Examples of org.apache.commons.math3.geometry.euclidean.twod.Segment

                this.lineSegments = new Segment[0];
            } else if (size == 2) {
                this.lineSegments = new Segment[1];
                final Vector2D p1 = vertices[0];
                final Vector2D p2 = vertices[1];
                this.lineSegments[0] = new Segment(p1, p2, new Line(p1, p2, tolerance));
            } else {
                this.lineSegments = new Segment[size];
                Vector2D firstPoint = null;
                Vector2D lastPoint = null;
                int index = 0;
                for (Vector2D point : vertices) {
                    if (lastPoint == null) {
                        firstPoint = point;
                        lastPoint = point;
                    } else {
                        this.lineSegments[index++] =
                                new Segment(lastPoint, point, new Line(lastPoint, point, tolerance));
                        lastPoint = point;
                    }
                }
                this.lineSegments[index] =
                        new Segment(lastPoint, firstPoint, new Line(lastPoint, firstPoint, tolerance));
            }
        }
        return lineSegments;
    }
View Full Code Here

Examples of org.apache.ctakes.typesystem.type.textspan.Segment

    JFSIndexRepository indexes = jcas.getJFSIndexRepository();
    Iterator<?> sectionItr = indexes.getAnnotationIndex(Segment.type)
        .iterator();
    while (sectionItr.hasNext()) {
      Segment sa = (Segment) sectionItr.next();
      String sectionID = sa.getId();
      if (!skipSegmentsSet.contains(sectionID)) {
        sentenceCount = annotateRange(jcas, text, sa, sentenceCount);
      }
    }
  }
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.