net.ontopia.topicmaps.schema.impl.osl
Class OSLSchemaWriter

java.lang.Object
  extended by net.ontopia.topicmaps.schema.impl.osl.OSLSchemaWriter
All Implemented Interfaces:
SchemaWriterIF

public class OSLSchemaWriter
extends java.lang.Object
implements SchemaWriterIF

PUBLIC: Writes out an OSL schema using the OSL schema syntax.


Field Summary
protected  LocatorIF base
           
protected  org.xml.sax.helpers.AttributeListImpl EMPTY_ATTR_LIST
           
protected  java.lang.String encoding
           
protected  java.io.Writer out
           
 
Constructor Summary
OSLSchemaWriter(java.io.File file, java.lang.String encoding)
          PUBLIC: Creates a schema writer bound to the given file.
OSLSchemaWriter(java.io.Writer out, java.lang.String encoding)
          PUBLIC: Creates a schema writer bound to the given Writer object.
 
Method Summary
protected  void emptyElement(org.xml.sax.DocumentHandler dh, java.lang.String elem, org.xml.sax.AttributeList atts)
           
protected  void export(AssociationClass klass, org.xml.sax.DocumentHandler dh)
           
protected  void export(AssociationRoleConstraint constraint, org.xml.sax.DocumentHandler dh)
           
protected  void export(OccurrenceConstraint constraint, org.xml.sax.DocumentHandler dh)
           
protected  void export(OSLSchema schema, org.xml.sax.DocumentHandler dh)
           
protected  void export(RuleSet ruleset, org.xml.sax.DocumentHandler dh)
           
protected  void export(TMObjectMatcherIF matcher, org.xml.sax.DocumentHandler dh)
           
protected  void export(TopicClass klass, org.xml.sax.DocumentHandler dh)
           
protected  void export(TopicConstraintCollection constraint, org.xml.sax.DocumentHandler dh)
           
protected  void export(TopicNameConstraint constraint, org.xml.sax.DocumentHandler dh)
           
protected  void export(TopicRoleConstraint constraint, org.xml.sax.DocumentHandler dh)
           
protected  void export(VariantConstraint constraint, org.xml.sax.DocumentHandler dh)
           
protected  void exportInstanceOf(TypeSpecification spec, org.xml.sax.DocumentHandler dh)
           
protected  void exportMatchers(java.util.Collection matchers, org.xml.sax.DocumentHandler dh)
           
protected  void exportScope(ScopedConstraintIF constraint, org.xml.sax.DocumentHandler dh)
           
protected  org.xml.sax.AttributeList getAttributes(boolean setting, java.lang.String name, java.lang.String tvalue, java.lang.String fvalue)
           
protected  org.xml.sax.AttributeList getAttributes(java.lang.String name, java.lang.String value)
           
protected  org.xml.sax.AttributeList getMinMax(CardinalityConstraintIF constraint)
           
protected  java.lang.String getRelativeLocator(LocatorIF base, LocatorIF relative)
           
 void write(SchemaIF schema)
          PUBLIC: Writes the schema.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

out

protected java.io.Writer out

encoding

protected java.lang.String encoding

base

protected LocatorIF base

EMPTY_ATTR_LIST

protected org.xml.sax.helpers.AttributeListImpl EMPTY_ATTR_LIST
Constructor Detail

OSLSchemaWriter

public OSLSchemaWriter(java.io.Writer out,
                       java.lang.String encoding)
PUBLIC: Creates a schema writer bound to the given Writer object.

Parameters:
encoding - The encoding in which the schema will be written.

OSLSchemaWriter

public OSLSchemaWriter(java.io.File file,
                       java.lang.String encoding)
                throws java.io.IOException
PUBLIC: Creates a schema writer bound to the given file.

Parameters:
encoding - The encoding in which to write the file.
Throws:
java.io.IOException
Method Detail

write

public void write(SchemaIF schema)
           throws java.io.IOException
PUBLIC: Writes the schema.

Specified by:
write in interface SchemaWriterIF
Throws:
java.io.IOException - Thrown if there are problems writing to the specified location.

export

protected void export(OSLSchema schema,
                      org.xml.sax.DocumentHandler dh)
               throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

export

protected void export(RuleSet ruleset,
                      org.xml.sax.DocumentHandler dh)
               throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

export

protected void export(TopicClass klass,
                      org.xml.sax.DocumentHandler dh)
               throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

export

protected void export(AssociationClass klass,
                      org.xml.sax.DocumentHandler dh)
               throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

export

protected void export(TopicConstraintCollection constraint,
                      org.xml.sax.DocumentHandler dh)
               throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

export

protected void export(TopicNameConstraint constraint,
                      org.xml.sax.DocumentHandler dh)
               throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

export

protected void export(VariantConstraint constraint,
                      org.xml.sax.DocumentHandler dh)
               throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

export

protected void export(OccurrenceConstraint constraint,
                      org.xml.sax.DocumentHandler dh)
               throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

export

protected void export(TopicRoleConstraint constraint,
                      org.xml.sax.DocumentHandler dh)
               throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

export

protected void export(AssociationRoleConstraint constraint,
                      org.xml.sax.DocumentHandler dh)
               throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

export

protected void export(TMObjectMatcherIF matcher,
                      org.xml.sax.DocumentHandler dh)
               throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

exportScope

protected void exportScope(ScopedConstraintIF constraint,
                           org.xml.sax.DocumentHandler dh)
                    throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

exportInstanceOf

protected void exportInstanceOf(TypeSpecification spec,
                                org.xml.sax.DocumentHandler dh)
                         throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

exportMatchers

protected void exportMatchers(java.util.Collection matchers,
                              org.xml.sax.DocumentHandler dh)
                       throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

getAttributes

protected org.xml.sax.AttributeList getAttributes(java.lang.String name,
                                                  java.lang.String value)

getAttributes

protected org.xml.sax.AttributeList getAttributes(boolean setting,
                                                  java.lang.String name,
                                                  java.lang.String tvalue,
                                                  java.lang.String fvalue)

getMinMax

protected org.xml.sax.AttributeList getMinMax(CardinalityConstraintIF constraint)

emptyElement

protected void emptyElement(org.xml.sax.DocumentHandler dh,
                            java.lang.String elem,
                            org.xml.sax.AttributeList atts)
                     throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

getRelativeLocator

protected java.lang.String getRelativeLocator(LocatorIF base,
                                              LocatorIF relative)


Copyright © 2000-2012 Ontopia.