Java Code Examples for org.w3c.dom.Node.getNodeName()

The following are Jave code examples for showing how to use getNodeName() of the org.w3c.dom.Node class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: kaltura-ce-sakai-extension   File: KalturaYahooSyndicationFeed.java   Source Code and License Vote up 7 votes
public KalturaYahooSyndicationFeed(Element node) throws KalturaApiException {
    super(node);
    NodeList childNodes = node.getChildNodes();
    for (int i = 0; i < childNodes.getLength(); i++) {
        Node aNode = childNodes.item(i);
        String nodeName = aNode.getNodeName();
        String txt = aNode.getTextContent();
        if (nodeName.equals("category")) {
            this.category = KalturaYahooSyndicationFeedCategories.get(ParseUtils.parseString(txt));
            continue;
        } else if (nodeName.equals("adultContent")) {
            this.adultContent = KalturaYahooSyndicationFeedAdultValues.get(ParseUtils.parseString(txt));
            continue;
        } else if (nodeName.equals("feedDescription")) {
            this.feedDescription = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("feedLandingPage")) {
            this.feedLandingPage = ParseUtils.parseString(txt);
            continue;
        } 
    }
}
 
Example 2
Project: kaltura-ce-sakai-extension   File: KalturaContentDistributionSearchItem.java   Source Code and License Vote up 6 votes
public KalturaContentDistributionSearchItem(Element node) throws KalturaApiException {
    super(node);
    NodeList childNodes = node.getChildNodes();
    for (int i = 0; i < childNodes.getLength(); i++) {
        Node aNode = childNodes.item(i);
        String nodeName = aNode.getNodeName();
        String txt = aNode.getTextContent();
        if (nodeName.equals("noDistributionProfiles")) {
            this.noDistributionProfiles = ParseUtils.parseBool(txt);
            continue;
        } else if (nodeName.equals("distributionProfileId")) {
            this.distributionProfileId = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("distributionSunStatus")) {
            this.distributionSunStatus = KalturaEntryDistributionSunStatus.get(ParseUtils.parseInt(txt));
            continue;
        } else if (nodeName.equals("entryDistributionFlag")) {
            this.entryDistributionFlag = KalturaEntryDistributionFlag.get(ParseUtils.parseInt(txt));
            continue;
        } else if (nodeName.equals("entryDistributionStatus")) {
            this.entryDistributionStatus = KalturaEntryDistributionStatus.get(ParseUtils.parseInt(txt));
            continue;
        } else if (nodeName.equals("hasEntryDistributionValidationErrors")) {
            this.hasEntryDistributionValidationErrors = ParseUtils.parseBool(txt);
            continue;
        } else if (nodeName.equals("entryDistributionValidationErrors")) {
            this.entryDistributionValidationErrors = ParseUtils.parseString(txt);
            continue;
        } 
    }
}
 
Example 3
Project: kaltura-ce-sakai-extension   File: KalturaFlavorParamsOutputBaseFilter.java   Source Code and License Vote up 6 votes
public KalturaFlavorParamsOutputBaseFilter(Element node) throws KalturaApiException {
    super(node);
    NodeList childNodes = node.getChildNodes();
    for (int i = 0; i < childNodes.getLength(); i++) {
        Node aNode = childNodes.item(i);
        String nodeName = aNode.getNodeName();
        String txt = aNode.getTextContent();
        if (nodeName.equals("flavorParamsIdEqual")) {
            this.flavorParamsIdEqual = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("flavorParamsVersionEqual")) {
            this.flavorParamsVersionEqual = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("flavorAssetIdEqual")) {
            this.flavorAssetIdEqual = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("flavorAssetVersionEqual")) {
            this.flavorAssetVersionEqual = ParseUtils.parseString(txt);
            continue;
        } 
    }
}
 
Example 4
Project: incubator-netbeans   File: SpringXMLConfigEditorUtils.java   Source Code and License Vote up 6 votes
public static Node getBean(Node tag) {
    if (tag == null) {
        return null;
    }

    if (tag.getNodeName().equals(BeansElements.BEAN)) {
        return tag;
    }

    if (tag.getNodeName().equals(BeansElements.LOOKUP_METHOD)
            || tag.getNodeName().equals(BeansElements.REPLACED_METHOD)
            || tag.getNodeName().equals(BeansElements.PROPERTY)) {
        Node parent = tag.getParentNode();

        if (parent != null // to prevent NPE in case the node has just been created and not yet added to the tree
                && parent.getNodeName() != null // in cases that parent node is without node name (see #202319)
                && parent.getNodeName().equals(BeansElements.BEAN)) { // NOI18N
            return parent;
        } else {
            return null;
        }
    }

    return null;

}
 
