Java Doc for SOIF.java in  » Portal » Open-Portal » com » sun » portal » search » 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 » com.sun.portal.search.soif 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.util.HashMap
   com.sun.portal.search.soif.SOIF

SOIF
public class SOIF extends HashMap (Code)
SOIF (Summary Object Interchange Format) is a general purpose syntax and data structure for representing meta data. It is commonly used to create summaries, or Resource Descriptions, for storage, indexing, and transmission purposes.

A SOIF object has a standard serialized form, for example:

 @DOCUMENT { http://www.siroe.com
 content-type{29}:	text/html; charset=iso-8859-1
 title{16}:	Siroe Consulting
 author-1{14}:	William Lawson
 author-2{16}:	Gregory Blaxland
 author-3{17}:	William Wentworth
 description{245}:	
 Siroe Consulting
 - Business & Industry Solutions 
 - Downloads 
 - Documentation 
 - Developers 
 - Partners 
 - Executives 
 - Press 
 Company Info
 - Investor Relations
 - News & Events
 - Feature Stories
 - Employment
 - Siroe Labs
 Copyright 1994-2002 Siroe Consulting
 }
 

Each SOIF object has a schema (eg, DOCUMENT) and URL.
SOIF attribute values can be plain text or binary.
Multivalued attributes are supported.
The standard SOIF serialized form uses UTF-8 encoding for all character based data.
SOIF attribute names are case-insensitive.

More information on SOIF and the RDM search protocol can be found at http://www.w3.org/TR/NOTE-rdm.html
See Also:   AVPair



Field Summary
final static  intENC_8BIT
    
final static  intENC_DEFAULT
    
final static  intENC_UTF16
    
final static  intENC_UTF8
    
public static  StringINVALIDSOIF
     Error message for invalid SOIF.
public static  StringdefaultEncoding
     Default char encoding.
 Stringencoding
     Byte encoding.

Constructor Summary
public  SOIF()
     Constructor.
public  SOIF(String schemaName, String URL)
     Constructor.
public  SOIF(byte[] data, String encoding, Set allowed)
     Constructor.
public  SOIF(byte[] data, String encoding)
     Constructor.
public  SOIF(byte[] data, Set allowed)
     Constructor.
public  SOIF(byte[] data)
     Constructor.

Method Summary
public  voidabsorb(SOIF s)
     Copies all data from another SOIF without replacement.
public  voidabsorb(SOIF s, String[] filter)
     Copies selected data from another SOIF without replacement Ignores case of all attribute names.
public  booleancontains(String a)
     Tests for attribute existence.
public  booleancontainsKey(Object key)
     Case insensistive collection function.
public  intcontentSize()
    
public  Objectget(Object key)
     Case insensistive collection function.
public  AVPairgetAVPair(String a)
     Gets an AVPair by attribute.
public  intgetAttributeCount()
    
public  SetgetAttributes()
     the set of all attribute names in this SOIF.e.g.
public  String[]getAttributesArray()
     the set of all attribute names in this SOIF as an array.e.g.
public  byte[]getBytes(String a)
     Gets a byte array value by attribute.
public  byte[]getBytes(String a, int n)
     Gets a byte array value by multivalue attribute and index.
public  StringgetSchemaName()
    
public  String[]getStringValues(String a)
     Gets all valid values of this attribute.
public  StringgetURL()
    
public  StringgetValue(String a)
     Gets a String value by attribute.
public  StringgetValue(String a, int n)
     Gets a String value by multivalue attribute and index.
public  booleaninsert(String a, String v)
     Inserts a String valued attribute.
public  booleaninsert(String a, byte[] b)
     Inserts a byte array valued attribute.
public  booleaninsert(String a, String v, int n)
     Inserts a String valued attribute with index.
public  booleaninsert(String a, byte[] b, int n)
     Inserts a String valued attribute with index.
public  booleaninsert(AVPair a)
     Inserts an AVPair, which may be either single or multivalued.
