Java Doc for Content.java in  » Web-Framework » rife-1.6.1 » com » uwyn » rife » cmf » 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 » Web Framework » rife 1.6.1 » com.uwyn.rife.cmf 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.uwyn.rife.cmf.Content

Content
public class Content implements Cloneable(Code)
Contains the information required to store new content data together with additional meta-data.

All content is determined by its mime type and the raw data that will be used to load the content. The type of the data is dependent on the mime type.

For example, images can be loaded from byte arrays and texts can be loaded from strings. If an unsupported data type is used or the format is incorrect, suitable exceptions will be thrown when the content is stored in the back-end.
author:
   Geert Bevin (gbevin[remove] at uwyn dot com)
version:
   $Revision: 3634 $
since:
   1.0




Constructor Summary
public  Content(MimeType mimeType, Object data)
     Creates a new Content instance with the minimal required arguments.
Parameters:
  mimeType - the mime type as which the content will be stored inthe back-end, note that this doesn't necessarily has to correspond tothe mime type of the provided data.

Method Summary
public  Contentattribute(String name, boolean value)
     Sets a named content attribute that will be converted internally to a String value.
public  Contentattribute(String name, char value)
     Sets a named content attribute that will be converted internally to a String value.
public  Contentattribute(String name, byte value)
     Sets a named content attribute that will be converted internally to a String value.
public  Contentattribute(String name, short value)
     Sets a named content attribute that will be converted internally to a String value.
public  Contentattribute(String name, int value)
     Sets a named content attribute that will be converted internally to a String value.
public  Contentattribute(String name, long value)
     Sets a named content attribute that will be converted internally to a String value.
public  Contentattribute(String name, float value)
     Sets a named content attribute that will be converted internally to a String value.
public  Contentattribute(String name, double value)
     Sets a named content attribute that will be converted internally to a String value.
public  Contentattribute(String name, String value)
     Sets a named content attribute.
public  Contentattributes(Map<String, String> attributes)
     Replaces the map of named content attributes.

Note that attributes provide information about how to load, convert and transform content into its stored data form.

public  ContentcachedLoadedData(Object data)
     Sets the cached loaded data.

This is internally used by content loaders to prevent having to load and convert data to the specified mime type several times for the same content.

public  Contentclone()
    
public  Contentfragment(boolean fragment)
     Sets whether the content data is a fragment.
public  StringgetAttribute(String name)
     Retrieves the value of a named content attribute.
public  Map<String, String>getAttributes()
     Retrieves the map of named content attributes.
public  ObjectgetCachedLoadedData()
     Retrieves the cached loaded content data.
public  ObjectgetData()
     Retrieves the data of the content.
public  MimeTypegetMimeType()
     Retrieves the mime type of the content.
public  StringgetName()
     Retrieves the name of the content.
public  Map<String, String>getProperties()
     Retrieves the content properties.
public  StringgetProperty(String name)
     Retrieves the value of a named content property.
public  booleanhasAttribute(String name)
     Indicates whether a specific named content attribute is present.
public  booleanhasAttributes()
     Indicates whether named content attributes are present.
public  booleanhasCachedLoadedData()
     Indicates whether cached loaded content data is present.
public  booleanhasName()
     Indicates whether the content data has a name.
public  booleanhasProperties()
    
public  booleanhasProperty(String name)
     Indicates whether a specific named content property is present.
public  booleanisFragment()
     Indicates whether the content data is a fragment.
public  Contentname(String name)
     Sets the name of the content.
public  Contentproperties(Map<String, String> properties)
     Replaces the content properties.

This is also internally used by content formatters to provide additional information about the content that's stored after formatting and transformation.

public  Contentproperty(String name, boolean value)
     Sets a named content property that will be converted internally to a String value.
public  Contentproperty(String name, char value)
     Sets a named content property that will be converted internally to a String value.
public  Contentproperty(String name, byte value)
     Sets a named content property that will be converted internally to a String value.
public  Contentproperty(String name, short value)
     Sets a named content property that will be converted internally to a String value.
public  Contentproperty(String name, int value)
     Sets a named content property that will be converted internally to a String value.
public  Contentproperty(String name, long value)
     Sets a named content property that will be converted internally to a String value.
public  Contentproperty(String name, float value)
     Sets a named content property that will be converted internally to a String value.
public  Contentproperty(String name, double value)
     Sets a named content property that will be converted internally to a String value.
public  Contentproperty(String name, String value)
     Sets a named content property.
public  voidsetAttributes(Map<String, String> attributes)
     Replaces the map of named content attributes.
