debian/0000775000000000000000000000000012243255303007167 5ustar debian/maven.cleanIgnoreRules0000664000000000000000000000150112243255043013456 0ustar # Maven clean ignore rules - ignore some Maven dependencies and plugins # during the clean phase of a Maven build # Format of this file is: # [group] [artifact] [type] [version] [classifier] [scope] # where each element can be either # - the exact string, for example org.apache for the group, or 3.1 # for the version. In this case, the element is simply matched # and left as it is # - * (the star character, alone). In this case, anything will # match and be left as it is. For example, using * on the # position of the artifact field will match any artifact id # All elements much match before a rule can be applied # Example rule: match jar with groupid= junit, artifactid= junit # and version starting with 3., this dependency is then removed # from the POM before mvn clean is called # junit junit jar s/3\\..*/3.x/ debian/changelog0000664000000000000000000000316612243255167011057 0ustar jsoup (1.7.3-1) unstable; urgency=low * New upstream release * Refreshed the patch * Replaced debian/get-orig-source with debian/orig-tar.sh called from uscan * Use XZ compression for the upstream tarball * Updated Standards-Version to 3.9.5 (no changes) * Switch to debhelper level 9 -- Emmanuel Bourg Thu, 21 Nov 2013 01:56:54 +0100 jsoup (1.7.2-1) unstable; urgency=low * Team upload * New upstream release * Refreshed the patch * Updated the debian/get-orig-source script for the latest release * Fixed the watch file * Updated Standards-Version to 3.9.4 (no changes) * debian/copyright: Updated the Format URI to 1.0 -- Emmanuel Bourg Mon, 13 May 2013 11:28:30 +0200 jsoup (1.6.2-1) unstable; urgency=low * New upstream release. * Add OSGi metadata to JAR manifest. * Add Jakub Adam to Uploaders. * Update Standards-Version to 3.9.3. * Fixed syntax-error-in-dep5-copyright lintian warning. * Don't install javadoc jar to maven-repo. Documentation is already in /usr/share/doc/libjsoup-java/api * Fix installation of library to /usr/share/java. * Replace possibly non-distributable test data with CC-BY-SA 3.0 Wikipedia article. (Closes: #667021) -- Jakub Adam Sun, 08 Apr 2012 00:18:08 +0200 jsoup (1.6.1-2) unstable; urgency=low * Fix Uploaders field. (Closes: #640485) * Fix Vcs headers. -- Torsten Werner Tue, 06 Sep 2011 21:44:04 +0200 jsoup (1.6.1-1) unstable; urgency=low * Initial release (Closes: #639715) -- Torsten Werner Mon, 29 Aug 2011 15:54:01 +0200 debian/maven.publishedRules0000664000000000000000000000164212243255043013215 0ustar # Maven published rules - additional rules to publish, to help # the packaging work of Debian maintainers using mh_make # Format of this file is: # [group] [artifact] [type] [version] [classifier] [scope] # where each element can be either # - the exact string, for example org.apache for the group, or 3.1 # for the version. In this case, the element is simply matched # and left as it is # - * (the star character, alone). In this case, anything will # match and be left as it is. For example, using * on the # position of the artifact field will match any artifact id # - a regular expression of the form s/match/replace/ # in this case, elements that match are transformed using # the regex rule. # All elements much match before a rule can be applied # Example rule: match jar with groupid= junit, artifactid= junit # and version starting with 3., replacing the version with 3.x # junit junit jar s/3\\..*/3.x/ debian/maven.ignoreRules0000664000000000000000000000145312243255043012521 0ustar # Maven ignore rules - ignore some Maven dependencies and plugins # Format of this file is: # [group] [artifact] [type] [version] [classifier] [scope] # where each element can be either # - the exact string, for example org.apache for the group, or 3.1 # for the version. In this case, the element is simply matched # and left as it is # - * (the star character, alone). In this case, anything will # match and be left as it is. For example, using * on the # position of the artifact field will match any artifact id # All elements much match before a rule can be applied # Example rule: match jar with groupid= junit, artifactid= junit # and version starting with 3., this dependency is then removed # from the POM # junit junit jar s/3\\..*/3.x/ org.apache.maven.plugins maven-source-plugin * * * * debian/README.source0000664000000000000000000000044112243252310011340 0ustar Information about jsoup ------------------------------ This package was debianized using the mh_make command from the maven-debian-helper package. The build system uses Maven but prevents it from downloading anything from the Internet, making the build compliant with the Debian policy. debian/source/0000775000000000000000000000000012243252310010462 5ustar debian/source/format0000664000000000000000000000001412243252310011670 0ustar 3.0 (quilt) debian/copyright0000664000000000000000000005300312243252310011116 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: jsoup Upstream-Contact: Jonathan Hedley as Lead Developer Source: http://jsoup.org Files: * Copyright: 2009-2011, Jonathan Hedley License: MIT Files: debian/* Copyright: 2011, Torsten Werner 2012, Debian Java Maintainers License: MIT Files: debian/patches/dfsg-free-test-data.patch Copyright: 2012, Wikimedia Foundation, Inc. and its contributors 2012, Debian Java Maintainers License: CC-BY-SA 3.0 License: MIT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: . The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. License: CC-BY-SA 3.0 THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. . BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. . 1. Definitions . "Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License. . "Collection" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined below) for the purposes of this License. . "Creative Commons Compatible License" means a license that is listed at http://creativecommons.org/compatiblelicenses that has been approved by Creative Commons as being essentially equivalent to this License, including, at a minimum, because that license: (i) contains terms that have the same purpose, meaning and effect as the License Elements of this License; and, (ii) explicitly permits the relicensing of adaptations of works made available under that license under this License or a Creative Commons jurisdiction license with the same License Elements as this License. . "Distribute" means to make available to the public the original and copies of the Work or Adaptation, as appropriate, through sale or other transfer of ownership. . "License Elements" means the following high-level license attributes as selected by Licensor and indicated in the title of this License: Attribution, ShareAlike. . "Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License. . "Original Author" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast. . "Work" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not otherwise considered a literary or artistic work. . "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. . "Publicly Perform" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images. . "Reproduce" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium. . 2. Fair Dealing Rights . Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws. . 3. License Grant . Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: . a) to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections; b) to create and Reproduce Adaptations provided that any such Adaptation, including any translation in any medium, takes reasonable steps to clearly label, demarcate or otherwise identify that changes were made to the original Work. For example, a translation could be marked "The original work was translated from English to Spanish," or a modification could indicate "The original work has been modified."; c) to Distribute and Publicly Perform the Work including as incorporated in Collections; and, d) to Distribute and Publicly Perform Adaptations. e) For the avoidance of doubt: i. Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; ii. Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor waives the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; and, iii. Voluntary License Schemes. The Licensor waives the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License. . The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. Subject to Section 8(f), all rights not expressly granted by Licensor are hereby reserved. . 4. Restrictions . The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: . a) You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(c), as requested. If You create an Adaptation, upon notice from any Licensor You must, to the extent practicable, remove from the Adaptation any credit as required by Section 4(c), as requested. b) You may Distribute or Publicly Perform an Adaptation only under the terms of: (i) this License; (ii) a later version of this License with the same License Elements as this License; (iii) a Creative Commons jurisdiction license (either this or a later license version) that contains the same License Elements as this License (e.g., Attribution-ShareAlike 3.0 US)); (iv) a Creative Commons Compatible License. If you license the Adaptation under one of the licenses mentioned in (iv), you must comply with the terms of that license. If you license the Adaptation under the terms of any of the licenses mentioned in (i), (ii) or (iii) (the "Applicable License"), you must comply with the terms of the Applicable License generally and the following provisions: (I) You must include a copy of, or the URI for, the Applicable License with every copy of each Adaptation You Distribute or Publicly Perform; (II) You may not offer or impose any terms on the Adaptation that restrict the terms of the Applicable License or the ability of the recipient of the Adaptation to exercise the rights granted to that recipient under the terms of the Applicable License; (III) You must keep intact all notices that refer to the Applicable License and to the disclaimer of warranties with every copy of the Work as included in the Adaptation You Distribute or Publicly Perform; (IV) when You Distribute or Publicly Perform the Adaptation, You may not impose any effective technological measures on the Adaptation that restrict the ability of a recipient of the Adaptation from You to exercise the rights granted to that recipient under the terms of the Applicable License. This Section 4(b) applies to the Adaptation as incorporated in a Collection, but this does not require the Collection apart from the Adaptation itself to be made subject to the terms of the Applicable License. c) If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and (iv) , consistent with Ssection 3(b), in the case of an Adaptation, a credit identifying the use of the Work in the Adaptation (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). The credit required by this Section 4(c) may be implemented in any reasonable manner; provided, however, that in the case of a Adaptation or Collection, at a minimum such credit will appear, if a credit for all contributing authors of the Adaptation or Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties. d) Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Adaptations or Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. Licensor agrees that in those jurisdictions (e.g. Japan), in which any exercise of the right granted in Section 3(b) of this License (the right to make Adaptations) would be deemed to be a distortion, mutilation, modification or other derogatory action prejudicial to the Original Author's honor and reputation, the Licensor will waive or not assert, as appropriate, this Section, to the fullest extent permitted by the applicable national law, to enable You to reasonably exercise Your right under Section 3(b) of this License (right to make Adaptations) but not otherwise. . 5. Representations, Warranties and Disclaimer . UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. . 6. Limitation on Liability . EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. . 7. Termination . a) This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Adaptations or Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. b) Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. . 8. Miscellaneous . a) Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. b) Each time You Distribute or Publicly Perform an Adaptation, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. c) If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. d) No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. e) This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. f) The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the license of any rights under applicable law. debian/orig-tar.excludes0000664000000000000000000000060212243252310012442 0ustar src/test/resources/htmltests/baidu-cn-home.html src/test/resources/htmltests/baidu-variant.html src/test/resources/htmltests/google-ipod.html src/test/resources/htmltests/news-com-au-home.html src/test/resources/htmltests/nyt-article-1.html src/test/resources/htmltests/smh-biz-article-1.html src/test/resources/htmltests/yahoo-article-1.html src/test/resources/htmltests/yahoo-jp.html debian/watch0000664000000000000000000000013512243252310010212 0ustar version=3 https://github.com/jhy/jsoup/tags .*/jsoup-(.*)\.tar\.gz debian debian/orig-tar.sh debian/libjsoup-java-doc.install0000664000000000000000000000006212243252310014061 0ustar target/apidocs/* usr/share/doc/libjsoup-java/api debian/orig-tar.sh0000775000000000000000000000027612243252310011252 0ustar #!/bin/sh set -e VERSION=$2 DIR=jsoup-jsoup-${VERSION} TAR=../jsoup_${VERSION}.orig.tar.xz tar -xf $3 rm $3 XZ_OPT=--best tar -c -v -J -f $TAR -X debian/orig-tar.excludes $DIR rm -Rf $DIR debian/maven.rules0000664000000000000000000000165112243255043011355 0ustar # Maven rules - transform Maven dependencies and plugins # Format of this file is: # [group] [artifact] [type] [version] [classifier] [scope] # where each element can be either # - the exact string, for example org.apache for the group, or 3.1 # for the version. In this case, the element is simply matched # and left as it is # - * (the star character, alone). In this case, anything will # match and be left as it is. For example, using * on the # position of the artifact field will match any artifact id # - a regular expression of the form s/match/replace/ # in this case, elements that match are transformed using # the regex rule. # All elements much match before a rule can be applied # Example rule: match jar with groupid= junit, artifactid= junit # and version starting with 3., replacing the version with 3.x # junit junit jar s/3\\..*/3.x/ junit junit jar s/4\..*/4.x/ * * org.jsoup jsoup jar s/.*/debian/ * * debian/maven.properties0000664000000000000000000000014412243252310012405 0ustar # Include here properties to pass to Maven during the build. # For example: # maven.test.skip=true debian/libjsoup-java.poms0000664000000000000000000000320512243254563012644 0ustar # List of POM files for the package # Format of this file is: # [option]* # where option can be: # --ignore: ignore this POM and its artifact if any # --ignore-pom: don't install the POM. To use on POM files that are created # temporarily for certain artifacts such as Javadoc jars. [mh_install, mh_installpoms] # --no-parent: remove the tag from the POM # --package=: an alternative package to use when installing this POM # and its artifact # --has-package-version: to indicate that the original version of the POM is the same as the upstream part # of the version for the package. # --keep-elements=: a list of XML elements to keep in the POM # during a clean operation with mh_cleanpom or mh_installpom # --artifact=: path to the build artifact associated with this POM, # it will be installed when using the command mh_install. [mh_install] # --java-lib: install the jar into /usr/share/java to comply with Debian # packaging guidelines # --usj-name=: name to use when installing the library in /usr/share/java # --usj-version=: version to use when installing the library in /usr/share/java # --no-usj-versionless: don't install the versionless link in /usr/share/java # --dest-jar=: the destination for the real jar. # It will be installed with mh_install. [mh_install] # --classifier=: Optional, the classifier for the jar. Empty by default. # --site-xml=: Optional, the location for site.xml if it needs to be installed. # Empty by default. [mh_install] # pom.xml --has-package-version --java-lib debian/rules0000775000000000000000000000042112243252310010237 0ustar #!/usr/bin/make -f include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/maven.mk JAVA_HOME := /usr/lib/jvm/default-java DEB_MAVEN_INSTALL_DOC_TARGET := get-orig-source: uscan --download-version $(DEB_UPSTREAM_VERSION) --force-download --rename debian/compat0000664000000000000000000000000212243252310010360 0ustar 9 debian/control0000664000000000000000000000507712243252310010576 0ustar Source: jsoup Section: java Priority: optional Maintainer: Debian Java Maintainers Uploaders: Torsten Werner , Jakub Adam , Emmanuel Bourg Build-Depends: debhelper (>= 9), cdbs, default-jdk, maven-debian-helper (>= 1.4) Build-Depends-Indep: libmaven-javadoc-plugin-java, junit4, default-jdk-doc, libmaven-bundle-plugin-java Standards-Version: 3.9.5 Vcs-Git: git://anonscm.debian.org/pkg-java/jsoup.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-java/jsoup.git Homepage: http://jsoup.org Package: libjsoup-java Architecture: all Depends: ${misc:Depends}, ${maven:Depends} Recommends: ${maven:OptionalDepends} Suggests: libjsoup-java-doc Description: Java HTML parser that makes sense of real-world HTML soup Jsoup is a Java library for working with real-world HTML. It provides a very convenient API for extracting and manipulating data, using the best of DOM, CSS, and jquery-like methods. . jsoup implements the WHATWG HTML specification (http://whatwg.org/html), and parses HTML to the same DOM as modern browsers do. . * parse HTML from a URL, file, or string * find and extract data, using DOM traversal or CSS selectors * manipulate the HTML elements, attributes, and text * clean user-submitted content against a safe white-list, to prevent XSS * output tidy HTML . jsoup is designed to deal with all varieties of HTML found in the wild; from pristine and validating, to invalid tag-soup; jsoup will create a sensible parse tree. Package: libjsoup-java-doc Architecture: all Section: doc Depends: ${misc:Depends}, ${maven:DocDepends} Recommends: ${maven:DocOptionalDepends} Suggests: libjsoup-java Description: Documentation for jsoup HTML Parser Jsoup is a Java library for working with real-world HTML. It provides a very convenient API for extracting and manipulating data, using the best of DOM, CSS, and jquery-like methods. . jsoup implements the WHATWG HTML specification (http://whatwg.org/html), and parses HTML to the same DOM as modern browsers do. . * parse HTML from a URL, file, or string * find and extract data, using DOM traversal or CSS selectors * manipulate the HTML elements, attributes, and text * clean user-submitted content against a safe white-list, to prevent XSS * output tidy HTML . jsoup is designed to deal with all varieties of HTML found in the wild; from pristine and validating, to invalid tag-soup; jsoup will create a sensible parse tree. . This package contains the API documentation of libjsoup-java. debian/patches/0000775000000000000000000000000012243254456010626 5ustar debian/patches/series0000664000000000000000000000003212243252310012021 0ustar dfsg-free-test-data.patch debian/patches/dfsg-free-test-data.patch0000664000000000000000000040442512243254456015406 0ustar Description: Use free test data Author: Jakub Adam Forwarded: not-needed --- a/src/test/java/org/jsoup/integration/ParseTest.java +++ b/src/test/java/org/jsoup/integration/ParseTest.java @@ -5,6 +5,7 @@ import org.jsoup.nodes.Element; import org.jsoup.select.Elements; import org.junit.Test; +import org.junit.Ignore; import java.io.*; import java.net.URISyntaxException; @@ -19,6 +20,45 @@ public class ParseTest { @Test + public void testWikipediaArticle() throws IOException { + File in = getFile("/htmltests/wikipedia-article-1.html"); + Document doc = Jsoup.parse(in, "UTF-8", + "http://en.wikipedia.org/wiki/Debian"); + assertEquals("Kepler’s laws of planetary motion - Wikipedia, the free encyclopedia", + doc.title()); // note that the apos in the source is a literal ’ (8217), not escaped or ' + + assertEquals("en", doc.select("html").attr("lang")); + Elements thumbInner = doc.select(".thumbinner > *"); + assertEquals(10, thumbInner.size()); + + assertEquals("Kepler's laws of planetary motion", doc.select(".mw-body h1").text().trim()); + + Element a = doc.select("a[href=/wiki/File:Kepler_laws_diagram.svg]").first(); + assertEquals("/wiki/File:Kepler_laws_diagram.svg", a.attr("href")); + assertEquals("http://en.wikipedia.org/wiki/File:Kepler_laws_diagram.svg", a.attr("abs:href")); + + Element hs = doc.select("a[href*=stargaze]").first(); + assertEquals( + "http://www-istp.gsfc.nasa.gov/stargaze/Skeplaws.htm", + hs.attr("href")); + assertEquals(hs.attr("href"), hs.attr("abs:href")); + + Elements results = doc.select("span.reference-text > a"); + assertEquals(15, results.size()); + assertEquals("http://demonstrations.wolfram.com/KeplersSecondLaw/", + results.get(0).attr("href")); + assertEquals("http://plato.stanford.edu/archives/win2008/entries/newton-principia/", + results.get(1).attr("href")); + + a = doc.select("a[href=//ja.wikipedia.org/wiki/%E3%82%B1%E3%83%97%E3%83%A9%E3%83%BC%E3%81%AE%E6%B3%95%E5%89%87]").first(); + assertEquals("日本語", a.text()); + + Element p = doc.select("p:contains(different parts in its orbit").first(); + assertEquals("Now as the first law states that the planet follows an ellipse, the planet is at different distances from the Sun at different parts in its orbit. So the planet has to move faster when it is closer to the Sun so that it sweeps equal areas in equal times.", p.text()); + } + + @Test + @Ignore public void testSmhBizArticle() throws IOException { File in = getFile("/htmltests/smh-biz-article-1.html"); Document doc = Jsoup.parse(in, "UTF-8", @@ -34,6 +74,7 @@ } @Test + @Ignore public void testNewsHomepage() throws IOException { File in = getFile("/htmltests/news-com-au-home.html"); Document doc = Jsoup.parse(in, "UTF-8", "http://www.news.com.au/"); @@ -52,6 +93,7 @@ } @Test + @Ignore public void testGoogleSearchIpod() throws IOException { File in = getFile("/htmltests/google-ipod.html"); Document doc = Jsoup.parse(in, "UTF-8", "http://www.google.com/search?hl=en&q=ipod&aq=f&oq=&aqi=g10"); @@ -74,6 +116,7 @@ } @Test + @Ignore public void testYahooJp() throws IOException { File in = getFile("/htmltests/yahoo-jp.html"); Document doc = Jsoup.parse(in, "UTF-8", "http://www.yahoo.co.jp/index.html"); // http charset is utf-8. @@ -85,6 +128,7 @@ } @Test + @Ignore public void testBaidu() throws IOException { // tests File in = getFile("/htmltests/baidu-cn-home.html"); @@ -109,6 +153,7 @@ } @Test + @Ignore public void testBaiduVariant() throws IOException { // tests when preceded by another File in = getFile("/htmltests/baidu-variant.html"); @@ -151,6 +196,7 @@ } @Test + @Ignore public void testNytArticle() throws IOException { // has tags like File in = getFile("/htmltests/nyt-article-1.html"); @@ -161,6 +207,7 @@ } @Test + @Ignore public void testYahooArticle() throws IOException { File in = getFile("/htmltests/yahoo-article-1.html"); Document doc = Jsoup.parse(in, "UTF-8", "http://news.yahoo.com/s/nm/20100831/bs_nm/us_gm_china"); --- /dev/null +++ b/src/test/resources/htmltests/wikipedia-article-1.html @@ -0,0 +1,1169 @@ + + + +Kepler’s laws of planetary motion - Wikipedia, the free encyclopedia + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+ + + +
+ + +

