private string FindDefaultWebPage(adlcp_rootv1p2.imscp.manifestType root)
 {
     if (root.Hasorganizations())
     {
         adlcp_rootv1p2.imscp.organizationsType orgs = root.Getorganizations();
         if (orgs.Hasorganization()) // its possible but fatal to have a blank "organizations" node
         {
             string org_default = "";
             if (orgs.Hasdefault2())
             {
                 org_default = orgs.default2.ToString();
                 var    org         = FindDefaultOrg(org_default, orgs);
                 string identifier1 = "";
                 if (org.Hasidentifier())
                 {
                     identifier1 = org.Getidentifier().ToString();
                 }
                 if (org.Hastitle())
                 {
                     title = org.Gettitle().ToString();
                 }
                 if (org.Hasitem())
                 {
                     int i = org.GetitemCount();
                     if (i > 0)
                     {
                         adlcp_itemType item = org.GetitemAt(0);
                         adlcp_rootv1p2.imscp.identifierrefType2 item_identifier = item.identifierref;
                         //
                         // find the resource for this item
                         //
                         adlcp_rootv1p2.imscp.resourceType resource = FindDefaultResource(item_identifier, root.resources);
                         if (resource.Hashref())
                         {
                             href = resource.href.ToString();
                             return(href);
                         }
                     }
                 }
             }
         }
     } // end of "organizations" object
     return("");
 }
Exemplo n.º 2
0
 public void InsertidentifierrefAt(identifierrefType2 newValue, int index)
 {
     InsertDomChildAt(NodeType.Attribute, "", "identifierref", index, newValue.ToString());
 }
Exemplo n.º 3
0
 public void ReplaceidentifierrefAt(identifierrefType2 newValue, int index)
 {
     ReplaceDomChildAt(NodeType.Attribute, "", "identifierref", index, newValue.ToString());
 }
Exemplo n.º 4
0
 public void Addidentifierref(identifierrefType2 newValue)
 {
     AppendDomChild(NodeType.Attribute, "", "identifierref", newValue.ToString());
 }