<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://ojwiki.soldin.de/index.php?action=history&amp;feed=atom&amp;title=Beanshell%3AScripts_for_Roadmatcher</id>
	<title>Beanshell:Scripts for Roadmatcher - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://ojwiki.soldin.de/index.php?action=history&amp;feed=atom&amp;title=Beanshell%3AScripts_for_Roadmatcher"/>
	<link rel="alternate" type="text/html" href="https://ojwiki.soldin.de/index.php?title=Beanshell:Scripts_for_Roadmatcher&amp;action=history"/>
	<updated>2026-10-15T05:05:36Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.5</generator>
	<entry>
		<id>https://ojwiki.soldin.de/index.php?title=Beanshell:Scripts_for_Roadmatcher&amp;diff=212&amp;oldid=prev</id>
		<title>Mentaer: Created page with &#039;Hi Chris:   BeanShell can be the same as Java. But it also allows shortcuts, most notably: omitting the type declaration. Example:   String x = &quot;Hello World&quot;;  is the same as:  x…&#039;</title>
		<link rel="alternate" type="text/html" href="https://ojwiki.soldin.de/index.php?title=Beanshell:Scripts_for_Roadmatcher&amp;diff=212&amp;oldid=prev"/>
		<updated>2009-10-12T00:08:09Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;#039;Hi Chris:   BeanShell can be the same as Java. But it also allows shortcuts, most notably: omitting the type declaration. Example:   String x = &amp;quot;Hello World&amp;quot;;  is the same as:  x…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Hi Chris:&lt;br /&gt;
 &lt;br /&gt;
BeanShell can be the same as Java. But it also allows shortcuts, most notably: omitting the type declaration. Example:&lt;br /&gt;
&lt;br /&gt;
 String x = &amp;quot;Hello World&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
is the same as:&lt;br /&gt;
 x = &amp;quot;Hello World&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Here&amp;#039;s how to change all the TRIM segment comments to &amp;quot;ABC&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
 {   &lt;br /&gt;
   for (feature : wc.getLayerManager().getLayer(&amp;quot;Network TRIM&amp;quot;).getFeatureCollectionWrapper().getFeatures()) {&lt;br /&gt;
     feature.getRoadSegment().setComment(&amp;quot;ABC&amp;quot;);&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
I&amp;#039;ve enclosed everything with { and } because I find that the BeanShell editor that JUMP uses sometimes freezes otherwise :-(&lt;br /&gt;
 &lt;br /&gt;
Here&amp;#039;s how to change all the TRIM segment comments to &amp;quot;Long Road&amp;quot; if the length &amp;gt; 2000:&lt;br /&gt;
&lt;br /&gt;
 {   &lt;br /&gt;
   for (feature : wc.getLayerManager().getLayer(&amp;quot;Network TRIM&amp;quot;).getFeatureCollectionWrapper().getFeatures()) {&lt;br /&gt;
     if (feature.getRoadSegment().getApparentLineLength() &amp;lt;= 2000) { continue; }&lt;br /&gt;
     feature.getRoadSegment().setComment(&amp;quot;Long Road&amp;quot;);&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Note the use of the &amp;quot;enhanced for loop&amp;quot; - a Java 1.5 thing, but BeanShell lets you use it in any version of Java :-)&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
OK time for the issue log.&lt;br /&gt;
 &lt;br /&gt;
Here&amp;#039;s how to change all the issue log descriptions to &amp;quot;Dell Axim X30&amp;quot;:&lt;br /&gt;
 &lt;br /&gt;
 {   &lt;br /&gt;
   for (feature : wc.getLayerManager().getLayer(&amp;quot;Issue Log&amp;quot;).getFeatureCollectionWrapper().getFeatures()) {&lt;br /&gt;
     feature.setAttribute(&amp;quot;Desc&amp;quot;, &amp;quot;Dell Axim X30&amp;quot;);&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Hope that helps!&lt;/div&gt;</summary>
		<author><name>Mentaer</name></author>
	</entry>
</feed>