public  voidmerge(SOIF s)
     Copies all data from another SOIF with replacement.
public  voidmerge(SOIF s, String[] filter)
     Copies selected data from another SOIF with replacement.
public  Objectput(Object key, Object value)
     Case insensistive collection function.
public  booleanremove(String a)
     Removes an attribute.
public  booleanremove(String a, int n)
     Removes an attribute by index.
public  Objectremove(Object key)
     Case insensistive collection function.
public  booleanrename(String a, String b)
     Renames attribute a to b.
public  voidreplace(String a, String v)
     Replaces a single-valued attribute.
public  voidreplace(String a, String v, int n)
     Replaces a multivalued attribute by index.
public  voidreplace(AVPair avp)
     Replaces an attribute-value pair by name.
public  voidsetSchemaName(String s)
     Sets the SOIF schema name.
public  voidsetURL(String u)
     Sets the SOIF URL.
public  voidsqueezeMV()
     Squeezes multivalued attributes.
public  byte[]toByteArray()
     Creates a byte array representation of this SOIF.
public  byte[]toByteArray(Set allowed)
     Creates a byte array representation of this SOIF.
public  byte[]toByteArray(String enc)
     Creates a byte array representation of this SOIF.
public  byte[]toByteArray(String enc, Set allowed)
     Creates a byte array representation of this SOIF.
public  StringtoString()
     WARNING*: This should be used for debugging only.

Field Detail
ENC_8BIT
final static int ENC_8BIT(Code)



ENC_DEFAULT
final static int ENC_DEFAULT(Code)



ENC_UTF16
final static int ENC_UTF16(Code)



ENC_UTF8
final static int ENC_UTF8(Code)



INVALIDSOIF
public static String INVALIDSOIF(Code)
Error message for invalid SOIF.



defaultEncoding
public static String defaultEncoding(Code)
Default char encoding.



encoding
String encoding(Code)
Byte encoding.




Constructor Detail
SOIF
public SOIF()(Code)
Constructor. Creates an empty SOIF object with schema = "-" and URL = "-"



SOIF
public SOIF(String schemaName, String URL)(Code)
Constructor. Creates an empty SOIF object with the given schema and URL.
Parameters:
  schemaName - the SOIF schema name
Parameters:
  URL - the SOIF URL



SOIF
public SOIF(byte[] data, String encoding, Set allowed) throws IOException(Code)
Constructor. Creates a SOIF by parsing the given byte array using the given character encoding.
Parameters:
  data - a byte array SOIF representation
Parameters:
  encoding - character encoding for byte/String conversion
Parameters:
  allowed - a restricted attribute set for the conversion (use lower case)
throws:
  SOIFException - on parsing error
throws:
  IOException - if byte array is empty



SOIF
public SOIF(byte[] data, String encoding) throws IOException(Code)
Constructor. Creates a SOIF by parsing the given byte array using the given character encoding.
Parameters:
  data - a byte array SOIF representation
Parameters:
  encoding - character encoding for byte/String conversion
throws:
  SOIFException - on parsing error
throws:
  IOException - if byte array is empty



SOIF
public SOIF(byte[] data, Set allowed) throws IOException(Code)
Constructor. Creates a SOIF by parsing the given byte array using the default character encoding (UTF-8).
Parameters:
  data - a byte array SOIF representation
Parameters:
  allowed - a restricted attribute set for the conversion (use lower case)
throws:
  SOIFException - if parsing error
throws:
  IOException - if byte array is empty



SOIF
public SOIF(byte[] data) throws IOException(Code)
Constructor. Creates a SOIF by parsing the given byte array using the default character encoding (UTF-8).
Parameters:
  data - a byte array SOIF representation
throws:
  SOIFException - if parsing error
throws:
  IOException - if byte array is empty




Method Detail
absorb
public void absorb(SOIF s)(Code)
Copies all data from another SOIF without replacement. Ignores case of all attribute names.



