1 / 14

Working with the Ontos Architecture

Working with the Ontos Architecture. Where we’re going What you should know. Overview. Current and future architecture Backwards compatibility Working with OSMX documents CVS techniques Java tips, resources, best practices. Current Architecture. Ontologies: OSM-L, osm.dtd

dreama
Download Presentation

Working with the Ontos Architecture

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Working with the Ontos Architecture Where we’re going What you should know

  2. Overview • Current and future architecture • Backwards compatibility • Working with OSMX documents • CVS techniques • Java tips, resources, best practices

  3. Current Architecture • Ontologies: OSM-L, osm.dtd • Ontology Editor • Data Frames rev. 2 support • Runs as applet or standalone app • Automatic layout algorithm • Reads osm.dtd-based docs • Writes to various formats (OSM-L, osm.dtd, PostScript) • Ontos • Handles XML and RDF as well as old files • Produces SQL insert statements • OSM-L parser, record boundary detector, etc.

  4. Future Architecture • Ontologies: OSMX (XML Schema) • Store data directly with ontology • Ontology Editor • Support new data frames ideas • Multiple phrases with confidence values • Specification of data types and units of measure • Methods • Import old files; write OSMX • Data frame library management • Ontos • Gen/spec working with data frames • Work with new extraction framework

  5. Backwards Compatibility • We don’t want to lose or have to re-create old ontologies • Choice: support old or convert them? • Support could be difficult over time • Conversion: auto, manual, hybrid? • XML Transform (XSLT) will help with conversion but not all the way • Manual: tedious, one-time effort • How many ontologies are we talking about?

  6. Working with OSMX • Reading and writing OSMX: • Use JAXB-generated classes // First get a JAXBContext instance from the factory method // Pass in the package containing the binding classes JAXBContext ctxt = JAXBContext.newInstance("edu.byu.deg.osmx.binding"); // We now wish to get an in-memory object tree from the source file Unmarshaller u = ctxt.createUnmarshaller(); OSM osm = (OSM) u.unmarshal(new java.io.File("some-file.xml")); // From here the OSM object may be used and modified however you please. // Now we wish to write the in-memory objects to a destination file Marshaller m = ctxt.createMarshaller(); m.marshal(osm, new java.io.FileWriter(new java.io.File("some-result.xml")));

  7. OSM ObjectSet Gen/Spec RelationshipSet Aggregation Object Association Relationship State GeneralConstraint Transition Note Conjunction Lexicon DataInstance Macro OSMX Structure ObjectSet NameList Name DataFrame InternalRepresentation ValuePhraseList ValuePhrase KeywordPhraseList KeywordPhrase MethodList OSM

  8. Sample OSMX Document <OSMxmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://www.deg.byu.edu/xml/osmx.xsd http://www.deg.byu.edu/xml/osmx.xsd' xmlns='http://www.deg.byu.edu/xml/osmx.xsd' order="1"> <Macrolabel="SomeMacro">[0-9]+</Macro> <Note><Textorder="2"content="Some note."></Text></Note> </OSM>

  9. Available Projects • Data frame library management tool • Data instance validator • Convert and validate old ontologies • Automatic precision/recall calculator (store and reuse hand-tagged data) • OSM-L to OSMX converter (use existing C parser to emit XML?) • Data instance to SQL ‘insert’ converter • OSMX to OSM-L stylesheet (XSLT)

  10. CVS Techniques • Tagging: Store a “milestone” • Branching: Parallel development • Steps • Create tag/branch on selection or entire module • Update from repository, specifying tag/branch • Tag/branch “sticks” to your local working files when you commit changes • Merge branches when done • Switch to trunk or other branch using ‘update’

  11. Java Best Practices • Coding standard • Follow Sun’s example • See Sun’s “The Java Tutorial” for samples • Use javadoc comments • Avoid hard-coded constants • Have editor expand tabs to spaces • Indent two spaces • Use white space thoughtfully

  12. Using Java • Stay up-to-date but avoid “bleeding edge” where possible • Java 1.2: Swing (instead of AWT) • Java 1.3: Collections (instead of Vector, Hashtable, Enumeration) • Java 1.4: javax.xml, java.nio, asserts, logging, preferences, … • Java 1.5 (coming): generic types, etc. • Check within code for support of new features so older VMs fail gracefully

  13. Resources • java.sun.com • Tutorials • API documentation • developer.java.sun.com • TechTips e-mail newsletter • Free tools • Sun’s stuff, of course • JBuilder, Eclipse

  14. Additional Resources • xml.apache.org (xerces, xalan) • w3.org (XML specs and resources) • xml.com (XML tutorials) • netbeans.org (good free Java IDE) • CVS repository • DEG website

More Related