Examples of SignatureTransformDataValue


Examples of org.apache.juddi.model.SignatureTransformDataValue

                SignatureTransform modelTransform = new SignatureTransform();
                modelTransform.setReference(ref);
                modelTransform.setTransform(apiTransform.getAlgorithm());

                for (Object xform : apiTransform.getContent()) {
                    SignatureTransformDataValue sdv = mapSignatureTransformDataValue(xform);
                    sdv.setSignatureTransform(modelTransform);
                    modelTransform.getSignatureTransformDataValue().add(sdv);
                }

                ref.getTransforms().add(modelTransform);
            }
View Full Code Here

Examples of org.apache.juddi.model.SignatureTransformDataValue

                transformKDV.setKeyDataType(String.class.getSimpleName());
                transformKDV.setKeyDataValue(retrievalMethodTypeKDV);
                transformKDV.setKeyDataValueString(tType.getAlgorithm());
               
                for (Object xform : tType.getContent()) {
                    SignatureTransformDataValue stdv = mapSignatureTransformDataValue(xform);
                    KeyDataValue transformContentKDV = new KeyDataValue();
                    transformContentKDV.setKeyDataType(stdv.getContentType());
                    transformContentKDV.setKeyDataValueBytes(stdv.getContentBytes());
                    transformContentKDV.setKeyDataValue(transformKDV);
                    transformKDV.getKeyDataValueList().add(transformContentKDV);
                }
               
                retrievalMethodTypeKDV.getKeyDataValueList().add(transformKDV);
View Full Code Here

