Package org.dom4j

Examples of org.dom4j.Element.valueOf()


      Element field = (Element) iter.next();
      String fieldName, storedS, indexedS, tokenizedS, boostS, fieldText;
      boolean stored, tokenized, indexed;
      float boost = 1;

      fieldName = field.valueOf("@name");
      if (fieldName.equals("")) {
        throw new IllegalDocumentException("Field without name.");
      }

      //There cannot be a field with the name used to store the documentId (docIdName)
View Full Code Here


      if (fieldName.equals(docIdName)) {
        throw new IllegalDocumentException("This document contains a field with the same name as the configured name "
                        + "to save the documentId( " + docIdName + ").");
      }

      storedS = field.valueOf("@stored");
      if (storedS.equals("")) {
        throw new IllegalDocumentException("Field without stored attribute.");
      }
      stored = Boolean.valueOf(storedS);
View Full Code Here

      if (storedS.equals("")) {
        throw new IllegalDocumentException("Field without stored attribute.");
      }
      stored = Boolean.valueOf(storedS);

      indexedS = field.valueOf("@indexed");
      if (indexedS.equals("")) {
        throw new IllegalDocumentException("Field without indexed attribute.");
      }
      indexed = Boolean.valueOf(indexedS);
      //Lucene complains of an unindexed unstored field with a runtime exception
View Full Code Here

      //and it makes no sense anyway
      if (!(indexed || stored)) {
        throw new IllegalDocumentException("processAdd: unindexed unstored field \"" + fieldName + "\".");
      }

      tokenizedS = field.valueOf("@tokenized");
      if (tokenizedS.equals("")) {
        throw new IllegalDocumentException("Field without tokenized attribute.");
      }
      tokenized = Boolean.valueOf(tokenizedS);
View Full Code Here

      if (tokenizedS.equals("")) {
        throw new IllegalDocumentException("Field without tokenized attribute.");
      }
      tokenized = Boolean.valueOf(tokenizedS);

      boostS = field.valueOf("@boost");
      if (!boostS.equals("")) {
        try {
          boost = new Float(boostS).floatValue();
        } catch (NumberFormatException exception) {
          throw new IllegalDocumentException("Unparsable boost value (" + boostS + ") for field  \"" + fieldName + "\".");
View Full Code Here

        HashSet<String> providedPayloads = new HashSet<String>();
    // Now we add the payloads
    for (Iterator iter = e.elementIterator("payload"); iter.hasNext();) {
      Element payload = (Element) iter.next();
     
            String payloadName = payload.valueOf("@name");
      if (payloadName.equals("")) {
        throw new IllegalDocumentException("Payload without name.");
      }
            providedPayloads.add(payloadName);
            try {
View Full Code Here

    protected void processSpecificElements(Element element, Activity activity) throws DeploymentException {
        Switch aSwitch = (Switch) activity;
        for (Iterator i = element.elementIterator("case"); i.hasNext();) {
            Element caseElement = (Element) i.next();
            String s = caseElement.valueOf("@condition");
            log.debug("<case " +s +">");
            Element activityElement = getActivityElement(caseElement);
            log.debug("<" + activityElement.getName() + ">");
            ActivityDeployer ad = ActivityDeployerFactory.getActivityDeployer(activityElement.getName());
            aSwitch.addCondition(s, ad.deploy(activityElement, aSwitch));
View Full Code Here

    protected void processSpecificElements(final Element element, Activity activity) throws DeploymentException {
        Pick pick = (Pick) activity;
        for (Iterator i = element.elementIterator("onMessage"); i.hasNext();) {
            Element onMessageElt = (Element) i.next();
            String partnerLink = onMessageElt.valueOf("@partnerLink");
            String portType = onMessageElt.valueOf("@portType");
            String operation = onMessageElt.valueOf("@operation");
            String variable = onMessageElt.valueOf("@variable");
            Element correlationsElt = onMessageElt.element("correlations");
            Set correlationList = getCorrelationRefList(correlationsElt);
View Full Code Here

    protected void processSpecificElements(final Element element, Activity activity) throws DeploymentException {
        Pick pick = (Pick) activity;
        for (Iterator i = element.elementIterator("onMessage"); i.hasNext();) {
            Element onMessageElt = (Element) i.next();
            String partnerLink = onMessageElt.valueOf("@partnerLink");
            String portType = onMessageElt.valueOf("@portType");
            String operation = onMessageElt.valueOf("@operation");
            String variable = onMessageElt.valueOf("@variable");
            Element correlationsElt = onMessageElt.element("correlations");
            Set correlationList = getCorrelationRefList(correlationsElt);
            Element activityElement = getActivityElement(onMessageElt);
View Full Code Here

        Pick pick = (Pick) activity;
        for (Iterator i = element.elementIterator("onMessage"); i.hasNext();) {
            Element onMessageElt = (Element) i.next();
            String partnerLink = onMessageElt.valueOf("@partnerLink");
            String portType = onMessageElt.valueOf("@portType");
            String operation = onMessageElt.valueOf("@operation");
            String variable = onMessageElt.valueOf("@variable");
            Element correlationsElt = onMessageElt.element("correlations");
            Set correlationList = getCorrelationRefList(correlationsElt);
            Element activityElement = getActivityElement(onMessageElt);
            ActivityDeployer ad = ActivityDeployerFactory.getActivityDeployer(activityElement.getName());
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.