Package org.vfny.geoserver.global.xml

Examples of org.vfny.geoserver.global.xml.NameSpaceTranslator


        name = attributeType.getName();
        minOccurs = 1;
        maxOccurs = 1;

  NameSpaceTranslatorFactory nsFactory = NameSpaceTranslatorFactory.getInstance();
        NameSpaceTranslator nst = nsFactory.getNameSpaceTranslator("xs");
        NameSpaceElement nse = nst.getElement(name);
  if (nse == null) {
      nse = nst.getDefaultElement(attributeType.getType());
  }
        if (nse == null) {
      nst = nsFactory.getNameSpaceTranslator("gml");
      nse = nst.getElement(name);
      if (nse == null) {
    nse = nst.getDefaultElement(attributeType.getType());
      }
  }
     
  //System.out.println("creating new atypininfig for: " + attributeType +
  //       ", nse = " + nse);
View Full Code Here


        AttributeTypeInfoDTO dto = new AttributeTypeInfoDTO();
        dto.setName( attributeType.getName() );
        dto.setMinOccurs( isManditory(schemaBase, attributeType.getName() ) ? 1: 0 );
        dto.setMaxOccurs( 1 );
        dto.setNillable( attributeType.isNillable() );
        NameSpaceTranslator xs = NameSpaceTranslatorFactory.getInstance().getNameSpaceTranslator("xs");       
        NameSpaceTranslator gml = NameSpaceTranslatorFactory.getInstance().getNameSpaceTranslator("gml");
        NameSpaceElement element;
       
        element = xs.getElement( attributeType.getType(), attributeType.getName() );               
        if(element == null) element = gml.getElement( attributeType.getType(), attributeType.getName() );
        if(element == null) element = xs.getElement( "string" );
       
//    element = xs.getElement( attributeType.getName() );               
//    if(element == null) element = gml.getElement( attributeType.getName() );
//    if(element == null) element = xs.getElement( "string" );
View Full Code Here

        dto.setName( attributeName );
        dto.setMinOccurs( isManditory(schemaBase, attributeName ) ? 1: 0 );
        dto.setMaxOccurs( 1 );
        dto.setNillable( true ); // nillable by default?
       
        NameSpaceTranslator xs = NameSpaceTranslatorFactory.getInstance().getNameSpaceTranslator("xs");       
        NameSpaceTranslator gml = NameSpaceTranslatorFactory.getInstance().getNameSpaceTranslator("gml");
        NameSpaceElement element;
       
        element = xs.getElement( attributeName );               
        if(element == null) element = gml.getElement( attributeName );
        if(element == null) element = xs.getElement( "string" );
               
        dto.setComplex(false);
        dto.setType( element.getTypeRefName() );
        return dto;       
View Full Code Here

        dto.setLatLongBBox(new Envelope());
        dto.setName(schema.getTypeName());
        dto.setNumDecimals(8);
        dto.setSchemaAttributes(generateAttributes(schema));

        NameSpaceTranslator gml = NameSpaceTranslatorFactory.getInstance().getNameSpaceTranslator("gml");
        String schemaBase = gml.getElement("AbstractFeatureType").getQualifiedTypeDefName();               
        dto.setSchemaBase( schemaBase );
       
        dto.setSchemaName( dataStoreId.toUpperCase() + "_"
            + schema.getTypeName().toUpperCase() + "_TYPE");
        dto.setSRS(schema.getDefaultGeometry().getGeometryFactory().getSRID());
View Full Code Here

     * @param name attribute name
     * @param type attribtue type
     * @return List of NameSpaceElements is returned in the order of most specific to least specific.
     */
    public static List getElements(String name, Class type){
      NameSpaceTranslator xs = NameSpaceTranslatorFactory.getInstance().getNameSpaceTranslator("xs");       
      NameSpaceTranslator gml = NameSpaceTranslatorFactory.getInstance().getNameSpaceTranslator("gml");
      List result = new LinkedList();
     
      if(name==null || name == "")
        throw new NullPointerException("Element name must be defined.");
      if(type==null)
        throw new NullPointerException("Element type must be defined.");
     
      Set s = xs.getAssociatedTypes(type);
      s.addAll(xs.getAssociatedTypes(name));
      s.addAll(gml.getAssociatedTypes(type));
      s.addAll(gml.getAssociatedTypes(name));
      Iterator i = s.iterator();
      while(i.hasNext()){
          NameSpaceElement element = (NameSpaceElement)i.next();
          if(name.equals(element.getTypeDefName()))
            if(!result.contains(element)){
View Full Code Here

TOP

Related Classes of org.vfny.geoserver.global.xml.NameSpaceTranslator

Copyright © 2018 www.massapicom. 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.