Example 5
Project: kaltura-ce-sakai-extension   File: KalturaBaseSyndicationFeedListResponse.java   Source Code and License Vote up 5 votes
public KalturaBaseSyndicationFeedListResponse(Element node) throws KalturaApiException {
    NodeList childNodes = node.getChildNodes();
    for (int i = 0; i < childNodes.getLength(); i++) {
        Node aNode = childNodes.item(i);
        String nodeName = aNode.getNodeName();
        String txt = aNode.getTextContent();
        if (nodeName.equals("objects")) {
            this.objects = ParseUtils.parseArray(KalturaBaseSyndicationFeed.class, aNode);
            continue;
        } else if (nodeName.equals("totalCount")) {
            this.totalCount = ParseUtils.parseInt(txt);
            continue;
        } 
    }
}
 
Example 6
Project: fb2parser   File: Title.java   Source Code and License Vote up 5 votes
Title(Node root) {
    NodeList body = root.getChildNodes();
    for (int item = 0; item < body.getLength(); item++) {
        Node node = body.item(item);
        switch (node.getNodeName()) {
            case "p":
                paragraphs.add(new P(node));
                break;
        }
    }
}
 
Example 7
Project: kaltura-ce-sakai-extension   File: KalturaAdCuePointBaseFilter.java   Source Code and License Vote up 5 votes
public KalturaAdCuePointBaseFilter(Element node) throws KalturaApiException {
    super(node);
    NodeList childNodes = node.getChildNodes();
    for (int i = 0; i < childNodes.getLength(); i++) {
        Node aNode = childNodes.item(i);
        String nodeName = aNode.getNodeName();
        String txt = aNode.getTextContent();
        if (nodeName.equals("protocolTypeEqual")) {
            this.protocolTypeEqual = KalturaAdProtocolType.get(ParseUtils.parseString(txt));
            continue;
        } else if (nodeName.equals("protocolTypeIn")) {
            this.protocolTypeIn = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("titleLike")) {
            this.titleLike = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("titleMultiLikeOr")) {
            this.titleMultiLikeOr = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("titleMultiLikeAnd")) {
            this.titleMultiLikeAnd = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("endTimeGreaterThanOrEqual")) {
            this.endTimeGreaterThanOrEqual = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("endTimeLessThanOrEqual")) {
            this.endTimeLessThanOrEqual = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("durationGreaterThanOrEqual")) {
            this.durationGreaterThanOrEqual = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("durationLessThanOrEqual")) {
            this.durationLessThanOrEqual = ParseUtils.parseInt(txt);
            continue;
        } 
    }
}
 
Example 8
Project: kaltura-ce-sakai-extension   File: KalturaPermissionItem.java   Source Code and License Vote up 5 votes
public KalturaPermissionItem(Element node) throws KalturaApiException {
    NodeList childNodes = node.getChildNodes();
    for (int i = 0; i < childNodes.getLength(); i++) {
        Node aNode = childNodes.item(i);
        String nodeName = aNode.getNodeName();
        String txt = aNode.getTextContent();
        if (nodeName.equals("id")) {
            this.id = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("type")) {
            this.type = KalturaPermissionItemType.get(ParseUtils.parseString(txt));
            continue;
        } else if (nodeName.equals("partnerId")) {
            this.partnerId = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("tags")) {
            this.tags = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("createdAt")) {
            this.createdAt = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("updatedAt")) {
            this.updatedAt = ParseUtils.parseInt(txt);
            continue;
        } 
    }
}
 
