try { angular.module('ocelot.ds'); } catch (e) { angular.module('ocelot.ds', []); }

@param writer
@throws IOException
321564
public void writeModule(Writer writer) throws IOException {
		writer.append(TAB).append("try").append(SPACEOPTIONAL).append(OPENBRACE).append(CR); // \ttry {\n
		writer.append(TAB2).append(ANGULAR_MODULE).append(OPENPARENTHESIS).append(MODULENAME).append(CLOSEPARENTHESIS)
				  .append(SEMICOLON).append(CR); // \tangular.module('ocelot.ds');\n
		writer.append(TAB).append(CLOSEBRACE).append(SPACEOPTIONAL).append("catch").append(SPACEOPTIONAL)
				  .append(OPENPARENTHESIS).append("e").append(CLOSEPARENTHESIS).append(SPACEOPTIONAL).append(OPENBRACE)
				  .append(CR); // \t} catch (e) {\n
		writer.append(TAB2).append(ANGULAR_MODULE).append(OPENPARENTHESIS).append(MODULENAME).append(COMMA)
				  .append(SPACEOPTIONAL).append(BRACKETS).append(CLOSEPARENTHESIS).append(SEMICOLON)
				  .append(CR); // \t\tangular.module('ocelot.ds', []);\n
		writer.append(TAB).append(CLOSEBRACE).append(CR); // \t}\n
	}
442019
public static void writeXML(DocumentFragment fragment, Writer writer) throws IOException {
		assert fragment != null : AssertMessages.notNullParameter(0);
		assert writer != null : AssertMessages.notNullParameter(1);
		writeNode(fragment, writer);
	}
67018
public void writeExternal(PofWriter writer)
            throws IOException {
        super.writeExternal(writer);
        writer.writeObject(10, numInc);
        writer.writeBoolean(11, fPostInc);
    }
1023448
public void write(Writer writer, String enclosingNamespace) throws IOException {
        for (CharSequence csq : sb.getAsList()) {
            if (csq instanceof XmlStringBuilder) {
                ((XmlStringBuilder) csq).write(writer, enclosingNamespace);
            }
            else if (csq instanceof XmlNsAttribute) {
                XmlNsAttribute xmlNsAttribute = (XmlNsAttribute) csq;
                if (!xmlNsAttribute.value.equals(enclosingNamespace)) {
                    writer.write(xmlNsAttribute.toString());
                    enclosingNamespace = xmlNsAttribute.value;
                }
            }
            else {
                writer.write(csq.toString());
            }
        }
    }
1181889
public static void writelnTo(String html, Writer writer) throws IOException {
		writeTo(html, writer);
		writer.write('\n');
	}
603157
public void xmlWriteOn(FormattedWriter writer) throws IOException
  {
    super.xmlWriteOn(writer);
    
    writer.newLine();
    writer.taggedValue("subscriberID", _subState.getSubscriberID());

    writer.newLine();
    writer.startTag("topics");
    writer.indent();

    String[] topics = _subState.getTopics();

    if (topics != null)
    {
      for (int i = 0; i < topics.length; i++)
      {
        writer.newLine();
        writer.taggedValue("topic", topics[i]);
      }
    }

    writer.outdent();
    writer.newLine();
    writer.endTag("topics");
    writer.newLine();
    writer.taggedValue("toBeDeleted", toBeDeleted);
  }
379347
protected void initJsonWriter() {
		String writerList = config.getJsonWriters();
		if (writerList != null) {
			String[] writers = writerList.split(",");
			Set<String> supportedWriters = TreeWriterRegistry.getWritersByFormat("json");
			TreeWriter selectedWriter = null;
			for (String writer : writers) {
				writer = writer.trim().toLowerCase();
				if (!writer.isEmpty()) {
					for (String supportedWriter : supportedWriters) {
						int i = supportedWriter.lastIndexOf('.');
						if (i > -1) {
							supportedWriter = supportedWriter.substring(i + 1);
						}
						if (supportedWriter.toLowerCase().contains(writer)) {
							selectedWriter = TreeWriterRegistry.getWriter(supportedWriter);
							logger.info("Default JSON serializer/writer is \"" + selectedWriter.getClass() + "\".");
							TreeWriterRegistry.setWriter("json", selectedWriter);
							break;
						}
					}
					if (selectedWriter != null) {
						break;
					}
				}
			}
		}
	}
1141613
public static <T> void writeTo(Writer writer, T message, Schema<T> schema,
            boolean numeric) throws IOException
    {
        final JsonGenerator generator = DEFAULT_JSON_FACTORY.createJsonGenerator(writer);
        try
        {
            writeTo(generator, message, schema, numeric);
        }
        finally
        {
            generator.close();
        }
    }