+ Kepler's laws of planetary motion +

+ + +
+ +
From Wikipedia, the free encyclopedia
+ + +
+ + +
+ Jump to: navigation, + search +
+ + +
+
+
+
+Figure 1: Illustration of Kepler's three laws with two planetary orbits. (1) The orbits are ellipses, with focal points ƒ1 and ƒ2 for the first planet and ƒ1 and ƒ3 for the second planet. The Sun is placed in focal point ƒ1. (2) The two shaded sectors A1 and A2 have the same surface area and the time for planet 1 to cover segment A1 is equal to the time to cover segment A2. (3) The total orbit times for planet 1 and planet 2 have a ratio a13/2 : a23/2.
+
+
+

In astronomy, Kepler's laws give a description of the motion of planets around the Sun.

+

Kepler's laws are:

+
    +
  1. The orbit of every planet is an ellipse with the Sun at one of the two foci.
  2. +
  3. A line joining a planet and the Sun sweeps out equal areas during equal intervals of time.[1]
  4. +
  5. The square of the orbital period of a planet is directly proportional to the cube of the semi-major axis of its orbit.
  6. +
+ + + + +
+
+

Contents

+
+ +
+

[edit] History

+

Johannes Kepler published his first two laws in 1609, having found them by analyzing the astronomical observations of Tycho Brahe.[2] Kepler discovered his third law many years later, and it was published in 1619.[2] At the time, Kepler's laws were radical claims; the prevailing belief (particularly in epicycle-based theories) was that orbits should be based on perfect circles. Most of the planetary orbits can be rather closely approximated as circles, so it is not immediately evident that the orbits are ellipses. Detailed calculations for the orbit of the planet Mars first indicated to Kepler its elliptical shape, and he inferred that other heavenly bodies, including those farther away from the Sun, have elliptical orbits too. Kepler's laws and his analysis of the observations on which they were based, the assertion that the Earth orbited the Sun, proof that the planets' speeds varied, and use of elliptical orbits rather than circular orbits with epicycles—challenged the long-accepted geocentric models of Aristotle and Ptolemy, and generally supported the heliocentric theory of Nicolaus Copernicus (although Kepler's ellipses likewise did away with Copernicus's circular orbits and epicycles).[2]

