com.legstar.codegen.tasks
Class SourceToXsdCobolTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by com.legstar.codegen.tasks.SourceToXsdCobolTask

public abstract class SourceToXsdCobolTask
extends org.apache.tools.ant.Task

This abstract ant task is used by derived generates which generate an XML schema with COBOL annotation from different type of sources.


Field Summary
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
SourceToXsdCobolTask()
           
 
Method Summary
 void checkInput(boolean xsdFileNameMandatory, boolean namespaceMandatory)
          Checks that common properties set are valid.
 SourceToXsdCobolModel getModel()
           
 String getNamespace()
           
 File getTargetDir()
           
 String getTargetXsdFileName()
           
static String packageFromURI(URI namespaceURI)
          Converts a URI into a package name.
 void setModel(SourceToXsdCobolModel model)
           
 void setNamespace(String namespace)
           
 void setTargetDir(File targetDir)
           
 void setTargetXsdFileName(String targetXsdFileName)
           
 
Methods inherited from class org.apache.tools.ant.Task
execute, getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SourceToXsdCobolTask

public SourceToXsdCobolTask()
Method Detail

checkInput

public void checkInput(boolean xsdFileNameMandatory,
                       boolean namespaceMandatory)
Checks that common properties set are valid.

Parameters:
xsdFileNameMandatory - where an xsd file name is mandatory
namespaceMandatory - where a target namespace is mandatory

packageFromURI

public static String packageFromURI(URI namespaceURI)
Converts a URI into a package name. We assume a hierarchical, server-based URI with the following syntax: [scheme:][//host[:port]][path][?query][#fragment] The package name is derived from host, path and fragment.

Parameters:
namespaceURI - the input namespace URI
Returns:
the result package name

getTargetDir

public File getTargetDir()
Returns:
the current target directory

setTargetDir

public void setTargetDir(File targetDir)
Parameters:
targetDir - the target directory to set

getTargetXsdFileName

public String getTargetXsdFileName()
Returns:
the target annotated XSD file name

setTargetXsdFileName

public void setTargetXsdFileName(String targetXsdFileName)
Parameters:
targetXsdFileName - the target annotated XSD file name to set

getNamespace

public String getNamespace()
Returns:
the target schema namespace

setNamespace

public void setNamespace(String namespace)
Parameters:
namespace - the target schema namespace to set

getModel

public SourceToXsdCobolModel getModel()
Returns:
the generation model

setModel

public void setModel(SourceToXsdCobolModel model)
Parameters:
model - the generation model to set


Copyright © 2015 LegSem. All Rights Reserved.