org.opencyc.xml
Class ExportHtml

java.lang.Object
  |
  +--org.opencyc.xml.ExportHtml

public class ExportHtml
extends java.lang.Object

HTML ontology export for OpenCyc.

Author:
Stephen L. Reed

Copyright 2001 Cycorp, Inc., license is open source GNU LGPL.

the license

www.opencyc.org

OpenCyc at SourceForge

THIS SOFTWARE AND KNOWLEDGE BASE CONTENT ARE PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENCYC ORGANIZATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE AND KNOWLEDGE BASE CONTENT, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


Inner Class Summary
 class ExportHtml.Category
          Provides a container for term category information used to make vocabulary category HTML pages.
 
Field Summary
 java.util.ArrayList categories
          List of HTML vocabulary category page information items.
static Guid counterTerrorismConstantGuid
          The #$CounterTerrorismConstant guid.
protected  CycAccess cycAccess
          Manages connection to the cyc server api.
 CycFort cycKbSubsetCollection
          The CycKBSubsetCollection whose elements are exported to HTML.
 Guid cycKbSubsetCollectionGuid
          The CycKBSubsetCollection whose elements are exported to HTML.
protected  CycFort cycKbSubsetFilter
          The CycKBSubsetCollection whose elements are exported to HTML if they also generalizations of cycKbSubsetCollectionGuid collections or predicates above.
 Guid cycKbSubsetFilterGuid
          The guid which identifies the CycKBSubsetCollection whose elements are exported to HTML if they also generalizations of cycKbSubsetCollectionGuid collections or predicates above.
protected static int DEFAULT_VERBOSITY
          The default verbosity of the HTML export output.
static Guid eeldSharedOntologyCandidateConstantGuid
          The #$EELDSharedOntologyConstant guid.
static Guid eeldSharedOntologyConstantGuid
          The #$EELDSharedOntologyConstant guid.
static Guid eeldSharedOntologyCoreConstantGuid
          The #$EELDSharedOntologyCoreConstant guid.
static Guid equalSymbolsGuid
          #$equalSymbols guid
static int EXPORT_KB_SUBSET
          Command indicating that the HTML export contains only the marked KB subset terms.
static int EXPORT_KB_SUBSET_BELOW_TERM
          Command indicating that the HTML export contains the collections whose direct or indirect genl is the collection term indentified by rootTermGuid.
static int EXPORT_KB_SUBSET_PLUS_UPWARD_CLOSURE
          Command indicating that the HTML export contains the marked KB subset terms plus all the terms in the upward closure to #$Thing.
protected  int exportCommand
          The command performed by the HTML extract process.
 java.lang.String exportedHierarchyOutputPath
          The HTML exported hierarchy path and file name.
 java.lang.String exportedVocabularyOutputPath
          The HTML exported vocabulary path and file name.
protected  java.util.ArrayList filterFromDirectInstanceGuids
          Additional term guids not to appear in the list of direct instances even if otherwise qualified to appear.
protected  java.util.ArrayList filterFromDirectInstances
          Additional terms not to appear in the list of direct instances even if otherwise qualified to appear.
protected  boolean hasComment
          Indicates the presence of a comment for the current term.
protected  java.lang.String hostname
           
protected  org.w3c.dom.Element htmlBodyElement
          the HTML body element
protected  org.w3c.dom.html.HTMLDocument htmlDocument
          the html document
static Guid ikbConstantGuid
          The #$IKBConstant guid.
 boolean includeUpwardClosure
          Indicates whether the upward closure of terms should be exported.
static Guid inferencePSCGuid
          #$InferencePSC guid
 java.lang.String nartNoteOutputPath
          The NART note file name.
protected  int port
           
protected  java.util.HashSet previouslyExpandedTerms
          indicates which terms have been previously expanded in the hierarchy page
 boolean print_guid
          Export the GUID string for each term?
 boolean produceHierarchyPages
          Indicates whether hierarchy pages are produced.
static Guid publicConstantGuid
          The #$PublicConstant guid.
static Guid rewriteOfGuid
          #$rewriteOf guid
 CycFort rootTerm
          Used in the export command EXPORT_KB_SUBSET_BELOW_TERM.
 Guid rootTermGuid
          Used in the export command EXPORT_KB_SUBSET_BELOW_TERM.
protected  CycList selectedCycForts
          the selected terms
 java.util.ArrayList upwardClosureKbSubsetCollectionGuids
          Upward closure filtering kb subset collections guids.
