From bd9bfadeb4b404885198009f9f81fa53b7522c65 Mon Sep 17 00:00:00 2001 From: Willem Cazander Date: Tue, 27 May 2014 21:30:14 +0200 Subject: [PATCH] Added few doc lines. --- .../java/org/x4o/xml/eld/xsd/EldXsdWriter.java | 2 +- .../java/org/x4o/xml/lang/X4OLanguage.java | 13 +++++++------ .../org/x4o/xml/lang/X4OLanguageSession.java | 10 +++++++++- .../org/x4o/xml/lang/task/X4OLanguageTask.java | 18 ++++++++++++++++++ .../xml/lang/task/X4OLanguageTaskExecutor.java | 5 +++++ .../x4o/xml/lang/task/run/X4OTaskRunner.java | 2 +- 6 files changed, 41 insertions(+), 9 deletions(-) diff --git a/x4o-driver/src/main/java/org/x4o/xml/eld/xsd/EldXsdWriter.java b/x4o-driver/src/main/java/org/x4o/xml/eld/xsd/EldXsdWriter.java index b05a799..c2c30a5 100644 --- a/x4o-driver/src/main/java/org/x4o/xml/eld/xsd/EldXsdWriter.java +++ b/x4o-driver/src/main/java/org/x4o/xml/eld/xsd/EldXsdWriter.java @@ -39,7 +39,7 @@ import org.x4o.xml.lang.X4OLanguage; import org.xml.sax.SAXException; /** - * EldXsdWriter creates XML Schema files fom a x4o language. + * EldXsdWriter creates XML Schema files from a x4o language. * * @author Willem Cazander * @version 1.0 Aug 8, 2012 diff --git a/x4o-driver/src/main/java/org/x4o/xml/lang/X4OLanguage.java b/x4o-driver/src/main/java/org/x4o/xml/lang/X4OLanguage.java index 69805e2..1c4e085 100644 --- a/x4o-driver/src/main/java/org/x4o/xml/lang/X4OLanguage.java +++ b/x4o-driver/src/main/java/org/x4o/xml/lang/X4OLanguage.java @@ -32,7 +32,7 @@ import org.x4o.xml.element.ElementNamespace; import org.x4o.xml.lang.phase.X4OPhaseManager; /** - * X4OLanguage hold the defined language. + * X4OLanguage hold all the base definition properties of x4o xml language. * * @author Willem Cazander * @version 1.0 30 apr 2013 @@ -40,23 +40,24 @@ import org.x4o.xml.lang.phase.X4OPhaseManager; public interface X4OLanguage { /** - * Returns the language for which this ElementLanguage is created. - * @return Returns the language. + * Returns the language name of this x4o xml language. + * @return Returns the language name. */ String getLanguageName(); /** - * @return Returns the languageVersion of the parsing of this language. + * @return Returns the language version of this language instance. */ String getLanguageVersion(); /** - * @return the X4OPhaseManager. + * Returns the phase manager which runs the phases + * @return Returns the phase manager. */ X4OPhaseManager getPhaseManager(); /** - * @return the languageConfiguration. + * @return the language configuration. */ X4OLanguageConfiguration getLanguageConfiguration(); diff --git a/x4o-driver/src/main/java/org/x4o/xml/lang/X4OLanguageSession.java b/x4o-driver/src/main/java/org/x4o/xml/lang/X4OLanguageSession.java index dc5f659..0cd6de6 100644 --- a/x4o-driver/src/main/java/org/x4o/xml/lang/X4OLanguageSession.java +++ b/x4o-driver/src/main/java/org/x4o/xml/lang/X4OLanguageSession.java @@ -41,6 +41,9 @@ import org.x4o.xml.lang.phase.X4OPhase; */ public interface X4OLanguageSession { + /** + * @return Returns the language from which this session in created. + */ X4OLanguage getLanguage(); /** @@ -90,7 +93,6 @@ public interface X4OLanguageSession { */ void setRootElement(Element element); - /** * @return Returns null or an X4ODebugWriter to write parsing steps and debug data to. */ @@ -107,7 +109,13 @@ public interface X4OLanguageSession { */ X4OPhase getPhaseCurrent(); + /** + * @return Returns the phase this session will stop processing. + */ public String getPhaseStop(); + /** + * @return Returns a list of phases we skip while processing. + */ public List getPhaseSkip(); } diff --git a/x4o-driver/src/main/java/org/x4o/xml/lang/task/X4OLanguageTask.java b/x4o-driver/src/main/java/org/x4o/xml/lang/task/X4OLanguageTask.java index 57b9cf1..d637546 100644 --- a/x4o-driver/src/main/java/org/x4o/xml/lang/task/X4OLanguageTask.java +++ b/x4o-driver/src/main/java/org/x4o/xml/lang/task/X4OLanguageTask.java @@ -32,11 +32,29 @@ import org.x4o.xml.io.sax.ext.PropertyConfig; */ public interface X4OLanguageTask { + /** + * @return Returns the task id. + */ String getId(); + + /** + * @return Returns the task name. + */ String getName(); + + /** + * @return Returns the task description. + */ String getDescription(); + /** + * @return Returns newly created PropertyConfig for configuring this task. + */ PropertyConfig createTaskConfig(); + /** + * @param config The config with which the task will be runned. + * @return The task executor for running the task. + */ X4OLanguageTaskExecutor createTaskExecutor(PropertyConfig config); } diff --git a/x4o-driver/src/main/java/org/x4o/xml/lang/task/X4OLanguageTaskExecutor.java b/x4o-driver/src/main/java/org/x4o/xml/lang/task/X4OLanguageTaskExecutor.java index 7f4ee54..0810189 100644 --- a/x4o-driver/src/main/java/org/x4o/xml/lang/task/X4OLanguageTaskExecutor.java +++ b/x4o-driver/src/main/java/org/x4o/xml/lang/task/X4OLanguageTaskExecutor.java @@ -33,5 +33,10 @@ import org.x4o.xml.lang.X4OLanguage; */ public interface X4OLanguageTaskExecutor { + /** + * Executes a task for which this executor is created. + * @param language The language for which we run the task. + * @throws X4OLanguageTaskException Can be thrown in case of error. + */ void execute(X4OLanguage language) throws X4OLanguageTaskException; } diff --git a/x4o-driver/src/main/java/org/x4o/xml/lang/task/run/X4OTaskRunner.java b/x4o-driver/src/main/java/org/x4o/xml/lang/task/run/X4OTaskRunner.java index 9547417..3693620 100644 --- a/x4o-driver/src/main/java/org/x4o/xml/lang/task/run/X4OTaskRunner.java +++ b/x4o-driver/src/main/java/org/x4o/xml/lang/task/run/X4OTaskRunner.java @@ -38,7 +38,7 @@ import org.x4o.xml.lang.task.X4OLanguageTaskExecutor; * @author Willem Cazander * @version 1.0 Aug 30, 2013 */ -public class X4OTaskRunner { +public final class X4OTaskRunner { static public void runTask(String languageName,String languageVersion,String taskId,List props) throws X4OLanguageTaskException { X4ODriver driver = X4ODriverManager.getX4ODriver(languageName);