Example 9
Project: Hydrograph   File: XMLUtil.java   Source Code and License Vote up 5 votes
private void computeXPath(Node node,XPathGridRow xPathGridRow,String computedXpath,List<GridRow> schemaRecords,String loopXPathQuery) {
	org.w3c.dom.NodeList nodeList=node.getChildNodes();
	
	if(!hasChild(node)){
		xPathGridRow.setXPath(computedXpath+node.getNodeName());
	
		if(StringUtils.isNotBlank(loopXPathQuery)){
			xPathGridRow.setAbsolutexPath(loopXPathQuery+Path.SEPARATOR+xPathGridRow.getXPath());
		}else{
			xPathGridRow.setAbsolutexPath(xPathGridRow.getXPath());
		}
		schemaRecords.add(xPathGridRow);
	}else{
		
		computedXpath=computedXpath+node.getNodeName()+Path.SEPARATOR;
		for(int i=0;i<nodeList.getLength();i++){
			Node nod = nodeList.item(i);
			
			if(nod.getNodeType()==Node.ELEMENT_NODE){
				XPathGridRow xPathGridRowChild=new XPathGridRow();
				String fieldName=nod.getNodeName();
				if(fieldName.contains(":")){
					fieldName=fieldName.split(":")[1];
				}
				xPathGridRowChild.setFieldName(fieldName);
	        	addDataTypeToGridRow(nod,xPathGridRowChild);
	        	xPathGridRowChild.setDateFormat("");
	        	xPathGridRowChild.setPrecision("");
	        	xPathGridRowChild.setScale("");
	        	xPathGridRowChild.setScaleType(Integer.valueOf(Constants.DEFAULT_INDEX_VALUE_FOR_COMBOBOX));
	        	xPathGridRowChild.setDescription("");
				computeXPath(nod,xPathGridRowChild,computedXpath,schemaRecords,loopXPathQuery);
			}
			
		}
		
	}
}
 
Example 10
Project: convertigo-engine   File: DOMNodePointer.java   Source Code and License Vote up 5 votes
/**
 * Get the local name of the specified node.
 * @param node node to check
 * @return String local name
 */
public static String getLocalName(Node node) {
    String localName = node.getLocalName();
    if (localName != null) {
        return localName;
    }

    String name = node.getNodeName();
    int index = name.lastIndexOf(':');
    return index < 0 ? name : name.substring(index + 1);
}
 
Example 11
Project: kaltura-ce-sakai-extension   File: KalturaDistributionValidationErrorMissingThumbnail.java   Source Code and License Vote up 5 votes
public KalturaDistributionValidationErrorMissingThumbnail(Element node) throws KalturaApiException {
    super(node);
    NodeList childNodes = node.getChildNodes();
    for (int i = 0; i < childNodes.getLength(); i++) {
        Node aNode = childNodes.item(i);
        String nodeName = aNode.getNodeName();
        if (nodeName.equals("dimensions")) {
            this.dimensions = ParseUtils.parseObject(KalturaDistributionThumbDimensions.class, aNode);
            continue;
        } 
    }
}
 
Example 12
Project: kaltura-ce-sakai-extension   File: KalturaFeatureStatus.java   Source Code and License Vote up 5 votes
public KalturaFeatureStatus(Element node) throws KalturaApiException {
    NodeList childNodes = node.getChildNodes();
    for (int i = 0; i < childNodes.getLength(); i++) {
        Node aNode = childNodes.item(i);
        String nodeName = aNode.getNodeName();
        String txt = aNode.getTextContent();
        if (nodeName.equals("type")) {
            this.type = KalturaFeatureStatusType.get(ParseUtils.parseInt(txt));
            continue;
        } else if (nodeName.equals("value")) {
            this.value = ParseUtils.parseInt(txt);
            continue;
        } 
    }
}
 
Example 13
Project: Svg2AndroidXml   File: Svg2Vector.java   Source Code and License Vote up 5 votes
private static void parseDimension(SvgTree avg, Node nNode) {
    NamedNodeMap a = nNode.getAttributes();
    int len = a.getLength();

    for (int i = 0; i < len; i++) {
        Node n = a.item(i);
        String name = n.getNodeName();
        String value = n.getNodeValue();
        int subStringSize = value.length();
        if (subStringSize > 2) {
            if (value.endsWith("px")) {
                subStringSize = subStringSize - 2;
            }
        }

        if (SVG_WIDTH.equals(name)) {
            avg.w = Float.parseFloat(value.substring(0, subStringSize));
        } else if (SVG_HEIGHT.equals(name)) {
            avg.h = Float.parseFloat(value.substring(0, subStringSize));
        } else if (SVG_VIEW_BOX.equals(name)) {
            avg.viewBox = new float[4];
            String[] strbox = value.split(" ");
            for (int j = 0; j < avg.viewBox.length; j++) {
                avg.viewBox[j] = Float.parseFloat(strbox[j]);
            }
        }
    }
    if (avg.viewBox == null && avg.w != 0 && avg.h != 0) {
        avg.viewBox = new float[4];
        avg.viewBox[2] = avg.w;
        avg.viewBox[3] = avg.h;
    }
}
 
