## org.opencyc.xml
Class ImportOpenDirectoryStructure

    java.lang.Object
      |
      +--org.opencyc.xml.ImportDaml
            |
            +--org.opencyc.xml.ImportOpenDirectoryStructure

All Implemented Interfaces:
  com.hp.hpl.jena.rdf.arp.StatementHandler

public class ImportOpenDirectoryStructure
extends ImportDaml

Imports DAML xml content for the Open Directory Structure.

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
`protected class` `ImportOpenDirectoryStructure.DamlDocInfo` Provides a container for specifying the ODP DAML document paths and the Cyc import microtheory for each.

Inner classes inherited from class org.opencyc.xml.ImportDaml
`ImportDaml.DamlRestriction, ImportDaml.DamlTermInfo, ImportDaml.MyErrorHandler`

Field Summary
`protected java.util.ArrayList` `damlDocInfos` the list of DAML documents and import microtheories
`protected GatherOpenDirectoryTitles` `gatherOpenDirectoryTitles` reference to the GatherOpenDirectoryTitles object

Fields inherited from class org.opencyc.xml.ImportDaml
`actuallyImport, arp, bookkeepingMt, characterEncoding, cycAccess, damlOntologyDefiningURL, damlOntologyDefiningURLString, damlRestriction, DEFAULT_VERBOSITY, equivalentDamlCycTerms, importMt, importMtName, kbSubsetCollection, kbSubsetCollectionName, ontologyNicknames, previousDamlTermInfo, verbosity`

Constructor Summary
`ImportOpenDirectoryStructure()` Constructs a new ImportOpenDirectoryStructure object.

Method Summary
`protected void` `additionalLexicalAssertions(CycFort term)` Asserts additional lexical assertions about the given term which are specific to the import of Open Directory terms.
`protected void` `doImport()` Performs import of the Open Directory Structure.
`protected void` `gatherOdpTitles()` Gathers the ODP topic titles.
`protected void` `importDaml()` Import the ODP DAML ontologies into Cyc.
`protected void` `initializeDamlVocabulary()` Initializes the DAML ontology vocabulary if not present.
`protected void` `initializeDocumentsToImport()` Initializes the documents to import.
`protected void` `initializeMappedTerms()`
`protected void` `initializeOntologyNicknames()` Initializes the Ontology nicknames mapping.
`static void` `main(java.lang.String[] args)` Provides the main method for the ImportOdpDaml application.

Methods inherited from class org.opencyc.xml.ImportDaml

`assertArgumentMapping, assertArgumentMapping, assertForwardArgConstraints, assertMapping, assertMapping, damlTermInfoWrapper, damlTermInfoWrapperTest, displayTriple, escaped, getMappings, getMappings, getOntologyNickname, hasUriNamespaceSyntax, importArg1Isa, importArg2Isa, importComment, importConceptuallyRelated, importContainsInformationAbout, importDaml, importDaml, importGenlPreds, importGenls, importImports, importIsa, importLiteralTriple, importNameString, importSynonymousExternalConcept, importTerm, importTriple, importVersionInfo, initialize, initializeCommonDamlVocabulary, initializeCommonMappedTerms, initializeCommonOntologyNicknames, initializeDamlOntologyMt, isProbableUri, literal, processRestrictionObject, processRestrictionSubject, processRestrictionSubject, resource, setOntologyNickname, setVerbosity, statement, statement, translateResource`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### damlDocInfos

    protected java.util.ArrayList damlDocInfos

  the list of DAML documents and import microtheories

### gatherOpenDirectoryTitles

    protected GatherOpenDirectoryTitles gatherOpenDirectoryTitles

  reference to the GatherOpenDirectoryTitles object

Constructor Detail

### ImportOpenDirectoryStructure

    public ImportOpenDirectoryStructure()
                                 throws java.io.IOException,
                                        java.net.UnknownHostException,
                                        CycApiException

  Constructs a new ImportOpenDirectoryStructure object.

Method Detail

### main

    public static void main(java.lang.String[] args)

  Provides the main method for the ImportOdpDaml application.
  Parameters:
    `args` - ignored.

### doImport

    protected void doImport()
                     throws java.io.IOException,
                            CycApiException

  Performs import of the Open Directory Structure.

### gatherOdpTitles

    protected void gatherOdpTitles()
                            throws java.io.IOException

  Gathers the ODP topic titles. Win32 - file:///H:/OpenCyc/open-directory-structure.daml Linux - file:///home/reed/opencyc/open-directory.daml

### importDaml

    protected void importDaml()
                       throws java.io.IOException,
                              java.net.UnknownHostException,
                              CycApiException

  Import the ODP DAML ontologies into Cyc.

### initializeDocumentsToImport

    protected void initializeDocumentsToImport()

  Initializes the documents to import.

### initializeOntologyNicknames

    protected void initializeOntologyNicknames()

  Initializes the Ontology nicknames mapping.

### initializeMappedTerms

    protected void initializeMappedTerms()
                                  throws java.io.IOException,
                                         java.net.UnknownHostException,
                                         CycApiException

### initializeDamlVocabulary

    protected void initializeDamlVocabulary()
                                     throws java.io.IOException,
                                            java.net.UnknownHostException,
                                            CycApiException

  Initializes the DAML ontology vocabulary if not present.

### additionalLexicalAssertions

    protected void additionalLexicalAssertions(CycFort term)
                                        throws java.io.IOException,
                                               CycApiException

  Asserts additional lexical assertions about the given term which are specific to the import of Open Directory terms. Overriden from the superclass for desired behavior.
  Overrides:
    `additionalLexicalAssertions` in class `ImportDaml`
  Parameters:
    `term` - the imported Open Directory (wrapped) term