|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.xefer.rebel.XBELElement | +--com.xefer.rebel.XBELDocument
Encapsulates the XBEL document
Field Summary | |
(package private) Document |
document
The underlying XML Document that this class is managing |
Fields inherited from class com.xefer.rebel.XBELElement |
element |
Constructor Summary | |
XBELDocument(Document document)
constructor |
|
XBELDocument(Element element)
constructor |
|
XBELDocument(String filename)
constructor |
Method Summary | |
protected void |
closeStream(InputStream stream)
silently closes the stream and absorbs and logs exceptions |
protected void |
closeStream(OutputStream stream)
silently closes the stream and absorbs and logs exceptions |
void |
delete()
delete Not allowed to delete the XBEL document itself |
void |
deleteElement(XBELElement resource)
deletes the element from the document |
XBELElement |
getElement(String path)
getElement retrieves the location at the given URL or throws a ResourceException if not element can be located. |
XBELElement |
getElement(String path,
boolean generate)
getElement retrieves the element at the given URL path, generating a new resource if the generate flag is true. |
String |
getLocationUrl(StringBuffer url)
Returns the resource Location URL based on the current url and the resource type |
boolean |
isLocatable()
Returns true if this XBELElement is directly locatable through a URL. |
protected FileInputStream |
openStream(File file)
Open the file and and return an input stream |
void |
postElement(XBELElement resource,
XBELElement entity)
postElement |
void |
putElement(XBELElement resource,
XBELElement entity)
put updates the resource element with the entity element |
void |
write(ServletContext context,
String filename)
Write the given XML Document to the given file location |
Methods inherited from class com.xefer.rebel.XBELElement |
addChild, addChildDirect, getId, getType, post, put, replaceChild, replaceSelf, setId, write |
Methods inherited from class java.lang.Object |
|
Field Detail |
Document document
Constructor Detail |
public XBELDocument(Document document)
document
- Document the document that this class encapsulatespublic XBELDocument(Element element)
element
- Element the document element of the resourcepublic XBELDocument(String filename) throws ResourceException
filename
- String the file to be parsedMethod Detail |
protected void closeStream(InputStream stream)
stream
- InputStream to be closedprotected void closeStream(OutputStream stream)
stream
- OutputputStream to be closedpublic void delete() throws ResourceException
delete
in class XBELElement
com.xefer.rebel.XBELElement
public void deleteElement(XBELElement resource) throws ResourceException
resource
- XBELElement to be deletedpublic XBELElement getElement(String path) throws ResourceException
path
- String representing the resources path.public XBELElement getElement(String path, boolean generate) throws ResourceException
path
- String of the path to the resourcepublic String getLocationUrl(StringBuffer url)
getLocationUrl
in class XBELElement
url
- StringBuffer the URL location of the parent resourcepublic boolean isLocatable()
isLocatable
in class XBELElement
protected FileInputStream openStream(File file) throws ResourceException
file
- File to be openedpublic void postElement(XBELElement resource, XBELElement entity) throws ResourceException
public void putElement(XBELElement resource, XBELElement entity) throws ResourceException
resource
- XBELElement to be updatedentity
- XBELElement to be stored as the updated resourcepublic void write(ServletContext context, String filename) throws ResourceException
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |