public class JHdf extends Object implements HDF
| Modifier and Type | Method and Description |
|---|---|
boolean |
belongsToSameRoot(HDF hdf)
Checks if the given hdf object belongs to the same root HDF object
as this one.
|
void |
close()
Clean up CS object state.
|
void |
copy(String hdfpath,
HDF src)
Deep copy of the contents of the source HDF structure to this HDF
starting at the specified HDF path node.
|
String |
dump()
Generates a string representing the content of the HDF tree rooted at
this node.
|
void |
exportDate(String hdfName,
String tz,
int tt)
Export a date to a clearsilver tree using a specified timezone
|
void |
exportDate(String hdfName,
TimeZone timeZone,
Date date)
Export a date to a clearsilver tree using a specified timezone
|
HDF |
getChild(String hdfpath)
Retrieves the HDF for the first child of the root of the subtree
at hdfpath, or null if no child exists of that path or if the
path doesn't exist.
|
CSFileLoader |
getFileLoader()
Get the file loader in use, if any.
|
int |
getIntValue(String hdfName,
int defaultValue)
Retrieves the integer value at the specified path in this HDF node's
subtree.
|
HDF |
getObj(String hdfpath)
Retrieves the HDF object that is the root of the subtree at hdfpath, or
null if no object exists at that path.
|
HDF |
getOrCreateObj(String hdfpath)
Retrieves the HDF object that is the root of the subtree at
hdfpath, create the subtree if it doesn't exist
|
HDF |
getRootObj()
Return the root of the tree where the current node lies.
|
String |
getValue(String hdfName,
String defaultValue)
Retrieves the value at the specified path in this HDF node's subtree.
|
HDF |
objChild()
Returns the child of this HDF node, or null if there is no child.
|
String |
objName()
Returns the name of this HDF node.
|
HDF |
objNext()
Returns the child of this HDF node, or null if there is no child.
|
String |
objValue()
Returns the value of this HDF node, or null if this node has no value.
|
void |
optimize()
JSilver-specific method that optimizes the underlying data object.
|
boolean |
readFile(String filename)
Loads the contents of the specified HDF file from disk into the current
HDF object.
|
boolean |
readString(String content)
Parses/loads the contents of the given string as HDF into the current
HDF object.
|
void |
removeTree(String hdfName)
Remove the specified subtree.
|
void |
setFileLoader(CSFileLoader fileLoader)
Set the CS file loader to use
|
void |
setSymLink(String hdfNameSrc,
String hdfNameDest)
Links the src hdf name to the dest.
|
void |
setValue(String hdfName,
String value)
Sets the value at the specified path in this HDF node's subtree.
|
String |
toString() |
boolean |
writeFile(String filename)
Serializes HDF contents to a file (readable by readFile)
|
String |
writeString()
Serializes HDF contents to a string (readable by readString)
|
public void close()
HDFpublic boolean readFile(String filename) throws IOException
HDFreadFile in interface HDFIOExceptionpublic CSFileLoader getFileLoader()
HDFgetFileLoader in interface HDFpublic void setFileLoader(CSFileLoader fileLoader)
HDFsetFileLoader in interface HDFfileLoader - the file loader that should be used.public boolean writeFile(String filename) throws IOException
HDFwriteFile in interface HDFIOExceptionpublic boolean readString(String content)
HDFreadString in interface HDFpublic int getIntValue(String hdfName, int defaultValue)
HDFgetIntValue in interface HDFpublic String getValue(String hdfName, String defaultValue)
HDFpublic void setValue(String hdfName, String value)
HDFpublic void removeTree(String hdfName)
HDFremoveTree in interface HDFpublic void setSymLink(String hdfNameSrc, String hdfNameDest)
HDFsetSymLink in interface HDFpublic void exportDate(String hdfName, TimeZone timeZone, Date date)
HDFexportDate in interface HDFpublic void exportDate(String hdfName, String tz, int tt)
HDFexportDate in interface HDFpublic HDF getObj(String hdfpath)
HDFpublic HDF getChild(String hdfpath)
HDFpublic HDF getRootObj()
HDFHDF every time.
Use HDF.belongsToSameRoot(HDF) to check if two HDFs
belong to the same root.getRootObj in interface HDFpublic boolean belongsToSameRoot(HDF hdf)
HDFbelongsToSameRoot in interface HDFhdf - The hdf object to compare to.public HDF getOrCreateObj(String hdfpath)
HDFgetOrCreateObj in interface HDFpublic String objName()
HDFpublic String objValue()
HDFpublic HDF objChild()
HDFpublic HDF objNext()
HDFpublic void copy(String hdfpath, HDF src)
HDFThis method copies over the attributes and value of the node and recurses through all the children of the source node. Any symlink in the source node becomes a symlink in the copy.
public String dump()
HDFpublic String writeString()
HDFwriteString in interface HDFpublic void optimize()
Copyright © 2010-2012 Google. All Rights Reserved.