Methods Summary |
---|
public int | addCheckInfo(com.sun.enterprise.tools.common.validation.constraints.data.CheckInfo value)
return this.addValue(CHECK_INFO, value);
|
public static void | addComparator(org.netbeans.modules.schema2beans.BeanComparator c)
comparators.add(c);
|
public static com.sun.enterprise.tools.common.validation.constraints.data.Constraints | createGraph(org.w3c.dom.Node doc)
return new Constraints(doc, Common.NO_DEFAULT_VALUES);
|
public static com.sun.enterprise.tools.common.validation.constraints.data.Constraints | createGraph(java.io.InputStream in)
return createGraph(in, false);
|
public static com.sun.enterprise.tools.common.validation.constraints.data.Constraints | createGraph(java.io.InputStream in, boolean validate)
Document doc = GraphManager.createXmlDocument(in, validate);
return createGraph(doc);
|
public static com.sun.enterprise.tools.common.validation.constraints.data.Constraints | createGraph()
try {
return new Constraints();
}
catch (Schema2BeansException e) {
throw new RuntimeException(e.getMessage());
}
|
public void | dump(java.lang.StringBuffer str, java.lang.String indent)
String s;
Object o;
org.netbeans.modules.schema2beans.BaseBean n;
str.append(indent);
str.append("CheckInfo["+this.sizeCheckInfo()+"]"); // NOI18N
for(int i=0; i<this.sizeCheckInfo(); i++)
{
str.append(indent+"\t");
str.append("#"+i+":");
n = (org.netbeans.modules.schema2beans.BaseBean) this.getCheckInfo(i);
if (n != null)
n.dump(str, indent + "\t"); // NOI18N
else
str.append(indent+"\tnull"); // NOI18N
this.dumpAttributes(CHECK_INFO, i, str, indent);
}
|
public java.lang.String | dumpBeanNode()
StringBuffer str = new StringBuffer();
str.append("Constraints\n"); // NOI18N
this.dump(str, "\n "); // NOI18N
return str.toString();
|
public com.sun.enterprise.tools.common.validation.constraints.data.CheckInfo[] | getCheckInfo()
return (CheckInfo[])this.getValues(CHECK_INFO);
|
public com.sun.enterprise.tools.common.validation.constraints.data.CheckInfo | getCheckInfo(int index)
return (CheckInfo)this.getValue(CHECK_INFO, index);
|
protected void | initFromNode(org.w3c.dom.Node doc, int options)
if (doc == null)
{
doc = GraphManager.createRootElementNode("constraints"); // NOI18N
if (doc == null)
throw new Schema2BeansException(Common.getMessage(
"CantCreateDOMRoot_msg", "constraints"));
}
Node n = GraphManager.getElementNode("constraints", doc); // NOI18N
if (n == null)
throw new Schema2BeansException(Common.getMessage(
"DocRootNotInDOMGraph_msg", "constraints", doc.getFirstChild().getNodeName()));
this.graphManager.setXmlDocument(doc);
// Entry point of the createBeans() recursive calls
this.createBean(n, this.graphManager());
this.initialize(options);
|
protected void | initOptions(int options)
// The graph manager is allocated in the bean root
this.graphManager = new GraphManager(this);
this.createRoot("constraints", "Constraints", // NOI18N
Common.TYPE_1 | Common.TYPE_BEAN, Constraints.class);
// Properties (see root bean comments for the bean graph)
this.createProperty("check-info", // NOI18N
CHECK_INFO,
Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY,
CheckInfo.class);
this.initialize(options);
|
void | initialize(int options)
|
private void | readObject(java.io.ObjectInputStream in)
try{
init(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0));
String strDocument = in.readUTF();
// System.out.println("strDocument='"+strDocument+"'");
ByteArrayInputStream bais = new ByteArrayInputStream(strDocument.getBytes());
Document doc = GraphManager.createXmlDocument(bais, false);
initOptions(Common.NO_DEFAULT_VALUES);
initFromNode(doc, Common.NO_DEFAULT_VALUES);
}
catch (Schema2BeansException e) {
e.printStackTrace();
throw new RuntimeException(e.getMessage());
}
|
public int | removeCheckInfo(com.sun.enterprise.tools.common.validation.constraints.data.CheckInfo value)
return this.removeValue(CHECK_INFO, value);
|
public static void | removeComparator(org.netbeans.modules.schema2beans.BeanComparator c)
comparators.remove(c);
|
public void | setCheckInfo(int index, com.sun.enterprise.tools.common.validation.constraints.data.CheckInfo value)
this.setValue(CHECK_INFO, index, value);
|
public void | setCheckInfo(com.sun.enterprise.tools.common.validation.constraints.data.CheckInfo[] value)
this.setValue(CHECK_INFO, value);
|
public int | sizeCheckInfo()
return this.size(CHECK_INFO);
|
public void | validate()
boolean restrictionFailure = false;
// Validating property checkInfo
for (int _index = 0; _index < sizeCheckInfo(); ++_index) {
com.sun.enterprise.tools.common.validation.constraints.data.CheckInfo element = getCheckInfo(_index);
if (element != null) {
element.validate();
}
}
|
private void | writeObject(java.io.ObjectOutputStream out)
ByteArrayOutputStream baos = new ByteArrayOutputStream();
write(baos);
String str = baos.toString();;
// System.out.println("str='"+str+"'");
out.writeUTF(str);
|