Esempio n. 1
0
 public void populateFromAttributes(Element element) {
   author = element.getAttribute("author").intern();
   copyright = element.getAttribute("copyright").intern();
   description = StringUtil.internString(UtilXml.childElementValue(element, "description"));
   title = element.getAttribute("title").intern();
   version = element.getAttribute("version").intern();
   defaultResourceName = StringUtil.internString(element.getAttribute("default-resource-name"));
 }
Esempio n. 2
0
 public void populateFromElements(Element element) {
   author = StringUtil.internString(UtilXml.childElementValue(element, "author"));
   copyright = StringUtil.internString(UtilXml.childElementValue(element, "copyright"));
   description = StringUtil.internString(UtilXml.childElementValue(element, "description"));
   title = StringUtil.internString(UtilXml.childElementValue(element, "title"));
   version = StringUtil.internString(UtilXml.childElementValue(element, "version"));
   defaultResourceName =
       StringUtil.internString(UtilXml.childElementValue(element, "default-resource-name"));
 }
Esempio n. 3
0
  /** XML Constructor */
  public ModelIndex(ModelEntity mainEntity, Element indexElement) {
    super(mainEntity);

    this.name = UtilXml.checkEmpty(indexElement.getAttribute("name")).intern();
    this.unique = "true".equals(UtilXml.checkEmpty(indexElement.getAttribute("unique")));
    this.description =
        StringUtil.internString(UtilXml.childElementValue(indexElement, "description"));

    NodeList indexFieldList = indexElement.getElementsByTagName("index-field");
    for (int i = 0; i < indexFieldList.getLength(); i++) {
      Element indexFieldElement = (Element) indexFieldList.item(i);

      if (indexFieldElement.getParentNode() == indexElement) {
        String fieldName = indexFieldElement.getAttribute("name").intern();
        this.fieldNames.add(fieldName);
      }
    }
  }