Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F8723391
Axis.java
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Subscribers
None
Axis.java
View Options
package
cedar.hepdata.model
;
import
cedar.hepdata.util.Unit
;
/**
* An Axis is a property of a {@link Dataset}, containing a header and
* description and a set of either bins or points.
* {@link XAxis} and {@link YAxis} are concrete implementations.
* One Dataset may have multiple Axes. Every Axis has an associated {@link Unit}.
*
* @author Andy Buckley
* @version $Date: 2006-11-17 16:56:22 +0000 (Fri, 17 Nov 2006) $ $Revision: 759 $
*/
public
abstract
class
Axis
extends
Storeable
{
protected
Dataset
dataset
;
private
String
header
=
""
;
private
Unit
unit
=
new
Unit
();
//////////////////////////////////////////////////
/** Default constructor **/
public
Axis
()
{}
public
Axis
(
Dataset
dataset
)
{
log
().
debug
(
"Making a generic Axis (1 arg constructor)"
);
setDataset
(
dataset
);
log
().
debug
(
"Made a generic Axis"
);
}
public
Axis
(
Dataset
dataset
,
String
header
)
{
log
().
debug
(
"Making a generic Axis (2 arg constructor)"
);
setDataset
(
dataset
);
setHeader
(
header
);
log
().
debug
(
"Made a generic Axis"
);
}
public
Axis
(
Dataset
dataset
,
String
header
,
Unit
unit
)
{
log
().
debug
(
"Making a generic Axis (3 arg constructor)"
);
setDataset
(
dataset
);
setHeader
(
header
);
setUnit
(
unit
);
log
().
debug
(
"Made a generic Axis"
);
}
//////////////////////////////////////////////////
// Paper
public
Paper
getPaper
()
{
return
dataset
.
getPaper
();
}
// Dataset
public
Dataset
getDataset
()
{
return
dataset
;
}
public
void
setDataset
(
Dataset
dataset
)
{
this
.
dataset
=
dataset
;
if
(
dataset
!=
null
)
{
if
(
this
instanceof
XAxis
)
{
dataset
.
getXAxes
().
add
((
XAxis
)
this
);
}
else
if
(
this
instanceof
YAxis
)
{
dataset
.
getYAxes
().
add
((
YAxis
)
this
);
}
else
{
log
().
error
(
"This is not actually an Axis class (or at least, not one that Axis knows about)!"
);
}
}
}
// Header
public
String
getHeader
()
{
return
header
;
}
public
void
setHeader
(
String
header
)
{
this
.
header
=
header
;
}
// Unit
public
Unit
getUnit
()
{
return
unit
;
}
public
void
setUnit
(
Unit
unit
)
{
this
.
unit
=
unit
;
}
// Description
public
String
toString
()
{
return
""
;
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 20, 8:25 PM (9 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4242222
Default Alt Text
Axis.java (2 KB)
Attached To
rHEPDATASVN hepdatasvn
Event Timeline
Log In to Comment