Download presentation
Presentation is loading. Please wait.
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
OSMX Structure OSM ObjectSet RelationshipSet Object Relationship GeneralConstraint Note Lexicon Macro Gen/Spec Aggregation Association State Transition Conjunction DataInstance ObjectSet NameList Name DataFrame InternalRepresentation ValuePhraseList KeywordPhraseList MethodList ValuePhrase KeywordPhrase OSM
8
Sample OSMX Document <OSM xmlns: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"> [0-9]+
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
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.