@@ -1709,24 +1709,24 @@ Features
17091709
17101710The best way to create a new feature is like this:
17111711
1712- <java > Feature.Template templ = new RichFeature.Template(); // create a
1713- feature template templ.location = ...; // assign the feature template a
1714- location, type, and source templ.typeTerm = ...; templ.sourceTerm = ...;
1715- templ.annotation = new SimpleRichAnnotation(); // assign the rest of the
1716- necessary stuff templ.featureRelationshipSet = new TreeSet();
1717- templ.rankedCrossRefs = new TreeSet(); RichSequence rs = ...; // get a
1718- sequence from somewhere RichFeature feat =
1719- rs.createFeature(RichFeature.Template()); // make a new feature on that
1720- sequence </java >
1712+ <java > // create a feature template Feature.Template templ = new
1713+ RichFeature.Template(); // assign the feature template a location, type,
1714+ and source templ.location = ...; templ.typeTerm = ...; templ.sourceTerm
1715+ = ...; // assign the rest of the necessary stuff templ.annotation = new
1716+ SimpleRichAnnotation(); templ.featureRelationshipSet = new TreeSet();
1717+ templ.rankedCrossRefs = new TreeSet(); // get a sequence from somewhere
1718+ RichSequence rs = ...; // make a new feature on that sequence
1719+ RichFeature feat = rs.createFeature(RichFeature.Template()); </java >
17211720
17221721Alternatively, you can start with a completely empty dummy feature and
17231722just customise the bits you need:
17241723
1725- <java > RichSequence rs = ...; // get a sequence RichFeature feat =
1726- RichFeature.Tools.makeEmptyFeature(); // make an empty feature
1727- feat.setParent(rs): // associate sequence with feature
1728- rs.getFeatureSet().add(feat); // associate feature with sequence //
1729- customise the feature here, eg. location, type, source etc. </java >
1724+ <java > // get a sequence RichSequence rs = ...; // make an empty feature
1725+ RichFeature feat = RichFeature.Tools.makeEmptyFeature(); // associate
1726+ sequence with feature feat.setParent(rs): // associate feature with
1727+ sequence rs.getFeatureSet().add(feat);
1728+
1729+ // customise the feature here, eg. location, type, source etc. </java >
17301730
17311731### Qualifiers as annotations.
17321732
0 commit comments