protected  java.util.ArrayList upwardClosureKbSubsetCollections
          Upward closure filtering kb subset collections.
 int verbosity
          Sets verbosity of the HTML export output.
 
Constructor Summary
ExportHtml()
          Constructs a new ExportHtml object.
ExportHtml(java.lang.String hostname, int port)
          Constructs a new ExportHtml object which will connect to the cyc server at hostname, port.
ExportHtml(java.lang.String hostname, int port, boolean print_guid)
          Constructs a new ExportHtml object which will connect to the cyc server at hostname, port.
 
Method Summary
protected  void addAllActorSlots()
          Categorizes all actorslots.
protected  void addAllBinaryPredicates()
          Categorizes all binary predicates.
protected  void addAllCategories()
          Adds all categories to the HTML export.
protected  void addAllDenotingFunctions()
          Categorizes all denoting functions.
protected  void addAllEventTypes()
          Categorizes all event types.
protected  void addAllIETRef()
          Categorizes all ontology constants directly referenced in the IET Mapping.
protected  void addAllMaterials()
          Categorizes all 'materials'.
protected  void addAllOrganizationTypes()
          Categorizes all organization types.
protected  void addAllPartonomicPredicates()
          Categorizes all partonomic predicates.
protected  void addAllPersonTypes()
          Categorizes all person types.
protected  void addAllRelations()
          Categorizes all relations.
protected  void addAllSchemaMappingTypes()
          Categorizes all schema mapping types.
protected  void addAllScriptedEventTypes()
          Categorizes all scripted event types.
protected  void addAllSpecializationsOfAffiliation()
          Categorizes all specializations of affiliation.
protected  void addAllSpecializationsOfVestedInterest()
          Categorizes all specializations of vested interest.
protected  void addAllSraRef()
          Categorizes all constants directly reference in the SRA NetOwl Mapping.
protected  void addAllSyracuseRef()
          Categorizes all ontology constants directly referenced in the Syracuse Mapping.
protected  void addAllTemporalRelations()
          Categorizes all temporal relations.
protected  void addAllVeridianRef()
          Categorizes all ontology constants directly referenced in the Veridian Mapping.
protected  void addAllWeaponTypes()
          Categorizes all weapon types.
protected  void addEeldCoreOntology()
          Categorizes the original EELD 'core' ontology.
protected  void addPublicSharedOntology()
          Categorizes all public shared ontology constants.
protected  void addScriptRepresentationVocabulary()
          Categorizes script representation vocabulary.
protected  void addSemanticConstraintVocabulary()
          Categorizes semantic constraint vocabulary.
protected  void askEeldCoreOntology()
          Categorizes the original EELD 'core' ontology.
protected  CycList askQueryString(java.lang.String queryString, CycConstant mt)
          Returns the sorted terms resulting from asking the given query string.
protected  void createArg1IsaNodes(CycConstant cycConstant, org.w3c.dom.Element parentElement)
          Creates HTML nodes for arg1Isa links.
protected  void createArg2IsaNodes(CycConstant cycConstant, org.w3c.dom.Element parentElement)
          Creates HTML nodes for arg2Isa links.
protected  void createArg3IsaNodes(CycConstant cycConstant, org.w3c.dom.Element parentElement)
          Creates HTML nodes for arg3Isa links.
protected  void createArg4IsaNodes(CycConstant cycConstant, org.w3c.dom.Element parentElement)
          Creates HTML nodes for arg4Isa links.
protected  void createCategorizedVocabularies()
          Creates categorized vocabulary HTML pages.
protected  void createCategorizedVocabulary(java.lang.String title, java.lang.String queryString, CycConstant mt, java.lang.String outputPath)
          Creates the given categorized vocabulary HTML page.
protected  void createCollectionNode(CycConstant cycConstant, org.w3c.dom.Element parentElement)
          Creates an HTML node for a single Cyc collection.
protected  void createCommentNodes(CycConstant cycConstant, org.w3c.dom.Element parentElement)
          Creates HTML nodes for comment text containing CycConstants which are to be represented as hyperlinks.
protected  void createCycConstantNode(CycConstant cycConstant)
          Creates a HTML node for a single Cyc Constant.
protected  void createCycNartNode(CycNart cycNart)
          Creates a HTML node for a single Cyc Nart.
