Package org.jdom

Examples of org.jdom.ProcessingInstruction


                    metadata.add(name, text.getText());
                } else if (node instanceof Comment) {
                    Comment com = (Comment) node;
                    metadata.add(name, com.getText());
                } else if (node instanceof ProcessingInstruction) {
                    ProcessingInstruction pi = (ProcessingInstruction) node;
                    metadata.add(name, pi.getData());
                } else if (node instanceof EntityRef) {
                    EntityRef er = (EntityRef) node;
                    metadata.add(name, er.toString());
                }
            }
View Full Code Here


        return buf.toString();
    }

    public String getProcessingInstructionTarget(Object obj)
    {
        ProcessingInstruction pi = (ProcessingInstruction) obj;

        return pi.getTarget();
    }
View Full Code Here

        return pi.getTarget();
    }

    public String getProcessingInstructionData(Object obj)
    {
        ProcessingInstruction pi = (ProcessingInstruction) obj;

        return pi.getData();
    }
View Full Code Here

  // Javadoc inherited from super class.
  public void handleProcessingInstruction (SchemaParser parser,
                                           String target, String data) {
   
    ProcessingInstruction pi = new ProcessingInstruction (target, data);
    SchemaObject object = parser.getCurrentObject ();

    if (object instanceof ThemeElementInfo) {
      ThemeElementInfo info = (ThemeElementInfo) object;
View Full Code Here

  // Javadoc inherited from super class.
  public void handleProcessingInstruction (SchemaParser parser,
                                           String target, String data) {
   
    ProcessingInstruction pi = new ProcessingInstruction (target, data);
    SchemaObject object = parser.getCurrentObject ();

    if (object instanceof ThemeElementInfo) {
      ThemeElementInfo info = (ThemeElementInfo) object;
     
      info.setStylePropertyElement(true);
      info.setNaturalName(getRequiredValue(pi, "naturalName"));
     
      info.setEnumerationName(pi.getValue("enumeration"));

      info.setVersions(pi);

    }
  }
View Full Code Here

            SchemaParser parser,
            String target, String data) {

        SchemaObject object = parser.getCurrentObject();

        ProcessingInstruction pi = new ProcessingInstruction(target, data);
        String value;

        //System.out.println ("PAPI pi " + pi + " found in " + object);

        if (object instanceof AttributeInfo) {
            AttributeInfo info = (AttributeInfo) object;

            // Process the options.
            if ((value = pi.getValue("name")) != null) {
                info.setAPIName(value);
                parser.println("Attribute " + info.getName() +
                        " is known as "
                        + info.getAPIName() + " in java code");
            }

            if ((value = pi.getValue("protocolName")) != null) {
                info.setProtocolName(value);
                parser.println("Attribute " + info.getName() +
                        " is known as "
                        + info.getProtocolName() + " in protocol");
            }

            if (("true".equals(pi.getValue("ignore")))) {
                info.setProtocolName("");
            }

            if (("true".equals(pi.getValue("ignore")))) {
                info.setDeprecated(true);
            }

        } else if (object instanceof ElementInfo) {
            ElementInfo info = (ElementInfo) object;

            info.setAPIElementClass(pi.getValue("elementClass"));

            value = pi.getValue("attributesClass");
            info.setAPIAttributesClass(value);

            value = pi.getValue("naturalName");
            info.setNaturalName(value);

        } else if (object instanceof AttributeGroupInfo) {
            AttributeGroupInfo info = (AttributeGroupInfo) object;
            AttributesStructureInfo attributesStructureInfo
                    = info.getAttributesStructureInfo();

            info.setAPIElementClass(pi.getValue("elementClass"));

            value = pi.getValue("attributeGroupClass");
            //System.out.println ("attributeGroupClass=" + value);
            attributesStructureInfo.setAPIAttributesClass(value);

            value = pi.getValue("attributeGroupInterface");
            attributesStructureInfo.setAPIAttributesInterface(value);

            value = pi.getValue("baseAttributeGroup");
            attributesStructureInfo.setAPIBaseAttributeGroup(value);

            value = pi.getValue("naturalName");
            attributesStructureInfo.setNaturalName(value);

            // Add any extra attributes.
            if ((value = pi.getValue("attribute")) != null) {
                String name = value;

                Scope scope = parser.getScope();
                AttributeDefinition definition = scope.addAttributeDefinition(
                        name);
                definition.setType(pi.getValue("type"));
                definition.setUse(pi.getValue("use"));

                List attributes = attributesStructureInfo.getAttributes();
                attributes.add(definition);
            }
View Full Code Here

            SchemaParser parser,
            String target, String data) {

        SchemaObject object = parser.getCurrentObject();

        ProcessingInstruction pi = new ProcessingInstruction(target, data);
        String value;

        if (object instanceof AttributeDefinition) {
            AttributeInfo info = (AttributeInfo) object;
            parser.println("Attribute " + info.getName()
                    + " is deprecated");
            info.setDeprecated(true);

            if ((value = pi.getValue("name")) != null) {
                info.setProtocolName(value);
            }

        } else if (object instanceof ElementDefinition) {
            ElementDefinition definition = (ElementDefinition) object;
View Full Code Here

  // Javadoc inherited from super class.
  public void handleProcessingInstruction (SchemaParser parser,
                                           String target, String data) {
   
    ProcessingInstruction pi = new ProcessingInstruction (target, data);
    SchemaObject object = parser.getCurrentObject ();   

    ThemeElementInfo info = (ThemeElementInfo) object;
    String label = info.getName();
    String grp = getRequiredValue(pi, "grp");
View Full Code Here

            SchemaParser parser,
            String target, String data) {

        SchemaObject object = parser.getCurrentObject();

        ProcessingInstruction pi = new ProcessingInstruction(target, data);
        String value;

        if (object instanceof AttributeInfo) {
            AttributeInfo info = (AttributeInfo) object;

            // Process the options.
            if ((value = pi.getValue("name")) != null) {
                info.setAPIName(value);
                parser.println("Attribute " + info.getName() +
                        " is known as "
                        + info.getAPIName() + " in java code");
            }

            if ((value = pi.getValue("protocolName")) != null) {
                info.setProtocolName(value);
                parser.println("Attribute " + info.getName() +
                        " is known as "
                        + info.getProtocolName() + " in protocol");
            }

        } else if (object instanceof ElementInfo) {
            ElementInfo info = (ElementInfo) object;
            AttributesStructureInfo attributesStructureInfo
                    = info.getAttributesStructureInfo();

            info.setAPIElementClass(pi.getValue("elementClass"));

            value = pi.getValue("attributesClass");
            info.setAPIAttributesClass(value);

            value = pi.getValue("naturalName");
            info.setNaturalName(value);

            value = pi.getValue("assetClass");
            attributesStructureInfo.setApiAssetClassName(value);

            value = pi.getValue("componentClassBase");
            attributesStructureInfo.setApiComponentClassBase(value);

        } else if (object instanceof AttributeGroupInfo) {
            AttributeGroupInfo info = (AttributeGroupInfo) object;
            AttributesStructureInfo attributesStructureInfo
                    = info.getAttributesStructureInfo();

            info.setAPIElementClass(pi.getValue("elementClass"));

            value = pi.getValue("attributeGroupClass");
            //System.out.println ("attributeGroupClass=" + value);
            attributesStructureInfo.setAPIAttributesClass(value);

            value = pi.getValue("attributeGroupInterface");
            attributesStructureInfo.setAPIAttributesInterface(value);

            value = pi.getValue("baseAttributeGroup");
//      System.out.println("baseAttributeGroup = " + value);
            attributesStructureInfo.setAPIBaseAttributeGroup(value);

            value = pi.getValue("naturalName");
            attributesStructureInfo.setNaturalName(value);



            // Add any extra attributes.
            if ((value = pi.getValue("attribute")) != null) {
                String name = value;

                Scope scope = parser.getScope();
                AttributeDefinition definition = scope.addAttributeDefinition(
                        name);
                definition.setType(pi.getValue("type"));
                definition.setUse(pi.getValue("use"));

                List attributes = attributesStructureInfo.getAttributes();
                attributes.add(definition);
            }
View Full Code Here

            SchemaParser parser,
            String target, String data) {

        SchemaObject object = parser.getCurrentObject();

        ProcessingInstruction pi = new ProcessingInstruction(target, data);
        String value;

        if (object instanceof AttributeInfo) {
            AttributeInfo info = (AttributeInfo) object;

            // Process the options.
            if ((value = pi.getValue("attributeType")) != null) {
                info.setAttributeType(value);
                parser.println("Attribute " + info.getName() + " is of type "
                        + info.getAttributeType() + " in java code");
            }
View Full Code Here

TOP

Related Classes of org.jdom.ProcessingInstruction

Copyright © 2018 www.massapicom. 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.