Examples of declaration()


Examples of org.znerd.xmlenc.XMLOutputter.declaration()

    public void doGet(HttpServletRequest request, HttpServletResponse response
        ) throws ServletException, IOException {
      final PrintWriter out = response.getWriter();
      final String path = ServletUtil.getDecodedPath(request, "/getFileChecksum");
      final XMLOutputter xml = new XMLOutputter(out, "UTF-8");
      xml.declaration();

      final ServletContext context = getServletContext();
      final DataNode datanode = (DataNode) context.getAttribute("datanode");
      final Configuration conf =
        new HdfsConfiguration(datanode.getConf());
View Full Code Here

Examples of org.znerd.xmlenc.XMLOutputter.declaration()

    public void doGet(HttpServletRequest request, HttpServletResponse response
        ) throws ServletException, IOException {
      final PrintWriter out = response.getWriter();
      final String path = ServletUtil.getDecodedPath(request, "/getFileChecksum");
      final XMLOutputter xml = new XMLOutputter(out, "UTF-8");
      xml.declaration();

      final ServletContext context = getServletContext();
      final DataNode datanode = (DataNode) context.getAttribute("datanode");
      final Configuration conf =
        new HdfsConfiguration(datanode.getConf());
View Full Code Here

Examples of org.znerd.xmlenc.XMLOutputter.declaration()

        @Override
        public Void run() throws Exception {
          final String path = ServletUtil.getDecodedPath(request, "/contentSummary");
          final PrintWriter out = response.getWriter();
          final XMLOutputter xml = new XMLOutputter(out, "UTF-8");
          xml.declaration();
          try {
            //get content summary
            final ClientProtocol nnproxy = createNameNodeProxy();
            final ContentSummary cs = nnproxy.getContentSummary(path);
View Full Code Here

Examples of org.znerd.xmlenc.XMLOutputter.declaration()

        ) throws ServletException, IOException {
      final UnixUserGroupInformation ugi = getUGI(request);
      final PrintWriter out = response.getWriter();
      final String filename = getFilename(request, response);
      final XMLOutputter xml = new XMLOutputter(out, "UTF-8");
      xml.declaration();

      Configuration daemonConf = (Configuration) getServletContext()
        .getAttribute(HttpServer.CONF_CONTEXT_ATTRIBUTE);
      final Configuration conf = (daemonConf == null) ? new Configuration()
        : new Configuration(daemonConf);
View Full Code Here

Examples of wycs.core.WycsFile.declaration()

        if (module == null) {
            throw new InternalError("module '" + code.nid.module() + "' not found");
        }

        WycsFile.Declaration decl = module.declaration(code.nid.name());

        if (decl == null) {
            throw new InternalError(
                    "function call to a non-declared function (name=" + code.nid.name() + ")");
        }
View Full Code Here

Examples of wycs.core.WycsFile.declaration()

    for (WyalFile.Import imp : context.imports()) {
      for (Path.ID id : imports(imp.filter)) {
        try {
          WycsFile wf = getModule(id);
          if(wf == null) { continue; }
          T d = wf.declaration(name, type);
          if (d != null) {
            return new Pair<NameID, T>(new NameID(id, name), d);
          }
        } catch(SyntaxError e) {
          throw e;
View Full Code Here

Examples of wycs.core.WycsFile.declaration()

      // library is not on the path as e.g. x[i] is translated into
      // a call to wycs.core.Map.IndexOf().
      if(module == null) {
        internalFailure("cannot resolve as module: " + e.nid.module(), filename, e);
      }
      Object d = module.declaration(e.nid.name());
      if(d instanceof WycsFile.Function) {
        // Do nothing, since functions are not expanded like macros.
        // Instead, their axioms may be instantiated later either before
        // or during rewriting.
      } else if (d instanceof WycsFile.Macro) {
View Full Code Here

Examples of wycs.core.WycsFile.declaration()

  private Code instantiateAxioms(Code.FunCall condition, int freeVariable) {
    ArrayList<Code> axioms = new ArrayList<Code>();
    try {
      WycsFile module = builder.getModule(condition.nid.module());
      // module should not be null if TypePropagation has already passed.
      Object d = module.declaration(condition.nid.name());
      if(d instanceof WycsFile.Function) {
        WycsFile.Function fn = (WycsFile.Function) d;
        if(fn.constraint != null) {
          // There are some axioms we can instantiate. First, we need to
          // construct the generic binding for this function.
View Full Code Here

Examples of wycs.core.WycsFile.declaration()

    instantiateFromExpression(expression.operands[0], axioms, freeVariable);

    try {
      WycsFile module = builder.getModule(expression.nid.module());
      // module should not be null if TypePropagation has already passed.
      WycsFile.Function fn = module.declaration(expression.nid.name(),
          WycsFile.Function.class);
      if (fn.constraint != null) {
        // There are some axioms we can instantiate. First, we need to
        // construct the generic binding for this function.
        HashMap<String, SemanticType> generics = buildGenericBinding(
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.