protected  void createFunctionNode(CycConstant cycConstant, org.w3c.dom.Element parentElement)
          Creates an HTML node for a single Cyc function.
protected  void createGenlNodes(CycFort cycFort, org.w3c.dom.Element parentElement)
          Creates HTML nodes for genl links.
protected  void createGenlPredsNodes(CycConstant cycConstant, org.w3c.dom.Element parentElement)
          Creates HTML nodes for genlPreds links.
protected  void createGuidNode(CycConstant cycConstant, org.w3c.dom.Element parentElement)
          Creates HTML node for guid.
protected  void createHierarchyNodes(CycFort cycFort, int indent)
          Recursively creates hierarchy nodes for the given term and its spec collection terms.
protected  void createHierarchyPage(CycFort rootTerm)
          Creates hierarchy HTML page.
protected  void createIndividualNode(CycConstant cycConstant, org.w3c.dom.Element parentElement)
          Creates an HTML individual node for a single Cyc individual.
protected  void createIsaNodes(CycFort cycFort, org.w3c.dom.Element parentElement)
          Creates HTML nodes for isa links.
protected  void createPredicateNode(CycConstant cycConstant, org.w3c.dom.Element parentElement)
          Creates an HTML node for a single Cyc predicate.
protected  void createResultIsaNodes(CycConstant cycConstant, org.w3c.dom.Element parentElement)
          Creates HTML nodes for resultIsa links.
protected  void createVocabularyPage()
          Creates vocabulary HTML page.
 void export(int exportCommand)
          Exports the desired KB content into HTML.
protected  CycList filterSelectedConstants(CycList constants)
          Removes unselected terms from the given list.
protected  CycFort findSelectedGenls(CycFort collection)
          Returns the first indirect genls above the given term which is a member of the selected terms.
protected  CycList gatherUpwardClosure(CycList selectedCycForts)
          Gather the updward closure of the selected CycForts with regard to isas and genls for collection terms, and with regard to isas and genlPreds for predicate terms.
protected  void horizontalRule()
          Creates a horizontal rule in the HTML document.
protected  boolean isEligibleForUpwardClosureInclusion(CycFort cycFort)
          Returns true if the given term is eligible for incusion in the upward closure.
protected  org.w3c.dom.Element italics(org.w3c.dom.Element parentElement)
          Creates an italics element in the HTML document.
protected  void lineBreak(org.w3c.dom.Element parentElement)
          Creates a line break in the HTML document.
static void main(java.lang.String[] args)
          Runs the ExportHtml application.
protected  void paragraphBreak()
          Creates a paragraph break in the HTML document.
protected  boolean processRewriteOf(CycConstant cycConstant, org.w3c.dom.Element parentElement)
          Processes the case where the given Cyc constant has a #$rewriteOf relationship to a Cyc FORT (First Order Reified Term).
protected  void processRewrittenNart(java.lang.Object object, org.w3c.dom.Element parentElement)
          Creates nodes for rewritten NARTs.
protected  void serialize(org.w3c.dom.html.HTMLDocument htmlDocument, java.lang.String outputPath)
          Serializes the given HTML document to the given path.
protected  void setup()
          Sets up the HTML export process.
protected  CycList specificCollections(CycList collections)
          Given a set of collection terms, returns a set which does not contain any collections are more genl than the remaining collections.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXPORT_KB_SUBSET

public static final int EXPORT_KB_SUBSET
Command indicating that the HTML export contains only the marked KB subset terms. cycKbSubsetCollectionGuid contains the KB subset collection's guid. cycKbSubsetFilterGuid contains the guid for the KB subset term that filters membership in the upward closure.

EXPORT_KB_SUBSET_PLUS_UPWARD_CLOSURE

public static final int EXPORT_KB_SUBSET_PLUS_UPWARD_CLOSURE
Command indicating that the HTML export contains the marked KB subset terms plus all the terms in the upward closure to #$Thing. cycKbSubsetCollectionGuid contains the KB subset collection's guid.

EXPORT_KB_SUBSET_BELOW_TERM

public static final int EXPORT_KB_SUBSET_BELOW_TERM
Command indicating that the HTML export contains the collections whose direct or indirect genl is the collection term indentified by rootTermGuid. cycKbSubsetFilterGuid contains the guid for the KB subset term that filters membership in the export set.

exportCommand

protected int exportCommand
The command performed by the HTML extract process.

DEFAULT_VERBOSITY

