Package org.robwork.sdurw_core
Class DOMParserPtr
- java.lang.Object
-
- org.robwork.sdurw_core.DOMParserPtr
-
public class DOMParserPtr extends java.lang.ObjectPtr stores a pointer and optionally takes ownership of the value.
-
-
Constructor Summary
Constructors Constructor Description DOMParserPtr()Default constructor yielding a NULL-pointer.DOMParserPtr(long cPtr, boolean cMemoryOwn)DOMParserPtr(DOMParser ptr)Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DOMParser__ref__()Dereferencing operator.DOMParserCPtrcptr()voiddelete()DOMParserderef()The pointer stored in the object.booleanequals(DOMParser p)static longgetCPtr(DOMParserPtr obj)DOMParsergetDeref()Member access operator.DOMElemPtrgetRootElement()get the top/root element in the DOM structurebooleanisNull()checks if the pointer is nullbooleanisShared()check if this Ptr has shared ownership or none
ownershipvoidload(java.lang.String filename)parse from filevoidload(SWIGTYPE_p_std__istream input)parse from streamDOMParserPtrmake()make an instance of the default DOM parservoidsave(java.lang.String filename)save DOM structure to filevoidsave(SWIGTYPE_p_std__ostream input)save DOM structure to streamvoidsetDebug(boolean debug)Enable/disable debugging to the debug Log.voidsetSchema(java.lang.String filename)specify the schema file
Note: not all DOMParser implementations support schema validation
-
-
-
Constructor Detail
-
DOMParserPtr
public DOMParserPtr(long cPtr, boolean cMemoryOwn)
-
DOMParserPtr
public DOMParserPtr()
Default constructor yielding a NULL-pointer.
-
DOMParserPtr
public DOMParserPtr(DOMParser ptr)
Do not take ownership of ptr.
ptr can be null.
The constructor is implicit on purpose.
-
-
Method Detail
-
getCPtr
public static long getCPtr(DOMParserPtr obj)
-
delete
public void delete()
-
deref
public DOMParser deref()
The pointer stored in the object.
-
__ref__
public DOMParser __ref__()
Dereferencing operator.
-
getDeref
public DOMParser getDeref()
Member access operator.
-
equals
public boolean equals(DOMParser p)
-
isShared
public boolean isShared()
check if this Ptr has shared ownership or none
ownership- Returns:
- true if Ptr has shared ownership, false if it has no ownership.
-
isNull
public boolean isNull()
checks if the pointer is null- Returns:
- Returns true if the pointer is null
-
cptr
public DOMParserCPtr cptr()
-
load
public void load(java.lang.String filename)
parse from file- Parameters:
filename- [in] name of file
-
load
public void load(SWIGTYPE_p_std__istream input)
parse from stream- Parameters:
input- [in] input stream
-
save
public void save(java.lang.String filename)
save DOM structure to file- Parameters:
filename- [in] filename
-
save
public void save(SWIGTYPE_p_std__ostream input)
save DOM structure to stream- Parameters:
input-
-
setSchema
public void setSchema(java.lang.String filename)
specify the schema file
Note: not all DOMParser implementations support schema validation- Parameters:
filename-
-
getRootElement
public DOMElemPtr getRootElement()
get the top/root element in the DOM structure- Returns:
- root element of dom structure
-
setDebug
public void setDebug(boolean debug)
Enable/disable debugging to the debug Log.- Parameters:
debug- [in] true to enable debug output.
-
make
public DOMParserPtr make()
make an instance of the default DOM parser- Returns:
- a DOM parser for xml files
-
-