import javax.xml.parsers.ParserConfigurationException;
-import org.apache.commons.lang.StringUtils;
+
import org.onap.aai.config.SpringContextAware;
import org.onap.aai.edges.EdgeIngestor;
import org.onap.aai.edges.exceptions.EdgeRuleNotFoundException;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
-import com.google.common.base.CaseFormat;
-
public class HTMLfromOXM extends OxmFileProcessor {
private static final Logger logger = LoggerFactory.getLogger("HTMLfromOXM.class");
- public static final String LINE_SEPARATOR = System.getProperty("line.separator");
private String maxOccurs;
public String getDocumentHeader() {
StringBuffer sb = new StringBuffer();
logger.trace("processing starts");
- sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n");
+ sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>" + LINE_SEPARATOR);
String namespace = "org.onap";
if (v.compareTo(getSchemaVersions().getNamespaceChangeVersion()) < 0 ) {
namespace = "org.openecomp";
if ( versionUsesAnnotations(v.toString()) ) {
sb.append("<xs:schema elementFormDefault=\"qualified\" version=\"1.0\" targetNamespace=\"http://" + namespace + ".aai.inventory/"
+ v.toString() + "\" xmlns:tns=\"http://" + namespace + ".aai.inventory/" + v.toString() + "\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\""
- + "\n"
- + "xmlns:jaxb=\"http://java.sun.com/xml/ns/jaxb\"\r\n" +
- " jaxb:version=\"2.1\"\r\n" +
- " xmlns:annox=\"http://annox.dev.java.net\"\r\n" +
- " jaxb:extensionBindingPrefixes=\"annox\">\n\n");
+ + LINE_SEPARATOR
+ + "xmlns:jaxb=\"http://java.sun.com/xml/ns/jaxb\"" + LINE_SEPARATOR +
+ " jaxb:version=\"2.1\"" + LINE_SEPARATOR +
+ " xmlns:annox=\"http://annox.dev.java.net\"" + LINE_SEPARATOR +
+ " jaxb:extensionBindingPrefixes=\"annox\">" + DOUBLE_LINE_SEPARATOR);
} else {
sb.append("<xs:schema elementFormDefault=\"qualified\" version=\"1.0\" targetNamespace=\"http://" + namespace + ".aai.inventory/"
- + v.toString() + "\" xmlns:tns=\"http://" + namespace + ".aai.inventory/" + v.toString() + "\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">\n\n");
+ + v.toString() + "\" xmlns:tns=\"http://" + namespace + ".aai.inventory/" + v.toString() + "\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">" + DOUBLE_LINE_SEPARATOR);
}
return sb.toString();
}
-
@Override
public String process() throws ParserConfigurationException, SAXException, IOException, AAIException, FileNotFoundException, EdgeRuleNotFoundException {
StringBuilder sb = new StringBuilder();
+
try {
init();
} catch(Exception e) {
sb.append(processJavaTypeElement( javaTypeName, javaTypeElement, sbInventory ));
}
sb.append(sbInventory);
- sb.append(" </xs:sequence>\n");
- sb.append(" </xs:complexType>\n");
- sb.append(" </xs:element>\n");
- sb.append("</xs:schema>\n");
- StringBuilder invalidSb = new StringBuilder();
+ sb.append(" </xs:sequence>" + LINE_SEPARATOR);
+ sb.append(" </xs:complexType>" + LINE_SEPARATOR);
+ sb.append(" </xs:element>" + LINE_SEPARATOR);
+ sb.append("</xs:schema>" + LINE_SEPARATOR);
return sb.toString();
}
String pattern = "^[a-z0-9-]*$";
return name.matches(pattern);
}
+
+ protected boolean skipCheck( String javaAttribute ) {
+ if ( javaAttribute.equals("model")
+ || javaAttribute.equals("eventHeader") ) {
+ return true;
+ }
+ return false;
+ }
public String processJavaTypeElement( String javaTypeName, Element javaType_Element, StringBuilder sbInventory) {
String xmlRootElementName = getXMLRootElementName(javaType_Element);
if ( xmlElementNodes.getLength() > 0 ) {
if ( !processingInventory || !hasPreviousInventory ) {
- sb1.append(" <xs:element name=\"" + xmlRootElementName + "\">\n");
- sb1.append(" <xs:complexType>\n");
+ sb1.append(" <xs:element name=\"" + xmlRootElementName + "\">" + LINE_SEPARATOR);
+ sb1.append(" <xs:complexType>" + LINE_SEPARATOR);
XSDElement javaTypeElement = new XSDElement(javaType_Element, maxOccurs);
logger.debug("XSDElement name: "+javaTypeElement.name());
if(versionUsesAnnotations(v.toString())) {
sb1.append(javaTypeElement.getHTMLAnnotation("class", " "));
}
- sb1.append(" <xs:sequence>\n");
+ sb1.append(" <xs:sequence>" + LINE_SEPARATOR);
}
Element javatypeElement;
for ( int i = 0; i < xmlElementNodes.getLength(); ++i ) {
if ( elementType.contains("." + v.toString() + ".") && !generatedJavaType.containsKey(addType) ) {
generatedJavaType.put(addType, elementType);
javatypeElement = getJavaTypeElement(addType, processingInventory);
-
sb.append(processJavaTypeElement( addType, javatypeElement, null ));
}
if ("Nodes".equals(addType)) {
sb1.append(xmlElementElement.getHTMLElement(v, versionUsesAnnotations(v.toString()), this));
}
if ( !processingInventory ) {
- sb1.append(" </xs:sequence>\n");
- sb1.append(" </xs:complexType>\n");
- sb1.append(" </xs:element>\n");
+ sb1.append(" </xs:sequence>" + LINE_SEPARATOR);
+ sb1.append(" </xs:complexType>" + LINE_SEPARATOR);
+ sb1.append(" </xs:element>" + LINE_SEPARATOR);
}
}
if ( xmlElementNodes.getLength() < 1 ) {
- sb.append(" <xs:element name=\"" + xmlRootElementName + "\">\n");
- sb.append(" <xs:complexType>\n");
- sb.append(" <xs:sequence/>\n");
- sb.append(" </xs:complexType>\n");
- sb.append(" </xs:element>\n");
+ sb.append(" <xs:element name=\"" + xmlRootElementName + "\">" + LINE_SEPARATOR);
+ sb.append(" <xs:complexType>" + LINE_SEPARATOR);
+ sb.append(" <xs:sequence/>" + LINE_SEPARATOR);
+ sb.append(" </xs:complexType>" + LINE_SEPARATOR);
+ sb.append(" </xs:element>" + LINE_SEPARATOR);
generatedJavaType.put(javaTypeName, null);
return sb.toString();
}
}
return false;
}
-}
\ No newline at end of file
+}
import org.junit.Before;
import org.junit.BeforeClass;
+import org.junit.Ignore;
import org.junit.Test;
import org.onap.aai.config.SwaggerGenerationConfiguration;
import org.onap.aai.setup.SchemaVersion;
logger.debug(fileContent);
assertThat(fileContent, is(HTMLresult(0)));
}
-
+
@Test
public void testProcessWithCombiningJavaTypes() {
SchemaVersion v = schemaVersions.getAppRootVersion();
public String HTMLheader() {
StringBuilder sb = new StringBuilder(1500);
- sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n");
- sb.append("<xs:schema elementFormDefault=\"qualified\" version=\"1.0\" targetNamespace=\"http://org.onap.aai.inventory/v11\" xmlns:tns=\"http://org.onap.aai.inventory/v11\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\"\nxmlns:jaxb=\"http://java.sun.com/xml/ns/jaxb\"\r\n");
- sb.append(" jaxb:version=\"2.1\"\r\n");
- sb.append(" xmlns:annox=\"http://annox.dev.java.net\"\r\n");
- sb.append(" jaxb:extensionBindingPrefixes=\"annox\">\n\n");
+ sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append("<xs:schema elementFormDefault=\"qualified\" version=\"1.0\" targetNamespace=\"http://org.onap.aai.inventory/v11\" xmlns:tns=\"http://org.onap.aai.inventory/v11\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\"" + OxmFileProcessor.LINE_SEPARATOR + "xmlns:jaxb=\"http://java.sun.com/xml/ns/jaxb\"" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" jaxb:version=\"2.1\"" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" xmlns:annox=\"http://annox.dev.java.net\"" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" jaxb:extensionBindingPrefixes=\"annox\">" + OxmFileProcessor.DOUBLE_LINE_SEPARATOR);
return sb.toString();
}
}
public String HTMLdefs(int sbopt) {
StringBuilder sb = new StringBuilder(1500);
- sb.append(" <xs:element name=\"service-subscription\">\n");
- sb.append(" <xs:complexType>\n");
- sb.append(" <xs:annotation>\r\n");
- sb.append(" <xs:appinfo>\r\n");
- sb.append(" <annox:annotate target=\"class\">@org.onap.aai.annotations.Metadata(description=\"Object that group service instances.\",indexedProps=\"service-type\",dependentOn=\"customer\",container=\"service-subscriptions\",crossEntityReference=\"service-instance,service-type\")</annox:annotate>\r\n");
- sb.append(" </xs:appinfo>\r\n");
- sb.append(" </xs:annotation>\r\n");
- sb.append(" <xs:sequence>\n");
- sb.append(" <xs:element name=\"service-type\" type=\"xs:string\" minOccurs=\"0\">\n");
- sb.append(" <xs:annotation>\r\n");
- sb.append(" <xs:appinfo>\r\n");
- sb.append(" <annox:annotate target=\"field\">@org.onap.aai.annotations.Metadata(isKey=true,description=\"Value defined by orchestration to identify this service.\")</annox:annotate>\r\n");
- sb.append(" </xs:appinfo>\r\n");
- sb.append(" </xs:annotation>\r\n");
- sb.append(" </xs:element>\n");
- sb.append(" <xs:element name=\"temp-ub-sub-account-id\" type=\"xs:string\" minOccurs=\"0\">\n");
- sb.append(" <xs:annotation>\r\n");
- sb.append(" <xs:appinfo>\r\n");
- sb.append(" <annox:annotate target=\"field\">@org.onap.aai.annotations.Metadata(description=\"This property will be deleted from A&AI in the near future. Only stop gap solution.\")</annox:annotate>\r\n");
- sb.append(" </xs:appinfo>\r\n");
- sb.append(" </xs:annotation>\r\n");
- sb.append(" </xs:element>\n");
- sb.append(" <xs:element name=\"resource-version\" type=\"xs:string\" minOccurs=\"0\">\n");
- sb.append(" <xs:annotation>\r\n");
- sb.append(" <xs:appinfo>\r\n");
- sb.append(" <annox:annotate target=\"field\">@org.onap.aai.annotations.Metadata(description=\"Used for optimistic concurrency. Must be empty on create, valid on update and delete.\")</annox:annotate>\r\n");
- sb.append(" </xs:appinfo>\r\n");
- sb.append(" </xs:annotation>\r\n");
- sb.append(" </xs:element>\n");
- sb.append(" </xs:sequence>\n");
- sb.append(" </xs:complexType>\n");
- sb.append(" </xs:element>\n");
- sb.append(" <xs:element name=\"service-subscriptions\">\n");
- sb.append(" <xs:complexType>\n");
- sb.append(" <xs:annotation>\r\n");
- sb.append(" <xs:appinfo>\r\n");
- sb.append(" <annox:annotate target=\"class\">@org.onap.aai.annotations.Metadata(description=\"Collection of objects that group service instances.\")</annox:annotate>\r\n");
- sb.append(" </xs:appinfo>\r\n");
- sb.append(" </xs:annotation>\r\n");
- sb.append(" <xs:sequence>\n");
- sb.append(" <xs:element ref=\"tns:service-subscription\" minOccurs=\"0\" maxOccurs=\"5000\"/>\n");
- sb.append(" </xs:sequence>\n");
- sb.append(" </xs:complexType>\n");
- sb.append(" </xs:element>\n");
- sb.append(" <xs:element name=\"customer\">\n");
- sb.append(" <xs:complexType>\n");
- sb.append(" <xs:annotation>\r\n");
- sb.append(" <xs:appinfo>\r\n");
+ sb.append(" <xs:element name=\"service-subscription\">" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:complexType>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:annotation>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:appinfo>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <annox:annotate target=\"class\">@org.onap.aai.annotations.Metadata(description=\"Object that group service instances.\",indexedProps=\"service-type\",dependentOn=\"customer\",container=\"service-subscriptions\",crossEntityReference=\"service-instance,service-type\")</annox:annotate>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:appinfo>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:annotation>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:sequence>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:element name=\"service-type\" type=\"xs:string\" minOccurs=\"0\">" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:annotation>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:appinfo>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <annox:annotate target=\"field\">@org.onap.aai.annotations.Metadata(isKey=true,description=\"Value defined by orchestration to identify this service.\")</annox:annotate>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:appinfo>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:annotation>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:element>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:element name=\"temp-ub-sub-account-id\" type=\"xs:string\" minOccurs=\"0\">" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:annotation>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:appinfo>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <annox:annotate target=\"field\">@org.onap.aai.annotations.Metadata(description=\"This property will be deleted from A&AI in the near future. Only stop gap solution.\")</annox:annotate>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:appinfo>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:annotation>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:element>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:element name=\"resource-version\" type=\"xs:string\" minOccurs=\"0\">" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:annotation>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:appinfo>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <annox:annotate target=\"field\">@org.onap.aai.annotations.Metadata(description=\"Used for optimistic concurrency. Must be empty on create, valid on update and delete.\")</annox:annotate>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:appinfo>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:annotation>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:element>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:sequence>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:complexType>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:element>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:element name=\"service-subscriptions\">" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:complexType>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:annotation>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:appinfo>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <annox:annotate target=\"class\">@org.onap.aai.annotations.Metadata(description=\"Collection of objects that group service instances.\")</annox:annotate>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:appinfo>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:annotation>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:sequence>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:element ref=\"tns:service-subscription\" minOccurs=\"0\" maxOccurs=\"5000\"/>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:sequence>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:complexType>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:element>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:element name=\"customer\">" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:complexType>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:annotation>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:appinfo>" + OxmFileProcessor.LINE_SEPARATOR);
if ( sbopt == 0 ) {
- sb.append(" <annox:annotate target=\"class\">@org.onap.aai.annotations.Metadata(description=\"customer identifiers to provide linkage back to BSS information.\",nameProps=\"subscriber-name\",indexedProps=\"subscriber-name,global-customer-id,subscriber-type\",searchable=\"global-customer-id,subscriber-name\",uniqueProps=\"global-customer-id\",container=\"customers\",namespace=\"business\")</annox:annotate>\r\n");
+ sb.append(" <annox:annotate target=\"class\">@org.onap.aai.annotations.Metadata(description=\"customer identifiers to provide linkage back to BSS information.\",nameProps=\"subscriber-name\",indexedProps=\"subscriber-name,global-customer-id,subscriber-type\",searchable=\"global-customer-id,subscriber-name\",uniqueProps=\"global-customer-id\",container=\"customers\",namespace=\"business\")</annox:annotate>" + OxmFileProcessor.LINE_SEPARATOR);
} else {
- sb.append(" <annox:annotate target=\"class\">@org.onap.aai.annotations.Metadata(description=\"customer identifiers to provide linkage back to BSS information.\",nameProps=\"subscriber-name\",indexedProps=\"subscriber-type,subscriber-name,global-customer-id\",searchable=\"global-customer-id,subscriber-name\",uniqueProps=\"global-customer-id\",container=\"customers\",namespace=\"business\")</annox:annotate>\r\n");
+ sb.append(" <annox:annotate target=\"class\">@org.onap.aai.annotations.Metadata(description=\"customer identifiers to provide linkage back to BSS information.\",nameProps=\"subscriber-name\",indexedProps=\"subscriber-type,subscriber-name,global-customer-id\",searchable=\"global-customer-id,subscriber-name\",uniqueProps=\"global-customer-id\",container=\"customers\",namespace=\"business\")</annox:annotate>" + OxmFileProcessor.LINE_SEPARATOR);
}
- sb.append(" </xs:appinfo>\r\n");
- sb.append(" </xs:annotation>\r\n");
- sb.append(" <xs:sequence>\n");
- sb.append(" <xs:element name=\"global-customer-id\" type=\"xs:string\" minOccurs=\"0\">\n");
- sb.append(" <xs:annotation>\r\n");
- sb.append(" <xs:appinfo>\r\n");
- sb.append(" <annox:annotate target=\"field\">@org.onap.aai.annotations.Metadata(isKey=true,description=\"Global customer id used across to uniquely identify customer.\")</annox:annotate>\r\n");
- sb.append(" </xs:appinfo>\r\n");
- sb.append(" </xs:annotation>\r\n");
- sb.append(" </xs:element>\n");
- sb.append(" <xs:element name=\"subscriber-name\" type=\"xs:string\" minOccurs=\"0\">\n");
- sb.append(" <xs:annotation>\r\n");
- sb.append(" <xs:appinfo>\r\n");
- sb.append(" <annox:annotate target=\"field\">@org.onap.aai.annotations.Metadata(description=\"Subscriber name, an alternate way to retrieve a customer.\")</annox:annotate>\r\n");
- sb.append(" </xs:appinfo>\r\n");
- sb.append(" </xs:annotation>\r\n");
- sb.append(" </xs:element>\n");
+ sb.append(" </xs:appinfo>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:annotation>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:sequence>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:element name=\"global-customer-id\" type=\"xs:string\" minOccurs=\"0\">" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:annotation>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:appinfo>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <annox:annotate target=\"field\">@org.onap.aai.annotations.Metadata(isKey=true,description=\"Global customer id used across to uniquely identify customer.\")</annox:annotate>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:appinfo>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:annotation>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:element>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:element name=\"subscriber-name\" type=\"xs:string\" minOccurs=\"0\">" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:annotation>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:appinfo>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <annox:annotate target=\"field\">@org.onap.aai.annotations.Metadata(description=\"Subscriber name, an alternate way to retrieve a customer.\")</annox:annotate>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:appinfo>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:annotation>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:element>" + OxmFileProcessor.LINE_SEPARATOR);
if ( sbopt == 0 ) {
- sb.append(" <xs:element name=\"subscriber-type\" type=\"xs:string\" minOccurs=\"0\">\n");
- sb.append(" <xs:annotation>\r\n");
- sb.append(" <xs:appinfo>\r\n");
- sb.append(" <annox:annotate target=\"field\">@org.onap.aai.annotations.Metadata(description=\"Subscriber type, a way to provide VID with only the INFRA customers.\",defaultValue=\"CUST\")</annox:annotate>\r\n");
- sb.append(" </xs:appinfo>\r\n");
- sb.append(" </xs:annotation>\r\n");
- sb.append(" </xs:element>\n");
- sb.append(" <xs:element name=\"resource-version\" type=\"xs:string\" minOccurs=\"0\">\n");
- sb.append(" <xs:annotation>\r\n");
- sb.append(" <xs:appinfo>\r\n");
- sb.append(" <annox:annotate target=\"field\">@org.onap.aai.annotations.Metadata(description=\"Used for optimistic concurrency. Must be empty on create, valid on update and delete.\")</annox:annotate>\r\n");
- sb.append(" </xs:appinfo>\r\n");
- sb.append(" </xs:annotation>\r\n");
- sb.append(" </xs:element>\n");
+ sb.append(" <xs:element name=\"subscriber-type\" type=\"xs:string\" minOccurs=\"0\">" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:annotation>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:appinfo>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <annox:annotate target=\"field\">@org.onap.aai.annotations.Metadata(description=\"Subscriber type, a way to provide VID with only the INFRA customers.\",defaultValue=\"CUST\")</annox:annotate>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:appinfo>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:annotation>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:element>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:element name=\"resource-version\" type=\"xs:string\" minOccurs=\"0\">" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:annotation>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:appinfo>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <annox:annotate target=\"field\">@org.onap.aai.annotations.Metadata(description=\"Used for optimistic concurrency. Must be empty on create, valid on update and delete.\")</annox:annotate>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:appinfo>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:annotation>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:element>" + OxmFileProcessor.LINE_SEPARATOR);
} else {
- sb.append(" <xs:element name=\"resource-version\" type=\"xs:string\" minOccurs=\"0\">\n");
- sb.append(" <xs:annotation>\r\n");
- sb.append(" <xs:appinfo>\r\n");
- sb.append(" <annox:annotate target=\"field\">@org.onap.aai.annotations.Metadata(description=\"Used for optimistic concurrency. Must be empty on create, valid on update and delete.\")</annox:annotate>\r\n");
- sb.append(" </xs:appinfo>\r\n");
- sb.append(" </xs:annotation>\r\n");
- sb.append(" </xs:element>\n");
- sb.append(" <xs:element name=\"subscriber-type\" type=\"xs:string\" minOccurs=\"0\">\n");
- sb.append(" <xs:annotation>\r\n");
- sb.append(" <xs:appinfo>\r\n");
- sb.append(" <annox:annotate target=\"field\">@org.onap.aai.annotations.Metadata(description=\"Subscriber type, a way to provide VID with only the INFRA customers.\",defaultValue=\"CUST\")</annox:annotate>\r\n");
- sb.append(" </xs:appinfo>\r\n");
- sb.append(" </xs:annotation>\r\n");
- sb.append(" </xs:element>\n");
+ sb.append(" <xs:element name=\"resource-version\" type=\"xs:string\" minOccurs=\"0\">" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:annotation>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:appinfo>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <annox:annotate target=\"field\">@org.onap.aai.annotations.Metadata(description=\"Used for optimistic concurrency. Must be empty on create, valid on update and delete.\")</annox:annotate>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:appinfo>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:annotation>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:element>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:element name=\"subscriber-type\" type=\"xs:string\" minOccurs=\"0\">" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:annotation>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:appinfo>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <annox:annotate target=\"field\">@org.onap.aai.annotations.Metadata(description=\"Subscriber type, a way to provide VID with only the INFRA customers.\",defaultValue=\"CUST\")</annox:annotate>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:appinfo>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:annotation>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:element>" + OxmFileProcessor.LINE_SEPARATOR);
}
- sb.append(" <xs:element ref=\"tns:service-subscriptions\" minOccurs=\"0\"/>\n");
- sb.append(" </xs:sequence>\n");
- sb.append(" </xs:complexType>\n");
- sb.append(" </xs:element>\n");
- sb.append(" <xs:element name=\"customers\">\n");
- sb.append(" <xs:complexType>\n");
- sb.append(" <xs:annotation>\r\n");
- sb.append(" <xs:appinfo>\r\n");
- sb.append(" <annox:annotate target=\"class\">@org.onap.aai.annotations.Metadata(description=\"Collection of customer identifiers to provide linkage back to BSS information.\")</annox:annotate>\r\n");
- sb.append(" </xs:appinfo>\r\n");
- sb.append(" </xs:annotation>\r\n");
- sb.append(" <xs:sequence>\n");
- sb.append(" <xs:element ref=\"tns:customer\" minOccurs=\"0\" maxOccurs=\"5000\"/>\n");
- sb.append(" </xs:sequence>\n");
- sb.append(" </xs:complexType>\n");
- sb.append(" </xs:element>\n");
- sb.append(" <xs:element name=\"business\">\n");
- sb.append(" <xs:complexType>\n");
- sb.append(" <xs:annotation>\r\n");
- sb.append(" <xs:appinfo>\r\n");
- sb.append(" <annox:annotate target=\"class\">@org.onap.aai.annotations.Metadata(description=\"Namespace for business related constructs\")</annox:annotate>\r\n");
- sb.append(" </xs:appinfo>\r\n");
- sb.append(" </xs:annotation>\r\n");
- sb.append(" <xs:sequence>\n");
- sb.append(" <xs:element ref=\"tns:customers\" minOccurs=\"0\"/>\n");
- sb.append(" </xs:sequence>\n");
- sb.append(" </xs:complexType>\n");
- sb.append(" </xs:element>\n");
- sb.append(" <xs:element name=\"inventory\">\n");
- sb.append(" <xs:complexType>\n");
- sb.append(" <xs:sequence>\n");
- sb.append(" <xs:element ref=\"tns:business\" minOccurs=\"0\"/>\n");
- sb.append(" </xs:sequence>\n");
- sb.append(" </xs:complexType>\n");
- sb.append(" </xs:element>\n");
- sb.append("</xs:schema>\n");
+ sb.append(" <xs:element ref=\"tns:service-subscriptions\" minOccurs=\"0\"/>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:sequence>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:complexType>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:element>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:element name=\"customers\">" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:complexType>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:annotation>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:appinfo>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <annox:annotate target=\"class\">@org.onap.aai.annotations.Metadata(description=\"Collection of customer identifiers to provide linkage back to BSS information.\")</annox:annotate>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:appinfo>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:annotation>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:sequence>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:element ref=\"tns:customer\" minOccurs=\"0\" maxOccurs=\"5000\"/>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:sequence>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:complexType>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:element>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:element name=\"business\">" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:complexType>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:annotation>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:appinfo>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <annox:annotate target=\"class\">@org.onap.aai.annotations.Metadata(description=\"Namespace for business related constructs\")</annox:annotate>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:appinfo>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:annotation>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:sequence>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:element ref=\"tns:customers\" minOccurs=\"0\"/>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:sequence>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:complexType>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:element>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:element name=\"inventory\">" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:complexType>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:sequence>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" <xs:element ref=\"tns:business\" minOccurs=\"0\"/>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:sequence>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:complexType>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append(" </xs:element>" + OxmFileProcessor.LINE_SEPARATOR);
+ sb.append("</xs:schema>" + OxmFileProcessor.LINE_SEPARATOR);
return sb.toString();
}
}
+