Examples of org.apache.juddi.model.SignatureTransformDataValue

        }
        return spkiDataTypeKDV;
    }

    private static SignatureTransformDataValue mapSignatureTransformDataValue(Object xform) {
        SignatureTransformDataValue sdv = new SignatureTransformDataValue();
        if (xform instanceof String) {
            sdv.setContentType(String.class.getSimpleName());
            String xformStr = xform.toString();
            byte[] xformBytes = xformStr.getBytes();
            sdv.setContentBytes(xformBytes);
        } else if (xform instanceof Element) {
            sdv.setContentType(Element.class.getCanonicalName());
            Element xformEl = (Element)xform;
            String str = serializeTransformElement(xformEl);
            try {
                sdv.setContentBytes(str.getBytes("UTF-8"));
            } catch (Exception e) {
                throw new RuntimeException("Failed to encode string due to: " + e.getMessage(), e);
            }
        } else if (xform instanceof byte[]) {
            sdv.setContentType(byte[].class.getSimpleName());
            sdv.setContentBytes((byte[])xform);
        } else if (xform instanceof JAXBElement) {
            sdv.setContentType(Element.class.getCanonicalName());
            JAXBElement xformJAXB = (JAXBElement)xform;
            DOMResult domResult = new DOMResult();
            JAXB.marshal(xformJAXB, domResult);
            Element xformEl = ((Document)domResult.getNode()).getDocumentElement();
            String str = serializeTransformElement(xformEl);
            try {
                sdv.setContentBytes(str.getBytes("UTF-8"));
            } catch (Exception e) {
                throw new RuntimeException("Failed to encode string due to: " + e.getMessage(), e);
            }
        } else {
            throw new RuntimeException("Unrecognized type: " + xform.getClass().getCanonicalName());
View Full Code Here

Examples of org.apache.juddi.model.SignatureTransformDataValue

                        SignatureTransform modelTransform = new SignatureTransform();
                        modelTransform.setReference(ref);
                        modelTransform.setTransform(apiTransform.getAlgorithm());

                        for (Object xform : apiTransform.getContent()) {
                                SignatureTransformDataValue sdv = mapSignatureTransformDataValue(xform);
                                sdv.setSignatureTransform(modelTransform);
                                modelTransform.getSignatureTransformDataValue().add(sdv);
                        }

                        ref.getTransforms().add(modelTransform);
                }
View Full Code Here

Examples of org.apache.juddi.model.SignatureTransformDataValue

                                transformKDV.setKeyDataType(String.class.getSimpleName());
                                transformKDV.setKeyDataValue(retrievalMethodTypeKDV);
                                transformKDV.setKeyDataValueString(tType.getAlgorithm());

                                for (Object xform : tType.getContent()) {
                                        SignatureTransformDataValue stdv = mapSignatureTransformDataValue(xform);
                                        KeyDataValue transformContentKDV = new KeyDataValue();
                                        transformContentKDV.setKeyDataType(stdv.getContentType());
                                        transformContentKDV.setKeyDataValueBytes(stdv.getContentBytes());
                                        transformContentKDV.setKeyDataValue(transformKDV);
                                        transformKDV.getKeyDataValueList().add(transformContentKDV);
                                }

                                retrievalMethodTypeKDV.getKeyDataValueList().add(transformKDV);
View Full Code Here

Examples of org.apache.juddi.model.SignatureTransformDataValue

                }
                return spkiDataTypeKDV;
        }

        private static SignatureTransformDataValue mapSignatureTransformDataValue(Object xform) {
                SignatureTransformDataValue sdv = new SignatureTransformDataValue();
                if (xform instanceof String) {
                        sdv.setContentType(String.class.getSimpleName());
                        String xformStr = xform.toString();
                        byte[] xformBytes = xformStr.getBytes();
                        sdv.setContentBytes(xformBytes);
                } else if (xform instanceof Element) {
                        sdv.setContentType(Element.class.getCanonicalName());
                        Element xformEl = (Element) xform;
                        String str = serializeTransformElement(xformEl);
                        try {
                                sdv.setContentBytes(str.getBytes("UTF-8"));
                        } catch (Exception e) {
                                throw new RuntimeException("Failed to encode string due to: " + e.getMessage(), e);
                        }
                } else if (xform instanceof byte[]) {
                        sdv.setContentType(byte[].class.getSimpleName());
                        sdv.setContentBytes((byte[]) xform);
                } else if (xform instanceof JAXBElement) {
                        sdv.setContentType(Element.class.getCanonicalName());
                        JAXBElement xformJAXB = (JAXBElement) xform;
                        DOMResult domResult = new DOMResult();
                        JAXB.marshal(xformJAXB, domResult);
                        Element xformEl = ((Document) domResult.getNode()).getDocumentElement();
                        String str = serializeTransformElement(xformEl);
                        try {
                                sdv.setContentBytes(str.getBytes("UTF-8"));
                        } catch (Exception e) {
                                throw new RuntimeException("Failed to encode string due to: " + e.getMessage(), e);
                        }
                } else {
                        throw new RuntimeException("Unrecognized type: " + xform.getClass().getCanonicalName());
View Full Code Here

Examples of org.apache.juddi.model.SignatureTransformDataValue

                SignatureTransform modelTransform = new SignatureTransform();
                modelTransform.setReference(ref);
                modelTransform.setTransform(apiTransform.getAlgorithm());

                for (Object xform : apiTransform.getContent()) {
                    SignatureTransformDataValue sdv = mapSignatureTransformDataValue(xform);
                    sdv.setSignatureTransform(modelTransform);
                    modelTransform.getSignatureTransformDataValue().add(sdv);
                }

                ref.getTransforms().add(modelTransform);
            }
View Full Code Here

Examples of org.apache.juddi.model.SignatureTransformDataValue

                transformKDV.setKeyDataType(String.class.getSimpleName());
                transformKDV.setKeyDataValue(retrievalMethodTypeKDV);
                transformKDV.setKeyDataValueString(tType.getAlgorithm());
               
                for (Object xform : tType.getContent()) {
                    SignatureTransformDataValue stdv = mapSignatureTransformDataValue(xform);
                    KeyDataValue transformContentKDV = new KeyDataValue();
                    transformContentKDV.setKeyDataType(stdv.getContentType());
                    transformContentKDV.setKeyDataValueBytes(stdv.getContentBytes());
                    transformContentKDV.setKeyDataValue(transformKDV);
                    transformKDV.getKeyDataValueList().add(transformContentKDV);
                }
               
                retrievalMethodTypeKDV.getKeyDataValueList().add(transformKDV);
View Full Code Here

Examples of org.apache.juddi.model.SignatureTransformDataValue

        }
        return spkiDataTypeKDV;
    }

    private static SignatureTransformDataValue mapSignatureTransformDataValue(Object xform) {
        SignatureTransformDataValue sdv = new SignatureTransformDataValue();
        if (xform instanceof String) {
            sdv.setContentType(String.class.getSimpleName());
            String xformStr = xform.toString();
            byte[] xformBytes = xformStr.getBytes();
            sdv.setContentBytes(xformBytes);
        } else if (xform instanceof Element) {
            sdv.setContentType(Element.class.getCanonicalName());
            Element xformEl = (Element)xform;
            String str = serializeTransformElement(xformEl);
            try {
                sdv.setContentBytes(str.getBytes("UTF-8"));
            } catch (Exception e) {
                throw new RuntimeException("Failed to encode string due to: " + e.getMessage(), e);
            }
        } else if (xform instanceof byte[]) {
            sdv.setContentType(byte[].class.getSimpleName());
            sdv.setContentBytes((byte[])xform);
        } else if (xform instanceof JAXBElement) {
            sdv.setContentType(Element.class.getCanonicalName());
            JAXBElement xformJAXB = (JAXBElement)xform;
            DOMResult domResult = new DOMResult();
            JAXB.marshal(xformJAXB, domResult);
            Element xformEl = ((Document)domResult.getNode()).getDocumentElement();
            String str = serializeTransformElement(xformEl);
            try {
                sdv.setContentBytes(str.getBytes("UTF-8"));
            } catch (Exception e) {
                throw new RuntimeException("Failed to encode string due to: " + e.getMessage(), e);
            }
        } else {
            throw new RuntimeException("Unrecognized type: " + xform.getClass().getCanonicalName());
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.