CADI.Server.LogicalTarget
Class ServerLogicalTarget

java.lang.Object
  extended by CADI.Server.LogicalTarget.ServerLogicalTarget
Direct Known Subclasses:
JP2LogicalTarget

public abstract class ServerLogicalTarget
extends java.lang.Object

This class defines basic attributes and functions the new compression systems will have to inherit and implement.

Version:
1.0 2007/10/28
Author:
Group on Interactive Coding of Images (GICI)

Field Summary
protected  BufferedDataInputStream in
          Is the input stream used to read the file.
protected  int logicalTargetType
          Identifies the type of the logical target.
protected  java.lang.String target
          Definition in TargetField.target.
protected  java.lang.String tid
          Definition in TargetField.tid.
protected  int TID_DEFAULT_LENGTH
          Default length of the tid.
 
Constructor Summary
ServerLogicalTarget()
           
 
Method Summary
protected  void generateTid()
          It will generate a Target-ID for that logical target, i.e. a string that absolutely identifies the logical target.
protected  void generateTid(int length)
          This method is used to generate a target identifier for the this logical target, i.e. a string that absolutely identifies the logical target.
 BufferedDataInputStream getInputDataSource()
          Returns the in attribute.
 int getLogicalTargetType()
          Gets the logical target type which it belongs.
 java.lang.String getTarget()
          Returns the target attribute.
 java.lang.String getTID()
          Returns the tid attribute.
 void list(java.io.PrintStream out)
          Prints this Server Logical Target fields out to the specified output stream.
 void setInputDataSource(BufferedDataInputStream in)
          Sets the in attribute.
 void setLogicalTargetType(int logicalTargetType)
          Sets the logical target type which it belongs.
 void setTarget(java.lang.String target)
          Sets the target attribute
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

tid

protected java.lang.String tid
Definition in TargetField.tid.


in

protected BufferedDataInputStream in
Is the input stream used to read the file.


logicalTargetType

protected int logicalTargetType
Identifies the type of the logical target.

Allowed values: see LogicalTargetTypes


target

protected java.lang.String target
Definition in TargetField.target.


TID_DEFAULT_LENGTH

protected final int TID_DEFAULT_LENGTH
Default length of the tid.

See Also:
Constant Field Values
Constructor Detail

ServerLogicalTarget

public ServerLogicalTarget()
Method Detail

generateTid

protected void generateTid()
It will generate a Target-ID for that logical target, i.e. a string that absolutely identifies the logical target. The "Target-ID" shall not exceed 255 character in length.

This a generic function, but it is recommended classes that inherits from this one should implement their own methods.

NOTICE: This method must be called from the constructor of the class.

See Also:
tid

generateTid

protected void generateTid(int length)
This method is used to generate a target identifier for the this logical target, i.e. a string that absolutely identifies the logical target. The "Target-ID" shall not exceed 255 character in length.

This a generic function, but classes that inherits from this one can implement their own methods.

NOTICE: This method must be called from the constructor of the class.

Parameters:
length - the length of the identifier.
See Also:
tid

setInputDataSource

public final void setInputDataSource(BufferedDataInputStream in)
Sets the in attribute.

Parameters:
in - the input stream where data will be read.

getInputDataSource

public final BufferedDataInputStream getInputDataSource()
Returns the in attribute.

Returns:
in the in attribute.

setLogicalTargetType

public final void setLogicalTargetType(int logicalTargetType)
Sets the logical target type which it belongs.

Parameters:
logicalTargetType - The type of the logical target.

getLogicalTargetType

public final int getLogicalTargetType()
Gets the logical target type which it belongs.

Returns:
the type of the logical target.

setTarget

public final void setTarget(java.lang.String target)
Sets the target attribute

Parameters:
target - the value of the attribute.

getTarget

public final java.lang.String getTarget()
Returns the target attribute.

Returns:
the target attribute.

getTID

public final java.lang.String getTID()
Returns the tid attribute.

Returns:
the tid attribute.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

list

public void list(java.io.PrintStream out)
Prints this Server Logical Target fields out to the specified output stream. This method is useful for debugging.

Parameters:
out - an output stream.


CADI - Copyright (C) 2007
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Group on Interactive Coding of Images (GICI) (contact)