protected static final int DEFAULT_VERBOSITY
The default verbosity of the HTML export output. 0 --> quiet ... 9 -> maximum diagnostic input.

verbosity

public int verbosity
Sets verbosity of the HTML export output. 0 --> quiet ... 9 -> maximum diagnostic input.

includeUpwardClosure

public boolean includeUpwardClosure
Indicates whether the upward closure of terms should be exported. If so, the upward closure terms are filtered by cycKbSubsetFilterGuid below.

produceHierarchyPages

public boolean produceHierarchyPages
Indicates whether hierarchy pages are produced.

upwardClosureKbSubsetCollectionGuids

public java.util.ArrayList upwardClosureKbSubsetCollectionGuids
Upward closure filtering kb subset collections guids. These constrain the selected upward closure collection terms to be members of any of these kb subset collections.

upwardClosureKbSubsetCollections

protected java.util.ArrayList upwardClosureKbSubsetCollections
Upward closure filtering kb subset collections. These constrain the selected upward closure collection terms to be members of any of these kb subset collections.

cycKbSubsetCollection

public CycFort cycKbSubsetCollection
The CycKBSubsetCollection whose elements are exported to HTML.

eeldSharedOntologyConstantGuid

public static final Guid eeldSharedOntologyConstantGuid
The #$EELDSharedOntologyConstant guid.

eeldSharedOntologyCandidateConstantGuid

public static final Guid eeldSharedOntologyCandidateConstantGuid
The #$EELDSharedOntologyConstant guid.

eeldSharedOntologyCoreConstantGuid

public static final Guid eeldSharedOntologyCoreConstantGuid
The #$EELDSharedOntologyCoreConstant guid.

counterTerrorismConstantGuid

public static final Guid counterTerrorismConstantGuid
The #$CounterTerrorismConstant guid.

ikbConstantGuid

public static final Guid ikbConstantGuid
The #$IKBConstant guid.

publicConstantGuid

public static final Guid publicConstantGuid
The #$PublicConstant guid.

cycKbSubsetCollectionGuid

public Guid cycKbSubsetCollectionGuid
The CycKBSubsetCollection whose elements are exported to HTML.

cycKbSubsetFilterGuid

public Guid cycKbSubsetFilterGuid
The guid which identifies the CycKBSubsetCollection whose elements are exported to HTML if they also generalizations of cycKbSubsetCollectionGuid collections or predicates above. #$IKBConstant (not in OpenCyc)

cycKbSubsetFilter

protected CycFort cycKbSubsetFilter
The CycKBSubsetCollection whose elements are exported to HTML if they also generalizations of cycKbSubsetCollectionGuid collections or predicates above. #$IKBConstant (not in OpenCyc)

rootTermGuid

public Guid rootTermGuid
Used in the export command EXPORT_KB_SUBSET_BELOW_TERM. The HTML export contains the collections whose direct or indirect genl is the collection term indentified by this value.

rootTerm

public CycFort rootTerm
Used in the export command EXPORT_KB_SUBSET_BELOW_TERM. The HTML export contains the collections whose direct or indirect genl is this collection term.

rewriteOfGuid

public static final Guid rewriteOfGuid
#$rewriteOf guid

equalSymbolsGuid

public static final Guid equalSymbolsGuid
#$equalSymbols guid

inferencePSCGuid

public static final Guid inferencePSCGuid
#$InferencePSC guid

exportedVocabularyOutputPath

public java.lang.String exportedVocabularyOutputPath
The HTML exported vocabulary path and file name.

exportedHierarchyOutputPath

public java.lang.String exportedHierarchyOutputPath
The HTML exported hierarchy path and file name.

nartNoteOutputPath

public java.lang.String nartNoteOutputPath
The NART note file name.

htmlDocument

protected org.w3c.dom.html.HTMLDocument htmlDocument
the html document

cycAccess

protected CycAccess cycAccess
Manages connection to the cyc server api.

htmlBodyElement

protected org.w3c.dom.Element htmlBodyElement
the HTML body element

selectedCycForts

protected CycList selectedCycForts
the selected terms

hasComment

protected boolean hasComment
Indicates the presence of a comment for the current term.

previouslyExpandedTerms

protected java.util.HashSet previouslyExpandedTerms
indicates which terms have been previously expanded in the hierarchy page

hostname

protected java.lang.String hostname

port

protected int port

filterFromDirectInstanceGuids