Example 14
Project: kaltura-ce-sakai-extension   File: KalturaCEError.java   Source Code and License Vote up 5 votes
public KalturaCEError(Element node) throws KalturaApiException {
    NodeList childNodes = node.getChildNodes();
    for (int i = 0; i < childNodes.getLength(); i++) {
        Node aNode = childNodes.item(i);
        String nodeName = aNode.getNodeName();
        String txt = aNode.getTextContent();
        if (nodeName.equals("id")) {
            this.id = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("partnerId")) {
            this.partnerId = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("browser")) {
            this.browser = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("serverIp")) {
            this.serverIp = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("serverOs")) {
            this.serverOs = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("phpVersion")) {
            this.phpVersion = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("ceAdminEmail")) {
            this.ceAdminEmail = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("type")) {
            this.type = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("description")) {
            this.description = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("data")) {
            this.data = ParseUtils.parseString(txt);
            continue;
        } 
    }
}
 
Example 15
Project: kaltura-ce-sakai-extension   File: KalturaAssetBaseFilter.java   Source Code and License Vote up 4 votes
public KalturaAssetBaseFilter(Element node) throws KalturaApiException {
    super(node);
    NodeList childNodes = node.getChildNodes();
    for (int i = 0; i < childNodes.getLength(); i++) {
        Node aNode = childNodes.item(i);
        String nodeName = aNode.getNodeName();
        String txt = aNode.getTextContent();
        if (nodeName.equals("idEqual")) {
            this.idEqual = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("idIn")) {
            this.idIn = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("entryIdEqual")) {
            this.entryIdEqual = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("entryIdIn")) {
            this.entryIdIn = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("partnerIdEqual")) {
            this.partnerIdEqual = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("partnerIdIn")) {
            this.partnerIdIn = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("sizeGreaterThanOrEqual")) {
            this.sizeGreaterThanOrEqual = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("sizeLessThanOrEqual")) {
            this.sizeLessThanOrEqual = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("tagsLike")) {
            this.tagsLike = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("tagsMultiLikeOr")) {
            this.tagsMultiLikeOr = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("tagsMultiLikeAnd")) {
            this.tagsMultiLikeAnd = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("createdAtGreaterThanOrEqual")) {
            this.createdAtGreaterThanOrEqual = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("createdAtLessThanOrEqual")) {
            this.createdAtLessThanOrEqual = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("updatedAtGreaterThanOrEqual")) {
            this.updatedAtGreaterThanOrEqual = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("updatedAtLessThanOrEqual")) {
            this.updatedAtLessThanOrEqual = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("deletedAtGreaterThanOrEqual")) {
            this.deletedAtGreaterThanOrEqual = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("deletedAtLessThanOrEqual")) {
            this.deletedAtLessThanOrEqual = ParseUtils.parseInt(txt);
            continue;
        } 
    }
}
 
Example 16
Project: kaltura-ce-sakai-extension   File: KalturaCategoryUserBaseFilter.java   Source Code and License Vote up 4 votes
public KalturaCategoryUserBaseFilter(Element node) throws KalturaApiException {
    super(node);
    NodeList childNodes = node.getChildNodes();
    for (int i = 0; i < childNodes.getLength(); i++) {
        Node aNode = childNodes.item(i);
        String nodeName = aNode.getNodeName();
        String txt = aNode.getTextContent();
        if (nodeName.equals("categoryIdEqual")) {
            this.categoryIdEqual = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("categoryIdIn")) {
            this.categoryIdIn = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("userIdEqual")) {
            this.userIdEqual = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("userIdIn")) {
            this.userIdIn = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("permissionLevelEqual")) {
            this.permissionLevelEqual = KalturaCategoryUserPermissionLevel.get(ParseUtils.parseInt(txt));
            continue;
        } else if (nodeName.equals("permissionLevelIn")) {
            this.permissionLevelIn = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("statusEqual")) {
            this.statusEqual = KalturaCategoryUserStatus.get(ParseUtils.parseInt(txt));
            continue;
        } else if (nodeName.equals("statusIn")) {
            this.statusIn = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("createdAtGreaterThanOrEqual")) {
            this.createdAtGreaterThanOrEqual = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("createdAtLessThanOrEqual")) {
            this.createdAtLessThanOrEqual = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("updatedAtGreaterThanOrEqual")) {
            this.updatedAtGreaterThanOrEqual = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("updatedAtLessThanOrEqual")) {
            this.updatedAtLessThanOrEqual = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("updateMethodEqual")) {
            this.updateMethodEqual = KalturaUpdateMethodType.get(ParseUtils.parseInt(txt));
            continue;
        } else if (nodeName.equals("updateMethodIn")) {
            this.updateMethodIn = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("categoryFullIdsStartsWith")) {
            this.categoryFullIdsStartsWith = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("categoryFullIdsEqual")) {
            this.categoryFullIdsEqual = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("permissionNamesMatchAnd")) {
            this.permissionNamesMatchAnd = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("permissionNamesMatchOr")) {
            this.permissionNamesMatchOr = ParseUtils.parseString(txt);
            continue;
        } 
    }
}
 