absorb
public void absorb(SOIF s, String[] filter)(Code)
Copies selected data from another SOIF without replacement Ignores case of all attribute names.



contains
public boolean contains(String a)(Code)
Tests for attribute existence. Ignores case of attribute name.
Parameters:
  a - the attribute name true if the attribute exists in this SOIF



containsKey
public boolean containsKey(Object key)(Code)
Case insensistive collection function.



contentSize
public int contentSize()(Code)
the entire contents size of all AVPairs in this SOIF



get
public Object get(Object key)(Code)
Case insensistive collection function.



getAVPair
public AVPair getAVPair(String a)(Code)
Gets an AVPair by attribute. Ignores case of attribute name.
Parameters:
  a - the attribute name



getAttributeCount
public int getAttributeCount()(Code)
the number of attributes in this SOIF.



getAttributes
public Set getAttributes()(Code)
the set of all attribute names in this SOIF.e.g. for Bob-1, Bob-2, Jim-1, return { Bob, Jim }



getAttributesArray
public String[] getAttributesArray()(Code)
the set of all attribute names in this SOIF as an array.e.g. for Bob-1, Bob-2, Jim-1, return { Bob, Jim }



getBytes
public byte[] getBytes(String a)(Code)
Gets a byte array value by attribute. Ignores case of attribute name.
Parameters:
  a - the attribute name



getBytes
public byte[] getBytes(String a, int n)(Code)
Gets a byte array value by multivalue attribute and index. Ignores case of attribute name.
Parameters:
  a - the attribute name
Parameters:
  n - the index



getSchemaName
public String getSchemaName()(Code)
the SOIF schema name.



getStringValues
public String[] getStringValues(String a)(Code)
Gets all valid values of this attribute. an array of Strings formultiple values for an attribute, e.g., for Bob, returnvalues for Bob-1 and Bob-2.Ignores case of attribute name.
Parameters:
  a - the attribute name



getURL
public String getURL()(Code)
the SOIF URL.



getValue
public String getValue(String a)(Code)
Gets a String value by attribute. Ignores case of attribute name.
Parameters:
  a - the attribute name



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



insert
public boolean insert(String a, String v)(Code)
Inserts a String valued attribute. Ignores case of attribute name.
Parameters:
  a - the attribute name
Parameters:
  v - the String value to insert true if added, false if ignored (duplicate)



insert
public boolean insert(String a, byte[] b)(Code)
Inserts a byte array valued attribute. Ignores case of attribute name.
Parameters:
  a - the attribute name
Parameters:
  b - the byte array value to insert true if added, false if ignored (duplicate)



insert
public boolean insert(String a, String v, int n)(Code)
Inserts a String valued attribute with index. Ignores case of attribute name.
Parameters:
  a - the attribute name
Parameters:
  v - the String value to insert
Parameters:
  n - the multivalue index position for this value true if added, false if ignored (duplicate or MV index already taken)



insert
public boolean insert(String a, byte[] b, int n)(Code)
Inserts a String valued attribute with index. Ignores case of attribute name.
Parameters:
  a - the attribute name
Parameters:
  b - the byte array value to insert
Parameters:
  n - the multivalue index position for this value true if added, false if ignored (duplicate or MV index already taken)



insert
public boolean insert(AVPair a)(Code)
Inserts an AVPair, which may be either single or multivalued. Ignores case of attribute name.
Parameters:
  a - the AVPair to insert true if added, false if ignored (duplicate attribute name).



merge
public void merge(SOIF s)(Code)
Copies all data from another SOIF with replacement. Ignores case of all attribute names.



merge
public void merge(SOIF s, String[] filter)(Code)
Copies selected data from another SOIF with replacement. Ignores case of all attribute names.



put
public Object put(Object key, Object value)(Code)
Case insensistive collection function.



remove
public boolean remove(String a)(Code)
Removes an attribute. Ignores case of attribute name.
Parameters:
  a - the attibute name true if present and removed, false otherwise