public  voidsetCachedLoadedData(Object data)
     Sets the cached loaded data.
public  voidsetData(Object data)
     Sets the data of the content.
public  voidsetFragment(boolean fragment)
     Sets whether the content data is a fragment.
public  voidsetName(String name)
     Sets the name of the content.
public  voidsetProperties(Map<String, String> properties)
     Replaces the content properties.


Constructor Detail
Content
public Content(MimeType mimeType, Object data)(Code)
Creates a new Content instance with the minimal required arguments.
Parameters:
  mimeType - the mime type as which the content will be stored inthe back-end, note that this doesn't necessarily has to correspond tothe mime type of the provided data. Image formats can for example beautomatically detected and converted to the target mime type by imageloading and conversion libraries.
Parameters:
  data - the data of the content, if this is null,empty content should be stored
since:
   1.0




Method Detail
attribute
public Content attribute(String name, boolean value)(Code)
Sets a named content attribute that will be converted internally to a String value.
Parameters:
  name - the name of the attribute
Parameters:
  value - the value of the attribute the current Content instance
See Also:   Content.getAttribute(String)
See Also:   Content.hasAttribute(String)
since:
   1.0



attribute
public Content attribute(String name, char value)(Code)
Sets a named content attribute that will be converted internally to a String value.
Parameters:
  name - the name of the attribute
Parameters:
  value - the value of the attribute the current Content instance
See Also:   Content.getAttribute(String)
See Also:   Content.hasAttribute(String)
since:
   1.0



attribute
public Content attribute(String name, byte value)(Code)
Sets a named content attribute that will be converted internally to a String value.
Parameters:
  name - the name of the attribute
Parameters:
  value - the value of the attribute the current Content instance
See Also:   Content.getAttribute(String)
See Also:   Content.hasAttribute(String)
since:
   1.0



attribute
public Content attribute(String name, short value)(Code)
Sets a named content attribute that will be converted internally to a String value.
Parameters:
  name - the name of the attribute
Parameters:
  value - the value of the attribute the current Content instance
See Also:   Content.getAttribute(String)
See Also:   Content.hasAttribute(String)
since:
   1.0



attribute
public Content attribute(String name, int value)(Code)
Sets a named content attribute that will be converted internally to a String value.
Parameters:
  name - the name of the attribute
Parameters:
  value - the value of the attribute the current Content instance
See Also:   Content.getAttribute(String)
See Also:   Content.hasAttribute(String)
since:
   1.0



attribute
public Content attribute(String name, long value)(Code)
Sets a named content attribute that will be converted internally to a String value.
Parameters:
  name - the name of the attribute
Parameters:
  value - the value of the attribute the current Content instance
See Also:   Content.getAttribute(String)
See Also:   Content.hasAttribute(String)
since:
   1.0



attribute
public Content attribute(String name, float value)(Code)
Sets a named content attribute that will be converted internally to a String value.
Parameters:
  name - the name of the attribute
Parameters:
  value - the value of the attribute the current Content instance
See Also:   Content.getAttribute(String)
See Also:   Content.hasAttribute(String)
since:
   1.0



attribute
public Content attribute(String name, double value)(Code)
Sets a named content attribute that will be converted internally to a String value.
Parameters:
  name - the name of the attribute
Parameters:
  value - the value of the attribute the current Content instance
See Also:   Content.getAttribute(String)
See Also:   Content.hasAttribute(String)
since:
   1.0



attribute
public Content attribute(String name, String value)(Code)
Sets a named content attribute.
Parameters:
  name - the name of the attribute
Parameters:
  value - the value of the attribute the current Content instance
See Also:   Content.getAttribute(String)
See Also:   Content.hasAttribute(String)
since:
   1.0



attributes
public Content attributes(Map<String, String> attributes)(Code)
Replaces the map of named content attributes.

Note that attributes provide information about how to load, convert and transform content into its stored data form. If you want to provide meta information about the content, you should provide it through properties instead.
Parameters:
  attributes - the map of named content attributes the current Content instance
See Also:   Content.setAttributes(Map)
See Also:   Content.getAttributes()
See Also:   Content.hasAttributes()
since:
   1.0




cachedLoadedData
public Content cachedLoadedData(Object data)(Code)
Sets the cached loaded data.

This is internally used by content loaders to prevent having to load and convert data to the specified mime type several times for the same content. It is for instance very resource intensive to detect an image format, validate the provided raw data and create a generic image instance for further processing. These operations are however required in several different locations in the content handling logic. Storing the result after the first successful loading and simply retrieving it later enhances the speed considerably.
Parameters:
  data - the loaded data the current Content instance
