1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
/* ***************************************************************************** */ /* This is just a short example of implementing the "java,net.URL" classes */ /* using BSF4ooRexx */ /* created by Martin Stoppacher 26.12.2009 */ /* ***************************************************************************** */ say hello this reads a syndfeed say please type in the url url= "http://rss.orf.at/fm4.xml" f=.bsf~new("java.net.URL", url) /* creating a java url object with the above url */ say f~getAuthority() /* gets the authority part of this URL */ say f~getDefaultPort() /* gets the default port number of the protocol */ /* associated with this URL */ say f~getPort() /* gets the port number of this URL */ say f~getFile() /* gets the file name of this URL */ say f~getHost() /* gets the host name of this URL, if applicable */ say f~getProtocol() /* gets the protocol name of this URL */ say f~getQuery() /* gets the query part of this URL */ say f~hashCode() /* creates an integer suitable for hash table indexing */ ::requires BSF.cls /* get the Java support for ooRexx */ |
Daily Archives: 08/05/2014
Syndication Feed Reader (1_Read.rxj) – ooRexx with BSF4ooRexx
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
/* ***************************************************************************** */ /* Example of a syndication feed reader using the Project Rome API with */ /* BSF4ooRexx */ /* current version (2009) of Rome: rome1.0.jar https://rome.dev.java.net/ */ /* You need to implement this API plus the JDOM API */ /* jdom.jar , you can find this at https://jdom.org/ */ /* */ /* This class retrieves a syndfeed from the web by using a precreated */ /* Java class via BSF4ooRexx "com.sun.syndication.io.SyndFeedInput" methods */ /* created by Martin Stoppacher date: 26.12.2009 */ /* ***************************************************************************** */ javaclass = "FeedReader1" /* determine Java class to use */ get=.bsf~new(javaClass) /* create an instance of "javaClass" */ say get~getfeed /* calls the getfeed method in the FeedReader1 class */ ::requires BSF.CLS /* get the Java support */ |