Java Doc for AVPairs.java in  » Portal » Open-Portal » soif » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Portal » Open Portal » soif 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   soif.AVPairs

AVPairs
public class AVPairs implements Cloneable(Code)
A class to handle attribute/value pairs.

A SOIF attribute name may be multi-valued. For example, attributes "author-1" and "author-2" are treated as seperate instances of a single attribute, allowing the attribute to have more than one value.



Field Summary
final public static  intNOMULTIVALUE
     No multivalue value.
public  AVPairsnext
     Next AVPair.
public  Stringvalue
     Value.

Constructor Summary
public  AVPairs(String att, String val)
     Constructs a new AVPairs instance.

Method Summary
public  booleanattributeNameExists(String s)
     Check to see if an attributeName exists on the list of AVPairs, regardless of multivalue: e.g.
public  StringattributeValue()
     Return the base attribute name.
public  intattributeValueCount(String s)
     Get number of values for an attribute, e.g.
public  intcount()
     Count AVPairs.
public  AVPairsgetAVPair(String s)
     Get an avpair based on the attribute.
public  AVPairsgetAVPairsByAttribute(String s)
     Clone the AVPairs w/ the specified attribute.
public  AVPairsgetAVPairsByMV(int mv)
     Clone the AVPairs w/ the specified MV.
public  StringgetAttribute()
     Get the attribute for this AVPair.
public  intgetAttributeCount()
     Return a unique list of attributes w/out multi value, e.g.
public  intgetAttributeIndex()
     Get the attribute index for this AVPair.
public  StringgetAttributeName()
     Get the attribute name for this AVPair.
public  String[]getAttributes()
     Return a unique list of attributes w/out multi value, e.g.
public  intgetMaxAttributeIndex()
     Get the maximum multivalue value.
public  AVPairsgetSingleValuePairs()
     Return the pairs of the list that are not multivalue.
public  StringgetValue()
     Return the value of a single AVPair (head of list).
public  StringgetValue(String s)
     Find the value of a non-multivalue attribute.
public  StringgetValue(String s, int n)
     Find the value of a multivalue attribute by index.
public  String[]getValues(String s)
     Find all values of an attribute.
public  voidinsertAfter(AVPairs avPair)
     Insert new AVPair after this instance.
public  voidinsertAfter(String att, String val)
     Insert new AVPair after this instance.
public  booleanisMV()
    
public  AVPairsremove(AVPairs avp)
     Remove AVPairs instance from list.
public  AVPairsremove(String att)
     Remove AVPairs instance from list.
public  voidsetAttribute(String att)
     Set the attribute, do the multi-value parse.
public  voidsetIndices(int index)
     Sets the index of a multivalue attribute value pair.
public  booleansetValue(String s, String v)
     Set the value of a non-multivalue attribute.
public  booleansetValue(String s, int n, String v)
     Set the value of a multivalue attribute by index.
public  StringtoCGIEqualStringList(boolean quoted)
     Return "a = v" string version of AVPairs list, spaced.
public  StringtoEqualString(boolean quoted)
     Return "a = v" string version of AVPairs instance.
public static  StringtoSOIF(String a, String v)
     Print out SOIF attribute value pair.
public  StringtoSOIF()
     Print out SOIF attribute value pair.
public  StringtoSOIF(int mv)
     Print out SOIF attribute value pair.
public  StringtoSOIFList()
     Print out SOIF attribute value pair.
public  StringtoSOIFList(int mv)
     Print out SOIF attribute value pair.
public  StringtoSpacedEqualStringList(boolean quoted)
     Return "a = v" string version of AVPairs list, spaced.
public  StringtoString()
    
public  StringtoStringList()
     Return SOIF string version of AVPairs instance list.
public  AVPairsunduplicateValues()
     Unduplicate values on the AVPairs list.
public  AVPairsupdate(String att, String val)
     A convenience method which bundles insert(), setValue() and remove().

Field Detail
NOMULTIVALUE
final public static int NOMULTIVALUE(Code)
No multivalue value. This is the value that an AVPair which is not multivalue will return if asked for its multivalue index.



next
public AVPairs next(Code)
Next AVPair.



value
public String value(Code)
Value.




Constructor Detail
AVPairs
public AVPairs(String att, String val)(Code)
Constructs a new AVPairs instance.
Parameters:
  att - the attribute
Parameters:
  val - the value




Method Detail
attributeNameExists
public boolean attributeNameExists(String s)(Code)
Check to see if an attributeName exists on the list of AVPairs, regardless of multivalue: e.g. Bob == Bob-1. Ignores case of attribute name.
Parameters:
  s - the attribute



attributeValue
public String attributeValue()(Code)
Return the base attribute name.



attributeValueCount
public int attributeValueCount(String s)(Code)
Get number of values for an attribute, e.g. if Bob has Bob-1 and Bob-2, the answer is 2. Ignores case of attribute name.
Parameters:
  s - the attribute



count
public int count()(Code)
Count AVPairs.



getAVPair
public AVPairs getAVPair(String s)(Code)
Get an avpair based on the attribute.
Parameters:
  att - attribute



