Open Business Objects for EDI
v3.6.0

com.americancoders.edi
Class IDList

java.lang.Object
  |
  +--com.americancoders.edi.IDList
All Implemented Interfaces:
java.io.Externalizable, IDListProcessor, java.io.Serializable

public class IDList
extends java.lang.Object
implements IDListProcessor

An class that represents ID lists

OBOE - Open Business Objects for EDI

Part of the OBOE Basic Extended Package
An EDI and XML Translator Written In Java
Copyright 1998-2009 - American Coders, LTD - Raleigh NC USA
All rights reserved
American Coders, Ltd
P. O. Box 97462
Raleigh, NC 27624 USA
1-919-846-2014
http://www.americancoders.com

Version:
3.6.0
Author:
Joe McVerry - American Coders, Ltd.
See Also:
Serialized Form

Field Summary
protected  java.util.Vector codes
          codes and descriptive values associated with IDList
protected  boolean filtered
          IDList boolean filtered - filtered data from filename
protected  java.lang.String filterList
           
protected  java.lang.String name
          IDList name
protected  java.lang.String shortname
          IDList short filename
protected  java.util.Vector values
          codes and descriptive values associated with IDList
 
Constructor Summary
IDList()
          Construct an id list object with no values
IDList(java.lang.String inShortName)
          Construct an id list object with no values but a name
IDList(java.lang.String xmlFile, java.lang.String inLastDirectoryToLook, com.americancoders.edi.IDListParser idListParser)
          Build an IDList structure from an XML file
 
Method Summary
 void add(java.lang.String inCode, java.lang.String inDescribe)
          Add code and description to the vectors
 java.lang.String describe(java.lang.String inCode)
          returns the descriptive value of the code, if it is not found then the code is returned
 java.lang.String getCode(java.lang.String inValue)
          returns the code value for a descriptive value.
 java.lang.String getCodeByPos(int pos)
          returns a code at a specific position in vector
 java.util.Vector getCodes()
          returns the code vector
 java.lang.String getFilterList()
           
 java.lang.String getName()
          return name of id list file
 java.lang.String getShortName()
          return short name of id list
 java.util.Vector getValues()
          returns the value vector
 com.americancoders.edi.IDList idListWork(char c, java.lang.String string)
           
 boolean isCodeValid(java.lang.String inCode)
          tests if the passed code is in the code vector
 boolean isFiltered()
           
 void readExternal(java.io.ObjectInput in)
          used by externalize methods
 void setFiltered(boolean filtered)
           
 void setFilterList(java.lang.String filterList)
           
 void setName(java.lang.String inName)
          sets the name of id list file
 void writeExternal(java.io.ObjectOutput out)
          used by externalize methods
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.String name
IDList name


codes

protected java.util.Vector codes
codes and descriptive values associated with IDList


values

protected java.util.Vector values
codes and descriptive values associated with IDList


shortname

protected java.lang.String shortname
IDList short filename


filtered

protected boolean filtered
IDList boolean filtered - filtered data from filename


filterList

protected java.lang.String filterList
Constructor Detail

IDList

public IDList(java.lang.String xmlFile,
              java.lang.String inLastDirectoryToLook,
              com.americancoders.edi.IDListParser idListParser)
Build an IDList structure from an XML file

Parameters:
xmlFile - xml file containing id list structure
inLastDirectoryToLook - - name of the highest directory to find idlist file in
idListParser - SAX2 parser IDListParser

IDList

public IDList()
Construct an id list object with no values


IDList

public IDList(java.lang.String inShortName)
Construct an id list object with no values but a name

Parameters:
inShortName - String name of idList
Method Detail

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
used by externalize methods

Specified by:
readExternal in interface java.io.Externalizable
Parameters:
in - ObjectInput stream
Throws:
java.io.IOException - - most likely class changed since written
java.lang.ClassNotFoundException - - only when dummy constructro not found

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
used by externalize methods

Specified by:
writeExternal in interface java.io.Externalizable
Parameters:
out - ObjectOutput stream
Throws:
java.io.IOException - java.io exception

setName

public void setName(java.lang.String inName)
sets the name of id list file


getName

public java.lang.String getName()
return name of id list file

Returns:
String

getShortName

public java.lang.String getShortName()
return short name of id list

Returns:
String

add

public void add(java.lang.String inCode,
                java.lang.String inDescribe)
Add code and description to the vectors

Specified by:
add in interface IDListProcessor
Parameters:
inCode - String code
inDescribe - String descriptive value

isCodeValid

public boolean isCodeValid(java.lang.String inCode)
tests if the passed code is in the code vector

Specified by:
isCodeValid in interface IDListProcessor
Parameters:
inCode - String to test
Returns:
boolean

describe

public java.lang.String describe(java.lang.String inCode)
returns the descriptive value of the code, if it is not found then the code is returned

Specified by:
describe in interface IDListProcessor
Parameters:
inCode - String to test
Returns:
String

getCode

public java.lang.String getCode(java.lang.String inValue)
returns the code value for a descriptive value. if it is not found the value is returned

Specified by:
getCode in interface IDListProcessor
Parameters:
inValue - String to test
Returns:
String

getCodeByPos

public java.lang.String getCodeByPos(int pos)
returns a code at a specific position in vector

Specified by:
getCodeByPos in interface IDListProcessor
Parameters:
pos - int String position
Returns:
String

getCodes

public java.util.Vector getCodes()
returns the code vector

Specified by:
getCodes in interface IDListProcessor
Returns:
Vector

getValues

public java.util.Vector getValues()
returns the value vector

Specified by:
getValues in interface IDListProcessor
Returns:
Vector

isFiltered

public boolean isFiltered()

setFiltered

public void setFiltered(boolean filtered)

getFilterList

public java.lang.String getFilterList()

setFilterList

public void setFilterList(java.lang.String filterList)

idListWork

public com.americancoders.edi.IDList idListWork(char c,
                                                java.lang.String string)
Parameters:
c - 'i' or 'x', inlude or exclude
string - inclusion/exclusion list
comma seperated and dash range specifier
Returns:
new idlist object

Open Business Objects for EDI
v3.6.0


OBOE is a trademark or registered trademark of American Coders, Ltd. in the US and other countries.
Copyright 1999-2004 American Coders, Ltd.
POB 97462
Raleigh NC 27624 USA
All Rights Reserved.