|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.cysols.iodef.ElementCreator
com.cysols.iodef.rid.element.RIDElementCreator
public class RIDElementCreator
Create the element class indicated RID xml element, this class handle name spece.
RIDElementCreator. For example:
RIDElementCreator ridcreator = new RIDElementCreator();
ridcreator.setIODEFNamespace("iodef", "draft-ietf-inch-iodef-043.xsd");
ridcreator.setRIDNamespace("iodef-rid", "draft-ietf-inch-iodef-rid-05.xsd");
// Sets the namespace for IODEF nodes and RID nodes, the default value is used if not specify.
ridcreator.setSchemaLocation("RIDSchema.xsd"); //Sets the schema location for validation
NSIODEFElementCreator iodefcreator = new NSIODEFElementCreator("iodef", "draft-ietf-inch-iodef-043.xsd");
// To create Iodef nodes with namespace
RID rid_element = ridcreator.createRID();
IPPacket packet_element = ridcreator.createIPPacket();
..... // Sets some values
rid_element.setIPPacket(packet_element);
NPPath path_element = ridcreator.createNPPath();
.....
Node node_element = iodefcreator.createNode();
.....
Address address_element = iodefcreator.createAddress();
.....
node_element.addAddress(address_element);
path_element.setNode(node_element);
rid_element.addNPPath(path_element);
RIDPolicy policy_element = ridcreator.createRIDPolicy();
.....
rid_element.setRIDPolicy(policy_element);
org.w3c.dom.Document doc = rid_element.createDomDocument();
| Field Summary |
|---|
| Fields inherited from interface com.cysols.iodef.rid.element.RIDElementConstants |
|---|
AUTHORIZATIONSTATUS_ELE, HEXPACKET_ELE, INCIDENTSOURCE_ELE, IPPACKET_ELE, IPVERSION_ELE, MEANING_ATT, MSGDESTINATION_ELE, MSGTYPE_ELE, NPPATH_ELE, POLICYREGION_ELE, RESTRICTION_ATT, RID_ELE, RIDPOLICY_ELE, SOURCEFOUND_ELE, TRACESTATUS_ELE, TRAFFICTYPE_ELE |
| Constructor Summary | |
|---|---|
RIDElementCreator()
|
|
| Method Summary | |
|---|---|
protected IElement |
create(String name)
Creates an element of the type specified. |
protected IAttribute |
createAttribute(String name)
Creates an attribute of the type specified. |
protected Attr |
createDomAttr(Document doc,
IAttribute ia)
|
IncidentSource |
createIncidentSource()
Creates a new instance which represents IncidentSource node. |
IPPacket |
createIPPacket()
Creates a new instance which represents IPPacket node. |
NPPath |
createNPPath()
Creates a new instance which represents NPPath node. |
RID |
createRID()
Creates a new instance which represents RID node. |
RIDPolicy |
createRIDPolicy()
Creates a new instance which represents RIDPolicy node. |
TraceStatus |
createTraceStatus()
Creates a new instance which represents TraceStatus node. |
protected Element |
getDomElement(Document doc,
IElement ie)
|
void |
setIODEFNamespace(String prefix,
String namespace)
Sets the namespace and prefix. |
void |
setRIDNamespace(String prefix,
String namespace)
Sets the namespace and prefix. |
| Methods inherited from class com.cysols.iodef.ElementCreator |
|---|
createDomElement, replace |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RIDElementCreator()
| Method Detail |
|---|
public void setRIDNamespace(String prefix,
String namespace)
prefix - The namespace prefix using RID nodenamespace - The namespace uri using RID node
public void setIODEFNamespace(String prefix,
String namespace)
prefix - The namespace prefix using IODEF nodenamespace - The namespace uri using IODEF nodeprotected IElement create(String name)
IElement class,
create in class ElementCreatorname - The name of the element type to instantiate.
protected Element getDomElement(Document doc,
IElement ie)
getDomElement in class ElementCreatorprotected IAttribute createAttribute(String name)
ElementCreator
createAttribute in class ElementCreatorname - The name of the attribute type to instantiate.
protected Attr createDomAttr(Document doc,
IAttribute ia)
createDomAttr in class ElementCreatorpublic RID createRID()
public IncidentSource createIncidentSource()
public IPPacket createIPPacket()
public NPPath createNPPath()
public RIDPolicy createRIDPolicy()
public TraceStatus createTraceStatus()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||