com.prosysopc.ua.server
Class NodeManagerTable.ModelParserForUaDefinedTypes
java.lang.Object
org.xml.sax.helpers.DefaultHandler
com.prosysopc.ua.server.NodeManagerTable.ModelParserForUaDefinedTypes
- All Implemented Interfaces:
- ContentHandler, DTDHandler, EntityResolver, ErrorHandler
- Enclosing class:
- NodeManagerTable
public static class NodeManagerTable.ModelParserForUaDefinedTypes
- extends org.xml.sax.helpers.DefaultHandler
A class for reading XML and CSV model files and transforming them into OPC UA NodeManagement
Service Set Service calls.
This the old parser used for parsing the "old xml files". See ModelParser for the new
parser.
|
Constructor Summary |
NodeManagerTable.ModelParserForUaDefinedTypes(NodeManagerTable nodeManagerTable,
URL path,
Map<String,PredefinedIdPair> ids,
org.opcfoundation.ua.common.NamespaceTable nsTable)
Creates a new ModelParser with the handler and xmlPath specified |
NodeManagerTable.ModelParserForUaDefinedTypes(NodeManagerTable nodeManagerTable,
URL path,
Map<String,PredefinedIdPair> ids,
org.opcfoundation.ua.common.NamespaceTable nsTable,
Map<String,NodeManagerTable.ModelParserForUaDefinedTypes.ParentDefinition> parentIds)
|
|
Method Summary |
void |
characters(char[] ch,
int start,
int length)
|
void |
createModel()
|
void |
endElement(String uri,
String localName,
String name)
Creates the previously parsed model into the AddressSpaceHandler specified at initialization |
static Map<String,PredefinedIdPair> |
getCsvIds(URL file)
|
static Map<String,PredefinedIdPair> |
getIdentifierPairs()
|
static Map<Object,String> |
getReverseIdentifierPairs()
|
static Map<String,PredefinedIdPair> |
getStandardIds()
|
List<Exception> |
parseFile()
Reads a XML file and loads its information into a buffer |
void |
setTargetNamespace(String namespace)
|
void |
startElement(String uri,
String localName,
String name,
Attributes attributes)
|
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NodeManagerTable.ModelParserForUaDefinedTypes
public NodeManagerTable.ModelParserForUaDefinedTypes(NodeManagerTable nodeManagerTable,
URL path,
Map<String,PredefinedIdPair> ids,
org.opcfoundation.ua.common.NamespaceTable nsTable)
- Creates a new ModelParser with the handler and xmlPath specified
- Parameters:
nodeManagerUaNode - path -
NodeManagerTable.ModelParserForUaDefinedTypes
public NodeManagerTable.ModelParserForUaDefinedTypes(NodeManagerTable nodeManagerTable,
URL path,
Map<String,PredefinedIdPair> ids,
org.opcfoundation.ua.common.NamespaceTable nsTable,
Map<String,NodeManagerTable.ModelParserForUaDefinedTypes.ParentDefinition> parentIds)
getCsvIds
public static Map<String,PredefinedIdPair> getCsvIds(URL file)
throws NumberFormatException,
IllegalArgumentException,
IOException
- Throws:
NumberFormatException
IllegalArgumentException
IOException
getIdentifierPairs
public static Map<String,PredefinedIdPair> getIdentifierPairs()
getReverseIdentifierPairs
public static Map<Object,String> getReverseIdentifierPairs()
getStandardIds
public static Map<String,PredefinedIdPair> getStandardIds()
throws IOException,
IllegalArgumentException,
IllegalAccessException
- Throws:
IOException
IllegalAccessException
IllegalArgumentException
characters
public void characters(char[] ch,
int start,
int length)
throws SAXException
- Specified by:
characters in interface ContentHandler- Overrides:
characters in class org.xml.sax.helpers.DefaultHandler
- Throws:
SAXException
createModel
public void createModel()
throws org.opcfoundation.ua.common.ServiceResultException,
StatusException
- Throws:
StatusException
org.opcfoundation.ua.common.ServiceResultException
endElement
public void endElement(String uri,
String localName,
String name)
throws SAXException
- Creates the previously parsed model into the AddressSpaceHandler specified at initialization
- Specified by:
endElement in interface ContentHandler- Overrides:
endElement in class org.xml.sax.helpers.DefaultHandler
- Throws:
SAXException
parseFile
public List<Exception> parseFile()
- Reads a XML file and loads its information into a buffer
- Returns:
-
- Throws:
IOException
NumberFormatException
Exception
setTargetNamespace
public void setTargetNamespace(String namespace)
startElement
public void startElement(String uri,
String localName,
String name,
Attributes attributes)
throws SAXException
- Specified by:
startElement in interface ContentHandler- Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler
- Throws:
SAXException
Copyright © 2018. All rights reserved.