protected java.util.ArrayList filterFromDirectInstanceGuids
Additional term guids not to appear in the list of direct instances even if otherwise qualified to appear.

filterFromDirectInstances

protected java.util.ArrayList filterFromDirectInstances
Additional terms not to appear in the list of direct instances even if otherwise qualified to appear.

print_guid

public boolean print_guid
Export the GUID string for each term?

categories

public java.util.ArrayList categories
List of HTML vocabulary category page information items.
Constructor Detail

ExportHtml

public ExportHtml()
Constructs a new ExportHtml object.

ExportHtml

public ExportHtml(java.lang.String hostname,
                  int port)
Constructs a new ExportHtml object which will connect to the cyc server at hostname, port.
Parameters:
hostname - the cyc server hostname
port - the cyc server base port

ExportHtml

public ExportHtml(java.lang.String hostname,
                  int port,
                  boolean print_guid)
Constructs a new ExportHtml object which will connect to the cyc server at hostname, port. print_guid value gates guid printing.
Parameters:
hostname - the cyc server hostname
port - the cyc server base port
print_guid - gates guid presence in the HTML document
Method Detail

main

public static void main(java.lang.String[] args)
Runs the ExportHtml application.
Parameters:
args - the command line arguments.

export

public void export(int exportCommand)
            throws java.net.UnknownHostException,
                   java.io.IOException,
                   CycApiException
Exports the desired KB content into HTML.

setup

protected void setup()
              throws java.net.UnknownHostException,
                     java.io.IOException,
                     CycApiException
Sets up the HTML export process.

createVocabularyPage

protected void createVocabularyPage()
                             throws java.net.UnknownHostException,
                                    java.io.IOException,
                                    CycApiException
Creates vocabulary HTML page.

createCycNartNode

protected void createCycNartNode(CycNart cycNart)
                          throws java.net.UnknownHostException,
                                 java.io.IOException,
                                 CycApiException
Creates a HTML node for a single Cyc Nart.

createCycConstantNode

protected void createCycConstantNode(CycConstant cycConstant)
                              throws java.net.UnknownHostException,
                                     java.io.IOException,
                                     CycApiException
Creates a HTML node for a single Cyc Constant.

processRewriteOf

protected boolean processRewriteOf(CycConstant cycConstant,
                                   org.w3c.dom.Element parentElement)
                            throws java.net.UnknownHostException,
                                   java.io.IOException,
                                   CycApiException
Processes the case where the given Cyc constant has a #$rewriteOf relationship to a Cyc FORT (First Order Reified Term). For example when the given term is #$AttemptedKillingByCarAccident, then the KB contains the assertion (#$rewriteOf #$AttemptedKillingByCarAccident ((KillingThroughEventTypeFn #$CarAccident)) and the phrase " is the atomic form of (KillingThroughEventTypeFn #$CarAccident)" is output to the HTML document.
Parameters:
cycConstant - the given CycConstant for processing if a #$rewriteOf
parentElement - the parent HTML element for inserting rewriteOf text
Returns:
true iff there is in fact a rewrite term

processRewrittenNart

protected void processRewrittenNart(java.lang.Object object,
                                    org.w3c.dom.Element parentElement)
                             throws java.net.UnknownHostException,
                                    java.io.IOException,
                                    CycApiException
Creates nodes for rewritten NARTs. Recursive for the NART components, putting hyperlinks where possible.
Parameters:
object - the given ojbect for processing in a #$rewriteOf
parentElement - the parent HTML element for inserting rewriteOf text

paragraphBreak

protected void paragraphBreak()
Creates a paragraph break in the HTML document.

italics

protected org.w3c.dom.Element italics(org.w3c.dom.Element parentElement)
Creates an italics element in the HTML document.
Parameters:
parentElement - the parent HTML DOM element
Returns:
the italics element

lineBreak

protected void lineBreak(org.w3c.dom.Element parentElement)
Creates a line break in the HTML document.
Parameters:
parentElement - the parent HTML DOM element

horizontalRule

protected void horizontalRule()
Creates a horizontal rule in the HTML document.

createCommentNodes

protected void createCommentNodes(CycConstant cycConstant,
                                  org.w3c.dom.Element parentElement)
                           throws java.io.IOException,
                                  CycApiException
Creates HTML nodes for comment text containing CycConstants which are to be represented as hyperlinks.
Parameters:
cycConstant - the CycConstant for which isa links are to be created
parentElement - the parent HTML DOM element