Example 17
Project: kaltura-ce-sakai-extension   File: KalturaHttpNotificationDispatchJobData.java   Source Code and License Vote up 4 votes
public KalturaHttpNotificationDispatchJobData(Element node) throws KalturaApiException {
    super(node);
    NodeList childNodes = node.getChildNodes();
    for (int i = 0; i < childNodes.getLength(); i++) {
        Node aNode = childNodes.item(i);
        String nodeName = aNode.getNodeName();
        String txt = aNode.getTextContent();
        if (nodeName.equals("url")) {
            this.url = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("method")) {
            this.method = KalturaHttpNotificationMethod.get(ParseUtils.parseInt(txt));
            continue;
        } else if (nodeName.equals("data")) {
            this.data = ParseUtils.parseObject(KalturaHttpNotificationData.class, aNode);
            continue;
        } else if (nodeName.equals("timeout")) {
            this.timeout = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("connectTimeout")) {
            this.connectTimeout = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("username")) {
            this.username = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("password")) {
            this.password = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("authenticationMethod")) {
            this.authenticationMethod = KalturaHttpNotificationAuthenticationMethod.get(ParseUtils.parseInt(txt));
            continue;
        } else if (nodeName.equals("sslVersion")) {
            this.sslVersion = KalturaHttpNotificationSslVersion.get(ParseUtils.parseInt(txt));
            continue;
        } else if (nodeName.equals("sslCertificate")) {
            this.sslCertificate = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("sslCertificateType")) {
            this.sslCertificateType = KalturaHttpNotificationCertificateType.get(ParseUtils.parseString(txt));
            continue;
        } else if (nodeName.equals("sslCertificatePassword")) {
            this.sslCertificatePassword = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("sslEngine")) {
            this.sslEngine = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("sslEngineDefault")) {
            this.sslEngineDefault = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("sslKeyType")) {
            this.sslKeyType = KalturaHttpNotificationSslKeyType.get(ParseUtils.parseString(txt));
            continue;
        } else if (nodeName.equals("sslKey")) {
            this.sslKey = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("sslKeyPassword")) {
            this.sslKeyPassword = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("customHeaders")) {
            this.customHeaders = ParseUtils.parseArray(KalturaKeyValue.class, aNode);
            continue;
        } else if (nodeName.equals("contentParameters")) {
            this.contentParameters = ParseUtils.parseArray(KalturaKeyValue.class, aNode);
            continue;
        } 
    }
}
 
