de.interactive_instruments.ShapeChange.Target.XmlSchema
Class XmlSchema

java.lang.Object
  extended by de.interactive_instruments.ShapeChange.Target.XmlSchema.XmlSchema
All Implemented Interfaces:
Target

public class XmlSchema
extends Object
implements Target


Field Summary
static int TARGET_XMLSCHEMA
           
 
Constructor Summary
XmlSchema()
           
 
Method Summary
static boolean classCanBeReferenced(ClassInfo ci)
          Find out whether the given class is can carry an id and can hence be referenced by means of xlink:href.
static boolean classHasObjectElement(ClassInfo ci)
          Find out whether the given class is represented by means of an XML element construct.
protected  boolean createXSDs(PackageInfo pi, XsdDocument xsdcurr)
          Create XML Schema documents
 int getTargetID()
           
 void initialise(PackageInfo p, Model m, Options o, ShapeChangeResult r, boolean diagOnly)
          Allows a target to perform the necessary initialization routines before processing.
 void process(ClassInfo ci)
          The converter will call this method for each class belonging to the package given during initialization (see Target.initialise(de.interactive_instruments.ShapeChange.Model.PackageInfo, de.interactive_instruments.ShapeChange.Model.Model, de.interactive_instruments.ShapeChange.Options, de.interactive_instruments.ShapeChange.ShapeChangeResult, boolean)).
protected  void processDependecies(PackageInfo pi)
          Process dependency relationships with other packages
 void write()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TARGET_XMLSCHEMA

public static final int TARGET_XMLSCHEMA
See Also:
Constant Field Values
Constructor Detail

XmlSchema

public XmlSchema()
Method Detail

initialise

public void initialise(PackageInfo p,
                       Model m,
                       Options o,
                       ShapeChangeResult r,
                       boolean diagOnly)
                throws ShapeChangeAbortException
Description copied from interface: Target
Allows a target to perform the necessary initialization routines before processing.

Will be called by the Converter for each selected schema (see Model.selectedSchemas() and PackageInfo.isSchema()).

Specified by:
initialise in interface Target
Parameters:
p - a schema from the model selected via the configuration (see Model.selectedSchemas()) - not necessarily always an application schema
Throws:
ShapeChangeAbortException
See Also:
Model.selectedSchemas(), PackageInfo.isSchema()

process

public void process(ClassInfo ci)
Description copied from interface: Target
The converter will call this method for each class belonging to the package given during initialization (see Target.initialise(de.interactive_instruments.ShapeChange.Model.PackageInfo, de.interactive_instruments.ShapeChange.Model.Model, de.interactive_instruments.ShapeChange.Options, de.interactive_instruments.ShapeChange.ShapeChangeResult, boolean)).

NOTE: will be called not only for the classes directly contained in the package, but also all sub-packages belonging to the same targetNamespace!

Specified by:
process in interface Target

write

public void write()
Specified by:
write in interface Target

createXSDs

protected boolean createXSDs(PackageInfo pi,
                             XsdDocument xsdcurr)
                      throws ShapeChangeAbortException
Create XML Schema documents

Throws:
ShapeChangeAbortException

processDependecies

protected void processDependecies(PackageInfo pi)
                           throws ShapeChangeAbortException
Process dependency relationships with other packages

Throws:
ShapeChangeAbortException

getTargetID

public int getTargetID()
Specified by:
getTargetID in interface Target

classHasObjectElement

public static boolean classHasObjectElement(ClassInfo ci)
Find out whether the given class is represented by means of an XML element construct.

Parameters:
ci - ClassInfo of class to be inquired
Returns:
Flag returning the requested information

classCanBeReferenced

public static boolean classCanBeReferenced(ClassInfo ci)
Find out whether the given class is can carry an id and can hence be referenced by means of xlink:href.

Parameters:
ci - ClassInfo of class to be inquired
Returns:
Flag returning the requested information


Copyright © 2015. All rights reserved.