“主要是解决记录操作员parameters?"

UrhixidurUrhixidur MemberPosts:40Contributor II
edited June 2019 inHelp
How does one prevent the documentation from showing this in the GUI?

trace channel
Name of the trace channel to read.
Default value: metadata
Expert parameter
Depends on:
com.rapidminer.operator.io.CachedLTFExampleSource$1@15e672e7
MyOperatorsDocMyOperator.xmlhas anoperatorelement with sub-elementskey, name, shortName, synopsisandhelpbut I don't see in Unuk'sresources/com.rapidminer.resources.i18n/OperatorsCoreDocumentation.xmlhow to cover the parameters' documentation.

Answers

  • MariusHelfMariusHelf RapidMiner Certified Expert, MemberPosts:1,869Unicorn
    Hi,

    the documentation for the parameters is displayed in the function getParameters(), where the parameters are actually specified. One of the parameters of the parameter creation functions is usually the description; other information is gathered implicitly, e.g. parameter type etc.

    Best regards,
    Marius
  • UrhixidurUrhixidur MemberPosts:40Contributor II
    ParameterType构造函数和later methods only have a "short description" String. I'm trying to get rid of the "Depends on: com.rapidminer.operator.io.CachedLTFExampleSource$1@12015bce" part. I suppose this is related to the ParameterCondition object I create, but that constructor has no String description in it. How would you fix it?
  • MariusHelfMariusHelf RapidMiner Certified Expert, MemberPosts:1,869Unicorn
    Is com.rapidminer.operator.io.CachedLTFExampleSource an ioobject that you created? Then you should document that object. In the RapidMiner core the ioobjects are documented in a file called ioobjects.xml in the resources folder. You can define the location of your extension's ioobjects file with a property in the build.xml, e.g.:
    Happy coding!
  • UrhixidurUrhixidur MemberPosts:40Contributor II
    Marius wrote:

    Is com.rapidminer.operator.io.CachedLTFExampleSource an ioobject that you created? Then you should document that object. In the RapidMiner core the ioobjects are documented in a file called ioobjects.xml in the resources folder. You can define the location of your extension's ioobjects file with a property in the build.xml, e.g.:
    No, CachedLTFExampleSource is an Operator, modelled after com.rapidminer.operator.io.CachedDatabaseExampleSource. Its io nature should therefore fall under "Data Table" (class="com.rapidminer.example.ExampleSet") io ioobjects.xml. The operator itself is documented: com.rapidminer.resources.OperatorsLTFReader.xml has and com.rapidminer.resources.i18n.OperatorsDocLTFReader.xml exists. Its element has , , , and sub-elements.

    One operator parameter generated by getParameterTypes is PARAMETER_LTF_CHANNEL:

    type = new ParameterTypeMutableStringCategory(PARAMETER_LTF_CHANNEL,
    I18N.getMessage(I18N.getGUIBundle(), "gui.label.rmx_LTFDataReader.parameter.ltf_channel.description"),
    new String[] { "metadata" }, "metadata", false);
    type.registerDependencyCondition(isTraceCondition(this, PARAMETER_LTF_DIR));
    this.parameterTypes.add(type);
    PARAMETER_LTF_CHANNEL has a dependency implemented by an inner class, which is probably what "com.rapidminer.operator.io.CachedLTFExampleSource$1@12015bce" is referring to. Looking at descendants of ParameterCondition, I now see I need to override toString in order to achieve a proper rendering. This should be made to appear in the Javadoc by overriding toString at the ParameterCondition level with a simple super(); call (currently toString only appears as an inherited method...all the way down from Object!).

    I also note that the Javadoc of com.rapidminer.parameter.conditions.ParameterCondition completely omits getDefinitionAsXML(), which is a serious problem as this method is code-documented to state "Subclasses must override this method and...".

    To sum up, I needed to build a proper ParameterCondition descendant and override its toString method to fix my issue.
  • MariusHelfMariusHelf RapidMiner Certified Expert, MemberPosts:1,869Unicorn
    Hi,

    thank you for your hints about missing javadoc documentation. We will the locations you mentioned.

    Best regards,
    Marius
  • MariusHelfMariusHelf RapidMiner Certified Expert, MemberPosts:1,869Unicorn
    ...on the other hand, #getDefinitionAsXML is already well-documented in the current svn version. Adding the #toString version seems to make sense, though.

    Best!
    Marius
  • UrhixidurUrhixidur MemberPosts:40Contributor II
    Marius wrote:

    ...on the other hand, #getDefinitionAsXML is already well-documented in the current svn version. Adding the #toString version seems to make sense, though.
    I was referring tohttp://rapid-i.com/api/rapidminer-5.1/index.html, which does not mention getDefinitionAsXML at all.
  • UrhixidurUrhixidur MemberPosts:40Contributor II
    Any idea how I can get RapidMiner to invoke the (Element element) constructor of my ParameterCondition descendant? Also its getDefinitionAsXML and setOperator methods? I'd like to debug them but can't seem to get them triggerred: I thought the save to repository and/or the "recent project" startup option would, but they don't.
Sign InorRegisterto comment.