Example 18
Project: kaltura-ce-sakai-extension   File: KalturaDropFolderFile.java   Source Code and License Vote up 4 votes
public KalturaDropFolderFile(Element node) throws KalturaApiException {
    NodeList childNodes = node.getChildNodes();
    for (int i = 0; i < childNodes.getLength(); i++) {
        Node aNode = childNodes.item(i);
        String nodeName = aNode.getNodeName();
        String txt = aNode.getTextContent();
        if (nodeName.equals("id")) {
            this.id = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("partnerId")) {
            this.partnerId = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("dropFolderId")) {
            this.dropFolderId = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("fileName")) {
            this.fileName = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("fileSize")) {
            this.fileSize = ParseUtils.parseFloat(txt);
            continue;
        } else if (nodeName.equals("fileSizeLastSetAt")) {
            this.fileSizeLastSetAt = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("status")) {
            this.status = KalturaDropFolderFileStatus.get(ParseUtils.parseInt(txt));
            continue;
        } else if (nodeName.equals("parsedSlug")) {
            this.parsedSlug = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("parsedFlavor")) {
            this.parsedFlavor = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("leadDropFolderFileId")) {
            this.leadDropFolderFileId = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("deletedDropFolderFileId")) {
            this.deletedDropFolderFileId = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("entryId")) {
            this.entryId = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("errorCode")) {
            this.errorCode = KalturaDropFolderFileErrorCode.get(ParseUtils.parseString(txt));
            continue;
        } else if (nodeName.equals("errorDescription")) {
            this.errorDescription = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("lastModificationTime")) {
            this.lastModificationTime = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("createdAt")) {
            this.createdAt = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("updatedAt")) {
            this.updatedAt = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("uploadStartDetectedAt")) {
            this.uploadStartDetectedAt = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("uploadEndDetectedAt")) {
            this.uploadEndDetectedAt = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("importStartedAt")) {
            this.importStartedAt = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("importEndedAt")) {
            this.importEndedAt = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("batchJobId")) {
            this.batchJobId = ParseUtils.parseInt(txt);
            continue;
        } 
    }
}
 
Example 19
Project: kaltura-ce-sakai-extension   File: KalturaSystemPartnerUsageItem.java   Source Code and License Vote up 4 votes
public KalturaSystemPartnerUsageItem(Element node) throws KalturaApiException {
    NodeList childNodes = node.getChildNodes();
    for (int i = 0; i < childNodes.getLength(); i++) {
        Node aNode = childNodes.item(i);
        String nodeName = aNode.getNodeName();
        String txt = aNode.getTextContent();
        if (nodeName.equals("partnerId")) {
            this.partnerId = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("partnerName")) {
            this.partnerName = ParseUtils.parseString(txt);
            continue;
        } else if (nodeName.equals("partnerStatus")) {
            this.partnerStatus = KalturaPartnerStatus.get(ParseUtils.parseInt(txt));
            continue;
        } else if (nodeName.equals("partnerPackage")) {
            this.partnerPackage = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("partnerCreatedAt")) {
            this.partnerCreatedAt = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("views")) {
            this.views = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("plays")) {
            this.plays = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("entriesCount")) {
            this.entriesCount = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("totalEntriesCount")) {
            this.totalEntriesCount = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("videoEntriesCount")) {
            this.videoEntriesCount = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("imageEntriesCount")) {
            this.imageEntriesCount = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("audioEntriesCount")) {
            this.audioEntriesCount = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("mixEntriesCount")) {
            this.mixEntriesCount = ParseUtils.parseInt(txt);
            continue;
        } else if (nodeName.equals("bandwidth")) {
            this.bandwidth = ParseUtils.parseFloat(txt);
            continue;
        } else if (nodeName.equals("totalStorage")) {
            this.totalStorage = ParseUtils.parseFloat(txt);
            continue;
        } else if (nodeName.equals("storage")) {
            this.storage = ParseUtils.parseFloat(txt);
            continue;
        } else if (nodeName.equals("peakStorage")) {
            this.peakStorage = ParseUtils.parseFloat(txt);
            continue;
        } else if (nodeName.equals("avgStorage")) {
            this.avgStorage = ParseUtils.parseFloat(txt);
            continue;
        } else if (nodeName.equals("combinedBandwidthStorage")) {
            this.combinedBandwidthStorage = ParseUtils.parseFloat(txt);
            continue;
        } else if (nodeName.equals("deletedStorage")) {
            this.deletedStorage = ParseUtils.parseFloat(txt);
            continue;
        } 
    }
}
 
Example 20
Project: openjdk-jdk10   File: SOAPDocumentImpl.java   Source Code and License Vote up 3 votes
/**
 * Insert a mapping information for {@link org.w3c.dom.Node} - {@link javax.xml.soap.Node}.
 *
 * In SAAJ, elements in DOM are expected to be interfaces of SAAJ, on the other hand in JDKs Xerces,
 * they are casted to internal impl classes. After removal of SAAJ dependency
 * to JDKs internal classes elements in DOM can never be both of them.
 *
 * @param node SAAJ wrapper node for w3c DOM node
 */
public void register(javax.xml.soap.Node node) {
    final Node domElement = getDomNode(node);
    if (domElement.getUserData(SAAJ_NODE) != null) {
        throw new IllegalStateException("Element " + domElement.getNodeName()
                + " is already registered");
    }
    domElement.setUserData(SAAJ_NODE, node, null);
}