use of com.sun.xml.bind.validator.DOMLocator in project OpenAM by OpenRock.
the class UnmarshallerImpl method unmarshal.
public final Object unmarshal(Node node) throws JAXBException {
try {
DOMScanner scanner = new DOMScanner();
UnmarshallerHandler handler = new InterningUnmarshallerHandler(createUnmarshallerHandler(new DOMLocator(scanner)));
if (node instanceof Element)
scanner.parse((Element) node, handler);
else if (node instanceof Document)
scanner.parse(((Document) node).getDocumentElement(), handler);
else
// no other type of input is supported
throw new IllegalArgumentException();
return handler.getResult();
} catch (SAXException e) {
throw createUnmarshalException(e);
}
}
use of com.sun.xml.bind.validator.DOMLocator in project OpenAM by OpenRock.
the class UnmarshallerImpl method unmarshal.
public final Object unmarshal(Node node) throws JAXBException {
try {
DOMScanner scanner = new DOMScanner();
UnmarshallerHandler handler = new InterningUnmarshallerHandler(createUnmarshallerHandler(new DOMLocator(scanner)));
if (node instanceof Element)
scanner.parse((Element) node, handler);
else if (node instanceof Document)
scanner.parse(((Document) node).getDocumentElement(), handler);
else
// no other type of input is supported
throw new IllegalArgumentException();
return handler.getResult();
} catch (SAXException e) {
throw createUnmarshalException(e);
}
}
use of com.sun.xml.bind.validator.DOMLocator in project OpenAM by OpenRock.
the class UnmarshallerImpl method unmarshal.
public final Object unmarshal(Node node) throws JAXBException {
try {
DOMScanner scanner = new DOMScanner();
UnmarshallerHandler handler = new InterningUnmarshallerHandler(createUnmarshallerHandler(new DOMLocator(scanner)));
if (node instanceof Element)
scanner.parse((Element) node, handler);
else if (node instanceof Document)
scanner.parse(((Document) node).getDocumentElement(), handler);
else
// no other type of input is supported
throw new IllegalArgumentException();
return handler.getResult();
} catch (SAXException e) {
throw createUnmarshalException(e);
}
}
use of com.sun.xml.bind.validator.DOMLocator in project OpenAM by OpenRock.
the class UnmarshallerImpl method unmarshal.
public final Object unmarshal(Node node) throws JAXBException {
try {
DOMScanner scanner = new DOMScanner();
UnmarshallerHandler handler = new InterningUnmarshallerHandler(createUnmarshallerHandler(new DOMLocator(scanner)));
if (node instanceof Element)
scanner.parse((Element) node, handler);
else if (node instanceof Document)
scanner.parse(((Document) node).getDocumentElement(), handler);
else
// no other type of input is supported
throw new IllegalArgumentException();
return handler.getResult();
} catch (SAXException e) {
throw createUnmarshalException(e);
}
}
Aggregations