createGuidNode

protected void createGuidNode(CycConstant cycConstant,
                              org.w3c.dom.Element parentElement)
                       throws java.io.IOException,
                              CycApiException
Creates HTML node for guid.
Parameters:
cycConstant - the CycConstant for which isa links are to be created
parentElement - the parent HTML DOM element

createIsaNodes

protected void createIsaNodes(CycFort cycFort,
                              org.w3c.dom.Element parentElement)
                       throws java.io.IOException,
                              CycApiException
Creates HTML nodes for isa links.
Parameters:
cycConstant - the CycConstant for which isa links are to be created
parentElement - the parent HTML DOM element

findSelectedGenls

protected CycFort findSelectedGenls(CycFort collection)
                             throws java.io.IOException,
                                    CycApiException
Returns the first indirect genls above the given term which is a member of the selected terms.
Parameters:
collection - the cyc collection which is not a member of the selected terms.
Returns:
the first indirect genls above the given term which is a member of the selected terms

createGenlNodes

protected void createGenlNodes(CycFort cycFort,
                               org.w3c.dom.Element parentElement)
                        throws java.io.IOException,
                               CycApiException
Creates HTML nodes for genl links.
Parameters:
cycConstant - the CycConstant for which genl links are to be created
parentElement - the parent HTML DOM element

specificCollections

protected CycList specificCollections(CycList collections)
                               throws java.io.IOException,
                                      CycApiException
Given a set of collection terms, returns a set which does not contain any collections are more genl than the remaining collections.
Parameters:
collections - the given set of collection terms
Returns:
a set of collection terms which does not contain any collections are more genl than the remaining collections.

createPredicateNode

protected void createPredicateNode(CycConstant cycConstant,
                                   org.w3c.dom.Element parentElement)
                            throws java.net.UnknownHostException,
                                   java.io.IOException,
                                   CycApiException
Creates an HTML node for a single Cyc predicate.
Parameters:
parentElement - the parent HTML DOM element

createFunctionNode

protected void createFunctionNode(CycConstant cycConstant,
                                  org.w3c.dom.Element parentElement)
                           throws java.net.UnknownHostException,
                                  java.io.IOException,
                                  CycApiException
Creates an HTML node for a single Cyc function.
Parameters:
parentElement - the parent HTML DOM element

createGenlPredsNodes

protected void createGenlPredsNodes(CycConstant cycConstant,
                                    org.w3c.dom.Element parentElement)
                             throws java.io.IOException,
                                    CycApiException
Creates HTML nodes for genlPreds links.
Parameters:
cycConstant - the CycConstant for which genlPreds links are to be created
parentElement - the parent HTML DOM element

createArg1IsaNodes

protected void createArg1IsaNodes(CycConstant cycConstant,
                                  org.w3c.dom.Element parentElement)
                           throws java.io.IOException,
                                  CycApiException
Creates HTML nodes for arg1Isa links.
Parameters:
cycConstant - the CycConstant for which arg1Isa links are to be created
parentElement - the parent HTML DOM element

createArg2IsaNodes

protected void createArg2IsaNodes(CycConstant cycConstant,
                                  org.w3c.dom.Element parentElement)
                           throws java.io.IOException,
                                  CycApiException
Creates HTML nodes for arg2Isa links.
Parameters:
cycConstant - the CycConstant for which arg2Isa links are to be created
parentElement - the parent HTML DOM element

createArg3IsaNodes

protected void createArg3IsaNodes(CycConstant cycConstant,
                                  org.w3c.dom.Element parentElement)
                           throws java.io.IOException,
                                  CycApiException
Creates HTML nodes for arg3Isa links.
Parameters:
cycConstant - the CycConstant for which arg3Isa links are to be created
parentElement - the parent HTML DOM element

createArg4IsaNodes

protected void createArg4IsaNodes(CycConstant cycConstant,
                                  org.w3c.dom.Element parentElement)
                           throws java.io.IOException,
                                  CycApiException
Creates HTML nodes for arg4Isa links.
Parameters:
cycConstant - the CycConstant for which arg4Isa links are to be created
parentElement - the parent HTML DOM element

createResultIsaNodes

protected void createResultIsaNodes(CycConstant cycConstant,
                                    org.w3c.dom.Element parentElement)
                             throws java.io.IOException,
                                    CycApiException
Creates HTML nodes for resultIsa links.
Parameters:
cycConstant - the CycConstant for which resultIsa links are to be created
parentElement - the parent HTML DOM element

