Package org.w3c.tools.resources.serialization

Examples of org.w3c.tools.resources.serialization.ResourceDescription


    public static ResourceDescription readResourceDescription(InputStream in)
  throws IOException, AdminProtocolException
    {
  try {
      Reader reader = new BufferedReader(new InputStreamReader(in));
      ResourceDescription descriptions[] =
    serializer.readResourceDescriptions(reader);
      if (descriptions.length < 1) {
    throw new AdminProtocolException("No resource found.");
      }
      return descriptions[0];
View Full Code Here


      resourceStack.push(new EmptyDescription(resourceclass,
                identifier));
     
  } else if (iname == iRESOURCE_TAG) {
      String resourceclass = attributes.getValue(CLASS_ATTR);
      resourceStack.push(new ResourceDescription(resourceclass));
      defsStack.push(new Vector(10));
      Vector vcls = new Vector(8);
      vcls.addElement(resourceclass);
      classes.push(vcls);
      interfaces.push(new Vector(8));
View Full Code Here

  throws SAXException
    {
  endCharacters();
  String iname = name.intern();
  if (iname == iRESOURCE_TAG) {
      ResourceDescription res = (ResourceDescription)resourceStack.pop();
      res.setAttributeDescriptions((Vector)defsStack.pop());
      Vector vresources = (Vector)resourceSetStack.peek();
      vresources.addElement(res);
      Vector vclasses = (Vector)classes.pop();
      res.setClassHierarchy(vclasses);
      Vector vinterfaces = (Vector)interfaces.pop();
      res.setInterfaces(vinterfaces);
  } else if (iname == iCHILDREN_TAG) {
      ResourceDescription res =
    (ResourceDescription)resourceStack.peek();
      res.setChildren(array);
  } else if (iname == iDESCR_TAG) {
      ResourceDescription res = (ResourceDescription)resourceStack.pop();
      Vector vresources = (Vector)resourceSetStack.peek();
      vresources.addElement(res);
  } else if (iname == iATTRIBUTE_TAG) {
      currentS = null;
  } else if (iname == iARRAY_TAG) {
      AttributeDescription ad =
    new AttributeDescription(currentA, currentA.unpickle(array));
      Vector attrs = (Vector)defsStack.peek();
      attrs.addElement(ad);
      currentA = null;
  } else if (iname == iRESARRAY_TAG) {
      Vector vframes = (Vector) resourceSetStack.pop();
      ResourceDescription frames[] =
    new ResourceDescription[vframes.size()];
      vframes.copyInto(frames);
      AttributeDescription ad =
    new AttributeDescription((Attribute)FAStack.pop(),
           frames);
View Full Code Here

      writer.write("' ");
      writer.write(CLASS_ATTR);
      writer.write("='");
      writer.write(classname);
      writer.write("' ");
      ResourceDescription frames[] = null;
      if (value == null)
    frames = new ResourceDescription[0];
      else
    frames = (ResourceDescription[]) value;
      int len = frames.length;
View Full Code Here

TOP

Related Classes of org.w3c.tools.resources.serialization.ResourceDescription

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.