Methods Summary |
---|
public int | getCardinal()
String name = baseBean.name();
BaseBean parent = baseBean.parent();
BaseProperty baseProperty = parent.getProperty(name);
return baseProperty.getInstanceType();
|
public java.lang.Object | getElement(java.lang.String elementName, int index)
return utils.getElement(elementName, index, baseBean);
|
public java.lang.Object | getElement(java.lang.String elementName)
return utils.getElement(elementName, baseBean);
|
public int | getElementCardinal(java.lang.String elementName)
BaseProperty baseProperty = baseBean.getProperty(elementName);
int returnValue = -1;
if(null != baseProperty) {
returnValue = baseProperty.getInstanceType();
} else {
String format =
BundleReader.getValue("Error_does_not_exists"); //NOI18N
Object[] arguments =
new Object[]{"Property", elementName}; //NOI18N
String message = MessageFormat.format(format, arguments);
assert false : message;
}
return returnValue;
|
public java.util.ArrayList | getElementDtdNames()
ArrayList elements = new ArrayList();
BaseProperty[] baseProperty = baseBean.listProperties();
int size = baseProperty.length;
for(int i=0; i<size; i++){
elements.add(baseProperty[i].getDtdName());
///String format =
/// BundleReader.getValue("Name_Value_Pair_Format"); //NOI18N
///Object[] arguments = new Object[]{"Dtd Name", //NOI18N
/// baseProperty[i].getDtdName()};
///System.out.println(MessageFormat.format(format, arguments));
}
return elements;
|
public java.util.ArrayList | getElementNames()
ArrayList elements = new ArrayList();
BaseProperty[] baseProperty = baseBean.listProperties();
int size = baseProperty.length;
for(int i=0; i<size; i++){
elements.add(baseProperty[i].getName());
///String format =
/// BundleReader.getValue("Name_Value_Pair_Format"); //NOI18N
///Object[] arguments = new Object[]{"Name", //NOI18N
/// baseProperty[i].getName()};
///System.out.println(MessageFormat.format(format, arguments));
///arguments =
/// new Object[]{"FullName", baseProperty[i].getFullName()};//NOI18N
///System.out.println(MessageFormat.format(format, arguments));
}
return elements;
|
public java.lang.Object[] | getElements(java.lang.String elementName)
return utils.getElements(elementName, baseBean);
|
int | getIndex(org.netbeans.modules.schema2beans.BaseBean baseBean)
int index = -1;
boolean root = isRootElement(baseBean);
if(!root){
String name = baseBean.name();
BaseBean parent = baseBean.parent();
if(parent != null) {
index = parent.indexOf(name, baseBean);
}
}
return index;
|
public java.lang.String | getIndexedXPath()
BaseBean bean = baseBean;
BaseBean parentBean = null;
String xpath = bean.dtdName();
int index = getIndex(baseBean);
if(index != -1){
xpath = utils.getIndexedName(xpath, index);
}
boolean root = isRootElement(bean);
parentBean = bean.parent();
String name = null;
while(!root){
name = parentBean.dtdName();
index = getIndex(parentBean);
if(index != -1) {
name = utils.getIndexedName(name, index);
}
xpath = name + Constants.XPATH_DELIMITER + xpath;
bean = parentBean;
parentBean = bean.parent();
root = isRootElement(bean);
}
xpath = Constants.XPATH_DELIMITER + xpath;
return xpath;
|
public java.lang.reflect.Method | getMethod(java.lang.String methodName)
return utils.getMethod(utils.getClass(baseBean), methodName);
|
public java.lang.String | getXPath()
///String format = BundleReader.getValue("Name_Value_Pair_Format");//NOI18N
///Object[] arguments = new Object[]{"Name", baseBean.name()}; //NOI18N
///System.out.println(MessageFormat.format(format, arguments));
///arguments = new Object[]{"FullName", baseBean.fullName()}; //NOI18N
///System.out.println(MessageFormat.format(format, arguments));
BaseBean bean = baseBean;
BaseBean parentBean = null;
String xpath = bean.dtdName();
///boolean root = bean.isRoot();
boolean root = isRootElement(bean);
parentBean = bean.parent();
while(!root){
xpath = parentBean.dtdName() + Constants.XPATH_DELIMITER + xpath;
bean = parentBean;
parentBean = bean.parent();
///root = bean.isRoot();
root = isRootElement(bean);
}
xpath = Constants.XPATH_DELIMITER + xpath;
return xpath;
|
public java.lang.Object | invoke(java.lang.reflect.Method method)
return utils.invoke(baseBean, method);
|
public boolean | isBeanElement(java.lang.String elementName)
BaseProperty baseProperty = baseBean.getProperty(elementName);
boolean returnValue = false;
if(null != baseProperty) {
returnValue = baseProperty.isBean();
} else {
String format =
BundleReader.getValue("Error_does_not_exists"); //NOI18N
Object[] arguments =
new Object[]{"Property", elementName}; //NOI18N
String message = MessageFormat.format(format, arguments);
assert false : message;
}
return returnValue;
|
public boolean | isIndexed(java.lang.String elementName)
BaseProperty baseProperty = baseBean.getProperty(elementName);
boolean returnValue = false;
if(null != baseProperty) {
returnValue = baseProperty.isIndexed();
} else {
String format =
BundleReader.getValue("Error_does_not_exists"); //NOI18N
Object[] arguments =
new Object[]{"Property", elementName}; //NOI18N
String message = MessageFormat.format(format, arguments);
assert false : message;
}
return returnValue;
|
boolean | isRootElement(org.netbeans.modules.schema2beans.BaseBean bean)
BaseBean parent = bean.parent();
boolean root;
if(parent.name().equals(bean.name())){
root = true;
} else {
root = false;
}
return root;
|