com.raritantechnologies.inxight
Class InxightTreeXMLGenerator

java.lang.Object
  extended bycom.raritantechnologies.inxight.InxightTreeXMLGenerator
All Implemented Interfaces:
IConfigurable, ITreeXMLGenerator

public class InxightTreeXMLGenerator
extends java.lang.Object
implements ITreeXMLGenerator

Creates an XML file that can be published to the Inxight classifier.

XML Configuration Template:
   <TreeXMLGenerator class="com.raritantechnologies.inxight.InxightTreeXMLGenerator"
                        language="[ taxonomy language (default='english') ]"
                        descriptionAttribute="[ attribute to get node description ]"
                        ruleAttributes="[ comma separated list of attribute(s) that contain classification rules ]"
                        ruleOperator="[ AND | OR(default): boolean operator to concatenate rules  ]" 
                        labelAttribute="[ tree node attribute that give node name (default= 'NAME') ]" >

   </TreeXMLGenerator>
 
Sample Inxight XML taxonomy:
  <inxight-taxonomy xmlns="http://www.inxight.com/taxonomy/5.2" name="your taxonomy" author="you" language="english">
    <description>This is the overall description</description>
    <node>
      <label>Government</label>
      <description>Description of Government</description>
      <hierarchy enforce-parent="false" aggregate="false" />
      <attributes>
        <rule>legislature judiciary</rule>
        <threshold>0</threshold>
        <mdocs>
          <doc-id>/home/user/TBtest/mdoc1.txt</doc-id>
        </mdocs>
        <ddocs>
          <doc-id>/home/user/TBtest/ddoc1.txt</doc-id>
        </ddocs>
      </attributes>
      <link>
        <node>
          <label>Constitution</label>
          <description>Description of Constitution</description>
          <hierarchy enforce-parent="true" aggregate="false" />
          <attributes>
            <rule>state Virginia</rule>
            <threshold>0</threshold>
          </attributes>
        </node>
        <link>
          <node>
            <label>Preamble</label>
            <description>Description of Preamble</description>
            <hierarchy enforce-parent="true" aggregate="false" />
            <attributes>
               <rule>We the People</rule>
               <threshold>0</threshold>
          </attributes>
          </node>
        </link>
      </link>
    </node>
  </inxight-taxonomy>
 


Constructor Summary
InxightTreeXMLGenerator()
           
 
Method Summary
 java.lang.String getXML(TreeRoot tree)
          returns an XML string that represents data in a TreeRoot object.
 void initialize(org.w3c.dom.Element elem)
          Initializes the object from an XML tag or element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InxightTreeXMLGenerator

public InxightTreeXMLGenerator()
Method Detail

getXML

public java.lang.String getXML(TreeRoot tree)
Description copied from interface: ITreeXMLGenerator
returns an XML string that represents data in a TreeRoot object.

Specified by:
getXML in interface ITreeXMLGenerator

initialize

public void initialize(org.w3c.dom.Element elem)
Description copied from interface: IConfigurable
Initializes the object from an XML tag or element. This method is called by the Framework as part of the application initializtion. see ConfigurationManager, XMLConfigurationManager, XMLSearchFieldMapFactory, XMLSearchSourceFactory. Configurable objects that are owned or contained by other configurable objects will be initialized in by the parent object.

Specified by:
initialize in interface IConfigurable