remove
public boolean remove(String a, int n)(Code)
Removes an attribute by index. Ignores case of attribute name. true if present and removed, false if not



remove
public Object remove(Object key)(Code)
Case insensistive collection function.



rename
public boolean rename(String a, String b)(Code)
Renames attribute a to b. Ignores case of attribute name. true if successful



replace
public void replace(String a, String v)(Code)
Replaces a single-valued attribute. Inserts the attribute if not already present. Ignores case of attribute name.
Parameters:
  a - the attibute name
Parameters:
  v - the attribute value
Parameters:
  s - the attribute



replace
public void replace(String a, String v, int n)(Code)
Replaces a multivalued attribute by index. Inserts the attribute if not already present. Ignores case of attribute name.
Parameters:
  a - the attibute name
Parameters:
  v - the attribute value
Parameters:
  n - the multivalued index position to replace



replace
public void replace(AVPair avp)(Code)
Replaces an attribute-value pair by name. Ignores case of attribute name.
Parameters:
  avp - the attibute-value pair



setSchemaName
public void setSchemaName(String s)(Code)
Sets the SOIF schema name.



setURL
public void setURL(String u)(Code)
Sets the SOIF URL.



squeezeMV
public void squeezeMV()(Code)
Squeezes multivalued attributes. Packs the AVPair arrays by closing any holes in them towards index zero.



toByteArray
public byte[] toByteArray() throws IOException(Code)
Creates a byte array representation of this SOIF. Convert this SOIF to a byte array. this SOIF as a byte array using the current encoding
throws:
  UnsupportedEncodingException -
throws:
  IOException -



toByteArray
public byte[] toByteArray(Set allowed) throws IOException(Code)
Creates a byte array representation of this SOIF. Convert this SOIF to a byte array.
Parameters:
  allowed - a restricted attribute set for the conversion (use lower case) this SOIF as a byte array using the current encoding
throws:
  UnsupportedEncodingException -
throws:
  IOException -



toByteArray
public byte[] toByteArray(String enc) throws IOException(Code)
Creates a byte array representation of this SOIF.
Parameters:
  enc - character encoding for String/byte conversion this SOIF as a byte array using the given encoding
throws:
  UnsupportedEncodingException -
throws:
  IOException -
See Also:   SOIFInputStream.readSOIF
See Also:   SOIFOutputStream.write(SOIF s)



toByteArray
public byte[] toByteArray(String enc, Set allowed) throws IOException(Code)
Creates a byte array representation of this SOIF.
Parameters:
  enc - character encoding for String/byte conversion
Parameters:
  allowed - a restricted attribute set for the conversion (use lower case) this SOIF as a byte array using the given encoding
throws:
  IOException -
See Also:   SOIFInputStream.readSOIF
See Also:   SOIFOutputStream.write(SOIF s)



toString
public String toString()(Code)
WARNING*: This should be used for debugging only. a String representation of this SOIFWarning*: this is not a valid SOIF representation
See Also:   SOIF.toByteArray()
See Also:   SOIFInputStream.readSOIF
See Also:   SOIFOutputStream.write(SOIF s)



Methods inherited from java.util.HashMap
public void clear()(Code)(Java Doc)
public Object clone()(Code)(Java Doc)
public boolean containsKey(Object key)(Code)(Java Doc)
public boolean containsValue(Object value)(Code)(Java Doc)
public Set<Map.Entry<K, V>> entrySet()(Code)(Java Doc)
public V get(Object key)(Code)(Java Doc)
public boolean isEmpty()(Code)(Java Doc)
public Set<K> keySet()(Code)(Java Doc)
public V put(K key, V value)(Code)(Java Doc)
public void putAll(Map<? extends K, ? extends V> m)(Code)(Java Doc)
public V remove(Object key)(Code)(Java Doc)
public int size()(Code)(Java Doc)
public Collection<V> values()(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.