org.eclipse.ocl.examples.emf.validation.validity.export
Class AbstractExporter
java.lang.Object
org.eclipse.ocl.examples.emf.validation.validity.export.AbstractExporter
- All Implemented Interfaces:
- IValidityExporter, IValidityExporterDescriptor
- Direct Known Subclasses:
- HTMLExporter, ModelExporter, TextExporter
public abstract class AbstractExporter
- extends java.lang.Object
- implements IValidityExporter
Exports ocl validation results.
Method Summary |
protected abstract void |
createContents(java.lang.Appendable s,
org.eclipse.emf.ecore.resource.Resource validatedResource,
RootNode rootNode,
java.lang.String exportedFileName)
Returns a stream containing the initial contents to be given to new
exported validation results file resource instances. |
void |
export(java.lang.Appendable s,
org.eclipse.emf.ecore.resource.Resource validatedResource,
RootNode rootNode,
java.lang.String exportedFileName)
Export the validity results to an Appendable. |
java.lang.String |
export(org.eclipse.emf.ecore.resource.Resource validatedResource,
RootNode rootNode,
java.lang.String exportedFileName)
Export the validity results and return String containing the results. |
protected int |
getConstraintCount()
|
IValidityExporter |
getExporter()
|
protected java.lang.String |
getMessage(Result result)
|
protected java.lang.String |
getSeverity(Result result)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
validationErrors
@NonNull
protected final java.util.List<LeafConstrainingNode> validationErrors
validationFailures
@NonNull
protected final java.util.List<LeafConstrainingNode> validationFailures
validationInfos
@NonNull
protected final java.util.List<LeafConstrainingNode> validationInfos
validationSuccess
@NonNull
protected final java.util.List<LeafConstrainingNode> validationSuccess
validationWarnings
@NonNull
protected final java.util.List<LeafConstrainingNode> validationWarnings
AbstractExporter
public AbstractExporter()
createContents
protected abstract void createContents(@NonNull
java.lang.Appendable s,
@NonNull
org.eclipse.emf.ecore.resource.Resource validatedResource,
@NonNull
RootNode rootNode,
@Nullable
java.lang.String exportedFileName)
throws java.io.IOException
- Returns a stream containing the initial contents to be given to new
exported validation results file resource instances.
- Parameters:
validatedResource
- The validated modelrootNode
- The validation result modelexportedFileName
- The target file name or null if not known and not to be reported
- Throws:
java.io.IOException
export
@NonNull
public java.lang.String export(@NonNull
org.eclipse.emf.ecore.resource.Resource validatedResource,
@NonNull
RootNode rootNode,
@Nullable
java.lang.String exportedFileName)
- Description copied from interface:
IValidityExporter
- Export the validity results and return String containing the results.
- Specified by:
export
in interface IValidityExporter
- Parameters:
validatedResource
- The resource to validaterootNode
- The Root Node to exportexportedFileName
- The target file name or null if not known and not to be reported
export
public void export(@NonNull
java.lang.Appendable s,
@NonNull
org.eclipse.emf.ecore.resource.Resource validatedResource,
@NonNull
RootNode rootNode,
@Nullable
java.lang.String exportedFileName)
throws java.io.IOException
- Description copied from interface:
IValidityExporter
- Export the validity results to an Appendable.
- Specified by:
export
in interface IValidityExporter
- Parameters:
s
- The appendablevalidatedResource
- The resource to validaterootNode
- The Root Node to exportexportedFileName
- The target file name or null if not known and not to be reported
- Throws:
java.io.IOException
getConstraintCount
protected int getConstraintCount()
getExporter
@NonNull
public IValidityExporter getExporter()
- Specified by:
getExporter
in interface IValidityExporterDescriptor
getMessage
protected java.lang.String getMessage(Result result)
getSeverity
protected java.lang.String getSeverity(Result result)