createIndividualNode

protected void createIndividualNode(CycConstant cycConstant,
                                    org.w3c.dom.Element parentElement)
                             throws java.net.UnknownHostException,
                                    java.io.IOException,
                                    CycApiException
Creates an HTML individual node for a single Cyc individual.
Parameters:
parentElement - the parent HTML DOM element

createCollectionNode

protected void createCollectionNode(CycConstant cycConstant,
                                    org.w3c.dom.Element parentElement)
                             throws java.net.UnknownHostException,
                                    java.io.IOException,
                                    CycApiException
Creates an HTML node for a single Cyc collection.
Parameters:
parentElement - the parent HTML DOM element

createHierarchyPage

protected void createHierarchyPage(CycFort rootTerm)
                            throws java.net.UnknownHostException,
                                   java.io.IOException,
                                   CycApiException
Creates hierarchy HTML page.
Parameters:
rootTerm - the root term of the hierarchy tree

createHierarchyNodes

protected void createHierarchyNodes(CycFort cycFort,
                                    int indent)
                             throws java.io.IOException,
                                    CycApiException
Recursively creates hierarchy nodes for the given term and its spec collection terms.
Parameters:
cycFort - the given term for which hierarchy nodes will be created
indent - the current indent level

serialize

protected void serialize(org.w3c.dom.html.HTMLDocument htmlDocument,
                         java.lang.String outputPath)
                  throws java.io.IOException
Serializes the given HTML document to the given path.
Parameters:
htmlDocument - the HTML document model for serialization
outputPath - the file name of the serialized HTML document

filterSelectedConstants

protected CycList filterSelectedConstants(CycList constants)
Removes unselected terms from the given list.
Returns:
the filtered list

gatherUpwardClosure

protected CycList gatherUpwardClosure(CycList selectedCycForts)
                               throws java.net.UnknownHostException,
                                      java.io.IOException,
                                      CycApiException
Gather the updward closure of the selected CycForts with regard to isas and genls for collection terms, and with regard to isas and genlPreds for predicate terms.
Returns:
the updward closure of the selected CycForts with regard to genls for collection terms, and with regard to genlPreds for predicate terms

isEligibleForUpwardClosureInclusion

protected boolean isEligibleForUpwardClosureInclusion(CycFort cycFort)
                                               throws java.net.UnknownHostException,
                                                      java.io.IOException,
                                                      CycApiException
Returns true if the given term is eligible for incusion in the upward closure.
Parameters:
cycFort - the given term
Returns:
true if the given term is eligible for incusion in the upward closure

createCategorizedVocabularies

protected void createCategorizedVocabularies()
                                      throws java.net.UnknownHostException,
                                             java.io.IOException,
                                             CycApiException
Creates categorized vocabulary HTML pages.

createCategorizedVocabulary

protected void createCategorizedVocabulary(java.lang.String title,
                                           java.lang.String queryString,
                                           CycConstant mt,
                                           java.lang.String outputPath)
                                    throws java.net.UnknownHostException,
                                           java.io.IOException,
                                           CycApiException
Creates the given categorized vocabulary HTML page.
Parameters:
title - the title of the categorized vocabulary HTML page
queryString - the query string which finds the terms in the category
mt - the mt in which the query is asked
outputPath - the name of the output HTML page

addAllCategories

protected void addAllCategories()
                         throws CycApiException,
                                java.io.IOException,
                                java.net.UnknownHostException
Adds all categories to the HTML export.

addAllIETRef

protected void addAllIETRef()
                     throws CycApiException,
                            java.io.IOException,
                            java.net.UnknownHostException
Categorizes all ontology constants directly referenced in the IET Mapping.

addAllSyracuseRef

protected void addAllSyracuseRef()
                          throws CycApiException,
                                 java.io.IOException,
                                 java.net.UnknownHostException
Categorizes all ontology constants directly referenced in the Syracuse Mapping.

addAllSraRef

protected void addAllSraRef()
                     throws CycApiException,
                            java.io.IOException,
                            java.net.UnknownHostException
Categorizes all constants directly reference in the SRA NetOwl Mapping.

addAllVeridianRef

protected void addAllVeridianRef()
                          throws CycApiException,
                                 java.io.IOException,
                                 java.net.UnknownHostException
Categorizes all ontology constants directly referenced in the Veridian Mapping.