getAVPairsByAttribute
public AVPairs getAVPairsByAttribute(String s)(Code)
Clone the AVPairs w/ the specified attribute. For Bob, return for Bob-1 and Bob-2.
Parameters:
  s - attribute



getAVPairsByMV
public AVPairs getAVPairsByMV(int mv)(Code)
Clone the AVPairs w/ the specified MV.
Parameters:
  mv - multivalue value



getAttribute
public String getAttribute()(Code)
Get the attribute for this AVPair.



getAttributeCount
public int getAttributeCount()(Code)
Return a unique list of attributes w/out multi value, e.g. for Bob-1, Bob-2, Jim-1, return Bob, Jim.



getAttributeIndex
public int getAttributeIndex()(Code)
Get the attribute index for this AVPair. NOMULTIVALUE if no index.



getAttributeName
public String getAttributeName()(Code)
Get the attribute name for this AVPair.



getAttributes
public String[] getAttributes()(Code)
Return a unique list of attributes w/out multi value, e.g. for Bob-1, Bob-2, Jim-1, return Bob, Jim. Ignores case of attribute name.



getMaxAttributeIndex
public int getMaxAttributeIndex()(Code)
Get the maximum multivalue value.



getSingleValuePairs
public AVPairs getSingleValuePairs()(Code)
Return the pairs of the list that are not multivalue.



getValue
public String getValue()(Code)
Return the value of a single AVPair (head of list).
Parameters:
  s - the attribute



getValue
public String getValue(String s)(Code)
Find the value of a non-multivalue attribute. Ignores case of attribute name.
Parameters:
  s - the attribute



getValue
public String getValue(String s, int n)(Code)
Find the value of a multivalue attribute by index. Ignores case of attribute name.
Parameters:
  s - the attribute
Parameters:
  n - the index



getValues
public String[] getValues(String s)(Code)
Find all values of an attribute. Return an array of strings for multiple values for an attribute, e.g., for Bob, return values for Bob-1 and Bob-2. Ignores case of attribute name.
Parameters:
  s - the attribute



insertAfter
public void insertAfter(AVPairs avPair)(Code)
Insert new AVPair after this instance.
Parameters:
  avPair - the new instance



insertAfter
public void insertAfter(String att, String val)(Code)
Insert new AVPair after this instance.
Parameters:
  att - attribute
Parameters:
  val - value



isMV
public boolean isMV()(Code)
Is this avp multi-valued?



remove
public AVPairs remove(AVPairs avp)(Code)
Remove AVPairs instance from list. Return a pointer to corrected list. The method is silent if it finds nothing to remove.
Parameters:
  avp - node to nuke



remove
public AVPairs remove(String att)(Code)
Remove AVPairs instance from list. Return a pointer to corrected list.
Parameters:
  att - attribute to nuke



setAttribute
public void setAttribute(String att)(Code)
Set the attribute, do the multi-value parse.
Parameters:
  att - the attribute



setIndices
public void setIndices(int index)(Code)
Sets the index of a multivalue attribute value pair.
Parameters:
  index - index >= 0 or == NOMULTIVALUE
exception:
  IllegalArgumentException - on bad index



setValue
public boolean setValue(String s, String v)(Code)
Set the value of a non-multivalue attribute. Ignores case of attribute name.
Parameters:
  s - the attribute
Parameters:
  v - the value



setValue
public boolean setValue(String s, int n, String v)(Code)
Set the value of a multivalue attribute by index. Ignores case of attribute name.
Parameters:
  s - the attribute
Parameters:
  n - the index
Parameters:
  v - the value



toCGIEqualStringList
public String toCGIEqualStringList(boolean quoted)(Code)
Return "a = v" string version of AVPairs list, spaced.
Parameters:
  quoted - doublequote the value if true



toEqualString
public String toEqualString(boolean quoted)(Code)
Return "a = v" string version of AVPairs instance.
Parameters:
  quoted - doublequote the value if true



toSOIF
public static String toSOIF(String a, String v)(Code)
Print out SOIF attribute value pair.
Parameters:
  a - attribute
Parameters:
  v - value



toSOIF
public String toSOIF()(Code)
Print out SOIF attribute value pair.



toSOIF
public String toSOIF(int mv)(Code)
Print out SOIF attribute value pair.
Parameters:
  mv - multi-value



toSOIFList
public String toSOIFList()(Code)
Print out SOIF attribute value pair.



toSOIFList
public String toSOIFList(int mv)(Code)
Print out SOIF attribute value pair.
Parameters:
  mv - multi-value



toSpacedEqualStringList
public String toSpacedEqualStringList(boolean quoted)(Code)
Return "a = v" string version of AVPairs list, spaced.
Parameters:
  quoted - doublequote the value if true



toString
public String toString()(Code)



toStringList
public String toStringList()(Code)
Return SOIF string version of AVPairs instance list.



unduplicateValues
public AVPairs unduplicateValues()(Code)
Unduplicate values on the AVPairs list.



update
public AVPairs update(String att, String val)(Code)
A convenience method which bundles insert(), setValue() and remove(). If the proposed value is length 0, remove() is called. Otherwise, setValue() is called. If setValue() fails, insertAfter() is called.
Parameters:
  att - attribute
Parameters:
  val - value



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.