Package org.jdom.xpath

Examples of org.jdom.xpath.XPath.selectNodes()


            SchedulerDom currdom = (SchedulerDom)form.getDom();

            listOfElement2 = x2.selectNodes(currdom.getDoc());
            if(listOfElement2.isEmpty()) {             
              XPath x3 = XPath.newInstance("//job/monitor/script[@java_class='sos.scheduler.managed.configuration.ConfigurationOrderMonitor']");
              List listOfElement3  = x3.selectNodes(currdom.getDoc());
              if(listOfElement3.isEmpty()) {
                x3 = XPath.newInstance("//job");
                listOfElement3  = x3.selectNodes(currdom.getDoc());
                Element job = (Element)listOfElement3.get(0);
                addMonitoring(job, currdom);
View Full Code Here


            if(listOfElement2.isEmpty()) {             
              XPath x3 = XPath.newInstance("//job/monitor/script[@java_class='sos.scheduler.managed.configuration.ConfigurationOrderMonitor']");
              List listOfElement3  = x3.selectNodes(currdom.getDoc());
              if(listOfElement3.isEmpty()) {
                x3 = XPath.newInstance("//job");
                listOfElement3  = x3.selectNodes(currdom.getDoc());
                Element job = (Element)listOfElement3.get(0);
                addMonitoring(job, currdom);

                form.getTree().setSelection(new org.eclipse.swt.widgets.TreeItem[] { form.getTree().getItem(0) });
View Full Code Here

            listOfElement2 = x2.selectNodes(currDom.getDoc());
            if(listOfElement2.isEmpty()) {             
              //XPath x3 = XPath.newInstance("//jobs/job[@name='"+ jobname + "']");
              //XPath x3 = XPath.newInstance("//job[@name='"+ jobname + "']");
              XPath x3 = XPath.newInstance("//job");
              List listOfElement3  = x3.selectNodes(currDom.getDoc());
              if(!listOfElement3.isEmpty()) {
                Element job = (Element)listOfElement3.get(0);
                addMonitoring(job, currDom);
                currDom.writeElement(currDom.getFilename(), currDom.getDoc());
              }
View Full Code Here

            }
          }
        } else {
          XPath x2 = XPath.newInstance("//job[@name='"+ jobname + "']/monitor/script[@java_class='sos.scheduler.managed.configuration.ConfigurationOrderMonitor']");
          listOfElement2 = x2.selectNodes(dom.getDoc());
          if(listOfElement2.isEmpty()) {             
            XPath x3 = XPath.newInstance("//jobs/job[@name='"+ jobname + "']");
            List listOfElement3  = x3.selectNodes(dom.getDoc());
            if(!listOfElement3.isEmpty()) {
              Element job = (Element)listOfElement3.get(0);
View Full Code Here

        } else {
          XPath x2 = XPath.newInstance("//job[@name='"+ jobname + "']/monitor/script[@java_class='sos.scheduler.managed.configuration.ConfigurationOrderMonitor']");
          listOfElement2 = x2.selectNodes(dom.getDoc());
          if(listOfElement2.isEmpty()) {             
            XPath x3 = XPath.newInstance("//jobs/job[@name='"+ jobname + "']");
            List listOfElement3  = x3.selectNodes(dom.getDoc());
            if(!listOfElement3.isEmpty()) {
              Element job = (Element)listOfElement3.get(0);
              addMonitoring(job, dom);

              if(update != null)
View Full Code Here

    //ein Job Chain hat entweder job_chain_node ODER job_chain_node.job_chain Kindknoten.
    private boolean check() {
      try {
        XPath x3 = XPath.newInstance("//job_chain[@name='"+ listener.getChainName() + "']/job_chain_node.job_chain");
       
        List listOfElement_3 = x3.selectNodes(dom.getDoc());
        if(listOfElement_3.isEmpty())
          return true;
        else
          return false;
      } catch (Exception e) {
View Full Code Here

    List<ToolIdentity> identities = new ArrayList<ToolIdentity>();
    try {
      XPath xpath = XPath.newInstance("//fits:identity");
      Namespace ns = Namespace.getNamespace("fits",Fits.XML_NAMESPACE);
      xpath.addNamespace(ns);
      List<Element> identElements = xpath.selectNodes(dom);
      for(Element element : identElements) {
        Attribute formatAttr = element.getAttribute("format");
        Attribute mimetypeAttr = element.getAttribute("mimetype");
        Element versionElement = element.getChild("version",ns);
       
View Full Code Here

  public List<FitsMetadataElement> getMetadataElements(String name) {
    List<FitsMetadataElement> elements = new ArrayList<FitsMetadataElement>();
    try {
      XPath xpath = XPath.newInstance("//fits:"+name);
      xpath.addNamespace("fits",Fits.XML_NAMESPACE);
      List<Element> nodes = xpath.selectNodes(fitsXml);
      for(Element e : nodes) {
        elements.add(buildMetdataIElements(e));
      }
      return elements;
    } catch (JDOMException e) {
View Full Code Here

    List<FitsIdentity> identities = new ArrayList<FitsIdentity>();
    try {
      XPath xpath = XPath.newInstance("//fits:identity");
      Namespace ns = Namespace.getNamespace("fits",Fits.XML_NAMESPACE);
      xpath.addNamespace(ns);
      List<Element> identElements = xpath.selectNodes(fitsXml);
      for(Element element : identElements) {
        FitsIdentity fileIdentSect = new FitsIdentity();
       
        //get the identity attributes
        Attribute formatAttr = element.getAttribute("format");
View Full Code Here

        // Get all constraints that have our URL pattern
        // (Note the crazy j: prefix to denote the 2.4 j2ee schema)
        selector = "//j:web-app/j:security-constraint[j:web-resource-collection/j:url-pattern=\"" + url + "\"]";
        xpath = XPath.newInstance( selector );
        xpath.addNamespace( "j", J2EE_SCHEMA_24_NAMESPACE );
        List<?> constraints = xpath.selectNodes( root );

        // Get all constraints that match our Role pattern
        selector = "//j:web-app/j:security-constraint[j:auth-constraint/j:role-name=\"" + role.getName() + "\"]";
        xpath = XPath.newInstance( selector );
        xpath.addNamespace( "j", J2EE_SCHEMA_24_NAMESPACE );
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.