addAllSchemaMappingTypes

protected void addAllSchemaMappingTypes()
                                 throws CycApiException,
                                        java.io.IOException,
                                        java.net.UnknownHostException
Categorizes all schema mapping types.

addScriptRepresentationVocabulary

protected void addScriptRepresentationVocabulary()
                                          throws CycApiException,
                                                 java.io.IOException,
                                                 java.net.UnknownHostException
Categorizes script representation vocabulary.

addSemanticConstraintVocabulary

protected void addSemanticConstraintVocabulary()
                                        throws CycApiException,
                                               java.io.IOException,
                                               java.net.UnknownHostException
Categorizes semantic constraint vocabulary.

addAllPersonTypes

protected void addAllPersonTypes()
                          throws CycApiException,
                                 java.io.IOException,
                                 java.net.UnknownHostException
Categorizes all person types.

addAllOrganizationTypes

protected void addAllOrganizationTypes()
                                throws CycApiException,
                                       java.io.IOException,
                                       java.net.UnknownHostException
Categorizes all organization types.

addAllEventTypes

protected void addAllEventTypes()
                         throws CycApiException,
                                java.io.IOException,
                                java.net.UnknownHostException
Categorizes all event types.

addAllMaterials

protected void addAllMaterials()
                        throws CycApiException,
                               java.io.IOException,
                               java.net.UnknownHostException
Categorizes all 'materials'.

addAllWeaponTypes

protected void addAllWeaponTypes()
                          throws CycApiException,
                                 java.io.IOException,
                                 java.net.UnknownHostException
Categorizes all weapon types.

addAllRelations

protected void addAllRelations()
                        throws CycApiException,
                               java.io.IOException,
                               java.net.UnknownHostException
Categorizes all relations.

addAllBinaryPredicates

protected void addAllBinaryPredicates()
                               throws CycApiException,
                                      java.io.IOException,
                                      java.net.UnknownHostException
Categorizes all binary predicates.

addAllActorSlots

protected void addAllActorSlots()
                         throws CycApiException,
                                java.io.IOException,
                                java.net.UnknownHostException
Categorizes all actorslots.

addAllTemporalRelations

protected void addAllTemporalRelations()
                                throws CycApiException,
                                       java.io.IOException,
                                       java.net.UnknownHostException
Categorizes all temporal relations.

addAllPartonomicPredicates

protected void addAllPartonomicPredicates()
                                   throws CycApiException,
                                          java.io.IOException,
                                          java.net.UnknownHostException
Categorizes all partonomic predicates.

addAllSpecializationsOfAffiliation

protected void addAllSpecializationsOfAffiliation()
                                           throws CycApiException,
                                                  java.io.IOException,
                                                  java.net.UnknownHostException
Categorizes all specializations of affiliation.

addAllSpecializationsOfVestedInterest

protected void addAllSpecializationsOfVestedInterest()
                                              throws CycApiException,
                                                     java.io.IOException,
                                                     java.net.UnknownHostException
Categorizes all specializations of vested interest.

addAllDenotingFunctions

protected void addAllDenotingFunctions()
                                throws CycApiException,
                                       java.io.IOException,
                                       java.net.UnknownHostException
Categorizes all denoting functions.

addAllScriptedEventTypes

protected void addAllScriptedEventTypes()
                                 throws CycApiException,
                                        java.io.IOException,
                                        java.net.UnknownHostException
Categorizes all scripted event types.

addEeldCoreOntology

protected void addEeldCoreOntology()
                            throws CycApiException,
                                   java.io.IOException,
                                   java.net.UnknownHostException
Categorizes the original EELD 'core' ontology.

addPublicSharedOntology

protected void addPublicSharedOntology()
                                throws CycApiException,
                                       java.io.IOException,
                                       java.net.UnknownHostException
Categorizes all public shared ontology constants.

askEeldCoreOntology

protected void askEeldCoreOntology()
                            throws CycApiException,
                                   java.io.IOException,
                                   java.net.UnknownHostException
Categorizes the original EELD 'core' ontology.

askQueryString

protected CycList askQueryString(java.lang.String queryString,
                                 CycConstant mt)
                          throws CycApiException,
                                 java.io.IOException,
                                 java.net.UnknownHostException
Returns the sorted terms resulting from asking the given query string.
Parameters:
queryString - the query, as a string
mt - the mt in which the query is asked
Returns:
the sorted terms resulting from asking the given query string