< prev index next >

src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/SerializerFactory.java

Print this page


   1 /*
   2  * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
   3  * @LastModified: Oct 2017
   4  */
   5 /*
   6  * Licensed to the Apache Software Foundation (ASF) under one or more
   7  * contributor license agreements.  See the NOTICE file distributed with
   8  * this work for additional information regarding copyright ownership.
   9  * The ASF licenses this file to You under the Apache License, Version 2.0
  10  * (the "License"); you may not use this file except in compliance with
  11  * the License.  You may obtain a copy of the License at
  12  *
  13  *      http://www.apache.org/licenses/LICENSE-2.0
  14  *
  15  * Unless required by applicable law or agreed to in writing, software
  16  * distributed under the License is distributed on an "AS IS" BASIS,
  17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  18  * See the License for the specific language governing permissions and
  19  * limitations under the License.
  20  */
  21 
  22 package com.sun.org.apache.xml.internal.serializer;
  23 


  39    * are set for the given output "method".
  40    *
  41    * <p>
  42    * The standard property keys supported are: "method", "version", "encoding",
  43    * "omit-xml-declaration", "standalone", doctype-public",
  44    * "doctype-system", "cdata-section-elements", "indent", "media-type".
  45    * These property keys and their values are described in the XSLT recommendation,
  46    * see {@link <a href="http://www.w3.org/TR/1999/REC-xslt-19991116"> XSLT 1.0 recommendation</a>}
  47    *
  48    * <p>
  49    * The value of the "cdata-section-elements" property key is a whitespace
  50    * separated list of elements. If the element is in a namespace then
  51    * value is passed in this format: {uri}localName
  52    *
  53    * <p>
  54    * The non-standard property keys supported are defined in {@link OutputPropertiesFactory}.
  55    *
  56    * @see OutputPropertiesFactory
  57    * @see Method
  58    * @see Serializer

  59    */
  60 public final class SerializerFactory
  61 {
  62   /**
  63    * This constructor is private just to prevent the creation of such an object.
  64    */
  65 
  66   private SerializerFactory() {
  67 
  68   }
  69 
  70   /**
  71    * Returns a serializer for the specified output method. The output method
  72    * is specified by the value of the property associated with the "method" key.
  73    * If no implementation exists that supports the specified output method
  74    * an exception of some type will be thrown.
  75    * For a list of the output "method" key values see {@link Method}.
  76    *
  77    * @param format The output format, minimally the "method" property must be set.
  78    * @return A suitable serializer.


   1 /*
   2  * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.

   3  */
   4 /*
   5  * Licensed to the Apache Software Foundation (ASF) under one or more
   6  * contributor license agreements.  See the NOTICE file distributed with
   7  * this work for additional information regarding copyright ownership.
   8  * The ASF licenses this file to You under the Apache License, Version 2.0
   9  * (the "License"); you may not use this file except in compliance with
  10  * the License.  You may obtain a copy of the License at
  11  *
  12  *      http://www.apache.org/licenses/LICENSE-2.0
  13  *
  14  * Unless required by applicable law or agreed to in writing, software
  15  * distributed under the License is distributed on an "AS IS" BASIS,
  16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17  * See the License for the specific language governing permissions and
  18  * limitations under the License.
  19  */
  20 
  21 package com.sun.org.apache.xml.internal.serializer;
  22 


  38    * are set for the given output "method".
  39    *
  40    * <p>
  41    * The standard property keys supported are: "method", "version", "encoding",
  42    * "omit-xml-declaration", "standalone", doctype-public",
  43    * "doctype-system", "cdata-section-elements", "indent", "media-type".
  44    * These property keys and their values are described in the XSLT recommendation,
  45    * see {@link <a href="http://www.w3.org/TR/1999/REC-xslt-19991116"> XSLT 1.0 recommendation</a>}
  46    *
  47    * <p>
  48    * The value of the "cdata-section-elements" property key is a whitespace
  49    * separated list of elements. If the element is in a namespace then
  50    * value is passed in this format: {uri}localName
  51    *
  52    * <p>
  53    * The non-standard property keys supported are defined in {@link OutputPropertiesFactory}.
  54    *
  55    * @see OutputPropertiesFactory
  56    * @see Method
  57    * @see Serializer
  58  * @LastModified: Oct 2017
  59    */
  60 public final class SerializerFactory
  61 {
  62   /**
  63    * This constructor is private just to prevent the creation of such an object.
  64    */
  65 
  66   private SerializerFactory() {
  67 
  68   }
  69 
  70   /**
  71    * Returns a serializer for the specified output method. The output method
  72    * is specified by the value of the property associated with the "method" key.
  73    * If no implementation exists that supports the specified output method
  74    * an exception of some type will be thrown.
  75    * For a list of the output "method" key values see {@link Method}.
  76    *
  77    * @param format The output format, minimally the "method" property must be set.
  78    * @return A suitable serializer.


< prev index next >