public class JsonSchema extends Object implements Target, MessageSource
Modifier and Type | Field and Description |
---|---|
static String |
PARAM_SKIP_NOT_IMPLEMENTED_CHECK |
Constructor and Description |
---|
JsonSchema() |
Modifier and Type | Method and Description |
---|---|
String |
getTargetName() |
void |
initialise(PackageInfo p,
Model m,
Options o,
ShapeChangeResult r,
boolean diagOnly)
Initialize target generation for the JSON Schema output.
|
static boolean |
isEncoded(Info i) |
String |
message(int mnr)
This method returns messages belonging to the JSON Schema target by their
message number.
|
protected String |
messageText(int mnr)
This is the message text provision proper.
|
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) ). |
void |
write() |
public static final String PARAM_SKIP_NOT_IMPLEMENTED_CHECK
public void initialise(PackageInfo p, Model m, Options o, ShapeChangeResult r, boolean diagOnly) throws ShapeChangeAbortException
Initialize target generation for the JSON Schema output.
initialise
in interface Target
pi
- UML Package represented by PackageInfo interfacem
- Model represented by Model interfacer
- Result class for diagnostics outputdiagOnly
- Flag requesting to suppress any outputShapeChangeAbortException
Model.selectedSchemas()
,
PackageInfo.isSchema()
public static boolean isEncoded(Info i)
public void process(ClassInfo ci)
Target
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!
public String message(int mnr)
This method returns messages belonging to the JSON Schema target by their message number. The organization corresponds to the logic in module ShapeChangeResult. All functions in that class, which require an message number can be redirected to the function at hand.
message
in interface MessageSource
mnr
- Message numberprotected String messageText(int mnr)
mnr
- Message numberpublic String getTargetName()
getTargetName
in interface Target
Copyright © 2018. All rights reserved.