biz.c24.io.api.data
Class Annotation

java.lang.Object
  extended by biz.c24.io.api.data.Annotation
All Implemented Interfaces:
Serializable

public class Annotation
extends Object
implements Serializable

A group of documentation and application information objects used to annotate data models. Documentation objects generally contain human-readable narrative whereas AppInfo objects are used to store data destined for machine interpretation.

Warning: Serialized objects of this class or of a deployed class which is derived from it may not be compatible with future releases of C24 Integreation Objects. The current serialization support is appropriate for short term storage or RMI between applications running the same version of C24 Integreation Objects.

See Also:
Serialized Form

Constructor Summary
Annotation()
          Constructs a new instance.
Annotation(Annotation clone)
          Constructs a new instance cloned from clone.
Annotation(Documentation[] docArr, AppInfo[] appinfoArr)
          Creates a new instances with supplied arrays of documentation and appinfo objects.
Annotation(String description)
          Constructs a new instance with a single description.
 
Method Summary
 void addAppInfo(AppInfo appInfo)
          Adds an appinfo object.
 void addDocumentation(Documentation doc)
          Adds a documentation object.
 AppInfo getAppInfo(int index)
          Returns the appinfo object at index.
 int getAppInfoCount()
          Returns the number of appinfo items.
 Documentation getDocumentation(int index)
          Returns the documentation object at index.
 int getDocumentationCount()
          Returns the number of documentation objects.
 void removeAppInfo(int index)
          Removes an appinfo object.
 void removeDocumentation(int index)
          Removes a documentation object.
 String toString()
          Returns a description of this annotation.
 String toString(String lang)
          Returns a description of this annotation taken using the specified language.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Annotation

public Annotation()
Constructs a new instance.


Annotation

public Annotation(String description)
Constructs a new instance with a single description.

Parameters:
description - The description to be added as a documentation node.

Annotation

public Annotation(Documentation[] docArr,
                  AppInfo[] appinfoArr)
Creates a new instances with supplied arrays of documentation and appinfo objects.

Parameters:
docArr - The array of documentation objects.
appinfoArr - The array of appinfo objects.

Annotation

public Annotation(Annotation clone)
Constructs a new instance cloned from clone.

Parameters:
clone - The object to clone.
Method Detail

getDocumentationCount

public int getDocumentationCount()
Returns the number of documentation objects.

Returns:
The number of documentation objects.

getDocumentation

public Documentation getDocumentation(int index)
Returns the documentation object at index.

Parameters:
index - The index of the documentation object to return.
Returns:
The documentation object at index.
Throws:
IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= getDocumentationCount()).

getAppInfoCount

public int getAppInfoCount()
Returns the number of appinfo items.

Returns:
The number of appinfo items.

getAppInfo

public AppInfo getAppInfo(int index)
Returns the appinfo object at index.

Parameters:
index - The index of the appinfo object to return.
Returns:
The appinfo object at index.
Throws:
IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= getAppInfoCount()).

addDocumentation

public void addDocumentation(Documentation doc)
Adds a documentation object.

Parameters:
doc - The new object.

removeDocumentation

public void removeDocumentation(int index)
Removes a documentation object.

Parameters:
index - The index of the documentation object to be removed.
Throws:
IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= getDocumentationCount()).

addAppInfo

public void addAppInfo(AppInfo appInfo)
Adds an appinfo object.

Parameters:
appInfo - The new object.

removeAppInfo

public void removeAppInfo(int index)
Removes an appinfo object.

Parameters:
index - The index of the appinfo object to be removed.
Throws:
IndexOutOfBoundsException - if the index is out of range (index < 0 || index >= getAppInfoCount()).

toString

public String toString(String lang)
Returns a description of this annotation taken using the specified language.

The string returned will contain the content of the first documentation object found in the specified languge. If none is found, then a documentation with no language specified will be returned if one exists, otherwise the first documentation found will be returned.

Parameters:
lang - The language to use.
Returns:
A description of this annotation object.

toString

public String toString()
Returns a description of this annotation.

The string returned will contain the content of the first documentation object constituting this object.

Overrides:
toString in class Object
Returns:
A description of this annotation object.


C24 Technologies © 2002-2012: All Rights Reserved.