public void addSubSchema(InputStream xmlSubSchema) throws SSOException, SMSException {
  SMSEntry.validateToken(ssm.getSSOToken());
  Document doc=SMSSchema.getXMLDocument(xmlSubSchema,false);
  NodeList nl=doc.getElementsByTagName(SMSUtils.SUB_SCHEMA);
  Set asNames=ss.getSubSchemaNames();
  for (int i=0; i < nl.getLength(); i++) {
    Node node=nl.item(i);
    String nodeName=XMLUtils.getNodeAttributeValue(node,SMSUtils.NAME);
    if (asNames.contains(nodeName)) {
      Object[] args={nodeName};
      throw (new SMSException(IUMSConstants.UMS_BUNDLE_NAME,"sms-subschema-already-exists",args));
    }
  }
  appendSubSchema(doc);
}

public void addSubSchema ( InputStream xmlSubSchema ) throws SSOException , SMSException { SMSEntry . validateToken ( ssm . getSSOToken ( ) ) ; Document doc = SMSSchema . getXMLDocument ( xmlSubSchema , false ) ; NodeList nl = doc . getElementsByTagName ( SMSUtils . SUB_SCHEMA ) ; Set asNames = ss . getSubSchemaNames ( ) ; for ( int i = 0 ; i < nl . getLength ( ) ; i ++ ) { Node node = nl . item ( i ) ; String nodeName = XMLUtils . getNodeAttributeValue ( node , SMSUtils . NAME ) ; if ( asNames . contains ( nodeName ) ) { Object [ ] args = { nodeName } ; throw ( new SMSException ( IUMSConstants . UMS_BUNDLE_NAME , "sms-subschema-already-exists" , args ) ) ; } } appendSubSchema ( doc ) ; }
adds the service ' s sub - schema given the xml input stream that follows the sms dtd .