See Also:   Content.setCachedLoadedData(Object)
See Also:   Content.hasCachedLoadedData()
See Also:   Content.getCachedLoadedData()
since:
   1.0




clone
public Content clone()(Code)
Simply clones the instance with the default clone method since we want to create a shallow copy
since:
   1.0



fragment
public Content fragment(boolean fragment)(Code)
Sets whether the content data is a fragment. A fragment means that it's not a complete document or a file, but rather a small part that is intended to be used within a larger document. For example a HTML snippet. This information is for example important when validating the data.
Parameters:
  fragment - true if the content is a fragment; or

false otherwise the current Content instance
See Also:   Content.setFragment(boolean)
See Also:   Content.isFragment()
since:
   1.0




getAttribute
public String getAttribute(String name)(Code)
Retrieves the value of a named content attribute.
Parameters:
  name - the name of the attribute the value of the named content attribute; or

null if no such attribute could be found
See Also:   Content.hasAttribute(String)
since:
   1.0




getAttributes
public Map<String, String> getAttributes()(Code)
Retrieves the map of named content attributes. the map of named content attributes; or

null if no attributes are present
See Also:   Content.attributes(Map)
See Also:   Content.setAttributes(Map)
See Also:   Content.hasAttributes()
since:
   1.0




getCachedLoadedData
public Object getCachedLoadedData()(Code)
Retrieves the cached loaded content data. the cached loaded content data; or

null if no loaded content data has been cached
See Also:   Content.cachedLoadedData(Object)
See Also:   Content.setCachedLoadedData(Object)
See Also:   Content.hasCachedLoadedData()
since:
   1.0




getData
public Object getData()(Code)
Retrieves the data of the content. the data of the content
since:
   1.0



getMimeType
public MimeType getMimeType()(Code)
Retrieves the mime type of the content. the mime type of the content
since:
   1.0



getName
public String getName()(Code)
Retrieves the name of the content. null if the content has no name; or

the name of the content
See Also:   Content.name(String)
See Also:   Content.setName(String)
See Also:   Content.hasName()
since:
   1.0




getProperties
public Map<String, String> getProperties()(Code)
Retrieves the content properties. the content properties; or

null if no content properties are present
See Also:   Content.properties(Map)
See Also:   Content.setProperties(Map)
See Also:   Content.hasProperties()
since:
   1.0




getProperty
public String getProperty(String name)(Code)
Retrieves the value of a named content property.
Parameters:
  name - the name of the property the value of the named content property; or

null if no such property could be found
See Also:   Content.hasProperty(String)
since:
   1.0




hasAttribute
public boolean hasAttribute(String name)(Code)
Indicates whether a specific named content attribute is present.
Parameters:
  name - the name of the attribute true if the name content attribute is present; or

false otherwise
See Also:   Content.getAttribute(String)
since:
   1.0




hasAttributes
public boolean hasAttributes()(Code)
Indicates whether named content attributes are present. true if named content attributes are present; or

false otherwise
See Also:   Content.attributes(Map)
See Also:   Content.setAttributes(Map)
See Also:   Content.getAttributes()
since:
   1.0




hasCachedLoadedData
public boolean hasCachedLoadedData()(Code)
Indicates whether cached loaded content data is present. true if cached loaded content data is present; or

false otherwise
See Also:   Content.cachedLoadedData(Object)
See Also:   Content.setCachedLoadedData(Object)
See Also:   Content.getCachedLoadedData()
since:
   1.0




hasName
public boolean hasName()(Code)
Indicates whether the content data has a name. true if the content has a name; or

false otherwise
See Also:   Content.name(String)
See Also:   Content.setName(String)
See Also:   Content.getName()
since:
   1.0




hasProperties
public boolean hasProperties()(Code)
Indicates whether content properties are present true if properties are present; or

false otherwise
See Also:   Content.properties(Map)
See Also:   Content.setProperties(Map)
See Also:   Content.getProperties()
since:
   1.0




hasProperty
public boolean hasProperty(String name)(Code)
Indicates whether a specific named content property is present.
Parameters:
  name - the name of the property true if the name content property is present; or

false otherwise
See Also:   Content.getProperty(String)
since:
   1.0




isFragment
public boolean isFragment()(Code)
Indicates whether the content data is a fragment. true if the content is a fragment; or

false otherwise
See Also:   Content.fragment(boolean)
See Also:   Content.setFragment(boolean)
since:
   1.0




name
public Content name(String name)(Code)
Sets the name of the content.
Parameters:
  name - the name the current Content instance
See Also:   Content.setName(String)
See Also:   Content.getName()
See Also:   Content.hasName()
since:
   1.0