+

Some eight decades later, Isaac Newton proved that relationships like Kepler's would apply exactly under certain ideal conditions that are to a good approximation fulfilled in the solar system, as consequences of Newton's own laws of motion and law of universal gravitation.[3][4] Because of the nonzero planetary masses and resulting perturbations, Kepler's laws apply only approximately and not exactly to the motions in the solar system.[3][5] Voltaire's Eléments de la philosophie de Newton (Elements of Newton's Philosophy) was in 1738 the first publication to call Kepler's Laws "laws".[6] Together with Newton's mathematical theories, they are part of the foundation of modern astronomy and physics.[3]

+

[edit] First Law

+ +
+
+
+
+Figure 2: Kepler's first law placing the Sun at the focus of an elliptical orbit
+
+
+
+
"The orbit of every planet is an ellipse with the Sun at one of the two foci."
+
+

An ellipse is a particular class of mathematical shapes that resemble a stretched out circle (see the figure to the right). Note as well that the Sun is not at the center of the ellipse but is at one of the focal points. The other focal point is marked with a lighter dot but is a point that has no physical significance for the orbit. Ellipses have two focal points and the center of the ellipse is the midpoint of the line segment joining them. Circles are a special case of an ellipse that are not stretched out and in which both focal points coincide at the center.

+

How stretched out that ellipse is from a perfect circle is known as its eccentricity; a parameter that can take any value greater than or equal to 0 (a simple circle) and smaller than 1 (when the eccentricity tends to 1, the ellipse tends to a parabola). The eccentricities of the planets known to Kepler varies from 0.007 (Venus) to 0.2 (Mercury). (See List of planetary objects in the Solar System for more detail.)

+

After Kepler, though, bodies with highly eccentric orbits have been identified, among them many comets and asteroids. The dwarf planet Pluto was discovered as late as 1929, the delay mostly due to its small size, far distance, and optical faintness. Heavenly bodies such as comets with parabolic or even hyperbolic orbits are possible under the Newtonian theory and have been observed.[7]

+
+
+
+
+Figure 4: Heliocentric coordinate system (r, θ) for ellipse. Also shown are: semi-major axis a, semi-minor axis b and semi-latus rectum p; center of ellipse and its two foci marked by large dots. For θ = 0°, r = rmin and for θ = 180°, r = rmax.
+
+
+

Symbolically an ellipse can be represented in polar coordinates as:

+
+
r=\frac{p}{1+\varepsilon\, \cos\theta},
+
+

where (rθ) are the polar coordinates (from the focus) for the ellipse, p is the semi-latus rectum, and ε is the eccentricity of the ellipse. For a planet orbiting the Sun then r is the distance from the Sun to the planet and θ is the angle with its vertex at the Sun from the location where the planet is closest to the Sun.

+

At θ = 0°, perihelion, the distance is minimum

+
+
r_\mathrm{min}=\frac{p}{1+\varepsilon}.
+
+

At θ = 90° and at θ = 270°, the distance is \, p.

+

At θ = 180°, aphelion, the distance is maximum

+
+
r_\mathrm{max}=\frac{p}{1-\varepsilon}.
+
+

The semi-major axis a is the arithmetic mean between rmin and rmax:

+
+
\,r_\max - a=a-r_\min
+
+

so

+
+
a=\frac{p}{1-\varepsilon^2}.
+
+

The semi-minor axis b is the geometric mean between rmin and rmax:

+
+
\frac{r_\max} b =\frac b{r_\min}
+
+

so

+
+
b=\frac p{\sqrt{1-\varepsilon^2}}.
+
+

The semi-latus rectum p is the harmonic mean between rmin and rmax:

+
+
\frac{1}{r_\min}-\frac{1}{p}=\frac{1}{p}-\frac{1}{r_\max}
+
+

so

+
+
pa=r_\max r_\min=b^2\,.
+
+

The eccentricity ε is the coefficient of variation between rmin and rmax:

+
+
\varepsilon=\frac{r_\mathrm{max}-r_\mathrm{min}}{r_\mathrm{max}+r_\mathrm{min}}.
+
+

The area of the ellipse is

+
+
A=\pi a b\,.
+
+

The special case of a circle is ε = 0, resulting in r = p = rmin = rmax = a = b and A = π r2.

+

[edit] Second law

+
+
+
+
+Figure 3: Illustration of Kepler's second law. The planet moves faster near the Sun, so the same area is swept out in a given time as at larger distances, where the planet moves more slowly. The green arrow represents the planet's velocity, and the purple arrows represents the force on the planet.
+
+
+
+
"A line joining a planet and the Sun sweeps out equal areas during equal intervals of time."[1]
+
+

In a small time

+
+
dt\,
+
+

the planet sweeps out a small triangle having base line

+
+
r\,
+
+

and height

+
+
r d\theta\,.
+
+

The area of this triangle is

+
+
dA=\tfrac 1 2\cdot r\cdot r d\theta
+
+

and so the constant areal velocity is

+
+
\frac{dA}{dt}=\tfrac{1}{2}r^2 \frac{d\theta}{dt}.
+
+

Now as the first law states that the planet follows an ellipse, the planet is at different distances from the Sun at different parts in its orbit. So the planet has to move faster when it is closer to the Sun so that it sweeps equal areas in equal times.

+

The total area enclosed by the elliptical orbit is

+
+
A=\pi ab\,.
+
+

Therefore the period

+
+
P\,
+
+

satisfies

+
+
\pi ab=P\cdot \tfrac 12r^2 \dot\theta
+
+

or

+
+
r^2\dot \theta = nab
+
+

where

+
+
\dot\theta=\frac{d\theta}{dt}
+
+

is the angular velocity, (using Newton notation for differentiation), and

+
+
n = \frac{2\pi}{P}
+
+

is the mean motion of the planet around the Sun.

+

[edit] Third law

+
+
"The square of the orbital period of a planet is directly proportional to the cube of the semi-major axis of its orbit."
+
+

The third law, published by Kepler in 1619 [1] captures the relationship between the distance of planets from the Sun, and their orbital periods. For example, suppose planet A is 4 times as far from the Sun as planet B. Then planet A must traverse 4 times the distance of Planet B each orbit, and moreover it turns out that planet A travels at half the speed of planet B, in order to maintain equilibrium with the reduced gravitational centripetal force due to being 4 times further from the Sun. In total it takes 4×2=8 times as long for planet A to travel an orbit, in agreement with the law (82=43).

+

This third law used to be known as the harmonic law,[8] because Kepler enunciated it in a laborious attempt to determine what he viewed as the "music of the spheres" according to precise laws, and express it in terms of musical notation.[9]

+

This third law currently receives additional attention as it can be used to estimate the distance from an exoplanet to its central star, and help to decide if this distance is inside the habitable zone of that star.[10]

+

Symbolically:

+
+
 P^2 \propto a^3 \,
+
+

where P is the orbital period of the planet and a is the semi-major axis of the orbit.

+

Interestingly, the constant of proportion is theoretically same for both circular and elliptical orbits, and the constant is essentially the same for all planets (and other objects) orbiting the Sun.

+
+
\frac{P_{\rm planet}^2}{a_{\rm planet}^3} = \frac{P_{\rm earth}^2}{a_{\rm earth}^3}.
+
+

So the constant is 1 (sidereal year)2(astronomical unit)−3 or 2.97472505×10−19 s2m−3. See the actual figures: attributes of major planets.

+

[edit] Generality

+

Godefroy Wendelin, in 1643, noted that Kepler's third law applies to the four brightest moons of Jupiter. These laws approximately describe the motion of any two bodies in orbit around each other. (The statement in the first law about the focus becomes closer to exactitude as one of the masses becomes closer to zero mass. Where there are more than two masses, all of the statements in the laws become closer to exactitude as all except one of the masses become closer to zero mass and as the perturbations then also tend towards zero).[4] The masses of the two bodies can be nearly equal, e.g. CharonPluto (~1:10), in a small proportion, e.g. MoonEarth (~1:100), or in a great proportion, e.g. MercurySun (~1:10,000,000).

+

In all cases of two-body motion, rotation is about the barycenter of the two bodies, with neither one having its center of mass exactly at one focus of an ellipse. However, both orbits are ellipses with one focus at the barycenter. When the ratio of masses is large, the barycenter may be deep within the larger object, close to its center of mass. In such a case it may require sophisticated precision measurements to detect the separation of the barycenter from the center of mass of the larger object. But in the case of the planets orbiting the Sun, the largest of them are in mass as much as 1/1047.3486 (Jupiter) and 1/3497.898 (Saturn) of the solar mass,[11] and so it has long been known that the solar system barycenter can sometimes be outside the body of the Sun, up to about a solar diameter from its center.[12] Thus Kepler's first law, though not far off as an approximation, does not quite accurately describe the orbits of the planets around the Sun under classical physics.

+

[edit] Zero eccentricity

+

Kepler's laws refine the model of Copernicus. If the eccentricity of a planetary orbit is zero, then Kepler's laws state:

+
    +
  1. The planetary orbit is a circle
  2. +
  3. The Sun is in the center
  4. +
  5. The speed of the planet in the orbit is constant
  6. +
  7. The square of the sidereal period is proportionate to the cube of the distance from the Sun.
  8. +
+

Actually the eccentricities of the orbits of the six planets known to Copernicus and Kepler are quite small, so this gives excellent approximations to the planetary motions, but Kepler's laws give even better fit to the observations.

+

Kepler's corrections to the Copernican model are not at all obvious:

+
    +
  1. The planetary orbit is not a circle, but an ellipse
  2. +
  3. The Sun is not at the center but at a focal point
  4. +
  5. Neither the linear speed nor the angular speed of the planet in the orbit is constant, but the area speed is constant.
  6. +
  7. The square of the sidereal period is proportionate to the cube of the mean between the maximum and minimum distances from the Sun.
  8. +
+

The nonzero eccentricity of the orbit of the earth makes the time from the March equinox to the September equinox, around 186 days, unequal to the time from the September equinox to the March equinox, around 179 days. The equator cuts the orbit into two parts having areas in the proportion 186 to 179, while a diameter cuts the orbit into equal parts. So the eccentricity of the orbit of the Earth is approximately

+
+
\varepsilon\approx\frac \pi 4 \frac {186-179}{186+179}\approx 0.015
+
+

close to the correct value (0.016710219). (See Earth's orbit). The calculation is correct when the perihelion, the date that the Earth is closest to the Sun, is on a solstice. The current perihelion, near January 4, is fairly close to the solstice on December 21 or 22.

+

[edit] Relation to Newton's laws

+

Isaac Newton computed in his Philosophiæ Naturalis Principia Mathematica the acceleration of a planet moving according to Kepler's first and second law.

+
    +
  1. The direction of the acceleration is towards the Sun.
  2. +
  3. The magnitude of the acceleration is in inverse proportion to the square of the distance from the Sun.
  4. +
+

This suggests that the Sun may be the physical cause of the acceleration of planets.

+

Newton defined the force on a planet to be the product of its mass and the acceleration. (See Newton's laws of motion). So:

+
    +
  1. Every planet is attracted towards the Sun.
  2. +
  3. The force on a planet is in direct proportion to the mass of the planet and in inverse proportion to the square of the distance from the Sun.
  4. +
+

Here the Sun plays an unsymmetrical part which is unjustified. So he assumed Newton's law of universal gravitation:

+
    +
  1. All bodies in the solar system attract one another.
  2. +
  3. The force between two bodies is in direct proportion to the product of their masses and in inverse proportion to the square of the distance between them.
  4. +
+

As the planets have small masses compared to that of the Sun, the orbits conform to Kepler's laws approximately. Newton's model improves Kepler's model and gives better fit to the observations. See two-body problem.

+

A deviation of the motion of a planet from Kepler's laws due to attraction from other planets is called a perturbation.

+

[edit] Computing position as a function of time

+

Kepler used his two first laws for computing the position of a planet as a function of time. His method involves the solution of a transcendental equation called Kepler's equation.

+

The procedure for calculating the heliocentric polar coordinates (r,θ) to a planetary position as a function of the time t since perihelion, and the orbital period P, is the following four steps.

+
+
1. Compute the mean anomaly M from the formula +
+
M=\frac{2\pi t}{P}
+
+
+
2. Compute the eccentric anomaly E by solving Kepler's equation: +
+
\ M=E-\varepsilon\cdot\sin E
+
+
+
3. Compute the true anomaly θ by the equation: +
+
\tan\frac \theta 2 = \sqrt{\frac{1+\varepsilon}{1-\varepsilon}}\cdot\tan\frac E 2
+
+
+
4. Compute the heliocentric distance r from the first law: +
+
r=\frac p {1+\varepsilon\cdot\cos\theta}
+
+
+
+

The important special case of circular orbit, ε = 0, gives simply θ = E = M. Because the uniform circular motion was considered to be normal, a deviation from this motion was considered an anomaly.

+

The proof of this procedure is shown below.

+

[edit] Mean anomaly, M

+
+
+
+
+FIgure 5: Geometric construction for Kepler's calculation of θ. The Sun (located at the focus) is labeled S and the planet P. The auxiliary circle is an aid to calculation. Line xd is perpendicular to the base and through the planet P. The shaded sectors are arranged to have equal areas by positioning of point y.
+
+
+

The Keplerian problem assumes an elliptical orbit and the four points:

+
+
s the Sun (at one focus of ellipse);
+
z the perihelion
+
c the center of the ellipse
+
p the planet
+
+

and

+
+
\ a=|cz|, distance between center and perihelion, the semimajor axis,
+
\ \varepsilon={|cs|\over a}, the eccentricity,
+
\ b=a\sqrt{1-\varepsilon^2}, the semiminor axis,
+
\ r=|sp| , the distance between Sun and planet.
+
\theta=\angle zsp, the direction to the planet as seen from the Sun, the true anomaly.
+
+

The problem is to compute the polar coordinates (r,θ) of the planet from the time since perihelion, t.

+

It is solved in steps. Kepler considered the circle with the major axis as a diameter, and

+
+
\ x, the projection of the planet to the auxiliary circle
+
\ y, the point on the circle such that the sector areas |zcy| and |zsx| are equal,
+
M=\angle zcy, the mean anomaly.
+
+

The sector areas are related by |zsp|=\frac b a \cdot|zsx|.

+

The circular sector area \ |zcy| =  \frac{a^2 M}2.

+

The area swept since perihelion,

+
+
|zsp|=\frac b a \cdot|zsx|=\frac b a \cdot|zcy|=\frac b a\cdot\frac{a^2 M}2 = \frac {a b M}{2},
+
+

is by Kepler's second law proportional to time since perihelion. So the mean anomaly, M, is proportional to time since perihelion, t.

+
+
M={2 \pi t \over P},
+
+

where P is the orbital period.

+

[edit] Eccentric anomaly, E

+

When the mean anomaly M is computed, the goal is to compute the true anomaly θ. The function θ=f(M) is, however, not elementary. [2]. Kepler's solution is to use

+
+
E=\angle zcx, x as seen from the centre, the eccentric anomaly
+
+

as an intermediate variable, and first compute E as a function of M by solving Kepler's equation below, and then compute the true anomaly θ from the eccentric anomaly E. Here are the details.

+
+
\ |zcy|=|zsx|=|zcx|-|scx|
+
+
+
\frac{a^2 M}2=\frac{a^2 E}2-\frac {a\varepsilon\cdot a\sin E}2
+
+

Division by a2/2 gives Kepler's equation

+
+
M=E-\varepsilon\cdot\sin E.
+
+

This equation gives M as a function of E. Determining E for a given M is the inverse problem. Iterative numerical algorithms are commonly used.

+

Having computed the eccentric anomaly E, the next step is to calculate the true anomaly θ.

+

[edit] True anomaly, θ

+

Note from the figure that

+
+
\overrightarrow{cd}=\overrightarrow{cs}+\overrightarrow{sd}
+
+

so that

+
+
a\cdot\cos E=a\cdot\varepsilon+r\cdot\cos \theta.
+
+

Dividing by a and inserting from Kepler's first law

+
+
\ \frac r a =\frac{1-\varepsilon^2}{1+\varepsilon\cdot\cos \theta}
+
+

to get

+
+
\cos E
+=\varepsilon+\frac{1-\varepsilon^2}{1+\varepsilon\cdot\cos \theta}\cdot\cos \theta
+=\frac{\varepsilon\cdot(1+\varepsilon\cdot\cos \theta)+(1-\varepsilon^2)\cdot\cos \theta}{1+\varepsilon\cdot\cos \theta}
+=\frac{\varepsilon +\cos \theta}{1+\varepsilon\cdot\cos \theta}.
+
+

The result is a usable relationship between the eccentric anomaly E and the true anomaly θ.

+

A computationally more convenient form follows by substituting into the trigonometric identity:

+
+
\tan^2\frac{x}{2}=\frac{1-\cos x}{1+\cos x}.
+
+

Get

+
+
\tan^2\frac{E}{2}
+=\frac{1-\cos E}{1+\cos E}
+=\frac{1-\frac{\varepsilon+\cos \theta}{1+\varepsilon\cdot\cos \theta}}{1+\frac{\varepsilon+\cos \theta}{1+\varepsilon\cdot\cos \theta}}
+=\frac{(1+\varepsilon\cdot\cos \theta)-(\varepsilon+\cos \theta)}{(1+\varepsilon\cdot\cos \theta)+(\varepsilon+\cos \theta)}
+=\frac{1-\varepsilon}{1+\varepsilon}\cdot\frac{1-\cos \theta}{1+\cos \theta}=\frac{1-\varepsilon}{1+\varepsilon}\cdot\tan^2\frac{\theta}{2}.
+
+

Multiplying by (1+ε)/(1−ε) and taking the square root gives the result

+
+
\tan\frac \theta2=\sqrt\frac{1+\varepsilon}{1-\varepsilon}\cdot\tan\frac E2.
+
+

We have now completed the third step in the connection between time and position in the orbit.

+

[edit] Distance, r

+

The fourth step is to compute the heliocentric distance r from the true anomaly θ by Kepler's first law:

+
+
\ r=a\cdot\frac{1-\varepsilon^2}{1+\varepsilon\cdot\cos \theta}.
+
+

[edit] Computing the planetary acceleration

+

In his Principia Mathematica Philosophiae Naturalis, Newton showed that Kepler's laws imply that the acceleration of the planets are directed towards the sun and depend on the distance from the sun by the inverse square law. However, the geometrical method used by Newton to prove the result is quite complicated. The demonstration below is based on calculus.[13]

+

[edit] Acceleration vector

+ +

From the heliocentric point of view consider the vector to the planet \mathbf{r} = r \hat{\mathbf{r}} where  r is the distance to the planet and the direction  \hat {\mathbf{r}} is a unit vector. When the planet moves the direction vector  \hat {\mathbf{r}} changes:

+
+
 \frac{d\hat{\mathbf{r}}}{dt}=\dot{\hat{\mathbf{r}}} = \dot\theta  \hat{\boldsymbol\theta},\qquad \dot{\hat{\boldsymbol\theta}} = -\dot\theta \hat{\mathbf{r}}
+
+

where \scriptstyle  \hat{\boldsymbol\theta} is the unit vector orthogonal to \scriptstyle \hat{\mathbf{r}} and pointing in the direction of rotation, and \scriptstyle \theta is the polar angle, and where a dot on top of the variable signifies differentiation with respect to time.

+

So differentiating the position vector twice to obtain the velocity and the acceleration vectors:

+
+
\dot{\mathbf{r}} =\dot{r} \hat{\mathbf{r}} + r \dot{\hat{\mathbf{r}}}
+=\dot{r} \hat{\mathbf{r}} + r \dot{\theta} \hat{\boldsymbol{\theta}},
+
\ddot{\mathbf{r}} 
+= (\ddot{r} \hat{\mathbf{r}} +\dot{r} \dot{\hat{\mathbf{r}}} )
++ (\dot{r}\dot{\theta} \hat{\boldsymbol{\theta}} + r\ddot{\theta} \hat{\boldsymbol{\theta}}
++ r\dot{\theta} \dot{\hat{\boldsymbol{\theta}}})
+= (\ddot{r} - r\dot{\theta}^2) \hat{\mathbf{r}} + (r\ddot{\theta} + 2\dot{r} \dot{\theta}) \hat{\boldsymbol{\theta}}.
+
+

So

+
+
\ddot{\mathbf{r}} = a_r \hat{\boldsymbol{r}}+a_\theta\hat{\boldsymbol{\theta}}
+
+

where the radial acceleration is

+
+
a_r=\ddot{r} - r\dot{\theta}^2
+
+

and the tangential acceleration is

+
+
a_\theta=r\ddot{\theta} + 2\dot{r} \dot{\theta}.
+
+

[edit] The inverse square law

+

Kepler's second law implies that the areal velocity \tfrac 1 2 r^2 \dot \theta is a constant of motion. The tangential acceleration a_\theta is zero by Kepler's second law:

+
+
\frac{d (r^2 \dot \theta)}{dt} = r (2 \dot r \dot \theta + r \ddot \theta ) = r a_\theta = 0.
+
+

So the acceleration of a planet obeying Kepler's second law is directed exactly towards the sun.

+

Kepler's first law implies that the area enclosed by the orbit is \pi ab, where a is the semi-major axis and b is the semi-minor axis of the ellipse. Therefore the period P satisfies \pi ab=\tfrac 1 2 r^2\dot \theta P or

+
+
r^2\dot \theta = nab
+
+

where

+
+
n = \frac{2\pi}{P}
+
+

is the mean motion of the planet around the sun.

+

The radial acceleration a_r  is

+
+
a_r = \ddot r - r \dot \theta^2= \ddot r - r \left(\frac{nab}{r^2}
+\right)^2= \ddot r -\frac{n^2a^2b^2}{r^3}.
+
+

Kepler's first law states that the orbit is described by the equation:

+
+
\frac{p}{r} = 1+ \varepsilon \cos\theta
+
+

Differentiating with respect to time

+
+
-\frac{p\dot r}{r^2} = -\varepsilon  \sin \theta \,\dot \theta
+
+

or

+
+
p\dot r = nab\,\varepsilon\sin \theta.
+
+

Differentiating once more

+
+
p\ddot r =nab \varepsilon \cos \theta \,\dot \theta
+=nab \varepsilon \cos \theta \,\frac{nab}{r^2}
+=\frac{n^2a^2b^2}{r^2}\varepsilon \cos \theta .
+
+

The radial acceleration a_r  satisfies

+
+
p a_r = \frac{n^2 a^2b^2}{r^2}\varepsilon \cos \theta  - p\frac{n^2 a^2b^2}{r^3}
+= \frac{n^2a^2b^2}{r^2}\left(\varepsilon \cos \theta - \frac{p}{r}\right).
+
+

Substituting the equation of the ellipse gives

+
+
p a_r = \frac{n^2a^2b^2}{r^2}\left(\frac p r - 1 - \frac p r\right)= -\frac{n^2a^2}{r^2}b^2.
+
+

The relation b^2=pa gives the simple final result

+
+
a_r=-\frac{n^2a^3}{r^2}.
+
+

This means that the acceleration vector \mathbf{\ddot r} of any planet obeying Kepler's first and second law satisfies the inverse square law

+
+
\mathbf{\ddot r} = - \frac{\alpha}{r^2}\hat{\mathbf{r}}
+
+

where

+
+
\alpha = n^2 a^3=\frac{4\pi^2 a^3}{P^2}\,
+
+

is a constant, and \hat{\mathbf r} is the unit vector pointing from the Sun towards the planet, and r\, is the distance between the planet and the Sun.

+

According to Kepler's third law, \alpha has the same value for all the planets. So the inverse square law for planetary accelerations applies throughout the entire solar system.

+

The inverse square law is a differential equation. The solutions to this differential equation includes the Keplerian motions, as shown, but they also include motions where the orbit is a hyperbola or parabola or a straight line. See kepler orbit.

+

[edit] Newton's law of gravitation

+

By Newton's second law, the gravitational force that acts on the planet is:

+
+
\mathbf{F} = m \mathbf{\ddot r} = - \frac{m \alpha}{r^2}\hat{\mathbf{r}}
+
+

where \alpha only depends on the property of the Sun. According to Newton's third Law, the Sun is also attracted by the planet with a force of the same magnitude. Now that the force is proportional to the mass of the planet, under the symmetric consideration, it should also be proportional to the mass of the Sun. So the form of the gravitational force should be

+
+
\mathbf{F} = - \frac{GMm}{r^2}\hat{\mathbf{r}}
+
+

where G is a universal constant. This is Newton's law of universal gravitation.

+

The acceleration of solar system body no i is, according to Newton's laws:

+
+
\mathbf{\ddot r_i} = G\sum_{j\ne i} \frac{m_j}{r_{ij}^2}\hat{\mathbf{r}}_{ij}
+
+

where m_j is the mass of body no j, and r_{ij} is the distance between body i and body j, and \hat{\mathbf{r}}_{ij} is the unit vector from body i pointing towards body j, and the vector summation is over all bodies in the world, besides no i itself. In the special case where there are only two bodies in the world, Planet and Sun, the acceleration becomes

+
+
\mathbf{\ddot r}_{Planet} = G\frac{m_{Sun}}{r_{{Planet},{Sun}}^2}\hat{\mathbf{r}}_{{Planet},{Sun}}
+
+

which is the acceleration of the Kepler motion.

+

[edit] See also

+ +

[edit] Notes

+
+
    +
  1. ^ a b Bryant, Jeff; Pavlyk, Oleksandr. "Kepler's Second Law", Wolfram Demonstrations Project. Retrieved December 27, 2009.
  2. +
  3. ^ a b c Holton, Gerald James; Brush, Stephen G. (2001). Physics, the Human Adventure: From Copernicus to Einstein and Beyond (3rd paperback ed.). Piscataway, NJ: Rutgers University Press. pp. 40–41. ISBN 0-8135-2908-5. http://books.google.com/?id=czaGZzR0XOUC&pg=PA40. Retrieved December 27, 2009. 
  4. +
  5. ^ a b c See also G E Smith, "Newton's Philosophiae Naturalis Principia Mathematica", especially the section Historical context ... in The Stanford Encyclopedia of Philosophy (Winter 2008 Edition), Edward N. Zalta (ed.).
  6. +
  7. ^ a b Newton's showing, in the 'Principia', that the two-body problem with centripetal forces results in motion in one of the conic sections, is concluded at Book 1, Proposition 13, Corollary 1. His consideration of the effects of perturbations in a multi-body situation starts at Book 1, Proposition 65, including a limit argument that the error in the (Keplerian) approximation of ellipses and equal areas would tend to zero if the relevant planetary masses would tend to zero and with them the planetary mutual perturbations (Proposition 65, Case 1). He discusses the extent of the perturbations in the real solar system in Book 3, Proposition 13.
  8. +
  9. ^ Kepler "for the first time revealed" a "real approximation to the true kinematical relations [motions] of the solar system", see page 1 in H C Plummer (1918), An introductory treatise on dynamical astronomy, Cambridge, 1918.
  10. +
  11. ^ Wilson, Curtis (May 1994). "Kepler's Laws, So-Called". HAD News (Washington, DC: Historical Astronomy Division, American Astronomical Society) (31): 1–2. http://had.aas.org/hadnews/HADN31.pdf. Retrieved December 27, 2009. 
  12. +
  13. ^ Dunbar, Brian (2008). SECCHI Makes a Fantastic Recovery!. NASA. http://erc.ivv.nasa.gov/mission_pages/stereo/news/SECCHI_P2003.html 
  14. +
  15. ^ Gerald James Holton, Stephen G. Brush (2001). Physics, the Human Adventure. Rutgers University Press. p. 45. ISBN 0813529085. http://books.google.com/?id=czaGZzR0XOUC&pg=PA45&dq=Kepler+%22harmonic+law%22. 
  16. +
  17. ^ Burtt, Edwin. The Metaphysical Foundations of Modern Physical Science. p. 52.
  18. +
  19. ^ http://www.astro.lsa.umich.edu/undergrad/Labs/extrasolar_planets/pn_intro.html
  20. +
  21. ^ Astronomical Almanac for 2008, page K7.
  22. +
  23. ^ The fact was already stated by Newton ('Principia', Book 3, Proposition 12).
  24. +
  25. ^ Hai-Chau Chang, Wu-Yi Hsiang. "The epic journey from Kepler's laws to Newton's law of universal gravitation revisited". arXiv:0801.0308. 
  26. +
+
+

[edit] References

+ +
    +
  • A derivation of Kepler's third law of planetary motion is a standard topic in engineering mechanics classes. See, for example, pages 161–164 of Meriam, J. L. (1966, 1971). Dynamics, 2nd ed. New York: John Wiley. ISBN 0-471-59601-9 .
  • +
+
    +
  • Murray and Dermott, Solar System Dynamics, Cambridge University Press 1999, ISBN 0-521-57597-4
  • +
  • V.I. Arnold, Mathematical Methods of Classical Mechanics, Chapter 2. Springer 1989, ISBN 0-387-96890-3
  • +
+

[edit] External links

+
    +
  • B.Surendranath Reddy; animation of Kepler's laws: applet
  • +
  • Crowell, Benjamin, Conservation Laws, http://www.lightandmatter.com/area1book2.html, an online book that gives a proof of the first law without the use of calculus. (see section 5.2, p. 112)
  • +
  • David McNamara and Gianfranco Vidali, Kepler's Second Law - Java Interactive Tutorial, http://www.phy.syr.edu/courses/java/mc_html/kepler.html, an interactive Java applet that aids in the understanding of Kepler's Second Law.
  • +
  • Audio - Cain/Gay (2010) Astronomy Cast Johannes Kepler and His Laws of Planetary Motion
  • +
  • University of Tennessee's Dept. Physics & Astronomy: Astronomy 161 page on Johannes Kepler: The Laws of Planetary Motion [3]
  • +
  • Equant compared to Kepler: interactive model [4]
  • +
  • Kepler's Third Law:interactive model [5]
  • +
  • Solar System Simulator (Interactive Applet)
  • +
  • Kepler and His Laws, educational web pages by David P. Stern
  • +
+ + + + + +

+ + + + + +
+ + + + + +
+ + +
+ +
+ + +
+ + +
+
Personal tools
+ +
+ + +
+ + +
+
Namespaces
+ +
+ + + + +
+

+

+
Variants
+ +
+ + +
+
+ + +
+
Views
+ +
+ + + + +
+
Actions
+ +
+ + + + + + + +
+
+ + + + + + + + + + + + + + --- a/src/test/java/org/jsoup/nodes/DocumentTest.java +++ b/src/test/java/org/jsoup/nodes/DocumentTest.java @@ -87,7 +87,7 @@ TextUtil.stripNewlines(clone.html())); } - @Test public void testLocation() throws IOException { + @Test @Ignore public void testLocation() throws IOException { File in = new ParseTest().getFile("/htmltests/yahoo-jp.html"); Document doc = Jsoup.parse(in, "UTF-8", "http://www.yahoo.co.jp/index.html"); String location = doc.location(); debian/libjsoup-java-doc.doc-base.api0000664000000000000000000000044312243252310014643 0ustar Document: libjsoup-java Title: API Javadoc for jsoup Author: Jonathan Hedley developers Abstract: This is the API Javadoc provided for the libjsoup-java library. Section: Programming Format: HTML Index: /usr/share/doc/libjsoup-java/api/index.html Files: /usr/share/doc/libjsoup-java/api/*