437645
@Override
    public void write(int idx) throws IOException {
        try {
            beforeWrite(1);
            out.write(idx);
            afterWrite(1);
        } catch (IOException e) {
            handleIOException(e);
        }
    }
1340029
public void xmlWriteOn(FormattedWriter writer) throws IOException
  {
    writer.newLine();
    writer.taggedValue("streamId", streamId);
    writer.newLine();
    writer.taggedValue("flushStarted", flushStarted);
  }
71354
@Override
    public void writeContent(XMLExtendedStreamWriter writer, Dependency value) throws XMLStreamException {

        if(value != null && this != value) {
            throw new IllegalStateException("Wrong target dependency.");
        }

        writer.writeStartElement(ModuleConfigImpl.MODULE);
        writer.writeAttribute(ModuleConfigImpl.NAME, name);
        if (export) {
            writer.writeAttribute(ModuleConfigImpl.EXPORT, "true");
        }
        writer.writeEndElement();
    }
741276
public void write(Writer writer)
        throws IOException
    {
        synchronized(writer)
        {
            for (int i=0;i<_fields.size();i++)
            {
                Field field=(Field)_fields.get(i);
                if (field!=null)
                    field.write(writer,_version);
            }
            writer.write(__CRLF);
        }
    }
1214628
public void write(Writer out, ELContext ctx) throws ELException, IOException
    {
        out.write(this.literal);
    }
407202
function workFn() {
      if (currentSpec.$injector) {
        throw Error('Injector already created, can not register a module!');
      } else {
        var modules = currentSpec.$modules || (currentSpec.$modules = []);
        angular.forEach(moduleFns, function(module) {
          modules.push(module);
        });
      }
    }
925708
public void writeExternal(PofWriter writer)
            throws IOException {
        writer.writeString(0, name);
        writer.writeLong(1, last);
    }
873470
public void writeOpenFunctionWithDependencies(Writer writer, String object, String... dependencies) throws IOException {
		writer.append(TAB).append("/* @ngInject */").append(CR);
		writer.append(TAB).append(FUNCTION).append(SPACE).append(object).append(OPENPARENTHESIS);
		writeDependencies(writer, "", dependencies);
		writer.append(CLOSEPARENTHESIS).append(SPACEOPTIONAL).append(OPENBRACE).append(CR); //\tfunction config(dep1, dep2) {\n

	}
1199513
public void write(Writer writer) throws IOException {					
		GFF3Writer.writeVersionPragma(writer);
		GFF3Writer.writeRegionPragma(writer, entry.getPrimaryAccession(), 
				windowBeginPosition, windowEndPosition);		
		int ID = 0;
		if (show.contains(SHOW_GENE)) {
			locusTagGeneMap = new HashMap<String, GFF3Gene>();
			geneNameGeneMap = new HashMap<String, GFF3Gene>();
		}
		for (Feature feature : entry.getFeatures()) {
			Long minPosition = feature.getLocations().getMinPosition();
			Long maxPosition = feature.getLocations().getMaxPosition();
			// Remove global complement.
			feature.getLocations().removeGlobalComplement();			
		    String geneName = feature.getSingleQualifierValue(Qualifier.GENE_QUALIFIER_NAME);
		    String locusTag = feature.getSingleQualifierValue(Qualifier.LOCUS_TAG_QUALIFIER_NAME);
		    if (show.contains(SHOW_GENE)) {
		    	addGeneSegment(geneName, locusTag, minPosition, maxPosition);		    	
		    }
		    if (show.contains(SHOW_FEATURE)) {
				++ID;		    	
		    	writeFeature(writer, feature, geneName, locusTag, ID, minPosition, maxPosition);
		    	for (Location location : feature.getLocations().getLocations()) {
		    		int parentID = ID;
		    		++ID;
		    		writeFeatureSegment(writer, feature, geneName, locusTag, location, parentID, ID);
		    	}
		    }
		}
		if (show.contains(SHOW_GENE)) {
			for (GFF3Gene gene : locusTagGeneMap.values()) {
				++ID;
				writeGene(writer, gene, ID);			
			}
			for (GFF3Gene gene : geneNameGeneMap.values()) {
				++ID;
				writeGene(writer, gene, ID);			
			}
		}
		if (show.contains(SHOW_CONTIG)) {
			Long contigPosition = 1L;			
			for (Location location : entry.getSequence().getContigs()) {
				++ID;
				contigPosition = writeContig(writer, location, ID, contigPosition);
			}		
		}
		if (show.contains(SHOW_ASSEMBLY)) {
			for (Assembly assembly : entry.getAssemblies()) {
				++ID;
				writeAssembly(writer, assembly, ID);
			}			
		}
	}