properties
public Content properties(Map<String, String> properties)(Code)
Replaces the content properties.

This is also internally used by content formatters to provide additional information about the content that's stored after formatting and transformation. Note that this is not the same as content attributes, who provide infomration about how to format and transform the provided data before storage. The content properties describe the result as it's stored in the back-end.
Parameters:
  properties - the content properties the current Content instance
See Also:   Content.setProperties(Map)
See Also:   Content.hasProperties()
See Also:   Content.getProperties()
since:
   1.0




property
public Content property(String name, boolean value)(Code)
Sets a named content property that will be converted internally to a String value.
Parameters:
  name - the name of the property
Parameters:
  value - the value of the property the current Content instance
See Also:   Content.getProperty(String)
See Also:   Content.hasProperty(String)
since:
   1.0



property
public Content property(String name, char value)(Code)
Sets a named content property that will be converted internally to a String value.
Parameters:
  name - the name of the property
Parameters:
  value - the value of the property the current Content instance
See Also:   Content.getProperty(String)
See Also:   Content.hasProperty(String)
since:
   1.0



property
public Content property(String name, byte value)(Code)
Sets a named content property that will be converted internally to a String value.
Parameters:
  name - the name of the property
Parameters:
  value - the value of the property the current Content instance
See Also:   Content.getProperty(String)
See Also:   Content.hasProperty(String)
since:
   1.0



property
public Content property(String name, short value)(Code)
Sets a named content property that will be converted internally to a String value.
Parameters:
  name - the name of the property
Parameters:
  value - the value of the property the current Content instance
See Also:   Content.getProperty(String)
See Also:   Content.hasProperty(String)
since:
   1.0



property
public Content property(String name, int value)(Code)
Sets a named content property that will be converted internally to a String value.
Parameters:
  name - the name of the property
Parameters:
  value - the value of the property the current Content instance
See Also:   Content.getProperty(String)
See Also:   Content.hasProperty(String)
since:
   1.0



property
public Content property(String name, long value)(Code)
Sets a named content property that will be converted internally to a String value.
Parameters:
  name - the name of the property
Parameters:
  value - the value of the property the current Content instance
See Also:   Content.getProperty(String)
See Also:   Content.hasProperty(String)
since:
   1.0



property
public Content property(String name, float value)(Code)
Sets a named content property that will be converted internally to a String value.
Parameters:
  name - the name of the property
Parameters:
  value - the value of the property the current Content instance
See Also:   Content.getProperty(String)
See Also:   Content.hasProperty(String)
since:
   1.0



property
public Content property(String name, double value)(Code)
Sets a named content property that will be converted internally to a String value.
Parameters:
  name - the name of the property
Parameters:
  value - the value of the property the current Content instance
See Also:   Content.getProperty(String)
See Also:   Content.hasProperty(String)
since:
   1.0



property
public Content property(String name, String value)(Code)
Sets a named content property.
Parameters:
  name - the name of the property
Parameters:
  value - the value of the property the current Content instance
See Also:   Content.getProperty(String)
See Also:   Content.hasProperty(String)
since:
   1.0



setAttributes
public void setAttributes(Map<String, String> attributes)(Code)
Replaces the map of named content attributes.
Parameters:
  attributes - the map of named content attributes
See Also:   Content.attributes(Map)
See Also:   Content.getAttributes()
See Also:   Content.hasAttributes()
since:
   1.0



setCachedLoadedData
public void setCachedLoadedData(Object data)(Code)
Sets the cached loaded data.
Parameters:
  data - the loaded data
See Also:   Content.cachedLoadedData(Object)
See Also:   Content.hasCachedLoadedData()
See Also:   Content.getCachedLoadedData()
since:
   1.0



setData
public void setData(Object data)(Code)
Sets the data of the content.
since:
   1.4



setFragment
public void setFragment(boolean fragment)(Code)
Sets whether the content data is a fragment.
Parameters:
  fragment - true if the content is a fragment; or

false otherwise
See Also:   Content.fragment(boolean)
See Also:   Content.isFragment()
since:
   1.0




setName
public void setName(String name)(Code)
Sets the name of the content.
Parameters:
  name - the name
See Also:   Content.name(String)
See Also:   Content.getName()
See Also:   Content.hasName()
since:
   1.0



setProperties
public void setProperties(Map<String, String> properties)(Code)
Replaces the content properties.
Parameters:
  properties - the content properties
See Also:   Content.properties(Map)
See Also:   Content.hasProperties()
See Also:   Content.getProperties()
since:
   1.0



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.