- java.lang.Object
-
- org.fissore.jrecordbind.RecordDefinition
-
public class RecordDefinition extends Object
The definition of the record bean. This bean rapresentation of the XML Schema fixed-length file definition (.xsd)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RecordDefinition.Property
A single "element" in the fixed-length file definition
-
Constructor Summary
Constructors Constructor Description RecordDefinition()
Creates a new instance, without a parent (aka: the main definition)RecordDefinition(RecordDefinition parent)
Creates a new instance, with the given parent definition.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getClassName()
The fully qualified class name described by this definitionString
getDefaultPadder()
int
getLength()
The length of the fixed-length fileString
getLineSeparator()
int
getMaxOccurs()
How many times this definition can occur in the fixed-length file? Main definition can occur 1 time only, subdefinitions can varyint
getMinOccurs()
How many times this definition must occur in the fixed-length file? Main definition must occur 1 time, subdefinitions can varyRecordDefinition
getParent()
String
getPrintableLineSeparator()
List<RecordDefinition.Property>
getProperties()
The list ofproperties
contained by this definitionString
getPropertyDelimiter()
The delimiter used in the fixed-length fileString
getPropertyPattern()
The regex that matches a property (i.e.String
getSetterName()
The name of the property used to set records from this definition in the parent (container) definition.List<RecordDefinition>
getSubRecords()
The sub definitions contained by this definition (hierarchy based files)int
hashCode()
boolean
hasParent()
boolean
isChoice()
boolean
isDelimited()
Tells if properties of this record are delimitedvoid
setChoice(boolean choice)
void
setClassName(String fullyQualifiedClassName)
void
setClassName(String className, String packageName)
void
setDefaultPadder(String padder)
void
setLength(int length)
void
setLineSeparator(String separator)
void
setMaxOccurs(int maxOccurs)
void
setMinOccurs(int minOccurs)
void
setPropertyDelimiter(String delimiter)
void
setSetterName(String setterName)
-
-
-
Constructor Detail
-
RecordDefinition
public RecordDefinition()
Creates a new instance, without a parent (aka: the main definition)
-
RecordDefinition
public RecordDefinition(RecordDefinition parent)
Creates a new instance, with the given parent definition.- Parameters:
parent
- the parent record definition
-
-
Method Detail
-
getClassName
public String getClassName()
The fully qualified class name described by this definition- Returns:
- a fully qualified class name
-
getDefaultPadder
public String getDefaultPadder()
-
getLength
public int getLength()
The length of the fixed-length file- Returns:
- the length
-
getLineSeparator
public String getLineSeparator()
-
getMaxOccurs
public int getMaxOccurs()
How many times this definition can occur in the fixed-length file? Main definition can occur 1 time only, subdefinitions can vary- Returns:
- an int
-
getMinOccurs
public int getMinOccurs()
How many times this definition must occur in the fixed-length file? Main definition must occur 1 time, subdefinitions can vary- Returns:
- an int
-
getParent
public RecordDefinition getParent()
-
getPrintableLineSeparator
public String getPrintableLineSeparator()
-
getProperties
public List<RecordDefinition.Property> getProperties()
The list ofproperties
contained by this definition- Returns:
- the list of
properties
-
getPropertyDelimiter
public String getPropertyDelimiter()
The delimiter used in the fixed-length file- Returns:
- the delimiter
-
isDelimited
public boolean isDelimited()
Tells if properties of this record are delimited- Returns:
- True if properties of the record are delimited, false if the record is fixed-length
-
getSetterName
public String getSetterName()
The name of the property used to set records from this definition in the parent (container) definition. E.G.: the "name" attribute in "element" like the following
<xs:element name="child" type="RowChildRecord"/>
- Returns:
- a property name
-
getSubRecords
public List<RecordDefinition> getSubRecords()
The sub definitions contained by this definition (hierarchy based files)- Returns:
- the list of sub definitions
-
getPropertyPattern
public String getPropertyPattern()
The regex that matches a property (i.e. a string that does not contain a delimiter)- Returns:
- the regex that matches a delimited property
-
hasParent
public boolean hasParent()
-
isChoice
public boolean isChoice()
-
setChoice
public void setChoice(boolean choice)
-
setClassName
public void setClassName(String fullyQualifiedClassName)
-
setClassName
public void setClassName(String className, String packageName)
-
setDefaultPadder
public void setDefaultPadder(String padder)
-
setLength
public void setLength(int length)
-
setLineSeparator
public void setLineSeparator(String separator)
-
setMaxOccurs
public void setMaxOccurs(int maxOccurs)
-
setMinOccurs
public void setMinOccurs(int minOccurs)
-
setPropertyDelimiter
public void setPropertyDelimiter(String delimiter)
-
setSetterName
public void setSetterName(String setterName)
-
-