net.ontopia.topicmaps.schema.impl.osl
Class OSLSchemaWriter
java.lang.Object
net.ontopia.topicmaps.schema.impl.osl.OSLSchemaWriter
- All Implemented Interfaces:
- SchemaWriterIF
public class OSLSchemaWriter
- extends Object
- implements SchemaWriterIF
PUBLIC: Writes out an OSL schema using the OSL schema syntax.
Method Summary |
protected void |
emptyElement(DocumentHandler dh,
String elem,
AttributeList atts)
|
protected void |
export(AssociationClass klass,
DocumentHandler dh)
|
protected void |
export(AssociationRoleConstraint constraint,
DocumentHandler dh)
|
protected void |
export(OccurrenceConstraint constraint,
DocumentHandler dh)
|
protected void |
export(OSLSchema schema,
DocumentHandler dh)
|
protected void |
export(RuleSet ruleset,
DocumentHandler dh)
|
protected void |
export(TMObjectMatcherIF matcher,
DocumentHandler dh)
|
protected void |
export(TopicClass klass,
DocumentHandler dh)
|
protected void |
export(TopicConstraintCollection constraint,
DocumentHandler dh)
|
protected void |
export(TopicNameConstraint constraint,
DocumentHandler dh)
|
protected void |
export(TopicRoleConstraint constraint,
DocumentHandler dh)
|
protected void |
export(VariantConstraint constraint,
DocumentHandler dh)
|
protected void |
exportInstanceOf(TypeSpecification spec,
DocumentHandler dh)
|
protected void |
exportMatchers(Collection matchers,
DocumentHandler dh)
|
protected void |
exportScope(ScopedConstraintIF constraint,
DocumentHandler dh)
|
protected AttributeList |
getAttributes(boolean setting,
String name,
String tvalue,
String fvalue)
|
protected AttributeList |
getAttributes(String name,
String value)
|
protected AttributeList |
getMinMax(CardinalityConstraintIF constraint)
|
protected 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 |
out
protected Writer out
encoding
protected String encoding
base
protected LocatorIF base
EMPTY_ATTR_LIST
protected org.xml.sax.helpers.AttributeListImpl EMPTY_ATTR_LIST
OSLSchemaWriter
public OSLSchemaWriter(Writer out,
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(File file,
String encoding)
throws IOException
- PUBLIC: Creates a schema writer bound to the given file.
- Parameters:
encoding
- The encoding in which to write the file.
- Throws:
IOException
write
public void write(SchemaIF schema)
throws IOException
- PUBLIC: Writes the schema.
- Specified by:
write
in interface SchemaWriterIF
- Throws:
IOException
- Thrown if there are problems writing
to the specified location.
export
protected void export(OSLSchema schema,
DocumentHandler dh)
throws SAXException
- Throws:
SAXException
export
protected void export(RuleSet ruleset,
DocumentHandler dh)
throws SAXException
- Throws:
SAXException
export
protected void export(TopicClass klass,
DocumentHandler dh)
throws SAXException
- Throws:
SAXException
export
protected void export(AssociationClass klass,
DocumentHandler dh)
throws SAXException
- Throws:
SAXException
export
protected void export(TopicConstraintCollection constraint,
DocumentHandler dh)
throws SAXException
- Throws:
SAXException
export
protected void export(TopicNameConstraint constraint,
DocumentHandler dh)
throws SAXException
- Throws:
SAXException
export
protected void export(VariantConstraint constraint,
DocumentHandler dh)
throws SAXException
- Throws:
SAXException
export
protected void export(OccurrenceConstraint constraint,
DocumentHandler dh)
throws SAXException
- Throws:
SAXException
export
protected void export(TopicRoleConstraint constraint,
DocumentHandler dh)
throws SAXException
- Throws:
SAXException
export
protected void export(AssociationRoleConstraint constraint,
DocumentHandler dh)
throws SAXException
- Throws:
SAXException
export
protected void export(TMObjectMatcherIF matcher,
DocumentHandler dh)
throws SAXException
- Throws:
SAXException
exportScope
protected void exportScope(ScopedConstraintIF constraint,
DocumentHandler dh)
throws SAXException
- Throws:
SAXException
exportInstanceOf
protected void exportInstanceOf(TypeSpecification spec,
DocumentHandler dh)
throws SAXException
- Throws:
SAXException
exportMatchers
protected void exportMatchers(Collection matchers,
DocumentHandler dh)
throws SAXException
- Throws:
SAXException
getAttributes
protected AttributeList getAttributes(String name,
String value)
getAttributes
protected AttributeList getAttributes(boolean setting,
String name,
String tvalue,
String fvalue)
getMinMax
protected AttributeList getMinMax(CardinalityConstraintIF constraint)
emptyElement
protected void emptyElement(DocumentHandler dh,
String elem,
AttributeList atts)
throws SAXException
- Throws:
SAXException
getRelativeLocator
protected String getRelativeLocator(LocatorIF base,
LocatorIF relative)
Copyright © 2000-2012 Ontopia.